diff --git a/components/asic/bm1370.c b/components/asic/bm1370.c index 7ab12d506..4d2680323 100644 --- a/components/asic/bm1370.c +++ b/components/asic/bm1370.c @@ -100,7 +100,7 @@ static void _send_BM1370(uint8_t header, uint8_t * data, uint8_t data_len, bool } // send serial data - if (SERIAL_send(buf, total_length, debug) == 0) { + if (SERIAL_send(buf, total_length, debug) == ESP_FAIL) { ESP_LOGE(TAG, "Failed to send data to BM1370"); } diff --git a/components/asic/include/serial.h b/components/asic/include/serial.h index a8adef983..81d9b3447 100644 --- a/components/asic/include/serial.h +++ b/components/asic/include/serial.h @@ -4,7 +4,7 @@ #define SERIAL_BUF_SIZE 16 #define CHUNK_SIZE 1024 -int SERIAL_send(uint8_t *, int, bool); +esp_err_t SERIAL_send(uint8_t *, int, bool); void SERIAL_init(void); void SERIAL_debug_rx(void); int16_t SERIAL_rx(uint8_t *, uint16_t, uint16_t);