mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-29 03:11:52 +02:00
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
This commit is contained in:
parent
2544004a86
commit
5f50611735
@ -76,7 +76,7 @@ const uint8_t config_descriptor[] = {
|
||||
|
||||
/* Interface #0 */
|
||||
|
||||
DFU_ITF_DESCR(0)
|
||||
DFU_ITF_DESCR(0, dfu_proto_dfu)
|
||||
};
|
||||
|
||||
|
||||
|
@ -62,6 +62,11 @@ enum dfu_state {
|
||||
dfuERROR
|
||||
};
|
||||
|
||||
enum dfu_itf_proto {
|
||||
dfu_proto_runtime = 1, /* Runtime protocol */
|
||||
dfu_proto_dfu = 2, /* DFU mode protocol */
|
||||
};
|
||||
|
||||
|
||||
#define DFU_DT_FUNCTIONAL 0x21 /* DFU FUNCTIONAL descriptor type */
|
||||
|
||||
@ -78,7 +83,7 @@ struct dfu {
|
||||
};
|
||||
|
||||
|
||||
#define DFU_ITF_DESCR(itf) \
|
||||
#define DFU_ITF_DESCR(itf, proto) \
|
||||
9, /* bLength */ \
|
||||
USB_DT_INTERFACE, /* bDescriptorType */ \
|
||||
(itf), /* bInterfaceNumber */ \
|
||||
@ -86,7 +91,7 @@ struct dfu {
|
||||
0, /* bNumEndpoints */ \
|
||||
0xfe, /* bInterfaceClass (application specific) */ \
|
||||
0x01, /* bInterfaceSubClass (device fw upgrade) */ \
|
||||
0x02, /* bInterfaceProtocol (DFU mode protocol) */ \
|
||||
(proto), /* bInterfaceProtocol (dfu_proto_*) */ \
|
||||
0, /* iInterface */
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user