GaIA BIOS Library
Loading...
Searching...
No Matches
LED Indicators functions

Functions used to animate LEDs blinks to generate help codes. More...

Functions

void gwa_led_set (uint8_t led, uint32_t action, uint32_t message)
 This function is left for compatibility purpose, calling it has no effect.
void gwa_led_set_command (uint8_t led, led_indicator_type_t CmdIndex)
 This function sets the specified LED to the specified pattern.
void gwa_led_fsm_init_n (uint8_t nleds)
 Initialize LED Finite State Machine handler.
void gwa_led_fsm_init (void)
 Initialize LED Finite State Machine handler This function initializes 4 LEDs.
uint8_t gwa_led_fsm (void)
 Finite State Machine handler This function must be cyclically called every 50 ms to evolve the LED status.

Detailed Description

Functions used to animate LEDs blinks to generate help codes.

The indicator LED functions are used to produce LED blink patterns following predefined rules.
Currently available LED patterns are described in document CiA303-3 - CANopen Indicators.
Refer to CiA 303 CANopen related documents for additional information.
The library functions are designed to internally evolve the LED ON/OFF status and produce an output bitfield variable mirroring the LED status.
The user can then copy the produced bitfield variable to the physical LED outputs to drive them ON/OFF.

Function Documentation

◆ gwa_led_fsm()

uint8_t gwa_led_fsm ( void )

Finite State Machine handler This function must be cyclically called every 50 ms to evolve the LED status.

Returns
The LED status word to be output to physical LEDs

◆ gwa_led_fsm_init_n()

void gwa_led_fsm_init_n ( uint8_t nleds)

Initialize LED Finite State Machine handler.

Parameters
nleds- number of configured leds

◆ gwa_led_set_command()

void gwa_led_set_command ( uint8_t led,
led_indicator_type_t CmdIndex )

This function sets the specified LED to the specified pattern.

Parameters
led- LED number (0...7)
CmdIndex- required LED pattern defined by led_indicator_type_t