diff --git a/cpu/cc2538/include/periph_cpu.h b/cpu/cc2538/include/periph_cpu.h index 2ded24080c27..4e29617b3607 100644 --- a/cpu/cc2538/include/periph_cpu.h +++ b/cpu/cc2538/include/periph_cpu.h @@ -153,7 +153,7 @@ typedef enum { GPIO_IN_PD = ((uint8_t)OVERRIDE_PULLDOWN), /**< input, pull-down */ GPIO_IN_PU = ((uint8_t)OVERRIDE_PULLUP), /**< input, pull-up */ GPIO_OUT = ((uint8_t)OVERRIDE_ENABLE), /**< output */ - GPIO_OD = (0xff), /**< not supported */ + GPIO_OD = (0xfe), /**< not supported */ GPIO_OD_PU = (0xff) /**< not supported */ } gpio_mode_t; /** @} */ diff --git a/cpu/cc2538/periph/gpio.c b/cpu/cc2538/periph/gpio.c index 82bf84e416e7..4ed0cd709229 100644 --- a/cpu/cc2538/periph/gpio.c +++ b/cpu/cc2538/periph/gpio.c @@ -31,7 +31,7 @@ #define ENABLE_DEBUG 0 #include "debug.h" -#define MODE_NOTSUP (0xff) +#define MODE_NOTSUP (0xf0) #ifdef MODULE_PERIPH_GPIO_IRQ static gpio_isr_ctx_t isr_ctx[4][8]; @@ -100,7 +100,7 @@ static inline uint8_t _pp_num(gpio_t pin) int gpio_init(gpio_t pin, gpio_mode_t mode) { /* check if mode is valid */ - if (mode == MODE_NOTSUP) { + if (mode >= MODE_NOTSUP) { return -1; }