Skip to content

Commit 409c193

Browse files
authored
Merge pull request hathach#3313 from hathach/copilot/fix-dcd-edpt-xfer-issue
Add is_isr parameter to dcd_edpt_xfer, dcd_edpt_xfer_fifo, usbd_edpt_xfer, and usbd_edpt_xfer_fifo functions
2 parents 3af1bec + cea8661 commit 409c193

File tree

48 files changed

+193
-149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+193
-149
lines changed

src/class/audio/audio_device.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -503,10 +503,10 @@ static bool audiod_rx_xfer_isr(uint8_t rhport, audiod_function_t* audio, uint16_
503503
TU_VERIFY(0 < tu_fifo_write_n(&audio->ep_out_ff, audio->lin_buf_out, n_bytes_received));
504504

505505
// Schedule for next receive
506-
TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_out, audio->lin_buf_out, audio->ep_out_sz), false);
506+
TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_out, audio->lin_buf_out, audio->ep_out_sz, true));
507507
#else
508508
// Data is already placed in EP FIFO, schedule for next receive
509-
TU_VERIFY(usbd_edpt_xfer_fifo(rhport, audio->ep_out, &audio->ep_out_ff, audio->ep_out_sz), false);
509+
TU_VERIFY(usbd_edpt_xfer_fifo(rhport, audio->ep_out, &audio->ep_out_ff, audio->ep_out_sz, true));
510510
#endif
511511

512512
#if CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
@@ -574,10 +574,10 @@ static bool audiod_tx_xfer_isr(uint8_t rhport, audiod_function_t * audio, uint16
574574
#endif
575575
#if USE_LINEAR_BUFFER_TX
576576
tu_fifo_read_n(&audio->ep_in_ff, audio->lin_buf_in, n_bytes_tx);
577-
TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_in, audio->lin_buf_in, n_bytes_tx));
577+
TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_in, audio->lin_buf_in, n_bytes_tx, true));
578578
#else
579579
// Send everything in ISO EP FIFO
580-
TU_VERIFY(usbd_edpt_xfer_fifo(rhport, audio->ep_in, &audio->ep_in_ff, n_bytes_tx));
580+
TU_VERIFY(usbd_edpt_xfer_fifo(rhport, audio->ep_in, &audio->ep_in_ff, n_bytes_tx, true));
581581
#endif
582582

583583
// Call a weak callback here - a possibility for user to get informed former TX was completed and data gets now loaded into EP in buffer
@@ -610,7 +610,7 @@ bool tud_audio_int_n_write(uint8_t func_id, const audio_interrupt_data_t *data)
610610
// Check length
611611
if (tu_memcpy_s(int_ep_buf[func_id].buf, sizeof(int_ep_buf[func_id].buf), data, size) == 0) {
612612
// Schedule transmit
613-
TU_ASSERT(usbd_edpt_xfer(_audiod_fct[func_id].rhport, _audiod_fct[func_id].ep_int, int_ep_buf[func_id].buf, size), 0);
613+
TU_ASSERT(usbd_edpt_xfer(_audiod_fct[func_id].rhport, _audiod_fct[func_id].ep_int, int_ep_buf[func_id].buf, size, false));
614614
} else {
615615
// Release endpoint since we don't make any transfer
616616
usbd_edpt_release(_audiod_fct[func_id].rhport, _audiod_fct[func_id].ep_int);
@@ -622,7 +622,7 @@ bool tud_audio_int_n_write(uint8_t func_id, const audio_interrupt_data_t *data)
622622

623623
#if CFG_TUD_AUDIO_ENABLE_EP_OUT && CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
624624
// This function is called once a transmit of a feedback packet was successfully completed. Here, we get the next feedback value to be sent
625-
static inline bool audiod_fb_send(uint8_t func_id) {
625+
static inline bool audiod_fb_send(uint8_t func_id, bool is_isr) {
626626
audiod_function_t *audio = &_audiod_fct[func_id];
627627
uint8_t uac_version = tud_audio_n_version(func_id);
628628
// Format the feedback value
@@ -638,7 +638,7 @@ static inline bool audiod_fb_send(uint8_t func_id) {
638638
*audio->fb_buf = audio->feedback.value;
639639
}
640640

641-
return usbd_edpt_xfer(audio->rhport, audio->ep_fb, (uint8_t *) audio->fb_buf, uac_version == 1 ? 3 : 4);
641+
return usbd_edpt_xfer(audio->rhport, audio->ep_fb, (uint8_t *) audio->fb_buf, uac_version == 1 ? 3 : 4, is_isr);
642642
}
643643

644644
uint32_t tud_audio_feedback_update(uint8_t func_id, uint32_t cycles) {
@@ -1208,10 +1208,10 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *p
12081208
#endif
12091209
// Schedule first transmit if alternate interface is not zero, as sample data is available a ZLP is loaded
12101210
#if USE_LINEAR_BUFFER_TX
1211-
TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_in, audio->lin_buf_in, 0));
1211+
TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_in, audio->lin_buf_in, 0, false));
12121212
#else
12131213
// Send everything in ISO EP FIFO
1214-
TU_VERIFY(usbd_edpt_xfer_fifo(rhport, audio->ep_in, &audio->ep_in_ff, 0));
1214+
TU_VERIFY(usbd_edpt_xfer_fifo(rhport, audio->ep_in, &audio->ep_in_ff, 0, false));
12151215
#endif
12161216
}
12171217
#endif// CFG_TUD_AUDIO_ENABLE_EP_IN
@@ -1227,9 +1227,9 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *p
12271227

12281228
// Prepare for incoming data
12291229
#if USE_LINEAR_BUFFER_RX
1230-
TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_out, audio->lin_buf_out, audio->ep_out_sz), false);
1230+
TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_out, audio->lin_buf_out, audio->ep_out_sz, false));
12311231
#else
1232-
TU_VERIFY(usbd_edpt_xfer_fifo(rhport, audio->ep_out, &audio->ep_out_ff, audio->ep_out_sz), false);
1232+
TU_VERIFY(usbd_edpt_xfer_fifo(rhport, audio->ep_out, &audio->ep_out_ff, audio->ep_out_sz, false));
12331233
#endif
12341234
}
12351235

@@ -1239,7 +1239,7 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *p
12391239
audio->ep_fb = ep_addr;
12401240
audio->feedback.frame_shift = desc_ep->bInterval - 1;
12411241
// Schedule first feedback transmit
1242-
audiod_fb_send(func_id);
1242+
audiod_fb_send(func_id, false);
12431243
}
12441244
#else
12451245
(void) is_feedback_ep;
@@ -1538,7 +1538,7 @@ bool audiod_xfer_isr(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint
15381538
if (audio->ep_fb == ep_addr) {
15391539
// Schedule a transmit with the new value if EP is not busy
15401540
// Schedule next transmission - value is changed bytud_audio_n_fb_set() in the meantime or the old value gets sent
1541-
audiod_fb_send(func_id);
1541+
audiod_fb_send(func_id, true);
15421542
return true;
15431543
}
15441544
#endif

src/class/bth/bth_device.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static bool bt_tx_data(uint8_t ep, void *data, uint16_t len) {
6767
// skip if previous transfer not complete
6868
TU_VERIFY(!usbd_edpt_busy(rhport, ep));
6969

70-
TU_ASSERT(usbd_edpt_xfer(rhport, ep, data, len));
70+
TU_ASSERT(usbd_edpt_xfer(rhport, ep, data, len, false));
7171

7272
return true;
7373
}
@@ -169,7 +169,7 @@ uint16_t btd_open(uint8_t rhport, tusb_desc_interface_t const *itf_desc, uint16_
169169
itf_desc = (tusb_desc_interface_t const *) tu_desc_next(tu_desc_next(desc_ep));
170170

171171
// Prepare for incoming data from host
172-
TU_ASSERT(usbd_edpt_xfer(rhport, _btd_itf.ep_acl_out, _btd_epbuf.epout_buf, CFG_TUD_BTH_DATA_EPSIZE), 0);
172+
TU_ASSERT(usbd_edpt_xfer(rhport, _btd_itf.ep_acl_out, _btd_epbuf.epout_buf, CFG_TUD_BTH_DATA_EPSIZE, false), 0);
173173

174174
drv_len = hci_itf_size;
175175

@@ -272,7 +272,7 @@ bool btd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result,
272272
tud_bt_acl_data_received_cb(_btd_epbuf.epout_buf, xferred_bytes);
273273

274274
// prepare for next data
275-
TU_ASSERT(usbd_edpt_xfer(rhport, _btd_itf.ep_acl_out, _btd_epbuf.epout_buf, CFG_TUD_BTH_DATA_EPSIZE));
275+
TU_ASSERT(usbd_edpt_xfer(rhport, _btd_itf.ep_acl_out, _btd_epbuf.epout_buf, CFG_TUD_BTH_DATA_EPSIZE, false));
276276
} else if (ep_addr == _btd_itf.ep_ev) {
277277
tud_bt_event_sent_cb((uint16_t) xferred_bytes);
278278
} else if (ep_addr == _btd_itf.ep_acl_in) {

src/class/cdc/cdc_device.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ bool tud_cdc_n_notify_uart_state (uint8_t itf, const cdc_notify_uart_state_t *st
181181
notify_msg->request.wLength = sizeof(cdc_notify_uart_state_t);
182182
notify_msg->serial_state = *state;
183183

184-
return usbd_edpt_xfer(p_cdc->rhport, p_cdc->ep_notify, (uint8_t *)notify_msg, 8 + sizeof(cdc_notify_uart_state_t));
184+
return usbd_edpt_xfer(p_cdc->rhport, p_cdc->ep_notify, (uint8_t *)notify_msg, 8 + sizeof(cdc_notify_uart_state_t), false);
185185
}
186186

187187
bool tud_cdc_n_notify_conn_speed_change(uint8_t itf, const cdc_notify_conn_speed_change_t* conn_speed_change) {
@@ -199,7 +199,7 @@ bool tud_cdc_n_notify_conn_speed_change(uint8_t itf, const cdc_notify_conn_speed
199199
notify_msg->request.wLength = sizeof(cdc_notify_conn_speed_change_t);
200200
notify_msg->conn_speed_change = *conn_speed_change;
201201

202-
return usbd_edpt_xfer(p_cdc->rhport, p_cdc->ep_notify, (uint8_t *)notify_msg, 8 + sizeof(cdc_notify_conn_speed_change_t));
202+
return usbd_edpt_xfer(p_cdc->rhport, p_cdc->ep_notify, (uint8_t *)notify_msg, 8 + sizeof(cdc_notify_conn_speed_change_t), false);
203203
}
204204
#endif
205205

src/class/hid/hid_device.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ bool tud_hid_n_report(uint8_t instance, uint8_t report_id, void const *report, u
128128
TU_VERIFY(0 == tu_memcpy_s(p_epbuf->epin, CFG_TUD_HID_EP_BUFSIZE, report, len));
129129
}
130130

131-
return usbd_edpt_xfer(rhport, p_hid->ep_in, p_epbuf->epin, len);
131+
return usbd_edpt_xfer(rhport, p_hid->ep_in, p_epbuf->epin, len, false);
132132
}
133133

134134
uint8_t tud_hid_n_interface_protocol(uint8_t instance) {
@@ -263,7 +263,7 @@ uint16_t hidd_open(uint8_t rhport, tusb_desc_interface_t const *desc_itf, uint16
263263

264264
// Prepare for output endpoint
265265
if (p_hid->ep_out) {
266-
TU_ASSERT(usbd_edpt_xfer(rhport, p_hid->ep_out, p_epbuf->epout, CFG_TUD_HID_EP_BUFSIZE), drv_len);
266+
TU_ASSERT(usbd_edpt_xfer(rhport, p_hid->ep_out, p_epbuf->epout, CFG_TUD_HID_EP_BUFSIZE, false), drv_len);
267267
}
268268

269269
return drv_len;
@@ -413,7 +413,7 @@ bool hidd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_
413413
}
414414

415415
// prepare for new transfer
416-
TU_ASSERT(usbd_edpt_xfer(rhport, p_hid->ep_out, p_epbuf->epout, CFG_TUD_HID_EP_BUFSIZE));
416+
TU_ASSERT(usbd_edpt_xfer(rhport, p_hid->ep_out, p_epbuf->epout, CFG_TUD_HID_EP_BUFSIZE, false));
417417
}
418418

419419
return true;

src/class/msc/msc_device.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ TU_ATTR_ALWAYS_INLINE static inline bool send_csw(mscd_interface_t* p_msc) {
115115
p_msc->csw.data_residue = p_msc->cbw.total_bytes - p_msc->xferred_len;
116116
p_msc->stage = MSC_STAGE_STATUS_SENT;
117117
memcpy(_mscd_epbuf.buf, &p_msc->csw, sizeof(msc_csw_t)); //-V1086
118-
return usbd_edpt_xfer(rhport, p_msc->ep_in , _mscd_epbuf.buf, sizeof(msc_csw_t));
118+
return usbd_edpt_xfer(rhport, p_msc->ep_in , _mscd_epbuf.buf, sizeof(msc_csw_t), false);
119119
}
120120

121121
TU_ATTR_ALWAYS_INLINE static inline bool prepare_cbw(mscd_interface_t* p_msc) {
122122
uint8_t rhport = p_msc->rhport;
123123
p_msc->stage = MSC_STAGE_CMD;
124-
return usbd_edpt_xfer(rhport, p_msc->ep_out, _mscd_epbuf.buf, sizeof(msc_cbw_t));
124+
return usbd_edpt_xfer(rhport, p_msc->ep_out, _mscd_epbuf.buf, sizeof(msc_cbw_t), false);
125125
}
126126

127127
static void fail_scsi_op(mscd_interface_t* p_msc, uint8_t status) {
@@ -537,7 +537,7 @@ bool mscd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t event, uint32_t
537537
} else {
538538
// Didn't check for case 9 (Ho > Dn), which requires examining scsi command first
539539
// but it is OK to just receive data then responded with failed status
540-
TU_ASSERT(usbd_edpt_xfer(rhport, p_msc->ep_out, _mscd_epbuf.buf, (uint16_t) p_msc->total_len));
540+
TU_ASSERT(usbd_edpt_xfer(rhport, p_msc->ep_out, _mscd_epbuf.buf, (uint16_t) p_msc->total_len, false));
541541
}
542542
} else {
543543
// First process if it is a built-in commands
@@ -569,7 +569,7 @@ bool mscd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t event, uint32_t
569569
} else {
570570
// cannot return more than host expect
571571
p_msc->total_len = tu_min32((uint32_t)resplen, p_cbw->total_bytes);
572-
TU_ASSERT(usbd_edpt_xfer(rhport, p_msc->ep_in, _mscd_epbuf.buf, (uint16_t) p_msc->total_len));
572+
TU_ASSERT(usbd_edpt_xfer(rhport, p_msc->ep_in, _mscd_epbuf.buf, (uint16_t) p_msc->total_len, false));
573573
}
574574
}
575575
}
@@ -866,7 +866,7 @@ static void proc_read10_cmd(mscd_interface_t* p_msc) {
866866
static void proc_read_io_data(mscd_interface_t* p_msc, int32_t nbytes) {
867867
const uint8_t rhport = p_msc->rhport;
868868
if (nbytes > 0) {
869-
TU_ASSERT(usbd_edpt_xfer(rhport, p_msc->ep_in, _mscd_epbuf.buf, (uint16_t) nbytes),);
869+
TU_ASSERT(usbd_edpt_xfer(rhport, p_msc->ep_in, _mscd_epbuf.buf, (uint16_t) nbytes, false),);
870870
} else {
871871
// nbytes is status
872872
switch (nbytes) {
@@ -902,7 +902,7 @@ static void proc_write10_cmd(mscd_interface_t* p_msc) {
902902
// remaining bytes capped at class buffer
903903
uint16_t nbytes = (uint16_t)tu_min32(CFG_TUD_MSC_EP_BUFSIZE, p_cbw->total_bytes - p_msc->xferred_len);
904904
// Write10 callback will be called later when usb transfer complete
905-
TU_ASSERT(usbd_edpt_xfer(p_msc->rhport, p_msc->ep_out, _mscd_epbuf.buf, nbytes),);
905+
TU_ASSERT(usbd_edpt_xfer(p_msc->rhport, p_msc->ep_out, _mscd_epbuf.buf, nbytes, false),);
906906
}
907907

908908
// process new data arrived from WRITE10

src/class/mtp/mtp_device.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ TU_ATTR_UNUSED static const char* _mtp_phase_str[] = {
191191
//--------------------------------------------------------------------+
192192
static bool prepare_new_command(mtpd_interface_t* p_mtp) {
193193
p_mtp->phase = MTP_PHASE_COMMAND;
194-
return usbd_edpt_xfer(p_mtp->rhport, p_mtp->ep_out, _mtpd_epbuf.buf, CFG_TUD_MTP_EP_BUFSIZE);
194+
return usbd_edpt_xfer(p_mtp->rhport, p_mtp->ep_out, _mtpd_epbuf.buf, CFG_TUD_MTP_EP_BUFSIZE, false);
195195
}
196196

197197
static bool mtpd_data_xfer(mtp_container_info_t* p_container, uint8_t ep_addr) {
@@ -219,7 +219,7 @@ static bool mtpd_data_xfer(mtp_container_info_t* p_container, uint8_t ep_addr) {
219219
if (xact_len) {
220220
// already transferred all bytes in header's length. Application make an unnecessary extra call
221221
TU_VERIFY(usbd_edpt_claim(p_mtp->rhport, ep_addr));
222-
TU_ASSERT(usbd_edpt_xfer(p_mtp->rhport, ep_addr, _mtpd_epbuf.buf, xact_len));
222+
TU_ASSERT(usbd_edpt_xfer(p_mtp->rhport, ep_addr, _mtpd_epbuf.buf, xact_len, false));
223223
}
224224
return true;
225225
}
@@ -238,7 +238,7 @@ bool tud_mtp_response_send(mtp_container_info_t* p_container) {
238238
p_container->header->type = MTP_CONTAINER_TYPE_RESPONSE_BLOCK;
239239
p_container->header->transaction_id = p_mtp->command.header.transaction_id;
240240
TU_VERIFY(usbd_edpt_claim(p_mtp->rhport, p_mtp->ep_in));
241-
return usbd_edpt_xfer(p_mtp->rhport, p_mtp->ep_in, _mtpd_epbuf.buf, (uint16_t)p_container->header->len);
241+
return usbd_edpt_xfer(p_mtp->rhport, p_mtp->ep_in, _mtpd_epbuf.buf, (uint16_t) p_container->header->len, false);
242242
}
243243

244244
bool tud_mtp_mounted(void) {
@@ -251,7 +251,7 @@ bool tud_mtp_event_send(mtp_event_t* event) {
251251
TU_VERIFY(p_mtp->ep_event != 0);
252252
_mtpd_epbuf.buf_event = *event;
253253
TU_VERIFY(usbd_edpt_claim(p_mtp->rhport, p_mtp->ep_event)); // Claim the endpoint
254-
return usbd_edpt_xfer(p_mtp->rhport, p_mtp->ep_event, (uint8_t*) &_mtpd_epbuf.buf_event, sizeof(mtp_event_t));
254+
return usbd_edpt_xfer(p_mtp->rhport, p_mtp->ep_event, (uint8_t*) &_mtpd_epbuf.buf_event, sizeof(mtp_event_t), false);
255255
}
256256

257257
//--------------------------------------------------------------------+

src/class/net/ecm_rndis_device.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ static bool can_xmit;
8282
static bool ecm_link_is_up = true; // Store link state for ECM mode
8383

8484
void tud_network_recv_renew(void) {
85-
usbd_edpt_xfer(0, _netd_itf.ep_out, _netd_epbuf.rx, NETD_PACKET_SIZE);
85+
usbd_edpt_xfer(0, _netd_itf.ep_out, _netd_epbuf.rx, NETD_PACKET_SIZE, false);
8686
}
8787

8888
static void do_in_xfer(uint8_t *buf, uint16_t len) {
8989
can_xmit = false;
90-
usbd_edpt_xfer(0, _netd_itf.ep_in, buf, len);
90+
usbd_edpt_xfer(0, _netd_itf.ep_in, buf, len, false);
9191
}
9292

9393
void netd_report(uint8_t *buf, uint16_t len) {
@@ -100,7 +100,7 @@ void netd_report(uint8_t *buf, uint16_t len) {
100100
}
101101

102102
memcpy(_netd_epbuf.notify, buf, len);
103-
usbd_edpt_xfer(rhport, _netd_itf.ep_notif, _netd_epbuf.notify, len);
103+
usbd_edpt_xfer(rhport, _netd_itf.ep_notif, _netd_epbuf.notify, len, false);
104104
}
105105

106106
//--------------------------------------------------------------------+

src/class/net/ncm_device.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ static void notification_xmit(uint8_t rhport, bool force_next) {
201201

202202
uint16_t notif_len = sizeof(notify_speed_change.header) + notify_speed_change.header.wLength;
203203
ncm_epbuf.epnotif = notify_speed_change;
204-
usbd_edpt_xfer(rhport, ncm_interface.ep_notif, (uint8_t*) &ncm_epbuf.epnotif, notif_len);
204+
usbd_edpt_xfer(rhport, ncm_interface.ep_notif, (uint8_t*) &ncm_epbuf.epnotif, notif_len, false);
205205

206206
ncm_interface.notification_xmit_state = NOTIFICATION_CONNECTED;
207207
ncm_interface.notification_xmit_is_running = true;
@@ -223,7 +223,7 @@ static void notification_xmit(uint8_t rhport, bool force_next) {
223223

224224
uint16_t notif_len = sizeof(notify_connected.header) + notify_connected.header.wLength;
225225
ncm_epbuf.epnotif = notify_connected;
226-
usbd_edpt_xfer(rhport, ncm_interface.ep_notif, (uint8_t *) &ncm_epbuf.epnotif, notif_len);
226+
usbd_edpt_xfer(rhport, ncm_interface.ep_notif, (uint8_t *) &ncm_epbuf.epnotif, notif_len, false);
227227

228228
ncm_interface.notification_xmit_state = NOTIFICATION_DONE;
229229
ncm_interface.notification_xmit_is_running = true;
@@ -327,7 +327,7 @@ static bool xmit_insert_required_zlp(uint8_t rhport, uint32_t xferred_bytes) {
327327
TU_LOG_DRV("xmit_insert_required_zlp! (%u)\n", (unsigned) xferred_bytes);
328328

329329
// start transmission of the ZLP
330-
usbd_edpt_xfer(rhport, ncm_interface.ep_in, NULL, 0);
330+
usbd_edpt_xfer(rhport, ncm_interface.ep_in, NULL, 0, false);
331331

332332
return true;
333333
} // xmit_insert_required_zlp
@@ -373,7 +373,7 @@ static void xmit_start_if_possible(uint8_t rhport) {
373373
}
374374

375375
// Kick off an endpoint transfer
376-
usbd_edpt_xfer(0, ncm_interface.ep_in, ncm_interface.xmit_tinyusb_ntb->data, ncm_interface.xmit_tinyusb_ntb->nth.wBlockLength);
376+
usbd_edpt_xfer(0, ncm_interface.ep_in, ncm_interface.xmit_tinyusb_ntb->data, ncm_interface.xmit_tinyusb_ntb->nth.wBlockLength, false);
377377
} // xmit_start_if_possible
378378

379379
/**
@@ -522,7 +522,7 @@ static void recv_try_to_start_new_reception(uint8_t rhport) {
522522

523523
// initiate transfer
524524
TU_LOG_DRV(" start reception\n");
525-
bool r = usbd_edpt_xfer(rhport, ncm_interface.ep_out, ncm_interface.recv_tinyusb_ntb->data, CFG_TUD_NCM_OUT_NTB_MAX_SIZE);
525+
bool r = usbd_edpt_xfer(rhport, ncm_interface.ep_out, ncm_interface.recv_tinyusb_ntb->data, CFG_TUD_NCM_OUT_NTB_MAX_SIZE, false);
526526
if (!r) {
527527
recv_put_ntb_into_free_list(ncm_interface.recv_tinyusb_ntb);
528528
ncm_interface.recv_tinyusb_ntb = NULL;

0 commit comments

Comments
 (0)