mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-12 06:21:55 +00:00
Add support for LED APIs for controlling the LED devices. This API can be used by the LED devices present on the chip and connected externally via buses like I2C, SPI etc... Following APIs are currently supported: 1. led_blink 2. led_set_brightness 3. led_on 4. led_off Driver support using these APIs will be added in subsequent patches. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
39 lines
686 B
C
39 lines
686 B
C
/*
|
|
* Copyright (c) 2018 Linaro Limited
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* @file
|
|
* @brief Private LED driver APIs
|
|
*/
|
|
|
|
#ifndef __LED_CONTEXT_H__
|
|
#define __LED_CONTEXT_H__
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* @brief Internal driver specific representation of an LED device
|
|
*/
|
|
|
|
struct led_data {
|
|
/* Minimum acceptable LED blinking time period (in ms) */
|
|
u32_t min_period;
|
|
/* Maximum acceptable LED blinking time period (in ms) */
|
|
u32_t max_period;
|
|
/* Minimum acceptable LED brightness value */
|
|
u16_t min_brightness;
|
|
/* Maximum acceptable LED brightness value */
|
|
u16_t max_brightness;
|
|
};
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __LED_CONTEXT_H__ */
|