From abfd0f5fc57a8948aaef0f5ba7c1632bc5ebe3df Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Sun, 17 Jul 2022 18:21:25 +0200 Subject: [PATCH 27/27] hal: conditional definition of gpio_port_t Define type `gpio_port_t` only if it is not yet defined by RIOT `periph/gpio`. When this header is used during the compilation of RIOT source, this type definition isn't required and leads to name conflicts with RIOT's `gpio_port_t` definition. The definition of `gpio_port_t` in this header is only required when ESP-IDF source code is compiled. In that case RIOT's `gpio_port_t` isn't defined. --- components/hal/include/hal/gpio_types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/hal/include/hal/gpio_types.h b/components/hal/include/hal/gpio_types.h index 0b60f7284a8..a5258525801 100644 --- a/components/hal/include/hal/gpio_types.h +++ b/components/hal/include/hal/gpio_types.h @@ -21,10 +21,12 @@ extern "C" { #endif +#ifndef HAVE_GPIO_PORT_T typedef enum { GPIO_PORT_0 = 0, GPIO_PORT_MAX, } gpio_port_t; +#endif #define GPIO_SEL_0 (BIT(0)) /*!< Pin 0 selected */ #define GPIO_SEL_1 (BIT(1)) /*!< Pin 1 selected */ -- 2.17.1