diff options
| author | hathach <[email protected]> | 2018-03-11 13:59:37 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-03-11 13:59:37 +0700 |
| commit | 43cf0fb3dfeb87fadeed3b1c0f4ca9ae49df0422 (patch) | |
| tree | 547baee54bceccad9f1f3b1a6cbf4126af18fcf3 /hw | |
| parent | bf9fc1b31861c563253e429cbc10ed7362612d5b (diff) | |
refactor dcd_xfer_complete
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/mcu/nxp/lpc43xx/tusb_port/dcd_lpc43xx.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/mcu/nxp/lpc43xx/tusb_port/dcd_lpc43xx.c b/hw/mcu/nxp/lpc43xx/tusb_port/dcd_lpc43xx.c index f09529278..2ec14a4a2 100644 --- a/hw/mcu/nxp/lpc43xx/tusb_port/dcd_lpc43xx.c +++ b/hw/mcu/nxp/lpc43xx/tusb_port/dcd_lpc43xx.c @@ -406,8 +406,8 @@ void xfer_complete_isr(uint8_t port, uint32_t reg_complete) if (p_qtd->int_on_complete)
{
- tusb_event_t event = ( p_qtd->xact_err || p_qtd->halted || p_qtd->buffer_err ) ? TUSB_EVENT_XFER_ERROR : TUSB_EVENT_XFER_COMPLETE;
- usbd_xfer_isr(edpt_hdl, event, p_qtd->expected_bytes - p_qtd->total_bytes); // only number of bytes in the IOC qtd
+ bool succeeded = ( p_qtd->xact_err || p_qtd->halted || p_qtd->buffer_err ) ? false : true;
+ tusb_dcd_xfer_complete(edpt_hdl, p_qtd->expected_bytes - p_qtd->total_bytes, succeeded); // only number of bytes in the IOC qtd
}
}
}
@@ -481,9 +481,9 @@ void hal_dcd_isr(uint8_t port) .port = port,
.index = 0,
};
- tusb_event_t event = ( p_qtd->xact_err || p_qtd->halted || p_qtd->buffer_err ) ? TUSB_EVENT_XFER_ERROR : TUSB_EVENT_XFER_COMPLETE;
+ bool succeeded = ( p_qtd->xact_err || p_qtd->halted || p_qtd->buffer_err ) ? false : true;
- usbd_xfer_isr(edpt_hdl, event, 0); // TODO xferred bytes for control xfer is not needed yet !!!!
+ tusb_dcd_xfer_complete(edpt_hdl, 0, succeeded); // TODO xferred bytes for control xfer is not needed yet !!!!
}
}
}
|
