mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
boards: bluepill: invert LED state
This commit is contained in:
parent
e3547cef23
commit
c7270cf997
@ -43,8 +43,8 @@ extern "C" {
|
|||||||
#define LED0_PIN GPIO_PIN(PORT_C, 13)
|
#define LED0_PIN GPIO_PIN(PORT_C, 13)
|
||||||
#define LED0_MASK (1 << 13)
|
#define LED0_MASK (1 << 13)
|
||||||
|
|
||||||
#define LED0_ON (LED0_PORT->BSRR = LED0_MASK)
|
#define LED0_ON (LED0_PORT->BSRR = (LED0_MASK << 16))
|
||||||
#define LED0_OFF (LED0_PORT->BSRR = (LED0_MASK << 16))
|
#define LED0_OFF (LED0_PORT->BSRR = LED0_MASK)
|
||||||
#define LED0_TOGGLE (LED0_PORT->ODR ^= LED0_MASK)
|
#define LED0_TOGGLE (LED0_PORT->ODR ^= LED0_MASK)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
@ -34,7 +34,8 @@ static const saul_gpio_params_t saul_gpio_params[] =
|
|||||||
{
|
{
|
||||||
.name = "LED",
|
.name = "LED",
|
||||||
.pin = LED0_PIN,
|
.pin = LED0_PIN,
|
||||||
.mode = GPIO_OUT
|
.mode = GPIO_OUT,
|
||||||
|
.flags = (SAUL_GPIO_INVERTED | SAUL_GPIO_INIT_CLEAR)
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user