fix: begin cts rts (#9353)

Begin() may undo a setpins() that has set RTS and/or CTS pin.
This pins are only changed with RTS and CTS.
setpins() can be called after or before begin()
when called before, begin() shall not change those pins.
This commit is contained in:
Rodrigo Garcia 2024-03-11 10:09:50 -03:00 committed by GitHub
parent 4123e20a2c
commit b92ad5574a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -509,8 +509,6 @@ uart_t* uartBegin(uint8_t uart_nr, uint32_t baudrate, uint32_t config, int8_t rx
uart->_rxfifo_full_thrhd = rxfifo_full_thrhd;
uart->_rx_buffer_size = rx_buffer_size;
uart->_tx_buffer_size = tx_buffer_size;
uart->_ctsPin = -1;
uart->_rtsPin = -1;
uart->has_peek = false;
uart->peek_byte = 0;
}