mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
Implement invert for HardwareSerial (#6816)
* Simple i/f to turn on inverted logic on UART0. * Refactor invert from HardwareSerial to uart * Final refactoring of invert bits into config bitmap. * Overload instead of default arg for subclassing. * Prevent unwanted effects if setting invert on other than UART0 - only that has these flags defined and documented.
This commit is contained in:
committed by
Earle F. Philhower, III
parent
b478429fe4
commit
007e495e0d
@ -323,10 +323,11 @@ uart_get_bit_length(const int uart_nr)
|
||||
}
|
||||
|
||||
uart_t*
|
||||
uart_init(int uart_nr, int baudrate, int config, int mode, int tx_pin, size_t rx_size)
|
||||
uart_init(int uart_nr, int baudrate, int config, int mode, int tx_pin, size_t rx_size, bool invert)
|
||||
{
|
||||
(void) config;
|
||||
(void) tx_pin;
|
||||
(void) invert;
|
||||
uart_t* uart = (uart_t*) malloc(sizeof(uart_t));
|
||||
if(uart == NULL)
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user