mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-28 16:20:26 +00:00
remove the use of TU_VERIFY_HDLR
This commit is contained in:
parent
94fed7db0e
commit
6f4b6a1d03
@ -995,12 +995,21 @@ bool usbd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t
|
|||||||
|
|
||||||
TU_LOG2(" Queue EP %02X with %u bytes ... ", ep_addr, total_bytes);
|
TU_LOG2(" Queue EP %02X with %u bytes ... ", ep_addr, total_bytes);
|
||||||
|
|
||||||
|
// Set busy first since the actual transfer can be complete before dcd_edpt_xfer() could return
|
||||||
|
// and usbd task can preempt and clear the busy
|
||||||
_usbd_dev.ep_status[epnum][dir].busy = true;
|
_usbd_dev.ep_status[epnum][dir].busy = true;
|
||||||
TU_VERIFY_HDLR( dcd_edpt_xfer(rhport, ep_addr, buffer, total_bytes), _usbd_dev.ep_status[epnum][dir].busy = false);
|
|
||||||
|
|
||||||
TU_LOG2("OK\r\n");
|
if ( dcd_edpt_xfer(rhport, ep_addr, buffer, total_bytes) )
|
||||||
|
{
|
||||||
return true;
|
TU_LOG2("OK\r\n");
|
||||||
|
return true;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
_usbd_dev.ep_status[epnum][dir].busy = false;
|
||||||
|
TU_LOG2("failed\r\n");
|
||||||
|
TU_BREAKPOINT();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool usbd_edpt_busy(uint8_t rhport, uint8_t ep_addr)
|
bool usbd_edpt_busy(uint8_t rhport, uint8_t ep_addr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user