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:
parent
7f48057b9e
commit
9846216358
|
@ -94,6 +94,12 @@ leds_get(void) {
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
|
leds_set(unsigned char ledv)
|
||||||
|
{
|
||||||
|
show_leds(ledv);
|
||||||
|
}
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
void
|
||||||
leds_on(unsigned char ledv)
|
leds_on(unsigned char ledv)
|
||||||
{
|
{
|
||||||
show_leds(leds | ledv);
|
show_leds(leds | ledv);
|
||||||
|
|
|
@ -80,6 +80,7 @@ void leds_blink(void);
|
||||||
* Returns the current status of all leds
|
* Returns the current status of all leds
|
||||||
*/
|
*/
|
||||||
unsigned char leds_get(void);
|
unsigned char leds_get(void);
|
||||||
|
void leds_set(unsigned char leds);
|
||||||
void leds_on(unsigned char leds);
|
void leds_on(unsigned char leds);
|
||||||
void leds_off(unsigned char leds);
|
void leds_off(unsigned char leds);
|
||||||
void leds_toggle(unsigned char leds);
|
void leds_toggle(unsigned char leds);
|
||||||
|
|
Loading…
Reference in a new issue