mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-17 18:43:50 +01:00
boards/nucleo-common: fix on-board LED macro for nucleo-f302 case
This commit is contained in:
parent
768459d6c1
commit
24a12da2af
@ -41,16 +41,18 @@ extern "C" {
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#ifdef CPU_MODEL_STM32F302R8
|
#ifdef CPU_MODEL_STM32F302R8
|
||||||
|
#define LED0_PORT GPIOB
|
||||||
#define LED0_PIN GPIO_PIN(PORT_B, 13)
|
#define LED0_PIN GPIO_PIN(PORT_B, 13)
|
||||||
#define LED0_MASK (1 << 13)
|
#define LED0_MASK (1 << 13)
|
||||||
#else
|
#else
|
||||||
|
#define LED0_PORT GPIOA
|
||||||
#define LED0_PIN GPIO_PIN(PORT_A, 5)
|
#define LED0_PIN GPIO_PIN(PORT_A, 5)
|
||||||
#define LED0_MASK (1 << 5)
|
#define LED0_MASK (1 << 5)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LED0_ON (GPIOA->BSRR = LED0_MASK)
|
#define LED0_ON (LED0_PORT->BSRR = LED0_MASK)
|
||||||
#define LED0_OFF (GPIOA->BSRR = (LED0_MASK << 16))
|
#define LED0_OFF (LED0_PORT->BSRR = (LED0_MASK << 16))
|
||||||
#define LED0_TOGGLE (GPIOA->ODR ^= LED0_MASK)
|
#define LED0_TOGGLE (LED0_PORT->ODR ^= LED0_MASK)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user