1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +03:00

Added Serial.setRxBufferSize method description in libraries reference document (#3862)

* Added null pointer check

* Fixed typo

* Added Serial.setRxBufferSize method description in libraries reference document
This commit is contained in:
Alessio Leoncini
2017-11-22 18:30:11 +01:00
committed by Develo
parent 9dcc580aef
commit fecacf167c
3 changed files with 12 additions and 3 deletions

View File

@ -104,6 +104,9 @@ int uart_peek_char(uart_t* uart)
int uart_read_char(uart_t* uart)
{
if(uart == NULL) {
return -1;
}
int data = uart_peek_char(uart);
if(data != -1) {
uart->rx_buffer->rpos = (uart->rx_buffer->rpos + 1) % uart->rx_buffer->size;