Skip to content

Commit

Permalink
platforms/blackpill-f4: invert state of SET_IDLE_STATE, as PC13 needs…
Browse files Browse the repository at this point in the history
… to be pulled low to turn LED on
  • Loading branch information
lenvm authored and dragonmux committed Oct 18, 2023
1 parent ce985d8 commit 643106f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/platforms/common/blackpill-f4/blackpill-f4.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,13 @@
{ \
running_status = (state); \
}
#define SET_IDLE_STATE(state) \
{ \
gpio_set_val(LED_PORT, LED_IDLE_RUN, state); \
/*
* The state of LED_IDLE_RUN is inverted, as the led used for
* LED_IDLE_RUN (PC13) needs to be pulled low to turn the led on.
*/
#define SET_IDLE_STATE(state) \
{ \
gpio_set_val(LED_PORT, LED_IDLE_RUN, !state); \
}
#define SET_ERROR_STATE(state) \
{ \
Expand Down

0 comments on commit 643106f

Please sign in to comment.