Skip to content
Snippets Groups Projects
Commit 1c4971b4 authored by Hinnerk van Bruinehsen's avatar Hinnerk van Bruinehsen
Browse files

Merge pull request #1831 from LudwigOrtmann/periph_gpio_ifdef

drivers/periph/gpio: fix #ifdef instead of #if
parents d232595a b3266fee
No related branches found
No related tags found
No related merge requests found
FEATURES_PROVIDED = periph_gpio FEATURES_PROVIDED =
...@@ -261,7 +261,7 @@ ...@@ -261,7 +261,7 @@
/** /**
* @brief GPIO configuration * @brief GPIO configuration
*/ */
#define GPIO_NUMOF (15U) #define GPIO_NUMOF (0U)
#define GPIO_0_EN 0 #define GPIO_0_EN 0
#define GPIO_1_EN 0 #define GPIO_1_EN 0
#define GPIO_2_EN 0 #define GPIO_2_EN 0
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#include "periph/gpio.h" #include "periph/gpio.h"
#include "periph_conf.h" #include "periph_conf.h"
#if GPIO_NUMOF
typedef struct { typedef struct {
void (*cb)(void); void (*cb)(void);
} gpio_state_t; } gpio_state_t;
...@@ -69,3 +71,5 @@ void gpio_toggle(gpio_t dev) ...@@ -69,3 +71,5 @@ void gpio_toggle(gpio_t dev)
void gpio_write(gpio_t dev, int value) void gpio_write(gpio_t dev, int value)
{ {
} }
#endif /* GPIO_NUMOF */
...@@ -29,100 +29,100 @@ ...@@ -29,100 +29,100 @@
* @brief Definition of available GPIO devices. Each device is managing exactly one pin. * @brief Definition of available GPIO devices. Each device is managing exactly one pin.
*/ */
typedef enum { typedef enum {
#ifdef GPIO_0_EN #if GPIO_0_EN
GPIO_0 = 0, /**< GPIO device 0 */ GPIO_0 = 0, /**< GPIO device 0 */
#endif #endif
#ifdef GPIO_1_EN #if GPIO_1_EN
GPIO_1, /**< GPIO device 1 */ GPIO_1, /**< GPIO device 1 */
#endif #endif
#ifdef GPIO_2_EN #if GPIO_2_EN
GPIO_2, /**< GPIO device 2 */ GPIO_2, /**< GPIO device 2 */
#endif #endif
#ifdef GPIO_3_EN #if GPIO_3_EN
GPIO_3, /**< GPIO device 3 */ GPIO_3, /**< GPIO device 3 */
#endif #endif
#ifdef GPIO_4_EN #if GPIO_4_EN
GPIO_4, /**< GPIO device 4 */ GPIO_4, /**< GPIO device 4 */
#endif #endif
#ifdef GPIO_5_EN #if GPIO_5_EN
GPIO_5, /**< GPIO device 5 */ GPIO_5, /**< GPIO device 5 */
#endif #endif
#ifdef GPIO_6_EN #if GPIO_6_EN
GPIO_6, /**< GPIO device 6 */ GPIO_6, /**< GPIO device 6 */
#endif #endif
#ifdef GPIO_7_EN #if GPIO_7_EN
GPIO_7, /**< GPIO device 7 */ GPIO_7, /**< GPIO device 7 */
#endif #endif
#ifdef GPIO_8_EN #if GPIO_8_EN
GPIO_8, /**< GPIO device 8 */ GPIO_8, /**< GPIO device 8 */
#endif #endif
#ifdef GPIO_9_EN #if GPIO_9_EN
GPIO_9, /**< GPIO device 9 */ GPIO_9, /**< GPIO device 9 */
#endif #endif
#ifdef GPIO_10_EN #if GPIO_10_EN
GPIO_10, /**< GPIO device 10 */ GPIO_10, /**< GPIO device 10 */
#endif #endif
#ifdef GPIO_11_EN #if GPIO_11_EN
GPIO_11, /**< GPIO device 11 */ GPIO_11, /**< GPIO device 11 */
#endif #endif
#ifdef GPIO_12_EN #if GPIO_12_EN
GPIO_12, /**< GPIO device 12 */ GPIO_12, /**< GPIO device 12 */
#endif #endif
#ifdef GPIO_13_EN #if GPIO_13_EN
GPIO_13, /**< GPIO device 13 */ GPIO_13, /**< GPIO device 13 */
#endif #endif
#ifdef GPIO_14_EN #if GPIO_14_EN
GPIO_14, /**< GPIO device 14 */ GPIO_14, /**< GPIO device 14 */
#endif #endif
#ifdef GPIO_15_EN #if GPIO_15_EN
GPIO_15, /**< GPIO device 15 */ GPIO_15, /**< GPIO device 15 */
#endif #endif
#ifdef GPIO_16_EN #if GPIO_16_EN
GPIO_16, /**< GPIO device 16 */ GPIO_16, /**< GPIO device 16 */
#endif #endif
#ifdef GPIO_17_EN #if GPIO_17_EN
GPIO_17, /**< GPIO device 17 */ GPIO_17, /**< GPIO device 17 */
#endif #endif
#ifdef GPIO_18_EN #if GPIO_18_EN
GPIO_18, /**< GPIO device 18 */ GPIO_18, /**< GPIO device 18 */
#endif #endif
#ifdef GPIO_19_EN #if GPIO_19_EN
GPIO_19, /**< GPIO device 19 */ GPIO_19, /**< GPIO device 19 */
#endif #endif
#ifdef GPIO_20_EN #if GPIO_20_EN
GPIO_20, /**< GPIO device 20 */ GPIO_20, /**< GPIO device 20 */
#endif #endif
#ifdef GPIO_21_EN #if GPIO_21_EN
GPIO_21, /**< GPIO device 21 */ GPIO_21, /**< GPIO device 21 */
#endif #endif
#ifdef GPIO_22_EN #if GPIO_22_EN
GPIO_22, /**< GPIO device 22 */ GPIO_22, /**< GPIO device 22 */
#endif #endif
#ifdef GPIO_23_EN #if GPIO_23_EN
GPIO_23, /**< GPIO device 23 */ GPIO_23, /**< GPIO device 23 */
#endif #endif
#ifdef GPIO_24_EN #if GPIO_24_EN
GPIO_24, /**< GPIO device 24 */ GPIO_24, /**< GPIO device 24 */
#endif #endif
#ifdef GPIO_25_EN #if GPIO_25_EN
GPIO_25, /**< GPIO device 25 */ GPIO_25, /**< GPIO device 25 */
#endif #endif
#ifdef GPIO_26_EN #if GPIO_26_EN
GPIO_26, /**< GPIO device 26 */ GPIO_26, /**< GPIO device 26 */
#endif #endif
#ifdef GPIO_27_EN #if GPIO_27_EN
GPIO_27, /**< GPIO device 27 */ GPIO_27, /**< GPIO device 27 */
#endif #endif
#ifdef GPIO_28_EN #if GPIO_28_EN
GPIO_28, /**< GPIO device 28 */ GPIO_28, /**< GPIO device 28 */
#endif #endif
#ifdef GPIO_29_EN #if GPIO_29_EN
GPIO_29, /**< GPIO device 29 */ GPIO_29, /**< GPIO device 29 */
#endif #endif
#ifdef GPIO_30_EN #if GPIO_30_EN
GPIO_30, /**< GPIO device 30 */ GPIO_30, /**< GPIO device 30 */
#endif #endif
#ifdef GPIO_31_EN #if GPIO_31_EN
GPIO_31, /**< GPIO device 31 */ GPIO_31, /**< GPIO device 31 */
#endif #endif
} gpio_t; } gpio_t;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment