1#ifndef OF_NOTIFYHUB_HPP
2#define OF_NOTIFYHUB_HPP
8#include <ems_parser.hpp>
18 std::span<const ems::Note>
notes;
67 static constexpr auto name =
"NotifyHub";
80 const device* m_buzzer{
nullptr};
81 const device* m_led_pixel{
nullptr};
83 [[noreturn]]
static void m_buzzer_thread_entry(
void* p1,
void* p2,
void* p3);
84 [[noreturn]]
static void m_led_thread_entry(
void* p1,
void* p2,
void* p3);
86 k_thread m_buzzer_thread{};
87 k_thread m_led_thread{};
88 k_tid_t m_buzzer_tid{};
static void setBuzzerStatus(const FixedString< MAX_KEY_LEN > &key, const BuzzerStatus &status)
定义 NotifyHub.cpp:60
void setup()
定义 NotifyHub.cpp:45
void configure(const NotifyHubConfig &config)
定义 NotifyHub.cpp:39
static void removeLEDStatus(const FixedString< MAX_KEY_LEN > &key)
定义 NotifyHub.cpp:87
static constexpr auto name
定义 NotifyHub.hpp:67
static void setLEDStatus(const FixedString< MAX_KEY_LEN > &key, const LEDStatus &status)
定义 NotifyHub.cpp:78
static void removeBuzzerStatus(const FixedString< MAX_KEY_LEN > &key)
定义 NotifyHub.cpp:69
CommandType
定义 NotifyHub.hpp:40
@ REMOVE
定义 NotifyHub.hpp:40
constexpr size_t MAX_KEY_LEN
定义 NotifyHub.hpp:14
LEDMode
定义 NotifyHub.hpp:24
@ Breathing
定义 NotifyHub.hpp:27
@ Blink
定义 NotifyHub.hpp:26
@ Solid
定义 NotifyHub.hpp:25
BuzzerStatus status
定义 NotifyHub.hpp:47
CommandType type
定义 NotifyHub.hpp:44
FixedString< MAX_KEY_LEN > key
定义 NotifyHub.hpp:45
uint8_t volume
定义 NotifyHub.hpp:19
std::span< const ems::Note > notes
定义 NotifyHub.hpp:18
bool once
定义 NotifyHub.hpp:20
LEDStatus status
定义 NotifyHub.hpp:55
CommandType type
定义 NotifyHub.hpp:52
FixedString< MAX_KEY_LEN > key
定义 NotifyHub.hpp:53
LEDMode mode
定义 NotifyHub.hpp:34
uint8_t toggle_times
定义 NotifyHub.hpp:35
led_color color
定义 NotifyHub.hpp:32
bool once
定义 NotifyHub.hpp:37
uint16_t toggle_interval_ms
定义 NotifyHub.hpp:36
const device * led_pixel_dev
定义 NotifyHub.hpp:60
const device * pwm_buzzer_dev
定义 NotifyHub.hpp:61