leds: Add the leds_set() function

The leds_set() function is added on top of leds_arch_set() in order to have a
means of displaying a pattern on a set of LEDs, while keeping the ENERGEST
information up to date, which would be missing with a direct call to
leds_arch_set().

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
This commit is contained in:
Benoît Thébaudeau 2014-01-06 21:53:10 +01:00
parent 7f48057b9e
commit 9846216358
2 changed files with 7 additions and 0 deletions

View file

@ -94,6 +94,12 @@ leds_get(void) {
}
/*---------------------------------------------------------------------------*/
void
leds_set(unsigned char ledv)
{
show_leds(ledv);
}
/*---------------------------------------------------------------------------*/
void
leds_on(unsigned char ledv)
{
show_leds(leds | ledv);

View file

@ -80,6 +80,7 @@ void leds_blink(void);
* Returns the current status of all leds
*/
unsigned char leds_get(void);
void leds_set(unsigned char leds);
void leds_on(unsigned char leds);
void leds_off(unsigned char leds);
void leds_toggle(unsigned char leds);