diff options
| author | hathach <[email protected]> | 2021-07-12 21:08:13 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-07-12 21:08:13 +0700 |
| commit | 86d511f24452b13c8e5779c7a79bff54a03dafd8 (patch) | |
| tree | 84336a9d210b2b429c54d8901682157fc7ef9d2a /examples | |
| parent | 8c48a4a2886bdac96df274311f84bc6c04c56b95 (diff) | |
rename tud_dfu_set_timeout_cb() to tud_dfu_get_status_cb()
also add state as argument
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/device/dfu/src/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/device/dfu/src/main.c b/examples/device/dfu/src/main.c index ee201c1c5..4ec6d477c 100644 --- a/examples/device/dfu/src/main.c +++ b/examples/device/dfu/src/main.c @@ -125,10 +125,13 @@ bool tud_dfu_firmware_valid_check_cb(uint8_t alt) return true; } -uint16_t tud_dfu_set_timeout_cb(uint8_t alt) +uint32_t tud_dfu_get_status_cb(uint8_t alt, uint8_t state) { // For example Alt1 (EEPROM) is slow, add 2000ms timeout - if (alt == 1) return 2000; + if ( state == DFU_DNBUSY ) + { + if (alt == 1) return 2000; + } return 0; } |
