12 #ifndef __GD32F10X_USBD_DFU_CORE_H
13 #define __GD32F10X_USBD_DFU_CORE_H
38 #define USB_DFU_CONFIG_DESC_SIZE (18 + (9 * USBD_ITF_MAX_NUM))
39 #define USB_DFU_DESC_SIZE 9
40 #define DFU_DESC_TYPE 0x21
43 #define Manifest_complete 0x00
44 #define Manifest_In_Progress 0x01
47 #define GET_COMMANDS 0x00
48 #define SET_ADDRESS_POINTER 0x21
56 #define DFU_DETACH_MASK (uint8_t)(0x10)
67 typedef enum _DFU_STATE
72 STATE_dfuDNLOAD_SYNC ,
75 STATE_dfuMANIFEST_SYNC,
77 STATE_dfuMANIFEST_WAIT_RESET,
84 typedef enum _DFU_STATUS
91 STATUS_errCHECK_ERASED,
106 typedef enum _DFU_REQUESTS
118 typedef void (*pAppFunction) (void);
129 #define USBD_DFU_IF_DESC(n) 0x09, \
130 USB_DESCTYPE_INTERFACE, \
137 USBD_INTERFACE_STR_IDX + (n) + 1
USB device class callback type define.
USB DFU device media access layer header file.
USB enumeration function prototypes.