IEEE 802.15.4 subsystem
Sign in or create your account | Project List | Help
IEEE 802.15.4 subsystem Commit Details
Date: | 2011-06-11 04:15:51 (12 years 9 months ago) |
---|---|
Author: | Werner Almesberger |
Commit: | 5f506117354d8763b7d6356d3c00ecc0b64af198 |
Message: | atusb/fw/usb/: DFU_ITF_DESCR also needs a protocol argument - dfu.h (enum dfu_itf_proto): bInterfaceProtocol values for DFU functional descriptor - dfu.h (DFU_ITF_DESCR): added protocol argument - dfu.c (config_descriptor): pass protocol to DFU_ITF_DESCR |
Files: |
atusb/fw/usb/dfu.c (1 diff) atusb/fw/usb/dfu.h (3 diffs) |
Change Details
atusb/fw/usb/dfu.c | ||
---|---|---|
76 | 76 | |
77 | 77 | /* Interface #0 */ |
78 | 78 | |
79 | DFU_ITF_DESCR(0) | |
79 | DFU_ITF_DESCR(0, dfu_proto_dfu) | |
80 | 80 | }; |
81 | 81 | |
82 | 82 |
atusb/fw/usb/dfu.h | ||
---|---|---|
62 | 62 | dfuERROR |
63 | 63 | }; |
64 | 64 | |
65 | enum dfu_itf_proto { | |
66 | dfu_proto_runtime = 1, /* Runtime protocol */ | |
67 | dfu_proto_dfu = 2, /* DFU mode protocol */ | |
68 | }; | |
69 | ||
65 | 70 | |
66 | 71 | #define DFU_DT_FUNCTIONAL 0x21 /* DFU FUNCTIONAL descriptor type */ |
67 | 72 | |
... | ... | |
78 | 83 | }; |
79 | 84 | |
80 | 85 | |
81 | #define DFU_ITF_DESCR(itf) \ | |
86 | #define DFU_ITF_DESCR(itf, proto) \ | |
82 | 87 | 9, /* bLength */ \ |
83 | 88 | USB_DT_INTERFACE, /* bDescriptorType */ \ |
84 | 89 | (itf), /* bInterfaceNumber */ \ |
... | ... | |
86 | 91 | 0, /* bNumEndpoints */ \ |
87 | 92 | 0xfe, /* bInterfaceClass (application specific) */ \ |
88 | 93 | 0x01, /* bInterfaceSubClass (device fw upgrade) */ \ |
89 | 0x02, /* bInterfaceProtocol (DFU mode protocol) */ \ | |
94 | (proto), /* bInterfaceProtocol (dfu_proto_*) */ \ | |
90 | 95 | 0, /* iInterface */ |
91 | 96 | |
92 | 97 |