From a3d04a9fede70681b00412dd6419db736c432d1b Mon Sep 17 00:00:00 2001 From: Fabio <54480927+fabio-garavini@users.noreply.github.com> Date: Sat, 16 Dec 2023 09:42:36 +0100 Subject: [PATCH] Fix ESP-IDF undeclared 'highByte', 'lowByte' --- components/ld2450_uart.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/ld2450_uart.h b/components/ld2450_uart.h index 8cf0325..875d7d4 100644 --- a/components/ld2450_uart.h +++ b/components/ld2450_uart.h @@ -4,6 +4,9 @@ #define STATE_SIZE 8 #define TARGETS 3 +#define highByte(val) (uint8_t)((val) >> 8) +#define lowByte(val) (uint8_t)((val) & 0xff) + static const char *TAG = "ld2450"; class LD2450 : public PollingComponent, public UARTDevice {