add alt to tud_dfu_abort_cb()

This commit is contained in:
hathach 2021-07-12 18:50:19 +07:00
parent a0691a4fd4
commit 134ed995c8
2 changed files with 3 additions and 3 deletions

View File

@ -503,7 +503,7 @@ static bool dfu_state_machine(uint8_t rhport, tusb_control_request_t const * req
{
if ( tud_dfu_abort_cb )
{
tud_dfu_abort_cb();
tud_dfu_abort_cb(_dfu_state_ctx.alt);
}
_dfu_state_ctx.state = DFU_IDLE;
}
@ -613,7 +613,7 @@ static bool dfu_state_machine(uint8_t rhport, tusb_control_request_t const * req
{
if (tud_dfu_abort_cb)
{
tud_dfu_abort_cb();
tud_dfu_abort_cb(_dfu_state_ctx.alt);
}
_dfu_state_ctx.state = DFU_IDLE;
}

View File

@ -73,7 +73,7 @@ void tud_dfu_dnload_complete(void);
bool tud_dfu_device_data_done_check_cb(uint8_t alt);
// Invoked when the Host has terminated a download or upload transfer
TU_ATTR_WEAK void tud_dfu_abort_cb(void);
TU_ATTR_WEAK void tud_dfu_abort_cb(uint8_t alt);
// Invoked when a DFU_UPLOAD request is received
// alt is used as the partition number, in order to support multiple partitions like FLASH, EEPROM, etc.