Led#

oneAPI Level Zero Specification - Version 1.18.31

Led Functions#

zesLedGetProperties#

Added in version 1.0

ZE_APIEXPORT ze_result_t ZE_APICALL zesLedGetProperties(zes_led_handle_t hLed, zes_led_properties_t *pProperties)#

Get LED properties.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Parameters:
  • hLed – [in] Handle for the component.

  • pProperties – [in,out] Will contain the properties of the LED.

Returns:

zesLedGetState#

Added in version 1.0

ZE_APIEXPORT ze_result_t ZE_APICALL zesLedGetState(zes_led_handle_t hLed, zes_led_state_t *pState)#

Get current state of a LED - on/off, color.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Parameters:
  • hLed – [in] Handle for the component.

  • pState – [in,out] Will contain the current state of the LED.

Returns:

zesLedSetState#

Added in version 1.0

ZE_APIEXPORT ze_result_t ZE_APICALL zesLedSetState(zes_led_handle_t hLed, ze_bool_t enable)#

Turn the LED on/off.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Parameters:
  • hLed – [in] Handle for the component.

  • enable – [in] Set to TRUE to turn the LED on, FALSE to turn off.

Returns:

zesLedSetColor#

Added in version 1.0

ZE_APIEXPORT ze_result_t ZE_APICALL zesLedSetColor(zes_led_handle_t hLed, const zes_led_color_t *pColor)#

Set the color of the LED.

  • The application may call this function from simultaneous threads.

  • The implementation of this function should be lock-free.

Parameters:
  • hLed – [in] Handle for the component.

  • pColor – [in] New color of the LED.

Returns:

Led Structures#

zes_led_properties_t#

Added in version 1.0

struct zes_led_properties_t#

LED properties.

Public Members

zes_structure_type_t stype#

[in] type of this structure

void *pNext#

[in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).

ze_bool_t onSubdevice#

[out] True if the resource is located on a sub-device; false means that the resource is on the device of the calling Sysman handle

uint32_t subdeviceId#

[out] If onSubdevice is true, this gives the ID of the sub-device

ze_bool_t canControl#

[out] Indicates if software can control the LED assuming the user has permissions

ze_bool_t haveRGB#

[out] Indicates if the LED is RGB capable

zes_led_color_t#

Added in version 1.0

struct zes_led_color_t#

LED color.

Public Members

double red#

[in,out][range(0.0, 1.0)] The LED red value. On output, a value less than 0.0 indicates that the color is not known.

double green#

[in,out][range(0.0, 1.0)] The LED green value. On output, a value less than 0.0 indicates that the color is not known.

double blue#

[in,out][range(0.0, 1.0)] The LED blue value. On output, a value less than 0.0 indicates that the color is not known.

zes_led_state_t#

Added in version 1.0

struct zes_led_state_t#

LED state.

Public Members

zes_structure_type_t stype#

[in] type of this structure

const void *pNext#

[in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).

ze_bool_t isOn#

[out] Indicates if the LED is on or off

zes_led_color_t color#

[out] Color of the LED