Merge pull request #1181 from liamfraser/rp2040-hcd-assert-fix

Fix invalid assert in RP2040 host mode when compiled in debug mode
This commit is contained in:
Ha Thach 2021-11-05 21:40:42 +07:00 committed by GitHub
commit ab760290a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,12 +160,11 @@ static void hw_handle_buff_status(void)
static void hw_trans_complete(void)
{
struct hw_endpoint *ep = &epx;
assert(ep->active);
if (usb_hw->sie_ctrl & USB_SIE_CTRL_SEND_SETUP_BITS)
{
pico_trace("Sent setup packet\n");
struct hw_endpoint *ep = &epx;
assert(ep->active);
hw_xfer_complete(ep, XFER_RESULT_SUCCESS);
}
else