1#ifndef OF_NOTIFYHUB_HPP
2#define OF_NOTIFYHUB_HPP
6#include <zephyr/kernel.h>
8#include <ems_parser.hpp>
18 std::span<const ems::Note>
notes;
25 if (
notes.size() != other.
notes.size())
return false;
79 static constexpr auto name =
"NotifyHub";
90 const device* m_buzzer{
nullptr};
91 const device* m_led_pixel{
nullptr};
93 [[noreturn]]
static void m_buzzer_thread_entry(
void* p1,
void* p2,
void* p3);
94 [[noreturn]]
static void m_led_thread_entry(
void* p1,
void* p2,
void* p3);
96 k_thread m_buzzer_thread{};
97 k_thread m_led_thread{};
98 k_tid_t m_buzzer_tid{};
static void setBuzzerStatus(const FixedString< MAX_KEY_LEN > &key, const BuzzerStatus &status)
定义 NotifyHub.cpp:131
void setup()
定义 NotifyHub.cpp:99
static void removeLEDStatus(const FixedString< MAX_KEY_LEN > &key)
定义 NotifyHub.cpp:158
static constexpr auto name
定义 NotifyHub.hpp:79
static void setLEDStatus(const FixedString< MAX_KEY_LEN > &key, const LEDStatus &status)
定义 NotifyHub.cpp:149
static void removeBuzzerStatus(const FixedString< MAX_KEY_LEN > &key)
定义 NotifyHub.cpp:140
定义 JointSetpointGenerator.hpp:9
CommandType
定义 NotifyHub.hpp:58
@ REMOVE
定义 NotifyHub.hpp:58
constexpr size_t MAX_KEY_LEN
定义 NotifyHub.hpp:14
LEDMode
定义 NotifyHub.hpp:31
@ Breathing
定义 NotifyHub.hpp:34
@ Blink
定义 NotifyHub.hpp:33
@ Solid
定义 NotifyHub.hpp:32
BuzzerStatus status
定义 NotifyHub.hpp:65
CommandType type
定义 NotifyHub.hpp:62
FixedString< MAX_KEY_LEN > key
定义 NotifyHub.hpp:63
uint8_t volume
定义 NotifyHub.hpp:19
std::span< const ems::Note > notes
定义 NotifyHub.hpp:18
bool operator==(const BuzzerStatus &other) const
定义 NotifyHub.hpp:22
bool once
定义 NotifyHub.hpp:20
LEDStatus status
定义 NotifyHub.hpp:73
CommandType type
定义 NotifyHub.hpp:70
FixedString< MAX_KEY_LEN > key
定义 NotifyHub.hpp:71
bool operator==(const LEDStatus &other) const
定义 NotifyHub.hpp:46
LEDMode mode
定义 NotifyHub.hpp:41
uint8_t toggle_times
定义 NotifyHub.hpp:42
led_color color
定义 NotifyHub.hpp:39
bool once
定义 NotifyHub.hpp:44
uint16_t toggle_interval_ms
定义 NotifyHub.hpp:43
uint8_t g
定义 led_pixel.h:38
uint8_t b
定义 led_pixel.h:39
uint8_t r
定义 led_pixel.h:37