Indicator

This contains functionality to manage the system indicators. More...

Modules

Types
System indicator types.
 

Functions

gos_result_t gos_system_indicator_set_callback (gos_system_indicator_t indicator, gos_system_indicator_callback_t callback, void *arg)
 Register system indicator callback. More...
 

Detailed Description

This contains functionality to manage the system indicators.

Function Documentation

◆ gos_system_indicator_set_callback()

gos_result_t gos_system_indicator_set_callback ( gos_system_indicator_t  indicator,
gos_system_indicator_callback_t  callback,
void *  arg 
)

Register system indicator callback.

This registers a callback to be invoked when the corresponding system indicator's state changes. This is useful for blinking LEDs that are not directly connected to a GPIO (i.e. I/O expander).

See system.indicator.state for more details about how to configure the system indicators.

Parameters
indicatorThe indicator to configure, see gos_system_indicator_t
callbackCallback to be invoked when indicator changes, see gos_system_indicator_callback_t, set NULL to disable
argOptional arugment to be supplied to callback, leave NULL if unused
Returns
gos_result_t result of API
Examples:
system/indicator/main.c.