Skip to content

Commit

Permalink
boards: bluepill: invert LED state
Browse files Browse the repository at this point in the history
  • Loading branch information
Teufelchen1 committed Nov 29, 2017
1 parent e3547ce commit c7270cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions boards/bluepill/include/board.h
Expand Up @@ -43,8 +43,8 @@ extern "C" {
#define LED0_PIN GPIO_PIN(PORT_C, 13)
#define LED0_MASK (1 << 13)

#define LED0_ON (LED0_PORT->BSRR = LED0_MASK)
#define LED0_OFF (LED0_PORT->BSRR = (LED0_MASK << 16))
#define LED0_ON (LED0_PORT->BSRR = (LED0_MASK << 16))
#define LED0_OFF (LED0_PORT->BSRR = LED0_MASK)
#define LED0_TOGGLE (LED0_PORT->ODR ^= LED0_MASK)
/** @} */

Expand Down
3 changes: 2 additions & 1 deletion boards/bluepill/include/gpio_params.h
Expand Up @@ -34,7 +34,8 @@ static const saul_gpio_params_t saul_gpio_params[] =
{
.name = "LED",
.pin = LED0_PIN,
.mode = GPIO_OUT
.mode = GPIO_OUT,
.flags = (SAUL_GPIO_INVERTED | SAUL_GPIO_INIT_CLEAR)
},
};

Expand Down

0 comments on commit c7270cf

Please sign in to comment.