From 038ae8031d2a4cd469bd2ef44b7563f5ad0f39b8 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 14 Jun 2015 08:52:39 -0600 Subject: [PATCH] Fix reversed arguments in SAML21 DMA logic --- arch/arm/src/samdl/sam_dmac.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/src/samdl/sam_dmac.c b/arch/arm/src/samdl/sam_dmac.c index 820417e8cd..f7151be5a1 100644 --- a/arch/arm/src/samdl/sam_dmac.c +++ b/arch/arm/src/samdl/sam_dmac.c @@ -476,6 +476,10 @@ static int sam_txbuffer(struct sam_dmach_s *dmach, uint32_t paddr, uint16_t btctrl; uint16_t btcnt; + /* Set up the Block Transfer Control Register configuration */ +#warning Missing logic + + /* Set up the Block Transfer Count Register configuration */ #warning Missing logic /* Add the new link list entry */ @@ -504,11 +508,15 @@ static int sam_rxbuffer(struct sam_dmach_s *dmach, uint32_t paddr, uint16_t btctrl; uint16_t btcnt; + /* Set up the Block Transfer Control Register configuration */ +#warning Missing logic + + /* Set up the Block Transfer Count Register configuration */ #warning Missing logic /* Add the new link list entry */ - if (!sam_allocdesc(dmach, dmach->lltail, btctrl, btcnt, maddr, paddr)) + if (!sam_allocdesc(dmach, dmach->lltail, btctrl, btcnt, paddr, maddr)) { return -ENOMEM; }