Skip to content

Commit 30132e8

Browse files
committed
Fix copilot issues
Signed-off-by: Mengsk <[email protected]>
1 parent 27415e6 commit 30132e8

File tree

17 files changed

+23
-30
lines changed

17 files changed

+23
-30
lines changed

hw/mcu/raspberry_pi/Pico-PIO-USB

Lines changed: 0 additions & 1 deletion
This file was deleted.

hw/mcu/st/cmsis_device_f4

Lines changed: 0 additions & 1 deletion
This file was deleted.

hw/mcu/st/stm32f4xx_hal_driver

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/CMSIS_5

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/FreeRTOS-Kernel

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/lwip

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/class/audio/audio_device.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -520,10 +520,10 @@ static bool audiod_rx_xfer_isr(uint8_t rhport, audiod_function_t* audio, uint16_
520520
TU_VERIFY(tu_fifo_write_n(&audio->ep_out_ff, audio->lin_buf_out, n_bytes_received));
521521

522522
// Schedule for next receive
523-
TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_out, audio->lin_buf_out, audio->ep_out_sz, true), false);
523+
TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_out, audio->lin_buf_out, audio->ep_out_sz, true));
524524
#else
525525
// Data is already placed in EP FIFO, schedule for next receive
526-
TU_VERIFY(usbd_edpt_xfer_fifo(rhport, audio->ep_out, &audio->ep_out_ff, audio->ep_out_sz, true), false);
526+
TU_VERIFY(usbd_edpt_xfer_fifo(rhport, audio->ep_out, &audio->ep_out_ff, audio->ep_out_sz, true));
527527
#endif
528528

529529
#if CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
@@ -607,7 +607,7 @@ bool tud_audio_int_n_write(uint8_t func_id, const audio_interrupt_data_t *data)
607607
// Check length
608608
if (tu_memcpy_s(int_ep_buf[func_id].buf, sizeof(int_ep_buf[func_id].buf), data, sizeof(audio_interrupt_data_t)) == 0) {
609609
// Schedule transmit
610-
TU_ASSERT(usbd_edpt_xfer(_audiod_fct[func_id].rhport, _audiod_fct[func_id].ep_int, int_ep_buf[func_id].buf, sizeof(int_ep_buf[func_id].buf)), 0);
610+
TU_ASSERT(usbd_edpt_xfer(_audiod_fct[func_id].rhport, _audiod_fct[func_id].ep_int, int_ep_buf[func_id].buf, sizeof(int_ep_buf[func_id].buf), false));
611611
} else {
612612
// Release endpoint since we don't make any transfer
613613
usbd_edpt_release(_audiod_fct[func_id].rhport, _audiod_fct[func_id].ep_int);
@@ -619,7 +619,7 @@ bool tud_audio_int_n_write(uint8_t func_id, const audio_interrupt_data_t *data)
619619

620620
#if CFG_TUD_AUDIO_ENABLE_EP_OUT && CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
621621
// This function is called once a transmit of a feedback packet was successfully completed. Here, we get the next feedback value to be sent
622-
static inline bool audiod_fb_send(audiod_function_t *audio) {
622+
static inline bool audiod_fb_send(audiod_function_t *audio, bool is_isr) {
623623
bool apply_correction = (TUSB_SPEED_FULL == tud_speed_get()) && audio->feedback.format_correction;
624624
// Format the feedback value
625625
if (apply_correction) {
@@ -647,7 +647,7 @@ static inline bool audiod_fb_send(audiod_function_t *audio) {
647647
// 10.14 3 3 Linux, OSX
648648
//
649649
// We send 3 bytes since sending packet larger than wMaxPacketSize is pretty ugly
650-
return usbd_edpt_xfer(audio->rhport, audio->ep_fb, (uint8_t *) audio->fb_buf, apply_correction ? 3 : 4);
650+
return usbd_edpt_xfer(audio->rhport, audio->ep_fb, (uint8_t *) audio->fb_buf, apply_correction ? 3 : 4, is_isr);
651651
}
652652
#endif
653653

@@ -1133,10 +1133,10 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *p
11331133
#endif
11341134
// Schedule first transmit if alternate interface is not zero, as sample data is available a ZLP is loaded
11351135
#if USE_LINEAR_BUFFER_TX
1136-
TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_in, audio->lin_buf_in, 0));
1136+
TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_in, audio->lin_buf_in, 0, false));
11371137
#else
11381138
// Send everything in ISO EP FIFO
1139-
TU_VERIFY(usbd_edpt_xfer_fifo(rhport, audio->ep_in, &audio->ep_in_ff, 0));
1139+
TU_VERIFY(usbd_edpt_xfer_fifo(rhport, audio->ep_in, &audio->ep_in_ff, 0, false));
11401140
#endif
11411141
}
11421142
#endif// CFG_TUD_AUDIO_ENABLE_EP_IN
@@ -1152,9 +1152,9 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *p
11521152

11531153
// Prepare for incoming data
11541154
#if USE_LINEAR_BUFFER_RX
1155-
TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_out, audio->lin_buf_out, audio->ep_out_sz), false);
1155+
TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_out, audio->lin_buf_out, audio->ep_out_sz, false));
11561156
#else
1157-
TU_VERIFY(usbd_edpt_xfer_fifo(rhport, audio->ep_out, &audio->ep_out_ff, audio->ep_out_sz), false);
1157+
TU_VERIFY(usbd_edpt_xfer_fifo(rhport, audio->ep_out, &audio->ep_out_ff, audio->ep_out_sz, false));
11581158
#endif
11591159
}
11601160

@@ -1164,7 +1164,7 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *p
11641164
audio->ep_fb = ep_addr;
11651165
audio->feedback.frame_shift = desc_ep->bInterval - 1;
11661166
// Schedule first feedback transmit
1167-
audiod_fb_send(audio);
1167+
audiod_fb_send(audio, false);
11681168
}
11691169
#endif
11701170
#endif// CFG_TUD_AUDIO_ENABLE_EP_OUT
@@ -1472,7 +1472,7 @@ bool audiod_xfer_isr(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint
14721472
if (audio->ep_fb == ep_addr) {
14731473
// Schedule a transmit with the new value if EP is not busy
14741474
// Schedule next transmission - value is changed bytud_audio_n_fb_set() in the meantime or the old value gets sent
1475-
audiod_fb_send(audio);
1475+
audiod_fb_send(audio, true);
14761476
return true;
14771477
}
14781478
#endif

src/class/cdc/cdc_device.c

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

199-
return usbd_edpt_xfer(p_cdc->rhport, p_cdc->ep_notify, (uint8_t *, false)notify_msg, 8 + sizeof(cdc_notify_uart_state_t));
199+
return usbd_edpt_xfer(p_cdc->rhport, p_cdc->ep_notify, (uint8_t *)notify_msg, 8 + sizeof(cdc_notify_uart_state_t), false);
200200
}
201201

202202
bool tud_cdc_n_notify_conn_speed_change(uint8_t itf, const cdc_notify_conn_speed_change_t* conn_speed_change) {
@@ -213,7 +213,7 @@ bool tud_cdc_n_notify_conn_speed_change(uint8_t itf, const cdc_notify_conn_speed
213213
notify_msg->request.wLength = sizeof(cdc_notify_conn_speed_change_t);
214214
notify_msg->conn_speed_change = *conn_speed_change;
215215

216-
return usbd_edpt_xfer(p_cdc->rhport, p_cdc->ep_notify, (uint8_t *, false)notify_msg, 8 + sizeof(cdc_notify_conn_speed_change_t));
216+
return usbd_edpt_xfer(p_cdc->rhport, p_cdc->ep_notify, (uint8_t *)notify_msg, 8 + sizeof(cdc_notify_conn_speed_change_t), false);
217217
}
218218
#endif
219219

src/class/mtp/mtp_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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*, false) &_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/ncm_device.c

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

206206
uint16_t notif_len = sizeof(notify_speed_change.header) + notify_speed_change.header.wLength;
207207
ncm_epbuf.epnotif = notify_speed_change;
208-
usbd_edpt_xfer(rhport, ncm_interface.ep_notif, (uint8_t*, false) &ncm_epbuf.epnotif, notif_len);
208+
usbd_edpt_xfer(rhport, ncm_interface.ep_notif, (uint8_t*) &ncm_epbuf.epnotif, notif_len, false);
209209

210210
ncm_interface.notification_xmit_state = NOTIFICATION_CONNECTED;
211211
ncm_interface.notification_xmit_is_running = true;
@@ -227,7 +227,7 @@ static void notification_xmit(uint8_t rhport, bool force_next) {
227227

228228
uint16_t notif_len = sizeof(notify_connected.header) + notify_connected.header.wLength;
229229
ncm_epbuf.epnotif = notify_connected;
230-
usbd_edpt_xfer(rhport, ncm_interface.ep_notif, (uint8_t *, false) &ncm_epbuf.epnotif, notif_len);
230+
usbd_edpt_xfer(rhport, ncm_interface.ep_notif, (uint8_t *) &ncm_epbuf.epnotif, notif_len, false);
231231

232232
ncm_interface.notification_xmit_state = NOTIFICATION_DONE;
233233
ncm_interface.notification_xmit_is_running = true;

0 commit comments

Comments
 (0)