From 09af4ba1abf42da8637c96d45ddd65d7b17b01f9 Mon Sep 17 00:00:00 2001 From: Peter Bigot Date: Wed, 29 Jan 2020 08:27:13 -0600 Subject: [PATCH] gpio: mark deprecated flag macros Mark the outdated flag macros as deprecated so they can be fixed. Signed-off-by: Peter Bigot --- include/drivers/gpio.h | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/include/drivers/gpio.h b/include/drivers/gpio.h index 7eefb06853f..785f2ece8a5 100644 --- a/include/drivers/gpio.h +++ b/include/drivers/gpio.h @@ -265,26 +265,30 @@ extern "C" { * * @deprecated Replace with `GPIO_INPUT`. */ -#define GPIO_DIR_IN GPIO_INPUT +/* Deprecated in 2.2 release */ +#define GPIO_DIR_IN __DEPRECATED_MACRO GPIO_INPUT /** Legacy flag indicating pin is configured as output. * * @deprecated Replace with `GPIO_OUTPUT`. */ +/* Deprecated in 2.2 release */ #undef GPIO_DIR_OUT -#define GPIO_DIR_OUT GPIO_OUTPUT +#define GPIO_DIR_OUT __DEPRECATED_MACRO GPIO_OUTPUT /** Legacy flag indicating pin is disconnected when GPIO pin output is low. * * @deprecated Replace with `GPIO_OPEN_SOURCE`. */ -#define GPIO_DS_DISCONNECT_LOW GPIO_OPEN_SOURCE +/* Deprecated in 2.2 release */ +#define GPIO_DS_DISCONNECT_LOW __DEPRECATED_MACRO GPIO_OPEN_SOURCE /** Legacy flag indicating pin is disconnected when GPIO pin output is high. * * @deprecated Replace with `GPIO_OPEN_DRAIN`. */ -#define GPIO_DS_DISCONNECT_HIGH GPIO_OPEN_DRAIN +/* Deprecated in 2.2 release */ +#define GPIO_DS_DISCONNECT_HIGH __DEPRECATED_MACRO GPIO_OPEN_DRAIN /** @cond INTERNAL_HIDDEN */ #define GPIO_PUD_SHIFT 4 @@ -295,33 +299,38 @@ extern "C" { * * @deprecated Not used any more */ -#define GPIO_PUD_NORMAL 0U +/* Deprecated in 2.2 release */ +#define GPIO_PUD_NORMAL __DEPRECATED_MACRO 0U /** Enable GPIO pin pull-up. * * @deprecated Replace with `GPIO_PULL_UP`. */ +/* Deprecated in 2.2 release */ #undef GPIO_PUD_PULL_UP -#define GPIO_PUD_PULL_UP GPIO_PULL_UP +#define GPIO_PUD_PULL_UP __DEPRECATED_MACRO GPIO_PULL_UP /** Enable GPIO pin pull-down. * * @deprecated Replace with `GPIO_PULL_DOWN`. */ +/* Deprecated in 2.2 release */ #undef GPIO_PUD_PULL_DOWN -#define GPIO_PUD_PULL_DOWN GPIO_PULL_DOWN +#define GPIO_PUD_PULL_DOWN __DEPRECATED_MACRO GPIO_PULL_DOWN /** Legacy flag indicating that interrupt is enabled. * * @deprecated Replace with `GPIO_INT_ENABLE`. */ -#define GPIO_INT GPIO_INT_ENABLE +/* Deprecated in 2.2 release */ +#define GPIO_INT __DEPRECATED_MACRO GPIO_INT_ENABLE /** Legacy flag indicating that interrupt is level sensitive. * * @deprecated Replace with `GPIO_INT_LEVEL_LOW`, `GPIO_INT_LEVEL_HIGH`. */ -#define GPIO_INT_LEVEL (0U << 14) +/* Deprecated in 2.2 release */ +#define GPIO_INT_LEVEL __DEPRECATED_MACRO (0U << 14) /** Legacy flag setting indicating signal or interrupt active level. * @@ -335,8 +344,9 @@ extern "C" { * @deprecated Replace with `GPIO_ACTIVE_LOW` or `GPIO_INT_LOW_0` * depending on intent. */ +/* Deprecated in 2.2 release */ #undef GPIO_INT_ACTIVE_LOW -#define GPIO_INT_ACTIVE_LOW GPIO_INT_LOW_0 +#define GPIO_INT_ACTIVE_LOW __DEPRECATED_MACRO GPIO_INT_LOW_0 /** Legacy flag setting indicating signal or interrupt active level. * @@ -350,14 +360,16 @@ extern "C" { * @deprecated Replace with `GPIO_ACTIVE_HIGH` or `GPIO_INT_HIGH_1` * depending on intent. */ +/* Deprecated in 2.2 release */ #undef GPIO_INT_ACTIVE_HIGH -#define GPIO_INT_ACTIVE_HIGH GPIO_INT_HIGH_1 +#define GPIO_INT_ACTIVE_HIGH __DEPRECATED_MACRO GPIO_INT_HIGH_1 /** Legacy flag indicating interrupt triggers on both rising and falling edge. * * @deprecated Replace with `GPIO_INT_EDGE_BOTH`. */ -#define GPIO_INT_DOUBLE_EDGE GPIO_INT_EDGE_BOTH +/* Deprecated in 2.2 release */ +#define GPIO_INT_DOUBLE_EDGE __DEPRECATED_MACRO GPIO_INT_EDGE_BOTH /** @cond INTERNAL_HIDDEN */ #define GPIO_POL_SHIFT 0 @@ -368,13 +380,15 @@ extern "C" { * * @deprecated Replace with `GPIO_ACTIVE_HIGH`. */ -#define GPIO_POL_NORMAL GPIO_ACTIVE_HIGH +/* Deprecated in 2.2 release */ +#define GPIO_POL_NORMAL __DEPRECATED_MACRO GPIO_ACTIVE_HIGH /** Legacy flag indicating that GPIO pin polarity is inverted. * * @deprecated Replace with `GPIO_ACTIVE_LOW`. */ -#define GPIO_POL_INV GPIO_ACTIVE_LOW +/* Deprecated in 2.2 release */ +#define GPIO_POL_INV __DEPRECATED_MACRO GPIO_ACTIVE_LOW /** @} */