44#ifndef ZEPHYR_INCLUDE_USB_CLASS_USB_DFU_H_
45#define ZEPHYR_INCLUDE_USB_CLASS_USB_DFU_H_
50#define DFU_SUBCLASS 0x01
53#define DFU_RT_PROTOCOL 0x01
56#define DFU_MODE_PROTOCOL 0x02
61#define DFU_DETACH 0x00
62#define DFU_DNLOAD 0x01
63#define DFU_UPLOAD 0x02
64#define DFU_GETSTATUS 0x03
65#define DFU_CLRSTATUS 0x04
66#define DFU_GETSTATE 0x05
70#define DFU_FUNC_DESC 0x21
73#define DFU_ATTR_WILL_DETACH 0x08
74#define DFU_ATTR_MANIFESTATION_TOLERANT 0x04
75#define DFU_ATTR_CAN_UPLOAD 0x02
76#define DFU_ATTR_CAN_DNLOAD 0x01
79#define DFU_VERSION 0x0110
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
Run-Time Functional Descriptor.
Definition: usb_dfu.h:82
uint8_t bLength
Definition: usb_dfu.h:83
uint16_t bcdDFUVersion
Definition: usb_dfu.h:88
uint8_t bDescriptorType
Definition: usb_dfu.h:84
uint16_t wTransferSize
Definition: usb_dfu.h:87
uint8_t bmAttributes
Definition: usb_dfu.h:85
uint16_t wDetachTimeOut
Definition: usb_dfu.h:86
Kernel timeout type.
Definition: sys_clock.h:65
Variables needed for system clock.
dfu_state
bState values for the DFU_GETSTATUS response
Definition: usb_dfu.h:112
@ dfuMANIFEST_SYNC
Definition: usb_dfu.h:119
@ dfuERROR
Definition: usb_dfu.h:123
@ dfuUPLOAD_IDLE
Definition: usb_dfu.h:122
@ dfuIDLE
Definition: usb_dfu.h:115
@ dfuDNLOAD_IDLE
Definition: usb_dfu.h:118
@ appDETACH
Definition: usb_dfu.h:114
@ dfuMANIFEST_WAIT_RST
Definition: usb_dfu.h:121
@ appIDLE
Definition: usb_dfu.h:113
@ dfuMANIFEST
Definition: usb_dfu.h:120
@ dfuDNLOAD_SYNC
Definition: usb_dfu.h:116
@ dfuDNBUSY
Definition: usb_dfu.h:117
void wait_for_usb_dfu(k_timeout_t delay)
dfu_status
bStatus values for the DFU_GETSTATUS response
Definition: usb_dfu.h:92
@ errSTALLEDPKT
Definition: usb_dfu.h:108
@ errVENDOR
Definition: usb_dfu.h:104
@ errVERIFY
Definition: usb_dfu.h:100
@ errTARGET
Definition: usb_dfu.h:94
@ errFILE
Definition: usb_dfu.h:95
@ errERASE
Definition: usb_dfu.h:97
@ errWRITE
Definition: usb_dfu.h:96
@ errCHECK_ERASED
Definition: usb_dfu.h:98
@ errUSB
Definition: usb_dfu.h:105
@ errADDRESS
Definition: usb_dfu.h:101
@ errFIRMWARE
Definition: usb_dfu.h:103
@ errPOR
Definition: usb_dfu.h:106
@ errUNKNOWN
Definition: usb_dfu.h:107
@ errPROG
Definition: usb_dfu.h:99
@ statusOK
Definition: usb_dfu.h:93
@ errNOTDONE
Definition: usb_dfu.h:102