mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-06-30 04:21:00 +02:00
[UART] check if write data is valid
This commit is contained in:
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user