diff --git a/boards/nucleo-f091/include/board.h b/boards/nucleo-f091/include/board.h index 3d13993d5f..6725b0bde9 100644 --- a/boards/nucleo-f091/include/board.h +++ b/boards/nucleo-f091/include/board.h @@ -16,6 +16,7 @@ * @brief Board specific definitions for the nucleo-f091 board * * @author Hauke Petersen + * @author Mohmmad Ayman */ #ifndef BOARD_H_ @@ -46,8 +47,8 @@ extern "C" { #define LED_RED_OFF #define LED_RED_TOGGLE -#define LED_GREEN_ON (LED_GREEN_PORT->BSRRL = (1 << LED_GREEN_PIN)) -#define LED_GREEN_OFF (LED_GREEN_PORT->BSRRH = (1 << LED_GREEN_PIN)) +#define LED_GREEN_ON (LED_GREEN_PORT->BSRR = (1 << LED_GREEN_PIN)) +#define LED_GREEN_OFF (LED_GREEN_PORT->BSRR = ((1 << LED_GREEN_PIN) << 16)) #define LED_GREEN_TOGGLE (LED_GREEN_PORT->ODR ^= (1 << LED_GREEN_PIN)) #define LED_ORANGE_ON diff --git a/boards/nucleo-f091/include/periph_conf.h b/boards/nucleo-f091/include/periph_conf.h index 578931409c..2fc290fb45 100644 --- a/boards/nucleo-f091/include/periph_conf.h +++ b/boards/nucleo-f091/include/periph_conf.h @@ -88,74 +88,6 @@ extern "C" { #define UART_1_AF 0 /** @} */ -/** - * @name GPIO configuration - * @{ - */ -#define GPIO_0_EN 1 -#define GPIO_1_EN 1 -#define GPIO_2_EN 1 -#define GPIO_3_EN 1 -#define GPIO_4_EN 1 -#define GPIO_5_EN 1 -#define GPIO_IRQ_PRIO 1 - -/* IRQ config */ -#define GPIO_IRQ_0 -1 /* not configured */ -#define GPIO_IRQ_1 -1 /* not configured */ -#define GPIO_IRQ_2 -1 /* not configured */ -#define GPIO_IRQ_3 -1 /* not configured */ -#define GPIO_IRQ_4 -1 /* not configured */ -#define GPIO_IRQ_5 -1 /* not configured */ -#define GPIO_IRQ_6 -1 /* not configured */ -#define GPIO_IRQ_7 -1 /* not configured */ -#define GPIO_IRQ_8 -1 /* not configured */ -#define GPIO_IRQ_9 -1 /* not configured */ -#define GPIO_IRQ_10 GPIO_0 -#define GPIO_IRQ_11 GPIO_1 -#define GPIO_IRQ_12 GPIO_2 -#define GPIO_IRQ_13 GPIO_3 -#define GPIO_IRQ_14 GPIO_4 -#define GPIO_IRQ_15 GPIO_5 - -/* GPIO channel 0 config */ -#define GPIO_0_PORT GPIOC -#define GPIO_0_PIN 10 -#define GPIO_0_CLK 19 -#define GPIO_0_EXTI_CFG() (SYSCFG->EXTICR[2] |= SYSCFG_EXTICR3_EXTI10_PC) -#define GPIO_0_IRQ EXTI4_15_IRQn -/* GPIO channel 1 config */ -#define GPIO_1_PORT GPIOC -#define GPIO_1_PIN 11 -#define GPIO_1_CLK 19 -#define GPIO_1_EXTI_CFG() (SYSCFG->EXTICR[2] |= SYSCFG_EXTICR3_EXTI11_PC) -#define GPIO_1_IRQ EXTI4_15_IRQn -/* GPIO channel 2 config */ -#define GPIO_2_PORT GPIOC -#define GPIO_2_PIN 12 -#define GPIO_2_CLK 19 -#define GPIO_2_EXTI_CFG() (SYSCFG->EXTICR[3] |= SYSCFG_EXTICR4_EXTI12_PC) -#define GPIO_2_IRQ EXTI4_15_IRQn -/* GPIO channel 3 config */ -#define GPIO_3_PORT GPIOC -#define GPIO_3_PIN 13 /* Used for user button 1 */ -#define GPIO_3_CLK 19 -#define GPIO_3_EXTI_CFG() (SYSCFG->EXTICR[3] |= SYSCFG_EXTICR4_EXTI13_PC) -#define GPIO_3_IRQ EXTI4_15_IRQn -/* GPIO channel 4 config */ -#define GPIO_4_PORT GPIOC -#define GPIO_4_PIN 14 -#define GPIO_4_CLK 19 -#define GPIO_4_EXTI_CFG() (SYSCFG->EXTICR[3] |= SYSCFG_EXTICR4_EXTI14_PC) -#define GPIO_4_IRQ EXTI4_15_IRQn -/* GPIO channel 5 config */ -#define GPIO_5_PORT GPIOC -#define GPIO_5_PIN 15 -#define GPIO_5_CLK 19 -#define GPIO_5_EXTI_CFG() (SYSCFG->EXTICR[3] |= SYSCFG_EXTICR4_EXTI15_PC) -#define GPIO_5_IRQ EXTI4_15_IRQn -/** @} */ - /** * @name RTC configuration * @{