LED#
Sample API funtions for controlling LEDs.
See sl_si91x_led.c for source code.
Functions#
Configures GPIOs pertaining to the control of LEDs.
Atomically wraps an XOR or similar operation for a single GPIO pin attached to an LED.
Turns on (sets) a GPIO pin connected to an LED so that the LED turns on.
Turns off (clears) a GPIO pin connected to an LED, which turns off the LED.
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
const sl_led_t * | [in] | handle | The pointer to led structure that has the specific led information. |
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | [in] | pin | LED pin for the LED to be toggled. |
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | [in] | pin | LED pin for the LED to turn on. |
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | [in] | pin | LED pin for the LED to turn off. |
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).
Type | Direction | Argument Name | Description |
---|---|---|---|
bool | N/A | turnOn | 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.