diff options
| author | Christian Starkjohann <cs+github@obdev.at> | 2012-01-08 19:29:45 +0000 | 
|---|---|---|
| committer | Christian Starkjohann <cs+github@obdev.at> | 2012-01-08 19:29:45 +0000 | 
| commit | e3eee9f10132b7d16ad9b58babf0d2b64a15faf2 (patch) | |
| tree | 5c91271973251c39c3305396b02826e9a525496b | |
| parent | 1edb36a0321cfd26a6997621505c17eaa5cdf15f (diff) | |
| download | v-usb-e3eee9f10132b7d16ad9b58babf0d2b64a15faf2.tar.gz v-usb-e3eee9f10132b7d16ad9b58babf0d2b64a15faf2.tar.bz2 v-usb-e3eee9f10132b7d16ad9b58babf0d2b64a15faf2.zip  | |
- Fixed bug in usbDriverSetup() which prevented descriptor sizes above 255 bytes.
| -rw-r--r-- | usbdrv/usbdrv.c | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/usbdrv/usbdrv.c b/usbdrv/usbdrv.c index e94e29a..7a125f2 100644 --- a/usbdrv/usbdrv.c +++ b/usbdrv/usbdrv.c @@ -361,7 +361,8 @@ uchar       flags = USB_FLG_MSGPTR_IS_ROM;   */  static inline usbMsgLen_t usbDriverSetup(usbRequest_t *rq)  { -uchar   len  = 0, *dataPtr = usbTxBuf + 9;  /* there are 2 bytes free space at the end of the buffer */ +usbMsgLen_t len = 0; +uchar   *dataPtr = usbTxBuf + 9;    /* there are 2 bytes free space at the end of the buffer */  uchar   value = rq->wValue.bytes[0];  #if USB_CFG_IMPLEMENT_HALT  uchar   index = rq->wIndex.bytes[0]; @@ -557,6 +558,8 @@ uchar           isReset = !notResetState;          USB_RESET_HOOK(isReset);          wasReset = isReset;      } +#else +    notResetState = notResetState;  // avoid compiler warning  #endif  }  | 
