UART/Serial.write with communication status return
Posted: Thu Nov 29, 2018 6:58 am
while using ESP-NOW
it will return ESP_OK while the message is successfully delivered.
However, while using UART,
Return
(-1) Parameter error
OTHERS (>=0) The number of bytes pushed to the TX FIFO
How can we confirm the data is successfully delivered, without manually send a call back signal?
We are worried, when the usb is disconnected, the data transfering might be interrupted.
Code: Select all
esp_err_tesp_now_send(const uint8_t *peer_addr, const uint8_t *data, size_t len)
However, while using UART,
Code: Select all
int uart_write_bytes(uart_port_tuart_num, const char *src, size_t size)
(-1) Parameter error
OTHERS (>=0) The number of bytes pushed to the TX FIFO
How can we confirm the data is successfully delivered, without manually send a call back signal?
We are worried, when the usb is disconnected, the data transfering might be interrupted.