Skip to content

Commit

Permalink
Add get_led() function
Browse files Browse the repository at this point in the history
Add a function to get current LED value
  • Loading branch information
mchack-work committed Jan 29, 2024
1 parent d24c95d commit 822cef0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/tkey/led.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define LED_WHITE (LED_RED | LED_GREEN | LED_BLUE)
// clang-format on

uint32_t get_led();
void set_led(uint32_t led_value);
void forever_redflash();
#endif
5 changes: 5 additions & 0 deletions libcommon/led.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ void set_led(uint32_t led_value)
*led = led_value;
}

uint32_t get_led()
{
return *led;
}

void forever_redflash()
{
int led_on = 0;
Expand Down

0 comments on commit 822cef0

Please sign in to comment.