Skip to content

Commit 3fb65b6

Browse files
lbernstoneme-no-dev
authored andcommitted
Fix possible race condition in uart attach (#4569)
1 parent c3b4291 commit 3fb65b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp32/esp32-hal-uart.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ void uartAttachRx(uart_t* uart, uint8_t rxPin, bool inverted)
185185
return;
186186
}
187187
pinMode(rxPin, INPUT);
188-
pinMatrixInAttach(rxPin, UART_RXD_IDX(uart->num), inverted);
189188
uartEnableInterrupt(uart);
189+
pinMatrixInAttach(rxPin, UART_RXD_IDX(uart->num), inverted);
190190
}
191191

192192
void uartAttachTx(uart_t* uart, uint8_t txPin, bool inverted)

0 commit comments

Comments
 (0)