From 28dbae0dd041a115998fc17d1cf8faa0da365ec0 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 16 Dec 2010 00:33:12 +0000 Subject: [PATCH] Changes to get USB host driver compile git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3184 42af7a65-404d-4744-a932-0658087f49c3 --- arch/arm/src/lpc17xx/lpc17_usbhost.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/arch/arm/src/lpc17xx/lpc17_usbhost.c b/arch/arm/src/lpc17xx/lpc17_usbhost.c index 26bbb07589..c65415ca11 100755 --- a/arch/arm/src/lpc17xx/lpc17_usbhost.c +++ b/arch/arm/src/lpc17xx/lpc17_usbhost.c @@ -50,8 +50,8 @@ #include #include -#include #include +#include #include #include @@ -86,7 +86,7 @@ # define usbhost_dumpgpio() \ do { \ lpc17_dumpgpio(GPIO_USB_DP, "D+ P0.29; D- P0.30"); \ - lpc17_dumpgpio(GPIO_USB_UPLED, "LED P1:18; PPWR P1:19 PWRD P1:22 PVRCR P1:27); \ + lpc17_dumpgpio(GPIO_USB_UPLED, "LED P1:18; PPWR P1:19 PWRD P1:22 PVRCR P1:27"); \ } while (0); #else # define usbhost_dumpgpio() @@ -188,6 +188,12 @@ static int lpc17_usbinterrupt(int irq, FAR void *context); /* USB host controller operations **********************************************/ +/* Initializaion ***************************************************************/ + +static void usbhost_tdinit(volatile struct usbhost_hctd_s *td); +static void usbhost_edinit(volatile struct usbhost_hced_s *); +static void usbhost_hccainit(volatile struct usbhost_hcca_s *hcca); + /******************************************************************************* * Private Data *******************************************************************************/ @@ -421,7 +427,7 @@ void up_usbhostinitialize(void) usbhost_edinit(EDBulkOut); usbhost_tdinit(TDHead); usbhost_tdinit(TDTail); - usbhost_hccanit(Hcca); + usbhost_hccainit(Hcca); /* Wait 50MS then perform hardware reset */ @@ -457,7 +463,7 @@ void up_usbhostinitialize(void) /* Clear pending interrupts */ regval = lpc17_getreg(LPC17_USBHOST_INTST); - lpc17_putreg(revgval, LPC17_USBHOST_INTST); + lpc17_putreg(regval, LPC17_USBHOST_INTST); /* Enable OHCI interrupts */