mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
Merge branch 'bugfix/usj_fifo_8_32_read' into 'master'
fix(usb_serial_jtag): Fix issue that use u32_reg read/write cannot be used to modify fifo regs See merge request espressif/esp-idf!31879
This commit is contained in:
@@ -120,7 +120,7 @@ static inline int usb_serial_jtag_ll_read_rxfifo(uint8_t *buf, uint32_t rd_len)
|
||||
int i;
|
||||
for (i = 0; i < (int)rd_len; i++) {
|
||||
if (!USB_SERIAL_JTAG.ep1_conf.serial_out_ep_data_avail) break;
|
||||
buf[i] = HAL_FORCE_READ_U32_REG_FIELD(USB_SERIAL_JTAG.ep1, rdwr_byte);
|
||||
buf[i] = USB_SERIAL_JTAG.ep1.rdwr_byte;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ static inline int usb_serial_jtag_ll_write_txfifo(const uint8_t *buf, uint32_t w
|
||||
int i;
|
||||
for (i = 0; i < (int)wr_len; i++) {
|
||||
if (!USB_SERIAL_JTAG.ep1_conf.serial_in_ep_data_free) break;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(USB_SERIAL_JTAG.ep1, rdwr_byte, buf[i]);
|
||||
USB_SERIAL_JTAG.ep1.rdwr_byte = buf[i];
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
Reference in New Issue
Block a user