from usbd_dfu.h:195
typedef struct
{
const uint8_t *pStrDesc;
uint16_t (* Init)(void);
uint16_t (* DeInit)(void);
uint16_t (* Erase)(uint32_t Add);
uint16_t (* Write)(uint8_t *src, uint8_t *dest, uint32_t Len);
uint8_t *(* Read)(uint8_t *src, uint8_t *dest, uint32_t Len);
uint16_t (* GetStatus)(uint32_t Add, uint8_t cmd, uint8_t *buff);
#if (USBD_DFU_VENDOR_CMD_ENABLED == 1U)
uint16_t (* GetVendorCMD)(uint8_t *cmd, uint8_t *cmdlength);
uint16_t (* VendorDownloadCMD)(uint8_t *pbuf, uint32_t BlockNumber, uint32_t wlength, uint32_t *status);
uint16_t (* VendorUploadCMD)(uint32_t Add, uint32_t BlockNumber, uint32_t *status);
#endif
#if (USBD_DFU_VENDOR_CHECK_ENABLED == 1U)
uint16_t (* VendorCheck)(uint8_t *pbuf, uint32_t ReqType, uint32_t *status);
#endif
#if (USBD_DFU_VENDOR_EXIT_ENABLED == 1U)
uint16_t (* LeaveDFU)(uint32_t Add);
#endif
} USBD_DFU_MediaTypeDef;