From 8ffd2fe4eff9357e54573dab4369ea0f631545ae Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 30 Nov 2010 22:31:28 +0000 Subject: [PATCH] Fix dma-related register definitions git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3152 42af7a65-404d-4744-a932-0658087f49c3 --- arch/arm/src/lpc17xx/lpc17_usbdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/src/lpc17xx/lpc17_usbdev.c b/arch/arm/src/lpc17xx/lpc17_usbdev.c index b9bf2420c1e..a3bf002a729 100755 --- a/arch/arm/src/lpc17xx/lpc17_usbdev.c +++ b/arch/arm/src/lpc17xx/lpc17_usbdev.c @@ -2046,6 +2046,7 @@ static int lpc17_usbinterrupt(int irq, FAR void *context) uint32_t devintstatus; /* Sampled state of the device interrupt status register */ uint32_t epintstatus; /* Sampled state of the endpoint interrupt status register */ #ifdef CONFIG_LPC17_USBDEV_DMA + uint32_t usbintstatus; /* Sampled state is SYSCON USB interrupt status */ uint32_t dmaintstatus; /* Sampled state of dma interrupt status register */ #endif uint32_t softprio; /* Current priority interrupt bitset */ @@ -2061,7 +2062,8 @@ static int lpc17_usbinterrupt(int irq, FAR void *context) #ifdef CONFIG_LPC17_USBDEV_DMA /* Check for low priority and high priority (non-DMA) interrupts */ - if ((devintstatus & (USBDEV_INTST_REQLP|USBDEV_INTST_REQHP)) != 0) + usbintstatus = lpc17_getreg(LPC17_SYSCON_USBINTST); + if ((usbintstatus & (SYSCON_USBINTST_REQLP|SYSCON_USBINTST_REQHP)) != 0) { #endif #ifdef CONFIG_LPC17_USBDEV_EPFAST_INTERRUPT @@ -2309,7 +2311,7 @@ static int lpc17_usbinterrupt(int irq, FAR void *context) /* Check for DMA interrupts */ - if ((lpc17_getreg(LPC17_USBDEV_INTST) & USBDEV_INTST_REQDMA) != 0) + if (usbintstatus & SYSCON_USBINTST_REQDMA) != 0) { /* First Software High priority and then low priority */