1
0
Fork 0
forked from forks/qmk_firmware

[Core] RP2040 disable PIO IRQs on serial timeout (#17839)

This commit is contained in:
Stefan Kerkmann 2022-07-29 20:13:16 +02:00 committed by GitHub
parent ade2eb1e75
commit a204523bbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}
}
@ -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;
}
}