Skip to content

Commit

Permalink
[Core] RP2040 disable PIO IRQs on serial timeout (qmk#17839)
Browse files Browse the repository at this point in the history
  • Loading branch information
KarlK90 authored and nolanseaton committed Jan 23, 2023
1 parent ff2a54e commit fc6bc1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions platforms/chibios/drivers/vendor/RP/RP2040/serial_vendor.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ static inline msg_t sync_tx(sysinterval_t timeout) {
pio_set_irq0_source_enabled(pio, pis_sm0_tx_fifo_not_full + tx_state_machine, true);
msg = osalThreadSuspendTimeoutS(&tx_thread, timeout);
if (msg < MSG_OK) {
pio_set_irq0_source_enabled(pio, pis_sm0_tx_fifo_not_full + tx_state_machine, false);
break;
}
}
Expand Down Expand Up @@ -265,6 +266,7 @@ static inline msg_t sync_rx(sysinterval_t timeout) {
pio_set_irq0_source_enabled(pio, pis_sm0_rx_fifo_not_empty + rx_state_machine, true);
msg = osalThreadSuspendTimeoutS(&rx_thread, timeout);
if (msg < MSG_OK) {
pio_set_irq0_source_enabled(pio, pis_sm0_rx_fifo_not_empty + rx_state_machine, false);
break;
}
}
Expand Down

0 comments on commit fc6bc1b

Please sign in to comment.