LED Control#
Sample API funtions for controlling LEDs.
When specifying an LED to use, always use the BOARDLEDx definitions that are defined within the BOARD_HEADER.
See led.h for source code.
Typedefs#
Ensures that the definitions from the BOARD_HEADER are always used as parameters to the LED functions.
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). It is called once with turnOn
true and shortly thereafter with turnOn
false.
Typedef Documentation#
HalBoardLed#
typedef enum HalBoardLedPins HalBoardLed
Ensures that the definitions from the BOARD_HEADER are always used as parameters to the LED functions.
78
of file /mnt/raid/workspaces/ws.tfWcRzYcf/overlay/gsdk/platform/base/hal/micro/led.h
Function Documentation#
halInternalInitLed#
void halInternalInitLed (void )
Configures GPIOs pertaining to the control of LEDs.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
70
of file /mnt/raid/workspaces/ws.tfWcRzYcf/overlay/gsdk/platform/base/hal/micro/led.h
halToggleLed#
void halToggleLed (HalBoardLed led)
Atomically wraps an XOR or similar operation for a single GPIO pin attached to an LED.
Type | Direction | Argument Name | Description |
---|---|---|---|
HalBoardLed | N/A | led | Identifier (from BOARD_HEADER) for the LED to be toggled. |
90
of file /mnt/raid/workspaces/ws.tfWcRzYcf/overlay/gsdk/platform/base/hal/micro/led.h
halSetLed#
void halSetLed (HalBoardLed led)
Turns on (sets) a GPIO pin connected to an LED so that the LED turns on.
Type | Direction | Argument Name | Description |
---|---|---|---|
HalBoardLed | N/A | led | Identifier (from BOARD_HEADER) for the LED to turn on. |
97
of file /mnt/raid/workspaces/ws.tfWcRzYcf/overlay/gsdk/platform/base/hal/micro/led.h
halClearLed#
void halClearLed (HalBoardLed led)
Turns off (clears) a GPIO pin connected to an LED, which turns off the LED.
Type | Direction | Argument Name | Description |
---|---|---|---|
HalBoardLed | N/A | led | Identifier (from BOARD_HEADER) for the LED to turn off. |
104
of file /mnt/raid/workspaces/ws.tfWcRzYcf/overlay/gsdk/platform/base/hal/micro/led.h
halStackIndicateActivity#
void halStackIndicateActivity (bool turnOn)
Called by the stack to indicate activity over the radio (for both transmission and reception). It is called once with turnOn
true and shortly thereafter with turnOn
false.
Type | Direction | Argument Name | Description |
---|---|---|---|
bool | N/A | turnOn | See Usage. |
Typically does something interesting, such as change the state of an LED.
115
of file /mnt/raid/workspaces/ws.tfWcRzYcf/overlay/gsdk/platform/base/hal/micro/led.h