diff options
Diffstat (limited to 'nuttx/drivers/usbhost/usbhost_enumerate.c')
-rw-r--r-- | nuttx/drivers/usbhost/usbhost_enumerate.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/nuttx/drivers/usbhost/usbhost_enumerate.c b/nuttx/drivers/usbhost/usbhost_enumerate.c index 36bfa20d19..26b93bf360 100644 --- a/nuttx/drivers/usbhost/usbhost_enumerate.c +++ b/nuttx/drivers/usbhost/usbhost_enumerate.c @@ -42,6 +42,7 @@ #include <sys/types.h> #include <stdint.h> #include <string.h> +#include <unistd.h> #include <errno.h> #include <assert.h> #include <debug.h> @@ -317,7 +318,7 @@ int usbhost_enumerate(FAR struct usbhost_driver_s *drvr, uint8_t funcaddr, DEBUGASSERT(drvr && class); - /* Allocate TD buffers for use in this function. We will need two: + /* Allocate descriptor buffers for use in this function. We will need two: * One for the request and one for the data buffer. */ @@ -400,7 +401,7 @@ int usbhost_enumerate(FAR struct usbhost_driver_s *drvr, uint8_t funcaddr, udbg("ERROR: SETADDRESS DRVR_CTRLOUT returned %d\n", ret); goto errout; } - up_mdelay(2); + usleep(2*1000); /* Modify control pipe with the provided USB device address */ @@ -461,9 +462,9 @@ int usbhost_enumerate(FAR struct usbhost_driver_s *drvr, uint8_t funcaddr, goto errout; } - /* Free the TD that we were using for the request buffer. It is not needed - * further here but it may be needed by the class driver during its connection - * operations. + /* Free the descriptor buffer that we were using for the request buffer. + * It is not needed further here but it may be needed by the class driver + * during its connection operations. */ DRVR_FREE(drvr, (uint8_t*)ctrlreq); @@ -488,9 +489,9 @@ int usbhost_enumerate(FAR struct usbhost_driver_s *drvr, uint8_t funcaddr, } } - /* Some devices may require this delay before initialization */ + /* Some devices may require some delay before initialization */ - up_mdelay(100); + usleep(100*1000); /* Parse the configuration descriptor and bind to the class instance for the * device. This needs to be the last thing done because the class driver |