Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
LED Driver Backend API

Data Structures

struct  led_driver_api
  Driver Operations LED driver operations More...

Typedefs

typedef int(* led_api_blink) (const struct device *dev, uint32_t led, uint32_t delay_on, uint32_t delay_off)
 Callback API for blinking an LED.
typedef int(* led_api_get_info) (const struct device *dev, uint32_t led, const struct led_info **info)
 Optional API callback to get LED information.
typedef int(* led_api_set_brightness) (const struct device *dev, uint32_t led, uint8_t value)
 Callback API for setting brightness of an LED.
typedef int(* led_api_set_color) (const struct device *dev, uint32_t led, uint8_t num_colors, const uint8_t *color)
 Optional API callback to set the colors of a LED.
typedef int(* led_api_on) (const struct device *dev, uint32_t led)
 Callback API for turning on an LED.
typedef int(* led_api_off) (const struct device *dev, uint32_t led)
 Callback API for turning off an LED.
typedef int(* led_api_write_channels) (const struct device *dev, uint32_t start_channel, uint32_t num_channels, const uint8_t *buf)
 Callback API for writing a strip of LED channels.

Detailed Description

This group contains the API type definitions, callback signatures, and other helpers required to implement a LED driver.

Typedef Documentation

◆ led_api_blink

typedef int(* led_api_blink) (const struct device *dev, uint32_t led, uint32_t delay_on, uint32_t delay_off)

#include <zephyr/drivers/led.h>

Callback API for blinking an LED.

See also
led_blink() for argument descriptions.

◆ led_api_get_info

typedef int(* led_api_get_info) (const struct device *dev, uint32_t led, const struct led_info **info)

#include <zephyr/drivers/led.h>

Optional API callback to get LED information.

See also
led_get_info() for argument descriptions.

◆ led_api_off

typedef int(* led_api_off) (const struct device *dev, uint32_t led)

#include <zephyr/drivers/led.h>

Callback API for turning off an LED.

See also
led_off() for argument descriptions.

◆ led_api_on

typedef int(* led_api_on) (const struct device *dev, uint32_t led)

#include <zephyr/drivers/led.h>

Callback API for turning on an LED.

See also
led_on() for argument descriptions.

◆ led_api_set_brightness

typedef int(* led_api_set_brightness) (const struct device *dev, uint32_t led, uint8_t value)

#include <zephyr/drivers/led.h>

Callback API for setting brightness of an LED.

See also
led_set_brightness() for argument descriptions.

◆ led_api_set_color

typedef int(* led_api_set_color) (const struct device *dev, uint32_t led, uint8_t num_colors, const uint8_t *color)

#include <zephyr/drivers/led.h>

Optional API callback to set the colors of a LED.

See also
led_set_color() for argument descriptions.

◆ led_api_write_channels

typedef int(* led_api_write_channels) (const struct device *dev, uint32_t start_channel, uint32_t num_channels, const uint8_t *buf)

#include <zephyr/drivers/led.h>

Callback API for writing a strip of LED channels.

See also
led_write_channels() for arguments descriptions.