mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
add back edpt check before cbw, since bot reset can occurred any time
This commit is contained in:
parent
fc889ece74
commit
15fa2f447b
@ -323,7 +323,11 @@ bool mscd_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t
|
|||||||
if ( p_msc->stage == MSC_STAGE_CMD )
|
if ( p_msc->stage == MSC_STAGE_CMD )
|
||||||
{
|
{
|
||||||
// part of reset recovery (probably due to invalid CBW) -> prepare for new command
|
// part of reset recovery (probably due to invalid CBW) -> prepare for new command
|
||||||
TU_ASSERT( prepare_cbw(rhport, p_msc) );
|
// Note: skip if already queued previously
|
||||||
|
if ( usbd_edpt_ready(rhport, p_msc->ep_out) )
|
||||||
|
{
|
||||||
|
TU_ASSERT( prepare_cbw(rhport, p_msc) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user