FastLED 3.10.8
Loading...
Searching...
No Matches
platform.cpp.hpp
Go to the documentation of this file.
1// src/fl/channels/detail/validation/platform.cpp.hpp
2//
3// Platform-specific validation implementation
4// Queries ChannelManager for registered drivers instead of maintaining a
5// hardcoded list.
6
10#include "fl/log/log.h"
11#include "fl/stl/noexcept.h"
12
13namespace fl {
14namespace validation {
15
17 auto infos = channelManager().getDriverInfos();
18 return !infos.empty();
19}
20
22 auto infos = channelManager().getDriverInfos();
23
24 if (infos.empty()) {
25 FL_ERROR("[VALIDATION] No drivers registered with ChannelManager!");
26 return;
27 }
28
29 FL_WARN("\n[VALIDATION] Registered drivers: " << infos.size());
30 for (fl::size i = 0; i < infos.size(); i++) {
31 const auto& info = infos[i];
32 FL_UNUSED(info); // silences -Wunused-variable when FL_WARN is a no-op
33 FL_WARN(" - " << info.name.c_str() << " (priority=" << info.priority << ", enabled=" << ((info.enabled ? "true" : "false")) << ")");
34 }
35 FL_WARN("[VALIDATION] Driver registration OK");
36}
37
38} // namespace validation
39} // namespace fl
fl::span< const DriverInfo > getDriverInfos() const FL_NO_EXCEPT
Get full state of all registered drivers.
#define FL_UNUSED(x)
#define FL_WARN(...)
Definition log.h:437
#define FL_ERROR(...)
Definition log.h:373
Centralized logging categories for FastLED hardware interfaces and subsystems.
Unified manager for channel drivers with priority-based fallback.
bool validateExpectedEngines() FL_NO_EXCEPT
Validate that at least one driver is registered with ChannelManager.
void printEngineValidation() FL_NO_EXCEPT
Print validation results (logs registered drivers and status)
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Definition blur.h:186
ChannelManager & channelManager() FL_NO_EXCEPT
Get the global ChannelManager singleton instance.
Base definition for an LED controller.
Definition crgb.hpp:179