One Framework 0.1.0
RoboMaster嵌入式框架“一键”解决方案,为你的“创意”服务。
载入中...
搜索中...
未找到
status_leds.h
浏览该文件的文档.
1#ifndef STATUS_LEDS_H
2#define STATUS_LEDS_H
3#include <zephyr/device.h>
4#include <zephyr/kernel.h>
5
7{
8 const struct device* leds;
9 const uint32_t heartbeat_led_index;
10 const uint32_t error_led_index;
12 unsigned int error_interval_ms;
13};
14
27
28__subsystem struct status_leds_api
29{
30 void (*set_heartbeat)(const struct device* dev);
31 void (*set_heartbeat_always_on)(const struct device* dev);
32 int (*set_error_always_on)(const struct device* dev);
33 int (*set_error_blink)(const struct device* dev, const uint8_t times);
34 void (*remove_error)(const struct device* dev);
35};
36
37#endif // STATUS_LEDS_H
定义 status_leds.h:29
void(* set_heartbeat)(const struct device *dev)
定义 status_leds.h:30
int(* set_error_always_on)(const struct device *dev)
定义 status_leds.h:32
int(* set_error_blink)(const struct device *dev, const uint8_t times)
定义 status_leds.h:33
void(* set_heartbeat_always_on)(const struct device *dev)
定义 status_leds.h:31
void(* remove_error)(const struct device *dev)
定义 status_leds.h:34
定义 status_leds.h:7
const uint32_t heartbeat_led_index
定义 status_leds.h:9
unsigned int heartbeat_blink_interval_ms
定义 status_leds.h:11
const uint32_t error_led_index
定义 status_leds.h:10
unsigned int error_interval_ms
定义 status_leds.h:12
const struct device * leds
定义 status_leds.h:8
定义 status_leds.h:16
bool have_error
定义 status_leds.h:22
bool heartbeat_always_on
定义 status_leds.h:21
struct k_timer error_blink_timer
定义 status_leds.h:18
bool error_led_state
定义 status_leds.h:25
uint8_t error_blink_count
定义 status_leds.h:24
uint8_t error_blink_times
定义 status_leds.h:23
bool heartbeat_state
定义 status_leds.h:20
struct k_timer error_single_blink_timer
定义 status_leds.h:19
struct k_timer heartbeat_timer
定义 status_leds.h:17