diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-11-16 15:58:05 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-11-16 15:58:05 +0000 |
commit | a4b3688eff63f62a34dc4fc5a3e6f6666c4fdf38 (patch) | |
tree | 159c9d55dcbad2e704a0c3f3ada7e7cddad97958 | |
parent | 49c7861f0182a9cc9ced8426ddd600d3e218e899 (diff) | |
download | px4-nuttx-a4b3688eff63f62a34dc4fc5a3e6f6666c4fdf38.tar.gz px4-nuttx-a4b3688eff63f62a34dc4fc5a3e6f6666c4fdf38.tar.bz2 px4-nuttx-a4b3688eff63f62a34dc4fc5a3e6f6666c4fdf38.zip |
Addition DMA setup logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2262 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_sdio.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_sdio.c b/nuttx/arch/arm/src/stm32/stm32_sdio.c index d5a73ce67..3a128da10 100644 --- a/nuttx/arch/arm/src/stm32/stm32_sdio.c +++ b/nuttx/arch/arm/src/stm32/stm32_sdio.c @@ -1303,8 +1303,11 @@ static int tm32_dmareadsetup(FAR struct sdio_dev_s *dev, FAR ubyte *buffer, siz {
/* Configure the RX DMA */ - stm32_dmasetup(priv->dma, STM32_SDIO_FIFO, (uint32)buffer, - (buflen + 3) >> 2, SDIO_RXDMA16_CONFIG); + stm32_enableint(SDIO_MASK_DCRCFAILIE|SDIO_MASK_DTIMEOUTIE|SDIO_MASK_DATAENDIE|
+ SDIO_MASK_RXOVERRIE|SDIO_MASK_STBITERRIE);
+ putreg32(1, SDIO_DCTRL_DMAEN_BB)
+ stm32_dmasetup(priv->dma, STM32_SDIO_FIFO, (uint32)buffer, + (buflen + 3) >> 2, SDIO_RXDMA16_CONFIG); }
#endif
@@ -1331,10 +1334,13 @@ static int tm32_dmareadsetup(FAR struct sdio_dev_s *dev, FAR ubyte *buffer, siz static int stm32_dmawritesetup(FAR struct sdio_dev_s *dev,
FAR const ubyte *buffer, size_t buflen)
{
- /* Configure the RX DMA */ + /* Configure the TX DMA */ + stm32_enableint(SDIO_MASK_DCRCFAILIE|SDIO_MASK_DTIMEOUTIE|SDIO_MASK_DATAENDIE|
+ SDIO_MASK_TXUNDERRIE|SDIO_MASK_STBITERRIE);
stm32_dmasetup(priv->dma, STM32_SDIO_FIFO, (uint32)buffer, (buflen + 3) >> 2, SDIO_TXDMA16_CONFIG); + putreg32(1, SDIO_DCTRL_DMAEN_BB)
}
#endif
|