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:
@ -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;
|
||||
|
Reference in New Issue
Block a user