#include <zephyr/device.h>
#include <stdint.h>
浏览该文件的源代码.
◆ _HEX_BYTE
| #define _HEX_BYTE |
( |
| s, |
|
|
| i, |
|
|
| off ) |
值:( \
)
#define _HEX_C2I(c)
定义 led_pixel.h:7
◆ _HEX_C2I
值:( \
(c) >= '0' && (c) <= '9' ? (c) - '0' : \
(c) >= 'a' && (c) <= 'f' ? (c) - 'a' + 10 : \
(c) >= 'A' && (c) <= 'F' ? (c) - 'A' + 10 : 0 \
)
◆ _HEX_OFF
◆ COLOR_HEX
值:{ \
}
#define _HEX_OFF(s)
定义 led_pixel.h:16
#define _HEX_BYTE(s, i, off)
定义 led_pixel.h:23
◆ led_pixel_off_t
| typedef int(* led_pixel_off_t) (const struct device *dev) |
◆ led_pixel_on_t
| typedef int(* led_pixel_on_t) (const struct device *dev) |
◆ led_set_pixel_t
| typedef int(* led_set_pixel_t) (const struct device *dev, struct led_color color, const uint8_t bright_percent) |
◆ led_pixel_off()
| static int led_pixel_off |
( |
const struct device * | dev | ) |
|
|
inlinestatic |
◆ led_pixel_on()
| static int led_pixel_on |
( |
const struct device * | dev | ) |
|
|
inlinestatic |
◆ led_pixel_set()
| static int led_pixel_set |
( |
const struct device * | dev, |
|
|
const struct led_color | color, |
|
|
const uint8_t | bright_percent ) |
|
inlinestatic |
设置像素 LED 的颜色
- 参数
-
| dev | 设备指针 (指向你的虚拟设备) |
| color | RGB 颜色 |
| bright_percent | 亮度百分比 (0 ~ 100) |
- 返回
- 0 成功, 负数 失败