Skip to content

Commit 6b2965d

Browse files
authored
feat(uart_ci): trick for passing esp32 wokwi ci test
Wokwi ESP32 fails with the pinMode() in line 56|58 Real device with Arduino Core 3.1.2 and 3.2 needs it to fix the issue. This patch will skip the pinMode() when compiling with Wokwi and make it pass the CI test case.
1 parent f1412d6 commit 6b2965d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/validation/uart/uart.ino

+2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ public:
5454

5555
void begin(unsigned long baudrate) {
5656
// pinMode will force enabing the internal pullup resistor (IDF 5.3.2 Change)
57+
#ifdef ESP32 // Wokwi won't define it, therefore, it will ignore this line and pass Wokwi ESP32 CI
5758
pinMode(default_rx_pin, INPUT_PULLUP);
59+
#endif
5860
serial.begin(baudrate, SERIAL_8N1, default_rx_pin, default_tx_pin);
5961
while (!serial) {
6062
delay(10);

0 commit comments

Comments
 (0)