diff options
author | Christian Starkjohann <cs+github@obdev.at> | 2008-05-03 19:11:23 +0000 |
---|---|---|
committer | Christian Starkjohann <cs+github@obdev.at> | 2008-05-03 19:11:23 +0000 |
commit | ae639b82d163b19ee2bf51cce9e140f971702d2d (patch) | |
tree | 5f5b8f41e9a0e909e3c2e8253aadc7ccdc97ef27 | |
parent | b39c5ec739a2e02ba34739190aa7ab07bfa624bb (diff) | |
download | v-usb-ae639b82d163b19ee2bf51cce9e140f971702d2d.tar.gz v-usb-ae639b82d163b19ee2bf51cce9e140f971702d2d.tar.bz2 v-usb-ae639b82d163b19ee2bf51cce9e140f971702d2d.zip |
- we must initialize usbTxLen[13] to USBPID_NAK, otherwise the host is
confused about the long initial packet and disqualifies the device
-rw-r--r-- | usbdrv/usbdrv.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usbdrv/usbdrv.c b/usbdrv/usbdrv.c index ffa0bec..c4141a1 100644 --- a/usbdrv/usbdrv.c +++ b/usbdrv/usbdrv.c @@ -617,10 +617,12 @@ USB_PUBLIC void usbInit(void) #endif USB_INTR_ENABLE |= (1 << USB_INTR_ENABLE_BIT); usbResetDataToggling(); -/* We don't reset usbTxLen1 and usbTxLen3 to USBPID_NAK because this is done - * in RESET condition anyway (usbResetStall()). If an IN token is received - * BEFORE USB Reset, we send out 256 bytes of nonsense. - */ +#if USB_CFG_HAVE_INTRIN_ENDPOINT + usbTxLen1 = USBPID_NAK; +#if USB_CFG_HAVE_INTRIN_ENDPOINT3 + usbTxLen3 = USBPID_NAK; +#endif +#endif } /* ------------------------------------------------------------------------- */ |