mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-14 04:18:56 +00:00
Fix buf_id read for ISO transfer.
This commit is contained in:
parent
5666aa196f
commit
549f20d179
@ -275,7 +275,6 @@ static void handle_bus_reset(uint8_t rhport) {
|
||||
// Handle CTR interrupt for the TX/IN direction
|
||||
static void handle_ctr_tx(uint32_t ep_id) {
|
||||
uint32_t ep_reg = ep_read(ep_id) | USB_EP_CTR_TX | USB_EP_CTR_RX;
|
||||
ep_reg &= USB_EPREG_MASK;
|
||||
|
||||
uint8_t const ep_num = ep_reg & USB_EPADDR_FIELD;
|
||||
xfer_ctl_t *xfer = xfer_ctl_ptr(ep_num, TUSB_DIR_IN);
|
||||
@ -694,7 +693,6 @@ bool dcd_edpt_iso_activate(uint8_t rhport, tusb_desc_endpoint_t const *desc_ep)
|
||||
static void dcd_transmit_packet(xfer_ctl_t *xfer, uint16_t ep_ix) {
|
||||
uint16_t len = tu_min16(xfer->total_len - xfer->queued_len, xfer->max_packet_size);
|
||||
uint32_t ep_reg = ep_read(ep_ix) | USB_EP_CTR_TX | USB_EP_CTR_RX; // reserve CTR
|
||||
ep_reg &= USB_EPREG_MASK | EP_STAT_MASK(TUSB_DIR_IN); // only change TX Status, reserve other toggle bits
|
||||
|
||||
bool const is_iso = ep_is_iso(ep_reg);
|
||||
|
||||
@ -719,6 +717,7 @@ static void dcd_transmit_packet(xfer_ctl_t *xfer, uint16_t ep_ix) {
|
||||
if (is_iso) {
|
||||
xfer->iso_in_sending = true;
|
||||
}
|
||||
ep_reg &= USB_EPREG_MASK | EP_STAT_MASK(TUSB_DIR_IN); // only change TX Status, reserve other toggle bits
|
||||
ep_write(ep_ix, ep_reg, true);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user