1 #ifndef DEVICES_USB_DFU_H
2 #define DEVICES_USB_DFU_H
4 ** $VER: usb_dfu.h 2.0 (15.12.07)
6 ** usb definitions include file
8 ** (C) Copyright 2002-2007 Chris Hodges
12 #include <exec/types.h>
18 /* Usb DFU Requests */
19 #define UDFUR_DETACH 0x00
20 #define UDFUR_DNLOAD 0x01
21 #define UDFUR_UPLOAD 0x02
22 #define UDFUR_GETSTATUS 0x03
23 #define UDFUR_CLRSTATUS 0x04
24 #define UDFUR_GETSTATE 0x05
25 #define UDFUR_ABORT 0x06
27 /* DFU class specific descriptors */
30 /* Firmware Upgrade subclasses */
31 #define FWUPGRADE_STD_SUBCLASS 0x01
33 /* Firmware Upgrade protocols */
34 #define FWUPGRADE_PROTO_STD 0x01
35 #define FWUPGRADE_PROTO_DFU 0x02
37 /* DFU specific descriptor */
41 UBYTE bLength
; /* Size of this descriptor */
42 UBYTE bDescriptorType
; /* Descriptor Type (0x21) */
43 UBYTE bmAttributes
; /* DFU attributes */
44 UBYTE wDetachTimeOut0
; /* Lowbyte of Detach TimeOut */
45 UBYTE wDetachTimeOut1
; /* Highbyte of above */
46 UBYTE wTransferSize0
; /* Maximum bytes per control-write (Lowbyte) */
47 UBYTE wTransferSize1
; /* Highbyte of above */
48 UBYTE bcdDFUVersion
; /* DFU Spec Release */
51 /* bmAttributes from above */
52 #define UDDAF_DOWNLOADABLE 0x0001
53 #define UDDAF_UPLOADABLE 0x0002
54 #define UDDAF_NO_MANIFEST_RST 0x0004
55 #define UDDAF_WILL_DETACH 0x0008
57 /* Returned by UDFUR_GETSTATUS */
73 #endif /* DEVICES_USB_DFU_H */