AM263x MCU+ SDK  10.00.00
LED

The LED driver provides API to control I2C/GPIO based LED present in the board. The driver supports multiple LED control for the LEDs connected to the same I2C controller using a single API which can be used to set LED ON/OFF for multiple LED at the same time.

Features Supported

  • API to turn ON/OFF LED
  • Set LED mask using single API to set the LED state of multiple LEDs connected to same controller at one go

SysConfig Features

Note
It is strongly recommend to use SysConfig where it is available instead of using direct SW API calls. This will help simplify the SW application and also catch common mistakes early in the development cycle.
  • Option to select LED type based on board
  • Supported LED
    • GPIO

Features NOT Supported

  • Set mask API is not supported for GPIO based LED as typically only one LED is connected to a single instance of GPIO pin

Important Usage Guidelines

None

Example Usage

Include the below file to access the APIs

#include <board/led.h>

LED ON API

status = LED_on(ledHandle, 0U);

LED OFF API

status = LED_off(ledHandle, 0U);

API

APIs for I2C/GPIO based LED driver

LED_on
int32_t LED_on(LED_Handle handle, uint32_t index)
API to power on the LED.
LED_off
int32_t LED_off(LED_Handle handle, uint32_t index)
API to power off the LED.
SystemP_SUCCESS
#define SystemP_SUCCESS
Return status when the API execution was successful.
Definition: SystemP.h:56
led.h
DebugP_assert
#define DebugP_assert(expression)
Function to call for assert check.
Definition: DebugP.h:177