LED#

Sample API funtions for controlling LEDs.

See sl_si91x_led.c for source code.

Functions#

void
sl_si91x_led_init(const sl_led_t *handle)

Configures GPIOs pertaining to the control of LEDs.

void
sl_si91x_led_toggle(uint8_t pin)

Atomically wraps an XOR or similar operation for a single GPIO pin attached to an LED.

void
sl_si91x_led_set(uint8_t pin)

Turns on (sets) a GPIO pin connected to an LED so that the LED turns on.

void
sl_si91x_led_clear(uint8_t pin)

Turns off (clears) a GPIO pin connected to an LED, which turns off the LED.

void

Called by the stack to indicate activity over the radio (for both transmission and reception).

Function Documentation#

sl_si91x_led_init#

void sl_si91x_led_init (const sl_led_t * handle)

Configures GPIOs pertaining to the control of LEDs.

Parameters
[in]handle

The pointer to led structure that has the specific led information.


Definition at line 42 of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/led/inc/sl_si91x_led.h

sl_si91x_led_toggle#

void sl_si91x_led_toggle (uint8_t pin)

Atomically wraps an XOR or similar operation for a single GPIO pin attached to an LED.

Parameters
[in]pin

LED pin for the LED to be toggled.


Definition at line 49 of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/led/inc/sl_si91x_led.h

sl_si91x_led_set#

void sl_si91x_led_set (uint8_t pin)

Turns on (sets) a GPIO pin connected to an LED so that the LED turns on.

Parameters
[in]pin

LED pin for the LED to turn on.


Definition at line 56 of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/led/inc/sl_si91x_led.h

sl_si91x_led_clear#

void sl_si91x_led_clear (uint8_t pin)

Turns off (clears) a GPIO pin connected to an LED, which turns off the LED.

Parameters
[in]pin

LED pin for the LED to turn off.


Definition at line 63 of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/led/inc/sl_si91x_led.h

sl_si91x_led_StackIndicateActivity#

void sl_si91x_led_StackIndicateActivity (bool turnOn)

Called by the stack to indicate activity over the radio (for both transmission and reception).

Parameters
N/AturnOn

See Usage.

It is called once with turnOn true and shortly thereafter with turnOn false.

Typically does something interesting, such as change the state of an LED.


Definition at line 74 of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/led/inc/sl_si91x_led.h