AHI/HDAudio: fixes for ATI south bridge controller
[AROS.git] / compiler / include / devices / usb_dfu.h
blob424c1a2d02c6e58bf2de4d5607227176642eefa9
1 #ifndef DEVICES_USB_DFU_H
2 #define DEVICES_USB_DFU_H
3 /*
4 ** $VER: usb_dfu.h 2.0 (15.12.07)
5 **
6 ** usb definitions include file
7 **
8 ** (C) Copyright 2002-2007 Chris Hodges
9 ** All Rights Reserved
12 #include <exec/types.h>
14 #if defined(__GNUC__)
15 # pragma pack(1)
16 #endif
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 */
28 #define UDT_DFU 0x21
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 */
39 struct UsbDFUDesc
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 */
58 struct UsbDFUStatus
60 UBYTE bStatus;
61 UBYTE bwPollTimeout0;
62 UBYTE bwPollTimeout1;
63 UBYTE bwPollTimeout2;
64 UBYTE bState;
65 UBYTE iString;
69 #if defined(__GNUC__)
70 # pragma pack()
71 #endif
73 #endif /* DEVICES_USB_DFU_H */