libx52_set_led_state(3) -- set the LED state ============================================ ## SYNOPSIS `#include ` `int libx52_set_led_state(libx52_device *`_x52_`, libx52_led_id ` _led_ `, libx52_led_state ` _state_`)` ## DESCRIPTION The Saitek X52 Pro has several LEDs that can be individually controlled. This function allows you to set the state of each LED in the internal data structures. ### LED STATES The following are the supported LED states that are accepted by the _state_ parameter. Note that all values are not supported by all LEDs. * `LIBX52_LED_STATE_OFF` * `LIBX52_LED_STATE_ON` * `LIBX52_LED_STATE_RED` * `LIBX52_LED_STATE_AMBER` * `LIBX52_LED_STATE_GREEN` ### LED IDS The following are the supported LED identifiers that are accepted by the _led_ parameter: * `LIBX52_LED_FIRE` * `LIBX52_LED_A` * `LIBX52_LED_B` * `LIBX52_LED_D` * `LIBX52_LED_E` * `LIBX52_LED_T1` * `LIBX52_LED_T2` * `LIBX52_LED_T3` * `LIBX52_LED_POV` * `LIBX52_LED_CLUTCH` * `LIBX52_LED_THROTTLE` Note that the LEDs referred to by `LIBX52_LED_FIRE` and `LIBX52_LED_THROTTLE` support only the states `LIBX52_LED_STATE_OFF` and `LIBX52_LED_STATE_ON`. The remaining LEDs support all the states with the exception of `LIBX52_LED_STATE_ON`. ## RETURN VALUES `libx52_led_state()` returns 0 on success, `-EINVAL` if the _x52_ parameter is not valid, and `-ENOTSUP` if the _led_ and _state_ combination is not a supported one. ## SEE ALSO libx52_update(3)