Skip to content

Commit c1b06cc

Browse files
authored
Fix possible race condition in uart attach (espressif#4569)
1 parent 93c6226 commit c1b06cc

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)