diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-01-17 13:52:33 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-01-17 13:52:33 +0000 |
commit | 2192e41e80704f27a61c9ae6b8a2c496bfe5090c (patch) | |
tree | c2fc86c979f5fa98798412ff684c5ae3e224eef8 /nuttx/arch/arm/src/lpc17xx | |
parent | f66aa23286252a911e122349249b2def1d9c5810 (diff) | |
download | px4-nuttx-2192e41e80704f27a61c9ae6b8a2c496bfe5090c.tar.gz px4-nuttx-2192e41e80704f27a61c9ae6b8a2c496bfe5090c.tar.bz2 px4-nuttx-2192e41e80704f27a61c9ae6b8a2c496bfe5090c.zip |
More HID keyboard progress
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3256 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/lpc17xx')
-rwxr-xr-x | nuttx/arch/arm/src/lpc17xx/lpc17_usbhost.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_usbhost.c b/nuttx/arch/arm/src/lpc17xx/lpc17_usbhost.c index 78258d25e..e9a639b69 100755 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_usbhost.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_usbhost.c @@ -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. */ |