FastLED 3.9.15
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
12namespace fl {
13namespace validation {
14
16 auto infos = channelManager().getDriverInfos();
17 return !infos.empty();
18}
19
21 auto infos = channelManager().getDriverInfos();
22
23 if (infos.empty()) {
24 FL_ERROR("[VALIDATION] No drivers registered with ChannelManager!");
25 return;
26 }
27
28 FL_WARN("\n[VALIDATION] Registered drivers: " << infos.size());
29 for (fl::size i = 0; i < infos.size(); i++) {
30 const auto& info = infos[i];
31 FL_UNUSED(info); // silences -Wunused-variable when FL_WARN is a no-op
32 FL_WARN(" - " << info.name.c_str()
33 << " (priority=" << info.priority
34 << ", enabled=" << (info.enabled ? "true" : "false")
35 << ")");
36 }
37 FL_WARN("[VALIDATION] Driver registration OK");
38}
39
40} // namespace validation
41} // namespace fl
fl::span< const DriverInfo > getDriverInfos() const FL_NOEXCEPT
Get full state of all registered drivers.
#define FL_WARN(X)
Definition log.h:276
#define FL_ERROR(X)
Definition log.h:219
Centralized logging categories for FastLED hardware interfaces and subsystems.
Unified manager for channel drivers with priority-based fallback.
bool validateExpectedEngines()
Validate that at least one driver is registered with ChannelManager.
void printEngineValidation()
Print validation results (logs registered drivers and status)
ChannelManager & channelManager()
Get the global ChannelManager singleton instance.
Base definition for an LED controller.
Definition crgb.hpp:179
#define FL_UNUSED(x)