mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
stm32: Use the consistent type for stm32_dmacapable
This commit is contained in:
committed by
Xiang Xiao
parent
7999ff0633
commit
01abc41caf
@@ -743,7 +743,7 @@ size_t stm32_dmaresidual(DMA_HANDLE handle)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_DMACAPABLE
|
||||
bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr)
|
||||
bool stm32_dmacapable(uintptr_t maddr, uint32_t count, uint32_t ccr)
|
||||
{
|
||||
uint32_t transfer_size;
|
||||
uint32_t mend;
|
||||
|
||||
@@ -864,7 +864,7 @@ size_t stm32_dmaresidual(DMA_HANDLE handle)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_DMACAPABLE
|
||||
bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr)
|
||||
bool stm32_dmacapable(uintptr_t maddr, uint32_t count, uint32_t ccr)
|
||||
{
|
||||
uint32_t transfer_size;
|
||||
uint32_t burst_length;
|
||||
|
||||
@@ -1797,9 +1797,9 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
|
||||
|
||||
#ifdef CONFIG_STM32_DMACAPABLE
|
||||
if ((txbuffer && priv->txbuf == 0 &&
|
||||
!stm32_dmacapable((uint32_t)txbuffer, nwords, priv->txccr)) ||
|
||||
!stm32_dmacapable((uintptr_t)txbuffer, nwords, priv->txccr)) ||
|
||||
(rxbuffer && priv->rxbuf == 0 &&
|
||||
!stm32_dmacapable((uint32_t)rxbuffer, nwords, priv->rxccr)))
|
||||
!stm32_dmacapable((uintptr_t)rxbuffer, nwords, priv->rxccr)))
|
||||
{
|
||||
/* Unsupported memory region fall back to non-DMA method. */
|
||||
|
||||
|
||||
@@ -650,7 +650,7 @@ size_t stm32_dmaresidual(DMA_HANDLE handle)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32F0L0G0_DMACAPABLE
|
||||
bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr)
|
||||
bool stm32_dmacapable(uintptr_t maddr, uint32_t count, uint32_t ccr)
|
||||
{
|
||||
uint32_t transfer_size;
|
||||
uint32_t mend;
|
||||
|
||||
@@ -1408,9 +1408,9 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
|
||||
|
||||
#ifdef CONFIG_STM32F0L0G0_DMACAPABLE
|
||||
if ((txbuffer &&
|
||||
!stm32_dmacapable((uint32_t)txbuffer, nwords, priv->txccr)) ||
|
||||
!stm32_dmacapable((uintptr_t)txbuffer, nwords, priv->txccr)) ||
|
||||
(rxbuffer &&
|
||||
!stm32_dmacapable((uint32_t)rxbuffer, nwords, priv->rxccr)))
|
||||
!stm32_dmacapable((uintptr_t)rxbuffer, nwords, priv->rxccr)))
|
||||
{
|
||||
/* Unsupported memory region, fall back to non-DMA method. */
|
||||
|
||||
|
||||
@@ -875,7 +875,7 @@ size_t stm32_dmaresidual(DMA_HANDLE handle)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32F7_DMACAPABLE
|
||||
bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr)
|
||||
bool stm32_dmacapable(uintptr_t maddr, uint32_t count, uint32_t ccr)
|
||||
{
|
||||
uint32_t transfer_size;
|
||||
uint32_t burst_length;
|
||||
|
||||
@@ -1820,9 +1820,9 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
|
||||
/* If this bus uses a in driver DMA aligned buffers we can skip the test */
|
||||
|
||||
if ((txbuffer && priv->txbuf == 0 &&
|
||||
!stm32_dmacapable((uint32_t)txbuffer, nwords, priv->txccr)) ||
|
||||
!stm32_dmacapable((uintptr_t)txbuffer, nwords, priv->txccr)) ||
|
||||
(rxbuffer && priv->rxbuf == 0 &&
|
||||
!stm32_dmacapable((uint32_t)rxbuffer, nwords, priv->rxccr)))
|
||||
!stm32_dmacapable((uintptr_t)rxbuffer, nwords, priv->rxccr)))
|
||||
{
|
||||
/* Unsupported memory region or not in driver buffers
|
||||
* fall back to non-DMA method.
|
||||
|
||||
Reference in New Issue
Block a user