mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-15 00:02:49 +03:00
uart: BW improvements (#4620)
* uart fixes and BW improvements * uart: read_char straightly use hw buffer * +attributes for functions called by ISR * uart: BW improvements read_char straightly use hw buffer (+ ~10%bw) read by block (+ ~190%bw) (instead of generic Stream::readBytes) attributes for functions called by ISR remove overrun message remove some ISR flags which were not honoured * fix merge * fix buffer overflow * serial stress test sketch * astyle * serial stress example: interactive keyboard, stop reading, overrun * serial device test: bandwidth & overrun * update + HardwareSerial::hasError() * interactive overrun in example * astyle * Test using @plerup's SoftwareSerial as submodule (tag 3.4.1) * update upstream ref (fix warning) * host mock uart/read(buf,size) * reset style changes in submodules before style diff * update build_boards_manager_package.sh for submodules * trigger CI (removing space) * cannot reproduce locally the CI issue, setting bash -x option to get live trace * remove previously added (in this PR) 'set -e' in package builder (passes local tests, not real CI) script-comment new recipe.hooks.core.prebuild.3 (along with already commented .1 and .2) moved CI package test to be first on the test list remove 'set -x', wish me luck
This commit is contained in:
@ -126,17 +126,20 @@ void uart_set_baudrate(uart_t* uart, int baud_rate);
|
||||
int uart_get_baudrate(uart_t* uart);
|
||||
|
||||
size_t uart_resize_rx_buffer(uart_t* uart, size_t new_size);
|
||||
size_t uart_get_rx_buffer_size(uart_t* uart);
|
||||
|
||||
size_t uart_write_char(uart_t* uart, char c);
|
||||
size_t uart_write(uart_t* uart, const char* buf, size_t size);
|
||||
int uart_read_char(uart_t* uart);
|
||||
int uart_peek_char(uart_t* uart);
|
||||
size_t uart_read(uart_t* uart, char* buffer, size_t size);
|
||||
size_t uart_rx_available(uart_t* uart);
|
||||
size_t uart_tx_free(uart_t* uart);
|
||||
void uart_wait_tx_empty(uart_t* uart);
|
||||
void uart_flush(uart_t* uart);
|
||||
|
||||
bool uart_has_overrun (uart_t* uart); // returns then clear overrun flag
|
||||
bool uart_has_rx_error (uart_t* uart); // returns then clear rxerror flag
|
||||
|
||||
void uart_set_debug(int uart_nr);
|
||||
int uart_get_debug();
|
||||
|
Reference in New Issue
Block a user