diff options
| author | Mengsk <[email protected]> | 2021-07-08 00:25:12 +0200 |
|---|---|---|
| committer | Mengsk <[email protected]> | 2021-07-08 00:25:12 +0200 |
| commit | 5b4b5ca533b95fb39648f7eaf9ae77d0a94d7893 (patch) | |
| tree | f0288680973c48918bc4d8cb236efc8ba663c274 /examples/device/dfu/src/main.c | |
| parent | 941b02c6a98cd34eb84cf499db9810108871d49b (diff) | |
| parent | 7e883e0f41a4fdda699bbaf1d64a28d82527b8f9 (diff) | |
Add bwPollTimeout set callback, postpone download callback after GETSTATUS
Diffstat (limited to 'examples/device/dfu/src/main.c')
| -rw-r--r-- | examples/device/dfu/src/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/device/dfu/src/main.c b/examples/device/dfu/src/main.c index 81532ee90..f7c27174a 100644 --- a/examples/device/dfu/src/main.c +++ b/examples/device/dfu/src/main.c @@ -125,6 +125,13 @@ bool tud_dfu_firmware_valid_check_cb(uint8_t alt) return true; } +uint16_t tud_dfu_set_timeout_cb(uint8_t alt) +{ + // For example Alt1 (EEPROM) is slow, add 2000ms timeout + if (alt == 1) return 2000; + return 0; +} + void tud_dfu_req_dnload_data_cb(uint8_t alt, uint16_t wBlockNum, uint8_t* data, uint16_t length) { (void) data; |
