Skip to content

Commit a115594

Browse files
committed
Add required callbacks for TinyUSB DFU
1 parent 16cee61 commit a115594

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: cores/esp32/esp32-hal-tinyusb.c

+5
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,11 @@ bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_requ
357357
/*
358358
* Required Callbacks
359359
* */
360+
#if CFG_TUD_DFU
361+
__attribute__ ((weak)) uint32_t tud_dfu_get_timeout_cb(uint8_t alt, uint8_t state){return 0;}
362+
__attribute__ ((weak)) void tud_dfu_download_cb (uint8_t alt, uint16_t block_num, uint8_t const *data, uint16_t length){}
363+
__attribute__ ((weak)) void tud_dfu_manifest_cb(uint8_t alt){}
364+
#endif
360365
#if CFG_TUD_HID
361366
__attribute__ ((weak)) const uint8_t * tud_hid_descriptor_report_cb(uint8_t itf){return NULL;}
362367
__attribute__ ((weak)) uint16_t tud_hid_get_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen){return 0;}

0 commit comments

Comments
 (0)