[UART] check if write data is valid
This commit is contained in:
parent
f87107dedb
commit
381e88ec75
1 changed files with 1 additions and 1 deletions
|
|
@ -269,7 +269,7 @@ void uartWrite(uart_t* uart, uint8_t c)
|
||||||
|
|
||||||
void uartWriteBuf(uart_t* uart, const uint8_t * data, size_t len)
|
void uartWriteBuf(uart_t* uart, const uint8_t * data, size_t len)
|
||||||
{
|
{
|
||||||
if(uart == NULL) {
|
if(uart == NULL || data == NULL || !len) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue