More HID keyboard progress

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3256 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2011-01-17 13:52:33 +00:00
parent 39c428afc2
commit a7c0da9a2e

View File

@ -126,6 +126,11 @@
#define TDTAIL ((struct lpc17_gtd_s *)LPC17_TDTAIL_ADDR)
#define EDCTRL ((struct lpc17_ed_s *)LPC17_EDCTRL_ADDR)
/* Periodic intervals 2, 4, 8, 16,and 32 supported */
#define MIN_PERINTERVAL 2
#define MAX_PERINTERVAL 32
/* Descriptors *****************************************************************/
/* TD delay interrupt value */
@ -1051,7 +1056,7 @@ static inline int lpc17_reminted(struct lpc17_usbhost_s *priv,
/* Calculate the new minimum interval for this list */
interval = 32;
interval = MAX_PERINTERVAL;
for (curr = head; curr; curr = (struct lpc17_ed_s *)curr->hw.nexted)
{
if (curr->interval < interval)
@ -2391,6 +2396,11 @@ FAR struct usbhost_driver_s *usbhost_initialize(int controller)
sem_init(&priv->rhssem, 0, 0);
sem_init(&priv->exclsem, 0, 1);
#ifndef CONFIG_USBHOST_INT_DISABLE
priv->ininterval = MAX_PERINTERVAL;
priv->outinterval = MAX_PERINTERVAL;
#endif
/* Enable power by setting PCUSB in the PCONP register. Disable interrupts
* because this register may be shared with other drivers.
*/