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 committed by harald
parent df0cc061f6
commit db60afb2fb
2 changed files with 7 additions and 0 deletions

View file

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

View file

@ -80,6 +80,7 @@ void leds_blink(void);
* Returns the current status of all leds (respects invert)
*/
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);