From cf65070b060efe059c6990aebc7a017a1773b72d Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Thu, 7 Feb 2019 08:56:24 +0100 Subject: [PATCH] doxygen/GPIO: don't include overridden typedefs Add missing #ifndefs to overridden GPIO typedefs. Signed-off-by: Yegor Yefremov --- cpu/atmega_common/include/periph_cpu_common.h | 2 ++ cpu/cc2538/include/periph_cpu.h | 3 ++- cpu/esp32/include/periph_cpu.h | 2 ++ cpu/lpc1768/include/periph_cpu.h | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cpu/atmega_common/include/periph_cpu_common.h b/cpu/atmega_common/include/periph_cpu_common.h index fcf06d1c76..ac29608ea2 100644 --- a/cpu/atmega_common/include/periph_cpu_common.h +++ b/cpu/atmega_common/include/periph_cpu_common.h @@ -56,6 +56,7 @@ typedef uint8_t gpio_t; */ #define GPIO_PIN(x, y) ((x << 4) | y) +#ifndef DOXYGEN /** * @brief Override the GPIO flanks * @@ -73,6 +74,7 @@ typedef enum { GPIO_RISING, /**< emit interrupt on rising flank */ } gpio_flank_t; /** @} */ +#endif /* ndef DOXYGEN */ /** * @brief Use some common SPI functions diff --git a/cpu/cc2538/include/periph_cpu.h b/cpu/cc2538/include/periph_cpu.h index 5ded7dd543..9be6dcb402 100644 --- a/cpu/cc2538/include/periph_cpu.h +++ b/cpu/cc2538/include/periph_cpu.h @@ -138,6 +138,7 @@ typedef struct { #define PERIPH_SPI_NEEDS_TRANSFER_REGS /** @} */ +#ifndef DOXYGEN /** * @name Override the default GPIO mode settings * @{ @@ -153,7 +154,7 @@ typedef enum { GPIO_OD_PU = (0xff) /**< not supported */ } gpio_mode_t; /** @} */ - +#endif /* ndef DOXYGEN */ /** * @name UART device configuration diff --git a/cpu/esp32/include/periph_cpu.h b/cpu/esp32/include/periph_cpu.h index 6c42fa7c65..dfdfabb51b 100644 --- a/cpu/esp32/include/periph_cpu.h +++ b/cpu/esp32/include/periph_cpu.h @@ -82,6 +82,7 @@ typedef unsigned int gpio_t; #define GPIO_PIN_NUMOF (40) /** @} */ +#ifndef DOXYGEN /** * @brief Override mode flank selection values * @@ -117,6 +118,7 @@ typedef enum { GPIO_IN_OD_PU /**< input and open-drain output */ } gpio_mode_t; /** @} */ +#endif /* ndef DOXYGEN */ /** @} */ /** diff --git a/cpu/lpc1768/include/periph_cpu.h b/cpu/lpc1768/include/periph_cpu.h index 4e3d33846d..1e62873508 100644 --- a/cpu/lpc1768/include/periph_cpu.h +++ b/cpu/lpc1768/include/periph_cpu.h @@ -28,6 +28,7 @@ extern "C" { #endif +#ifndef DOXYGEN /** * @name Override the default GPIO type * @{ @@ -62,6 +63,7 @@ typedef enum { GPIO_OD_PU = (PIN_DIR_OUT | PIN_MODE_OD | PIN_MODE_PU) /**< open-drain output with pull-up */ } gpio_mode_t; /** @} */ +#endif /* ndef DOXYGEN */ /** * @brief CPU provides own pm_off() function