FastLED 3.10.10
Loading...
Searching...
No Matches

◆ bind()

bool fl::DriverBindings::bind ( Bus bus,
u8 which )

Bind (register) every node matching bus/which, or every node when bus is Bus::AUTO.

Returns true when at least one node matched.

Definition at line 22 of file driver_bindings.cpp.hpp.

22 {
23 bool matched = false;
24 for (DriverBinding* node = mHead; node != nullptr; node = node->next) {
25 if (bus != Bus::AUTO && (node->bus != bus || node->which != which)) {
26 continue;
27 }
28 matched = true;
29 // Registration deduplicates by name, so binding again is cheap and
30 // re-registers a driver a cleared manager dropped.
31 node->bind();
32 }
33 return matched;
34}
DriverBinding * mHead
@ AUTO
Definition bus.h:32

References fl::AUTO, fl::FL_NO_EXCEPT, and mHead.

Referenced by CFastLED::add().

+ Here is the caller graph for this function: