mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 17:33:08 +08:00
Port hub support to LPC31 from SAMA5; Updated Olimex-LPC-H3131 for hub support and refresh configurations
This commit is contained in:
@@ -2951,7 +2951,7 @@ static void lpc17_asynch_completion(struct lpc17_usbhost_s *priv,
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
* Name: lcp17_asynch
|
||||
* Name: lpc17_asynch
|
||||
*
|
||||
* Description:
|
||||
* Process a request to handle a transfer descriptor. This method will
|
||||
|
||||
@@ -60,6 +60,7 @@ config LPC31_SPI
|
||||
config LPC31_USBOTG
|
||||
bool "USB OTG"
|
||||
default n
|
||||
select USBHOST_HAVE_ASYNCH
|
||||
|
||||
config LPC31_MCI
|
||||
bool "MCI"
|
||||
|
||||
+338
-173
File diff suppressed because it is too large
Load Diff
@@ -257,7 +257,7 @@ struct sam_ehci_s
|
||||
volatile struct usbhost_hubport_s *hport;
|
||||
#endif
|
||||
|
||||
/* Root hub ports */
|
||||
/* Root hub ports */
|
||||
|
||||
struct sam_rhport_s rhport[SAM_EHCI_NRHPORT];
|
||||
};
|
||||
@@ -392,23 +392,20 @@ static int sam_ioalloc(FAR struct usbhost_driver_s *drvr,
|
||||
FAR uint8_t **buffer, size_t buflen);
|
||||
static int sam_iofree(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer);
|
||||
static int sam_ctrlin(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0,
|
||||
FAR const struct usb_ctrlreq_s *req,
|
||||
FAR uint8_t *buffer);
|
||||
FAR const struct usb_ctrlreq_s *req, FAR uint8_t *buffer);
|
||||
static int sam_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0,
|
||||
FAR const struct usb_ctrlreq_s *req,
|
||||
FAR const uint8_t *buffer);
|
||||
FAR const struct usb_ctrlreq_s *req, FAR const uint8_t *buffer);
|
||||
static int sam_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep,
|
||||
FAR uint8_t *buffer, size_t buflen);
|
||||
#ifdef CONFIG_USBHOST_ASYNCH
|
||||
static int sam_asynch(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep,
|
||||
FAR uint8_t *buffer, size_t buflen,
|
||||
usbhost_asynch_t callback, FAR void *arg);
|
||||
FAR uint8_t *buffer, size_t buflen, usbhost_asynch_t callback,
|
||||
FAR void *arg);
|
||||
static int sam_cancel(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep);
|
||||
#endif
|
||||
#ifdef CONFIG_USBHOST_HUB
|
||||
static int sam_connect(FAR struct usbhost_driver_s *drvr,
|
||||
FAR struct usbhost_hubport_s *hport,
|
||||
bool connected);
|
||||
FAR struct usbhost_hubport_s *hport, bool connected);
|
||||
#endif
|
||||
static void sam_disconnect(FAR struct usbhost_driver_s *drvr);
|
||||
|
||||
@@ -2638,6 +2635,7 @@ static inline void sam_ioc_bottomhalf(void)
|
||||
static inline void sam_portsc_bottomhalf(void)
|
||||
{
|
||||
struct sam_rhport_s *rhport;
|
||||
struct usbhost_hubport_s *hport;
|
||||
uint32_t portsc;
|
||||
int rhpndx;
|
||||
|
||||
@@ -2699,12 +2697,13 @@ static inline void sam_portsc_bottomhalf(void)
|
||||
|
||||
/* Are we bound to a class instance? */
|
||||
|
||||
if (rhport->hport.devclass)
|
||||
hport = &rhport->hport.hport;
|
||||
if (hport->devclass)
|
||||
{
|
||||
/* Yes.. Disconnect the class */
|
||||
|
||||
CLASS_DISCONNECTED(rhport->hport.devclass);
|
||||
rhport->hport.devclass = NULL;
|
||||
CLASS_DISCONNECTED(hport->devclass);
|
||||
hport->devclass = NULL;
|
||||
}
|
||||
|
||||
/* Notify any waiters for the Root Hub Status change
|
||||
@@ -3036,20 +3035,25 @@ static int sam_wait(FAR struct usbhost_connection_s *conn,
|
||||
|
||||
for (rhpndx = 0; rhpndx < SAM_EHCI_NRHPORT; rhpndx++)
|
||||
{
|
||||
struct lpc31_rhport_s *rhport;
|
||||
struct usbhost_hubport_s *connport;
|
||||
|
||||
/* Has the connection state changed on the RH port? */
|
||||
|
||||
if (g_ehci.rhport[rhpndx].hport.connected != connected[rhpndx])
|
||||
rhport = &g_ehci.rhport[rhpndx];
|
||||
connport = &rhport->hport.hport;
|
||||
if (rhport->connected != connport->connected)
|
||||
{
|
||||
/* Yes.. Return the RH port to inform the caller which
|
||||
* port has the connection change.
|
||||
*/
|
||||
|
||||
*hport = &g_ehci.rhport[rhpndx].hport;
|
||||
connport->connected = rhport->connected;
|
||||
*hport = connport;
|
||||
irqrestore(flags);
|
||||
|
||||
usbhost_vtrace2(EHCI_VTRACE2_MONWAKEUP,
|
||||
rhpndx + 1,
|
||||
g_ehci.rhport[rhpndx].hport.connected);
|
||||
rhpndx + 1, rhport->conected);
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
@@ -3059,14 +3063,14 @@ static int sam_wait(FAR struct usbhost_connection_s *conn,
|
||||
|
||||
if (g_ehci.hport)
|
||||
{
|
||||
FAR volatile struct usbhost_hubport_s *connport;
|
||||
volatile struct usbhost_hubport_s *connport;
|
||||
|
||||
/* Yes.. return the external hub port */
|
||||
|
||||
connport = g_ehci.hport;
|
||||
g_ehci.hport = NULL;
|
||||
|
||||
*hport = connport;
|
||||
*hport = (struct usbhost_hubport_s *)connport;
|
||||
irqrestore(flags);
|
||||
|
||||
usbhost_vtrace2(EHCI_VTRACE2_MONWAKEUP,
|
||||
@@ -3119,7 +3123,6 @@ static int sam_rh_enumerate(FAR struct usbhost_connection_s *conn,
|
||||
volatile uint32_t *regaddr;
|
||||
uint32_t regval;
|
||||
int rhpndx;
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(conn != NULL && hport != NULL);
|
||||
rhpndx = hport->port;
|
||||
@@ -3690,7 +3693,6 @@ static int sam_iofree(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer)
|
||||
* Name: sam_ctrlin and sam_ctrlout
|
||||
*
|
||||
* Description:
|
||||
* Description:
|
||||
* Process a IN or OUT request on the control endpoint. These methods
|
||||
* will enqueue the request and wait for it to complete. Only one transfer may be
|
||||
* queued; Neither these methods nor the transfer() method can be called again
|
||||
@@ -3847,7 +3849,7 @@ static int sam_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep,
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Name: lcp17_asynch
|
||||
* Name: lpc17_asynch
|
||||
*
|
||||
* Description:
|
||||
* Process a request to handle a transfer descriptor. This method will
|
||||
@@ -3998,7 +4000,7 @@ static void sam_disconnect(FAR struct usbhost_driver_s *drvr)
|
||||
/* Unbind the class */
|
||||
/* REVISIT: Is there more that needs to be done? */
|
||||
|
||||
rhport->hport.devclass = NULL;
|
||||
rhport->hport.hport.devclass = NULL;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -4010,7 +4012,7 @@ static void sam_disconnect(FAR struct usbhost_driver_s *drvr)
|
||||
* Description:
|
||||
* Set the HCRESET bit in the USBCMD register to reset the EHCI hardware.
|
||||
*
|
||||
* Table 2-9. USBCMD – USB Command Register Bit Definitions
|
||||
* Table 2-9. USBCMD - USB Command Register Bit Definitions
|
||||
*
|
||||
* "Host Controller Reset (HCRESET) ... This control bit is used by software
|
||||
* to reset the host controller. The effects of this on Root Hub registers
|
||||
@@ -4042,7 +4044,7 @@ static void sam_disconnect(FAR struct usbhost_driver_s *drvr)
|
||||
* on failure.
|
||||
*
|
||||
* Assumptions:
|
||||
* - Called during the initializaation of the EHCI.
|
||||
* - Called during the initialization of the EHCI.
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
@@ -648,7 +648,7 @@ Configurations
|
||||
RAMTest: Pattern test: 30000000 33554432 33333333 cccccccc
|
||||
RAMTest: Address-in-address test: 30000000 33554432
|
||||
|
||||
4. This configuration has been used to test USB host functionaly. USB
|
||||
4. This configuration has been used to test USB host functionality. USB
|
||||
host is *not* enabled by default. If you will to enable USB host
|
||||
support in the NSH configuration, please modify the NuttX
|
||||
configuration as follows:
|
||||
@@ -657,7 +657,7 @@ Configurations
|
||||
|
||||
Drivers -> USB Host Driver Support
|
||||
CONFIG_USBHOST=y : General USB host support
|
||||
CONFIG_USBHOST_INT_DISABLE=y : Not needed (unless you use the keyboard)
|
||||
CONFIG_USBHOST_INT_DISABLE=n : Interrupt EPs need with hub, HID keyboard, and HID mouse
|
||||
CONFIG_USBHOST_ISOC_DISABLE=y : Not needed (or supported)
|
||||
|
||||
System Type -> Peripherals
|
||||
@@ -667,11 +667,24 @@ Configurations
|
||||
CONFIG_LPC31_EHCI_BUFSIZE=128
|
||||
CONFIG_LPC31_EHCI_PREALLOCATE=y
|
||||
|
||||
Library Routines
|
||||
RTOS Features -> Work Queue Support
|
||||
CONFIG_SCHED_WORKQUEUE=y : Work queue support is needed
|
||||
CONFIG_SCHED_HPWORKSTACKSIZE=1536
|
||||
|
||||
b. USB Mass Storage Class. With this class enabled, you can support
|
||||
b. Hub Support.
|
||||
|
||||
Drivers -> USB Host Driver Support
|
||||
CONFIG_USBHOST_INT_DISABLE=n : Interrupt endpoint support needed
|
||||
CONFIG_USBHOST_HUB=y : Enable the hub class
|
||||
CONFIG_USBHOST_ASYNCH=y : Asynchonous I/O supported needed for hubs
|
||||
|
||||
System Type -> USB host configuration
|
||||
To be provided
|
||||
|
||||
Logic nesting becomes deeper with a hub and it may also be
|
||||
necessary to increase some stack sizes.
|
||||
|
||||
c. USB Mass Storage Class. With this class enabled, you can support
|
||||
connection of USB FLASH storage drives. Support for the USB
|
||||
mass storage class is enabled like this:
|
||||
|
||||
@@ -718,7 +731,7 @@ Configurations
|
||||
|
||||
nsh> umount /mnt/flash
|
||||
|
||||
c. HID Keyboard support. The following support will enable support
|
||||
d. HID Keyboard support. The following support will enable support
|
||||
for certain keyboard devices (only the so-called "boot" keyboard
|
||||
class is supported):
|
||||
|
||||
|
||||
@@ -46,8 +46,9 @@ CONFIG_RAW_BINARY=y
|
||||
# Debug Options
|
||||
#
|
||||
# CONFIG_DEBUG is not set
|
||||
CONFIG_ARCH_HAVE_STACKCHECK=y
|
||||
# CONFIG_ARCH_HAVE_HEAPCHECK is not set
|
||||
CONFIG_ARCH_HAVE_STACKCHECK=y
|
||||
# CONFIG_STACK_COLORATION is not set
|
||||
# CONFIG_DEBUG_SYMBOLS is not set
|
||||
CONFIG_ARCH_HAVE_CUSTOMOPT=y
|
||||
# CONFIG_DEBUG_NOOPT is not set
|
||||
@@ -76,6 +77,7 @@ CONFIG_ARCH="arm"
|
||||
# CONFIG_ARCH_CHIP_C5471 is not set
|
||||
# CONFIG_ARCH_CHIP_CALYPSO is not set
|
||||
# CONFIG_ARCH_CHIP_DM320 is not set
|
||||
# CONFIG_ARCH_CHIP_EFM32 is not set
|
||||
# CONFIG_ARCH_CHIP_IMX is not set
|
||||
# CONFIG_ARCH_CHIP_KINETIS is not set
|
||||
# CONFIG_ARCH_CHIP_KL is not set
|
||||
@@ -90,6 +92,7 @@ CONFIG_ARCH_CHIP_LPC31XX=y
|
||||
# CONFIG_ARCH_CHIP_SAMA5 is not set
|
||||
# CONFIG_ARCH_CHIP_SAMD is not set
|
||||
# CONFIG_ARCH_CHIP_SAM34 is not set
|
||||
# CONFIG_ARCH_CHIP_SAMV7 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32 is not set
|
||||
# CONFIG_ARCH_CHIP_STR71X is not set
|
||||
# CONFIG_ARCH_ARM7TDMI is not set
|
||||
@@ -98,11 +101,13 @@ CONFIG_ARCH_ARM926EJS=y
|
||||
# CONFIG_ARCH_CORTEXM0 is not set
|
||||
# CONFIG_ARCH_CORTEXM3 is not set
|
||||
# CONFIG_ARCH_CORTEXM4 is not set
|
||||
# CONFIG_ARCH_CORTEXM7 is not set
|
||||
# CONFIG_ARCH_CORTEXA5 is not set
|
||||
# CONFIG_ARCH_CORTEXA8 is not set
|
||||
CONFIG_ARCH_FAMILY="arm"
|
||||
CONFIG_ARCH_CHIP="lpc31xx"
|
||||
# CONFIG_ARCH_HAVE_FPU is not set
|
||||
# CONFIG_ARCH_HAVE_DPFPU is not set
|
||||
CONFIG_ARCH_HAVE_LOWVECTORS=y
|
||||
CONFIG_ARCH_LOWVECTORS=y
|
||||
CONFIG_ARCH_ROMPGTABLE=y
|
||||
@@ -225,6 +230,12 @@ CONFIG_NSH_MMCSDMINOR=0
|
||||
#
|
||||
# Board-Specific Options
|
||||
#
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
# CONFIG_BOARDCTL_TSCTEST is not set
|
||||
# CONFIG_BOARDCTL_ADCTEST is not set
|
||||
# CONFIG_BOARDCTL_PWMTEST is not set
|
||||
# CONFIG_BOARDCTL_GRAPHICS is not set
|
||||
# CONFIG_BOARDCTL_IOCTL is not set
|
||||
|
||||
#
|
||||
# RTOS Features
|
||||
@@ -254,6 +265,9 @@ CONFIG_PREALLOC_TIMERS=4
|
||||
#
|
||||
# Tasks and Scheduling
|
||||
#
|
||||
# CONFIG_INIT_NONE is not set
|
||||
CONFIG_INIT_ENTRYPOINT=y
|
||||
# CONFIG_INIT_FILEPATH is not set
|
||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
||||
CONFIG_RR_INTERVAL=200
|
||||
CONFIG_TASK_NAME_SIZE=0
|
||||
@@ -307,6 +321,13 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16
|
||||
CONFIG_PREALLOC_MQ_MSGS=4
|
||||
CONFIG_MQ_MAXMSGSIZE=32
|
||||
|
||||
#
|
||||
# Work Queue Support
|
||||
#
|
||||
# CONFIG_SCHED_WORKQUEUE is not set
|
||||
# CONFIG_SCHED_HPWORK is not set
|
||||
# CONFIG_SCHED_LPWORK is not set
|
||||
|
||||
#
|
||||
# Stack and heap information
|
||||
#
|
||||
@@ -337,9 +358,13 @@ CONFIG_DEV_NULL=y
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_SPI is not set
|
||||
# CONFIG_I2S is not set
|
||||
|
||||
#
|
||||
# Timer Driver Support
|
||||
#
|
||||
# CONFIG_TIMER is not set
|
||||
# CONFIG_RTC is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
# CONFIG_TIMER is not set
|
||||
# CONFIG_ANALOG is not set
|
||||
# CONFIG_AUDIO_DEVICES is not set
|
||||
# CONFIG_VIDEO_DEVICES is not set
|
||||
@@ -348,6 +373,7 @@ CONFIG_DEV_NULL=y
|
||||
# CONFIG_LCD is not set
|
||||
# CONFIG_MMCSD is not set
|
||||
# CONFIG_MTD is not set
|
||||
# CONFIG_EEPROM is not set
|
||||
# CONFIG_PIPES is not set
|
||||
# CONFIG_PM is not set
|
||||
# CONFIG_POWER is not set
|
||||
@@ -377,13 +403,18 @@ CONFIG_ARCH_HAVE_UART=y
|
||||
# CONFIG_ARCH_HAVE_USART6 is not set
|
||||
# CONFIG_ARCH_HAVE_USART7 is not set
|
||||
# CONFIG_ARCH_HAVE_USART8 is not set
|
||||
# CONFIG_ARCH_HAVE_OTHER_UART is not set
|
||||
|
||||
#
|
||||
# USART Configuration
|
||||
#
|
||||
CONFIG_MCU_SERIAL=y
|
||||
CONFIG_STANDARD_SERIAL=y
|
||||
# CONFIG_SERIAL_IFLOWCONTROL is not set
|
||||
# CONFIG_SERIAL_OFLOWCONTROL is not set
|
||||
# CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set
|
||||
CONFIG_UART_SERIAL_CONSOLE=y
|
||||
# CONFIG_OTHER_SERIAL_CONSOLE is not set
|
||||
# CONFIG_NO_SERIAL_CONSOLE is not set
|
||||
|
||||
#
|
||||
@@ -397,8 +428,6 @@ CONFIG_UART_PARITY=0
|
||||
CONFIG_UART_2STOP=0
|
||||
# CONFIG_UART_IFLOWCONTROL is not set
|
||||
# CONFIG_UART_OFLOWCONTROL is not set
|
||||
# CONFIG_SERIAL_IFLOWCONTROL is not set
|
||||
# CONFIG_SERIAL_OFLOWCONTROL is not set
|
||||
# CONFIG_USBDEV is not set
|
||||
# CONFIG_USBHOST is not set
|
||||
# CONFIG_WIRELESS is not set
|
||||
@@ -411,6 +440,7 @@ CONFIG_UART_2STOP=0
|
||||
# System Logging
|
||||
#
|
||||
# CONFIG_RAMLOG is not set
|
||||
# CONFIG_SYSLOG_CONSOLE is not set
|
||||
|
||||
#
|
||||
# Networking Support
|
||||
@@ -436,6 +466,8 @@ CONFIG_UART_2STOP=0
|
||||
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
|
||||
CONFIG_FS_READABLE=y
|
||||
CONFIG_FS_WRITABLE=y
|
||||
# CONFIG_FS_NAMED_SEMAPHORES is not set
|
||||
CONFIG_FS_MQUEUE_MPATH="/var/mqueue"
|
||||
# CONFIG_FS_RAMMAP is not set
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
@@ -451,8 +483,8 @@ CONFIG_FAT_MAXFNAME=32
|
||||
#
|
||||
# System Logging
|
||||
#
|
||||
|
||||
# CONFIG_SYSLOG is not set
|
||||
# CONFIG_SYSLOG_TIMESTAMP is not set
|
||||
|
||||
#
|
||||
# Graphics Support
|
||||
@@ -474,7 +506,7 @@ CONFIG_MM_REGIONS=1
|
||||
# CONFIG_AUDIO is not set
|
||||
|
||||
#
|
||||
# Binary Formats
|
||||
# Binary Loader
|
||||
#
|
||||
# CONFIG_BINFMT_DISABLE is not set
|
||||
# CONFIG_BINFMT_EXEPATH is not set
|
||||
@@ -498,6 +530,7 @@ CONFIG_LIB_HOMEDIR="/"
|
||||
# CONFIG_LIBM is not set
|
||||
# CONFIG_NOPRINTF_FIELDWIDTH is not set
|
||||
# CONFIG_LIBC_FLOATINGPOINT is not set
|
||||
# CONFIG_LIBC_IOCTL_VARIADIC is not set
|
||||
CONFIG_LIB_RAND_ORDER=1
|
||||
# CONFIG_EOL_IS_CR is not set
|
||||
# CONFIG_EOL_IS_LF is not set
|
||||
@@ -508,8 +541,11 @@ CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024
|
||||
CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=1536
|
||||
# CONFIG_LIBC_STRERROR is not set
|
||||
# CONFIG_LIBC_PERROR_STDOUT is not set
|
||||
CONFIG_LIBC_TMPDIR="/tmp"
|
||||
CONFIG_LIBC_MAX_TMPFILE=32
|
||||
CONFIG_ARCH_LOWPUTC=y
|
||||
# CONFIG_LIBC_LOCALTIME is not set
|
||||
# CONFIG_TIME_EXTENDED is not set
|
||||
CONFIG_LIB_SENDFILE_BUFSIZE=512
|
||||
# CONFIG_ARCH_ROMGETC is not set
|
||||
# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
|
||||
@@ -517,7 +553,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
|
||||
#
|
||||
# Non-standard Library Support
|
||||
#
|
||||
# CONFIG_SCHED_WORKQUEUE is not set
|
||||
# CONFIG_LIB_KBDCODEC is not set
|
||||
# CONFIG_LIB_SLCDCODEC is not set
|
||||
|
||||
@@ -569,10 +604,10 @@ CONFIG_EXAMPLES_NSH=y
|
||||
# CONFIG_EXAMPLES_OSTEST is not set
|
||||
# CONFIG_EXAMPLES_PIPE is not set
|
||||
# CONFIG_EXAMPLES_POLL is not set
|
||||
# CONFIG_EXAMPLES_PPPD is not set
|
||||
# CONFIG_EXAMPLES_POSIXSPAWN is not set
|
||||
# CONFIG_EXAMPLES_QENCODER is not set
|
||||
# CONFIG_EXAMPLES_RGMP is not set
|
||||
# CONFIG_EXAMPLES_ROMFS is not set
|
||||
# CONFIG_EXAMPLES_SENDMAIL is not set
|
||||
# CONFIG_EXAMPLES_SERIALBLASTER is not set
|
||||
# CONFIG_EXAMPLES_SERIALRX is not set
|
||||
@@ -584,7 +619,6 @@ CONFIG_EXAMPLES_NSH=y
|
||||
# CONFIG_EXAMPLES_THTTPD is not set
|
||||
# CONFIG_EXAMPLES_TIFF is not set
|
||||
# CONFIG_EXAMPLES_TOUCHSCREEN is not set
|
||||
# CONFIG_EXAMPLES_UDP is not set
|
||||
# CONFIG_EXAMPLES_WEBSERVER is not set
|
||||
# CONFIG_EXAMPLES_USBSERIAL is not set
|
||||
# CONFIG_EXAMPLES_USBTERM is not set
|
||||
@@ -594,12 +628,15 @@ CONFIG_EXAMPLES_NSH=y
|
||||
# Graphics Support
|
||||
#
|
||||
# CONFIG_TIFF is not set
|
||||
# CONFIG_GRAPHICS_TRAVELER is not set
|
||||
|
||||
#
|
||||
# Interpreters
|
||||
#
|
||||
# CONFIG_INTERPRETERS_BAS is not set
|
||||
# CONFIG_INTERPRETERS_FICL is not set
|
||||
# CONFIG_INTERPRETERS_PCODE is not set
|
||||
# CONFIG_INTERPRETERS_MICROPYTHON is not set
|
||||
|
||||
#
|
||||
# Network Utilities
|
||||
@@ -609,15 +646,11 @@ CONFIG_EXAMPLES_NSH=y
|
||||
# Networking Utilities
|
||||
#
|
||||
# CONFIG_NETUTILS_CODECS is not set
|
||||
# CONFIG_NETUTILS_DHCPD is not set
|
||||
# CONFIG_NETUTILS_FTPC is not set
|
||||
# CONFIG_NETUTILS_FTPD is not set
|
||||
# CONFIG_NETUTILS_JSON is not set
|
||||
# CONFIG_NETUTILS_SMTP is not set
|
||||
# CONFIG_NETUTILS_TFTPC is not set
|
||||
# CONFIG_NETUTILS_THTTPD is not set
|
||||
# CONFIG_NETUTILS_NETLIB is not set
|
||||
# CONFIG_NETUTILS_WEBCLIENT is not set
|
||||
# CONFIG_NETUTILS_PPPD is not set
|
||||
|
||||
#
|
||||
# FreeModBus
|
||||
@@ -650,6 +683,7 @@ CONFIG_NSH_NESTDEPTH=3
|
||||
# CONFIG_NSH_DISABLE_CD is not set
|
||||
# CONFIG_NSH_DISABLE_CP is not set
|
||||
# CONFIG_NSH_DISABLE_CMP is not set
|
||||
CONFIG_NSH_DISABLE_DATE=y
|
||||
# CONFIG_NSH_DISABLE_DD is not set
|
||||
# CONFIG_NSH_DISABLE_DF is not set
|
||||
# CONFIG_NSH_DISABLE_DELROUTE is not set
|
||||
@@ -671,6 +705,7 @@ CONFIG_NSH_NESTDEPTH=3
|
||||
# CONFIG_NSH_DISABLE_MKRD is not set
|
||||
# CONFIG_NSH_DISABLE_MH is not set
|
||||
# CONFIG_NSH_DISABLE_MOUNT is not set
|
||||
# CONFIG_NSH_DISABLE_MV is not set
|
||||
# CONFIG_NSH_DISABLE_MW is not set
|
||||
# CONFIG_NSH_DISABLE_PS is not set
|
||||
# CONFIG_NSH_DISABLE_PUT is not set
|
||||
@@ -708,7 +743,6 @@ CONFIG_NSH_FILEIOSIZE=512
|
||||
CONFIG_NSH_CONSOLE=y
|
||||
# CONFIG_NSH_ALTCONDEV is not set
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_LIB_BOARDCTL=y
|
||||
|
||||
#
|
||||
# NxWidgets/NxWM
|
||||
@@ -722,115 +756,19 @@ CONFIG_LIB_BOARDCTL=y
|
||||
#
|
||||
# System Libraries and NSH Add-Ons
|
||||
#
|
||||
|
||||
#
|
||||
# Custom Free Memory Command
|
||||
#
|
||||
# CONFIG_SYSTEM_FREE is not set
|
||||
|
||||
#
|
||||
# EMACS-like Command Line Editor
|
||||
#
|
||||
# CONFIG_SYSTEM_CLE is not set
|
||||
|
||||
#
|
||||
# FLASH Program Installation
|
||||
#
|
||||
# CONFIG_SYSTEM_CUTERM is not set
|
||||
# CONFIG_SYSTEM_INSTALL is not set
|
||||
|
||||
#
|
||||
# FLASH Erase-all Command
|
||||
#
|
||||
|
||||
#
|
||||
# Intel HEX to binary conversion
|
||||
#
|
||||
# CONFIG_SYSTEM_HEX2BIN is not set
|
||||
|
||||
#
|
||||
# I2C tool
|
||||
#
|
||||
|
||||
#
|
||||
# INI File Parser
|
||||
#
|
||||
# CONFIG_SYSTEM_INIFILE is not set
|
||||
|
||||
#
|
||||
# NxPlayer media player library / command Line
|
||||
#
|
||||
# CONFIG_SYSTEM_NXPLAYER is not set
|
||||
|
||||
#
|
||||
# RAM test
|
||||
#
|
||||
# CONFIG_SYSTEM_RAMTEST is not set
|
||||
|
||||
#
|
||||
# readline()
|
||||
#
|
||||
CONFIG_SYSTEM_READLINE=y
|
||||
CONFIG_READLINE_ECHO=y
|
||||
|
||||
#
|
||||
# P-Code Support
|
||||
#
|
||||
|
||||
#
|
||||
# PHY Tool
|
||||
#
|
||||
|
||||
#
|
||||
# Power Off
|
||||
#
|
||||
# CONFIG_SYSTEM_POWEROFF is not set
|
||||
|
||||
#
|
||||
# RAMTRON
|
||||
#
|
||||
# CONFIG_SYSTEM_RAMTRON is not set
|
||||
|
||||
#
|
||||
# SD Card
|
||||
#
|
||||
# CONFIG_SYSTEM_SDCARD is not set
|
||||
|
||||
#
|
||||
# Sudoku
|
||||
#
|
||||
# CONFIG_SYSTEM_SUDOKU is not set
|
||||
|
||||
#
|
||||
# Sysinfo
|
||||
#
|
||||
# CONFIG_SYSTEM_SYSINFO is not set
|
||||
|
||||
#
|
||||
# VI Work-Alike Editor
|
||||
#
|
||||
# CONFIG_SYSTEM_VI is not set
|
||||
|
||||
#
|
||||
# Stack Monitor
|
||||
#
|
||||
|
||||
#
|
||||
# USB CDC/ACM Device Commands
|
||||
#
|
||||
|
||||
#
|
||||
# USB Composite Device Commands
|
||||
#
|
||||
|
||||
#
|
||||
# USB Mass Storage Device Commands
|
||||
#
|
||||
|
||||
#
|
||||
# USB Monitor
|
||||
#
|
||||
|
||||
#
|
||||
# Zmodem Commands
|
||||
#
|
||||
# CONFIG_SYSTEM_ZMODEM is not set
|
||||
|
||||
@@ -51,6 +51,7 @@ fi
|
||||
# toolchain under windows. You will also have to edit this if you install
|
||||
# the CodeSourcery toolchain in any other location
|
||||
export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/Users/MyName/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
|
||||
|
||||
# This is the Cygwin path to the location where I build the buildroot
|
||||
# toolchain.
|
||||
|
||||
@@ -97,35 +97,23 @@ static xcpt_t g_ochandler;
|
||||
|
||||
static int ehci_waiter(int argc, char *argv[])
|
||||
{
|
||||
bool connected = false;
|
||||
int rhpndx;
|
||||
int ret;
|
||||
FAR struct usbhost_hubport_s *hport;
|
||||
|
||||
uvdbg("Waiter Running\n");
|
||||
uvdbg("ehci_waiter: Running\n");
|
||||
for (;;)
|
||||
{
|
||||
/* Wait for the device to change state */
|
||||
|
||||
rhpndx = CONN_WAIT(g_ehciconn, &connected);
|
||||
DEBUGASSERT(rhpndx >= 0 && rhpndx < 1);
|
||||
|
||||
connected = !connected;
|
||||
|
||||
uvdbg("RHport1 %s\n",
|
||||
connected ? "connected" : "disconnected");
|
||||
DEBUGVERIFY(CONN_WAIT(g_ehciconn, &hport));
|
||||
printf("ehci_waiter: %s\n", hport->connected ? "connected" : "disconnected");
|
||||
|
||||
/* Did we just become connected? */
|
||||
|
||||
if (connected)
|
||||
if (hport->connected)
|
||||
{
|
||||
/* Yes.. enumerate the newly connected device */
|
||||
|
||||
ret = CONN_ENUMERATE(g_ehciconn, rhpndx);
|
||||
if (ret < 0)
|
||||
{
|
||||
uvdbg("RHport1 CONN_ENUMERATE failed: %d\n", ret);
|
||||
connected = false;
|
||||
}
|
||||
(void)CONN_ENUMERATE(g_ehciconn, hport);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,11 +171,21 @@ int lpc31_usbhost_initialize(void)
|
||||
|
||||
/* First, register all of the class drivers needed to support the drivers
|
||||
* that we care about
|
||||
*
|
||||
* Register theUSB host Mass Storage Class:
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_USBHOST_HUB
|
||||
/* Initialize USB hub support */
|
||||
|
||||
ret = usbhost_hub_initialize();
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: usbhost_hub_initialize failed: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USBHOST_MSC
|
||||
/* Register theUSB host Mass Storage Class */
|
||||
|
||||
ret = usbhost_storageinit();
|
||||
if (ret != OK)
|
||||
{
|
||||
@@ -195,9 +193,9 @@ int lpc31_usbhost_initialize(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USBHOST_HIDKBD
|
||||
/* Register the USB host HID keyboard class driver */
|
||||
|
||||
#ifdef CONFIG_USBHOST_HIDKBD
|
||||
ret = usbhost_kbdinit();
|
||||
if (ret != OK)
|
||||
{
|
||||
|
||||
@@ -977,7 +977,7 @@ Configuration Sub-Directories
|
||||
crash seems seems to be due to a corrupt addess in the callback from
|
||||
the new asynchronous I/O. Should not be too hard to fix.
|
||||
|
||||
Also, the code does not enumerat the hub if it is connected at the
|
||||
Also, the code does not enumerate the hub if it is connected at the
|
||||
time of power up.
|
||||
|
||||
hidmouse:
|
||||
|
||||
Reference in New Issue
Block a user