From 48cdbfe5baa7743fb6818b7e4b9e41d530592f32 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 14 Apr 2014 12:26:49 -0600 Subject: [PATCH] examples/touchscreen: Add a configuration option to indicate that there is or is not an architecture-specific initialization function --- arch/arm/src/stm32/stm32_otgfshost.c | 10 +++++----- configs/hymini-stm32v/nsh2/defconfig | 1 + configs/mikroe-stm32f4/fulldemo/defconfig | 1 + configs/olimex-lpc1766stk/hidmouse/defconfig | 1 + configs/sim/nsh2/defconfig | 1 + configs/sim/touchscreen/defconfig | 1 + drivers/usbhost/usbhost_enumerate.c | 2 +- 7 files changed, 11 insertions(+), 6 deletions(-) diff --git a/arch/arm/src/stm32/stm32_otgfshost.c b/arch/arm/src/stm32/stm32_otgfshost.c index b7d39f93f6..e43e246a0b 100644 --- a/arch/arm/src/stm32/stm32_otgfshost.c +++ b/arch/arm/src/stm32/stm32_otgfshost.c @@ -640,7 +640,7 @@ static int stm32_chan_alloc(FAR struct stm32_usbhost_s *priv) /* Search the table of channels */ - for (chidx = 0 ; chidx < STM32_NHOST_CHANNELS ; chidx++) + for (chidx = 0; chidx < STM32_NHOST_CHANNELS; chidx++) { /* Is this channel available? */ @@ -693,7 +693,7 @@ static inline void stm32_chan_freeall(FAR struct stm32_usbhost_s *priv) /* Free all host channels */ - for (chidx = 2; chidx < STM32_NHOST_CHANNELS ; chidx ++) + for (chidx = 2; chidx < STM32_NHOST_CHANNELS; chidx ++) { stm32_chan_free(priv, chidx); } @@ -3232,8 +3232,8 @@ static int stm32_enumerate(FAR struct usbhost_connection_s *conn, int rhpndx) /* Configure control channels */ - stm32_chan_configure(priv, priv->ep0out) ; - stm32_chan_configure(priv, priv->ep0in) ; + stm32_chan_configure(priv, priv->ep0out); + stm32_chan_configure(priv, priv->ep0in); /* Let the common usbhost_enumerate do all of the real work. Note that the * FunctionAddress (USB address) is hardcoded to one. @@ -3412,7 +3412,7 @@ static int stm32_epalloc(FAR struct usbhost_driver_s *drvr, /* Then configure the endpoint */ - stm32_chan_configure(priv, chidx) ; + stm32_chan_configure(priv, chidx); /* Return the index to the allocated channel as the endpoint "handle" */ diff --git a/configs/hymini-stm32v/nsh2/defconfig b/configs/hymini-stm32v/nsh2/defconfig index c95f1618c9..b76f27cf2f 100644 --- a/configs/hymini-stm32v/nsh2/defconfig +++ b/configs/hymini-stm32v/nsh2/defconfig @@ -720,6 +720,7 @@ CONFIG_EXAMPLES_NXIMAGE=y CONFIG_EXAMPLES_TOUCHSCREEN=y CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0 CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0" +CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set # CONFIG_EXAMPLES_USBSERIAL is not set diff --git a/configs/mikroe-stm32f4/fulldemo/defconfig b/configs/mikroe-stm32f4/fulldemo/defconfig index 84be85eb60..e51238b921 100644 --- a/configs/mikroe-stm32f4/fulldemo/defconfig +++ b/configs/mikroe-stm32f4/fulldemo/defconfig @@ -1009,6 +1009,7 @@ CONFIG_EXAMPLES_NX_NOTIFYSIGNO=4 CONFIG_EXAMPLES_TOUCHSCREEN=y CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0 CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0" +CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y # CONFIG_EXAMPLES_TOUCHSCREEN_MOUSE is not set # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set diff --git a/configs/olimex-lpc1766stk/hidmouse/defconfig b/configs/olimex-lpc1766stk/hidmouse/defconfig index c1c437825c..f4fd85821a 100644 --- a/configs/olimex-lpc1766stk/hidmouse/defconfig +++ b/configs/olimex-lpc1766stk/hidmouse/defconfig @@ -675,6 +675,7 @@ CONFIG_EXAMPLES_TOUCHSCREEN=y CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0 CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/mouse0" CONFIG_EXAMPLES_TOUCHSCREEN_MOUSE=y +CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_UIP is not set diff --git a/configs/sim/nsh2/defconfig b/configs/sim/nsh2/defconfig index 87c8c0b6a3..efb61a6881 100644 --- a/configs/sim/nsh2/defconfig +++ b/configs/sim/nsh2/defconfig @@ -520,6 +520,7 @@ CONFIG_EXAMPLES_NXLINES_BPP=32 CONFIG_EXAMPLES_TOUCHSCREEN=y CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0 CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0" +CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y # CONFIG_EXAMPLES_TOUCHSCREEN_MOUSE is not set # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set diff --git a/configs/sim/touchscreen/defconfig b/configs/sim/touchscreen/defconfig index bdb1b3d309..f9d98cb5ef 100644 --- a/configs/sim/touchscreen/defconfig +++ b/configs/sim/touchscreen/defconfig @@ -515,6 +515,7 @@ CONFIG_EXAMPLES_TOUCHSCREEN=y CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0 CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0" CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25 +CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y # CONFIG_EXAMPLES_TOUCHSCREEN_MOUSE is not set # CONFIG_EXAMPLES_UDP is not set # CONFIG_EXAMPLES_UIP is not set diff --git a/drivers/usbhost/usbhost_enumerate.c b/drivers/usbhost/usbhost_enumerate.c index 1857499ed2..d8bcc9c024 100644 --- a/drivers/usbhost/usbhost_enumerate.c +++ b/drivers/usbhost/usbhost_enumerate.c @@ -179,7 +179,7 @@ static inline int usbhost_configdesc(const uint8_t *configdesc, int cfglen, configdesc += cfgdesc->len; remaining = cfglen - cfgdesc->len; - /* Loop where there are more dscriptors to examine */ + /* Loop while there are more descriptors to examine */ memset(id, 0, sizeof(FAR struct usb_desc_s)); while (remaining >= sizeof(struct usb_desc_s))