Skip to content
Snippets Groups Projects
Commit 857a6111 authored by patacongo's avatar patacongo
Browse files

Add a little more

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3201 42af7a65-404d-4744-a932-0658087f49c3
parent 4566137c
No related branches found
No related tags found
No related merge requests found
......@@ -144,7 +144,12 @@
#if CONFIG_USBHOST_TDBUFFERS > 0 && !defined(CONFIG_USBHOST_TDBUFSIZE)
# define CONFIG_USBHOST_TDBUFSIZE 128
#endif
#define LPC17_TDBUFFER_SIZE (CONFIG_USBHOST_TDBUFFERS * CONFIG_USBHOST_TDBUFSIZE)
#if (CONFIG_USBHOST_TDBUFSIZE & 3) != 0
# error "TD buffer size must be an even number of 32-bit words"
#endif
#define LPC17_TDFREE_SIZE (CONFIG_USBHOST_TDBUFFERS * CONFIG_USBHOST_TDBUFSIZE)
/* Configurable size of an IO buffer. The number of IO buffers will be determined
* by what is left at the end of the BANK1 memory setup aside of OHCI RAM.
......@@ -154,6 +159,10 @@
# define CONFIG_USBHOST_IOBUFSIZE 512
#endif
#if (CONFIG_USBHOST_IOBUFSIZE & 3) != 0
# error "IO buffer size must be an even number of 32-bit words"
#endif
/* OHCI Memory Layout ***************************************************************/
/* Example:
* Hardware:
......@@ -171,8 +180,8 @@
* Sizes of things
* CONFIG_USBHOST_NEDS 2
* LPC17_EDFREE_SIZE 48
* LPC17_TDBUFFER_SIZE 128
* LPC17_TDBUFFER_SIZE 512
* LPC17_TDFREE_SIZE 128
* LPC17_IOFREE_SIZE 512
*
* Memory Layout
* LPC17_OHCIRAM_END (0x20008000 + 16384) = 0x2000c000
......@@ -186,8 +195,8 @@
* LPC17_TDTAIL_ADDR 0x2000bd10
* LPC17_EDCTRL_ADDR 0x2000bd20
* LPC17_EDFREE_BASE 0x2000bd30
* LPC17_TDBUFFER_BASE 0x2000bd50
* LPC17_IOBUFFER_BASE 0x2000bdd0
* LPC17_TDFREE_BASE 0x2000bd50
* LPC17_IOFREE_BASE 0x2000bdd0
* LPC17_IOBUFFERS (0x2000c000 + 0x2000bdd0) / 512 = 560/512 = 1
*
* Wasted memory: 560-512 = 48 bytes
......@@ -198,8 +207,8 @@
#define LPC17_TDTAIL_ADDR (LPC17_TDHEAD_ADDR + LPC17_TD_SIZE)
#define LPC17_EDCTRL_ADDR (LPC17_TDTAIL_ADDR + LPC17_TD_SIZE)
#define LPC17_EDFREE_BASE (LPC17_EDCTRL_ADDR + LPC17_ED_SIZE)
#define LPC17_TDBUFFER_BASE (LPC17_EDFREE_BASE + LPC17_EDFREE_SIZE)
#define LPC17_IOBUFFER_BASE (LPC17_TDBUFFER_BASE + LPC17_TDBUFFER_SIZE)
#define LPC17_TDFREE_BASE (LPC17_EDFREE_BASE + LPC17_EDFREE_SIZE)
#define LPC17_IOFREE_BASE (LPC17_TDFREE_BASE + LPC17_TDFREE_SIZE)
/* Finally, use the remainder of the allocated OHCI for IO buffers */
......
This diff is collapsed.
......@@ -227,7 +227,7 @@
*
* Description:
* Process a IN or OUT request on the control endpoint. These methods
* will enqueue the request and return immediately. Only one transfer may be
* 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
* until the control transfer functions returns.
*
......@@ -261,8 +261,8 @@
*
* Description:
* Process a request to handle a transfer descriptor. This method will
* enqueue the transfer request and return immediately. Only one transfer may be
* queued; Neither this method nor the ctrlin or ctrlout methods can be called
* enqueue the transfer request and rwait for it to complete. Only one transfer may
* be queued; Neither this method nor the ctrlin or ctrlout methods can be called
* again until this function returns.
*
* This is a blocking method; this functions will not return until the
......@@ -414,8 +414,8 @@ struct usbhost_driver_s
int (*free)(FAR struct usbhost_driver_s *drvr, FAR uint8_t *buffer);
/* Process a IN or OUT request on the control endpoint. These methods
* will enqueue the request and return immediately. Only one transfer may be
* queued; Neither these methods nor the transfer() method can be called again
* 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
* until the control transfer functions returns.
*
* These are blocking methods; these functions will not return until the
......@@ -430,8 +430,8 @@ struct usbhost_driver_s
FAR const uint8_t *buffer);
/* Process a request to handle a transfer descriptor. This method will
* enqueue the transfer request and return immediately. Only one transfer may be
* queued; Neither this method nor the ctrlin or ctrlout methods can be called
* enqueue the transfer request and wait for it to complete. Only one transfer may
* be queued; Neither this method nor the ctrlin or ctrlout methods can be called
* again until this function returns.
*
* This is a blocking method; this functions will not return until the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment