3#include "libxr_def.hpp"
31 }
else if (timeout == 0) {
32 return ErrorCode::TIMEOUT;
45 return ErrorCode::TIMEOUT;
static ErrorCode Action(Thread &thread, int signal)
触发目标线程的信号处理操作。 Triggers a signal action on the target thread.
static ErrorCode Wait(int signal, uint32_t timeout=UINT32_MAX)
等待指定信号的到来。 Waits for the specified signal.
static ErrorCode ActionFromCallback(Thread &thread, int signal, bool in_isr)
在回调环境中触发目标线程的信号处理操作。 Triggers a signal action on the target thread from a callback environment.
线程管理类,封装 FreeRTOS 任务创建和调度 Thread management class encapsulating FreeRTOS task creation and scheduling
static TimestampMS GetMilliseconds()
获取当前时间的毫秒级时间戳。 Gets the current timestamp in milliseconds.
static void RefreshTimerInIdle()
在空闲时刷新定时器 Refreshes the timer during idle time
LibXR Color Control Library / LibXR终端颜色控制库
constexpr auto min(T1 a, T2 b) -> typename std::common_type< T1, T2 >::type
计算两个数的最小值