From 271c518ec6deeef5b90f6bc8355f6373e41dc136 Mon Sep 17 00:00:00 2001 From: Inaky Perez-Gonzalez Date: Tue, 20 Jun 2017 17:01:58 -0700 Subject: [PATCH] uart_esp32: alter the uart.h include order to avoid warning The esp-idf package contains on the BSP a definition of the BIT macro unconditionally #defined when rom/uart.h is #included. When Zephyr's uart.h (which pulls in include/misc/util.h) that conditionally This generates a compile warning on the re-definiton of BIT by the esp-idf package. Thus include uart.h after esp-idf's rom/uart.h to have BIT not re-defined thanks to Zephyr's conditional definition. Signed-off-by: Inaky Perez-Gonzalez --- drivers/serial/uart_esp32.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/serial/uart_esp32.c b/drivers/serial/uart_esp32.c index 19669121fd40..cbe60bbfe795 100644 --- a/drivers/serial/uart_esp32.c +++ b/drivers/serial/uart_esp32.c @@ -4,8 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include +/* include rom/uart.h (from the esp-dif package) before Z's uart.h so + * that the definition of BIT is not overriden */ #include +#include #include #include