This got me scratching my head for awhile. In uart.c there are a few assertion type checks at the beginning of the function uart_read_bytes():
Code: Select all
int uart_read_bytes(uart_port_t uart_num, uint8_t* buf, uint32_t length, TickType_t ticks_to_wait)
{
UART_CHECK((uart_num < UART_NUM_MAX), "uart_num error", (-1));
UART_CHECK((buf), "uart_num error", (-1)); //<---
...
}