From aaedc7b6176d668f21e5a94e4910a756dd5db83a Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 11 Jan 2011 12:43:02 +0000 Subject: [PATCH] README updates git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3242 42af7a65-404d-4744-a932-0658087f49c3 --- configs/mbed/README.txt | 50 ++++++++++++++++++++++++++++++- configs/nucleus2g/README.txt | 6 ++-- drivers/usbhost/usbhost_storage.c | 4 +-- 3 files changed, 55 insertions(+), 5 deletions(-) diff --git a/configs/mbed/README.txt b/configs/mbed/README.txt index 6098fc88b2..c4122a6f60 100755 --- a/configs/mbed/README.txt +++ b/configs/mbed/README.txt @@ -12,6 +12,7 @@ Contents NuttX buildroot Toolchain USB Device Controller Functions mbed Configuration Options + USB Host Configuration Configurations Development Environment @@ -305,7 +306,7 @@ mbed Configuration Options CONFIG_NET_MULTICAST - Enable receipt of multicast (and unicast) frames. Automatically set if CONFIG_NET_IGMP is selected. - LPC17xx USB Configuration + LPC17xx USB Device Configuration CONFIG_LPC17_USBDEV_FRAME_INTERRUPT Handle USB Start-Of-Frame events. @@ -320,6 +321,53 @@ mbed Configuration Options CONFIG_LPC17_USBDEV_DMA Enable lpc17xx-specific DMA support + LPC17xx USB Host Configuration + + CONFIG_USBHOST_OHCIRAM_SIZE + Total size of OHCI RAM (in AHB SRAM Bank 1) + CONFIG_USBHOST_NEDS + Number of endpoint descriptors + CONFIG_USBHOST_TDBUFFERS + Number of transfer descriptor buffers + CONFIG_USBHOST_TDBUFSIZE + Size of one transfer descriptor buffer + CONFIG_USBHOST_IOBUFSIZE + Size of one end-user I/O buffer. This can be zero if the + application can guarantee that all end-user I/O buffers + reside in AHB SRAM. + +USB Host Configuration +^^^^^^^^^^^^^^^^^^^^^^ + +The NuttShell (NSH) mbed can be modified in order to support USB +host operations. To make these modifications, do the following: + +1. First configure to build the NSH configuration from the top-level + NuttX directory: + + cd tools + ./configure mbed/nsh + cd .. + +2. Then edit the top-level .config file to enable USB host. Make the + following changes: + + CONFIG_LPC17_USBHOST=n + CONFIG_USBHOST=n + CONFIG_SCHED_WORKQUEUE=y + +When this change is made, NSH should be extended to support USB flash +devices. When a FLASH device is inserted, you should see a device +appear in the /dev (psuedo) directory. The device name should be +like /dev/sda, /dev/sdb, etc. The USB mass storage device, is present +it can be mounted from the NSH command line like: + + ls /dev + mount -t vfat /dev/sda /mnt/flash + +Files on the connect USB flash device should then be accessible under +the mountpoint /mnt/flash. + Configurations ^^^^^^^^^^^^^^ diff --git a/configs/nucleus2g/README.txt b/configs/nucleus2g/README.txt index 4d88654c5d..42be0f1bff 100755 --- a/configs/nucleus2g/README.txt +++ b/configs/nucleus2g/README.txt @@ -434,6 +434,7 @@ Nucleus 2G Configuration Options Enable lpc17xx-specific DMA support LPC17xx USB Host Configuration + CONFIG_USBHOST_OHCIRAM_SIZE Total size of OHCI RAM (in AHB SRAM Bank 1) CONFIG_USBHOST_NEDS @@ -450,8 +451,9 @@ Nucleus 2G Configuration Options USB Host Configuration ^^^^^^^^^^^^^^^^^^^^^^ -The NuttShell (NSH) Nucleus 2G can be modified in order to support -USB host operations. To make these modifications, do the following: +The NuttShell (NSH) Nucleus 2G configuration can be modified in order +to support USB host operations. To make these modifications, do the +following: 1. First configure to build the NSH configuration from the top-level NuttX directory: diff --git a/drivers/usbhost/usbhost_storage.c b/drivers/usbhost/usbhost_storage.c index e0f4dc4adb..5c44fd9f61 100644 --- a/drivers/usbhost/usbhost_storage.c +++ b/drivers/usbhost/usbhost_storage.c @@ -1085,14 +1085,14 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, ret = DRVR_EPALLOC(priv->drvr, &boutdesc, &priv->bulkout); if (ret != OK) { - udbg("ERROR: Failed to allocated Bulk OUT endpoint\n"); + udbg("ERROR: Failed to allocate Bulk OUT endpoint\n"); return ret; } ret = DRVR_EPALLOC(priv->drvr, &bindesc, &priv->bulkin); if (ret != OK) { - udbg("ERROR: Failed to allocated Bulk IN endpoint\n"); + udbg("ERROR: Failed to allocate Bulk IN endpoint\n"); (void)DRVR_EPFREE(priv->drvr, priv->bulkout); return ret; }