1
0
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:
Bennet Blischke 2017-11-28 20:11:43 +01:00
parent e3547cef23
commit c7270cf997
2 changed files with 4 additions and 3 deletions

View File

@ -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)
/** @} */ /** @} */

View File

@ -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)
}, },
}; };