Refactoring LEDs functions

Change-Id: Iab42912f59cf53a764b1239ddb0593bf418d2929
This commit is contained in:
Andrey Perminov 2020-04-20 16:00:50 -07:00
parent 5845267547
commit be47e75bd5
3 changed files with 4 additions and 13 deletions

View File

@ -8,7 +8,7 @@
#include "platform.h"
void board_set_led(platform_led_status_t color);
void board_set_leds(platform_led_status_t color);
uint32_t board_get_button_press_time();
#endif
#endif

View File

@ -25,11 +25,7 @@
/** LED blink time in ms */
#define LED_BLINK_TIME_MS 200
/** Board button used for app control */
#define BMLITE_BUTTON 3
static void _board_set_leds(uint8_t color)
void board_set_leds(uint8_t color)
{
uint32_t i;
@ -42,8 +38,3 @@ static void _board_set_leds(uint8_t color)
color = color >> 1;
}
}
void board_set_led(platform_led_status_t color)
{
_board_set_leds(color);
}

View File

@ -88,5 +88,5 @@ void platform_sw_reset(void)
void platform_set_led(platform_led_status_t color)
{
board_set_led(color);
board_set_leds(color);
}