led_event_get_rgb()

Get the status of the LEDs from a LED_INFO event.

Synopsis:

#include <bps/led.h>
 
BPS_API int led_event_get_rgb(bps_event_t *event, bool *red, bool *green, bool *blue)

Arguments:

event
The LED_INFO event to get the LED status from.
red
The status of the red LED will be set in this variable. If true the red LED is on, if false the red LED is off.
green
The status of the green LED will be set in this variable. If true the green LED is on, if false the green LED is off.
blue
The status of the blue LED will be set in this variable. If true the blue LED is on, if false the blue LED is off.

Library:

libbps

Description:

The led_event_get_rgb() function gets the status of the red, green, and blue LEDs from the specified LED_INFO event.

Returns:

BPS_SUCCESS upon success, BPS_FAILURE with errno set otherwise.