Skip to content

Commit 83398f6

Browse files
Don't bother testing isRxEnabled() on UART1 - it is always false.
1 parent e83dd4d commit 83398f6

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

cores/esp8266/HardwareSerial.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,7 @@ void ICACHE_RAM_ATTR uart_interrupt_handler(uart_t* uart) {
133133
}
134134

135135
// -------------- UART 1 --------------
136-
137-
if(Serial1.isRxEnabled()) {
138-
while(U1IS & (1 << UIFF)) {
139-
Serial1._rx_complete_irq((char) (U1F & 0xff));
140-
U1IC = (1 << UIFF);
141-
}
142-
}
136+
// Note: only TX is supported on UART 1.
143137
if(Serial1.isTxEnabled()) {
144138
if(U1IS & (1 << UIFE)) {
145139
U1IC = (1 << UIFE);
@@ -294,6 +288,7 @@ uart_t* uart_init(int uart_nr, int baudrate, byte config, byte mode) {
294288
IOSWAP &= ~(1 << IOSWAPU0);
295289
break;
296290
case UART1:
291+
// Note: uart_interrupt_handler does not support RX on UART 1.
297292
uart->rxEnabled = false;
298293
uart->txEnabled = (mode != SERIAL_RX_ONLY);
299294
uart->rxPin = 255;

0 commit comments

Comments
 (0)