aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Starkjohann <cs+github@obdev.at>2009-08-22 10:27:24 +0000
committerChristian Starkjohann <cs+github@obdev.at>2009-08-22 10:27:24 +0000
commit0d95c64b47fd66bfd6ef4a9e618b30711c12182f (patch)
tree73ba51e6fbd88d8b1fe616967c00449787924b24
parent36da169453b7d716fb63dc804c9853956981c64f (diff)
downloadv-usb-0d95c64b47fd66bfd6ef4a9e618b30711c12182f.tar.gz
v-usb-0d95c64b47fd66bfd6ef4a9e618b30711c12182f.tar.bz2
v-usb-0d95c64b47fd66bfd6ef4a9e618b30711c12182f.zip
- fixed bmAttributes in configuration descriptor
-rw-r--r--usbdrv/Changelog.txt2
-rw-r--r--usbdrv/usbdrv.c4
-rw-r--r--usbdrv/usbdrv.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/usbdrv/Changelog.txt b/usbdrv/Changelog.txt
index 6e2397d..496a1c0 100644
--- a/usbdrv/Changelog.txt
+++ b/usbdrv/Changelog.txt
@@ -290,3 +290,5 @@ Scroll down to the bottom to see the most recent changes.
receiver was out of sync.
- Included option for faster CRC routine.
Thanks to Slawomir Fras (BoskiDialer) for this code!
+ - Updated bits in Configuration Descriptor's bmAttributes according to
+ USB 1.1 (in particular bit 7, it is a must-be-set bit now).
diff --git a/usbdrv/usbdrv.c b/usbdrv/usbdrv.c
index cd2ce62..6eb7f22 100644
--- a/usbdrv/usbdrv.c
+++ b/usbdrv/usbdrv.c
@@ -149,9 +149,9 @@ PROGMEM char usbDescriptorConfiguration[] = { /* USB configuration descriptor
1, /* index of this configuration */
0, /* configuration name string index */
#if USB_CFG_IS_SELF_POWERED
- USBATTR_SELFPOWER, /* attributes */
+ (1 << 7) | USBATTR_SELFPOWER, /* attributes */
#else
- (char)USBATTR_BUSPOWER, /* attributes */
+ (1 << 7), /* attributes */
#endif
USB_CFG_MAX_BUS_POWER/2, /* max USB current in 2mA units */
/* interface descriptor follows inline: */
diff --git a/usbdrv/usbdrv.h b/usbdrv/usbdrv.h
index ba1ad4b..5c520c8 100644
--- a/usbdrv/usbdrv.h
+++ b/usbdrv/usbdrv.h
@@ -718,7 +718,7 @@ typedef struct usbRequest{
#define USBDESCR_HID_REPORT 0x22
#define USBDESCR_HID_PHYS 0x23
-#define USBATTR_BUSPOWER 0x80
+//#define USBATTR_BUSPOWER 0x80 // USB 1.1 does not define this value any more
#define USBATTR_SELFPOWER 0x40
#define USBATTR_REMOTEWAKE 0x20