FastLED 3.10.8
Loading...
Searching...
No Matches

◆ portValueToId() [3/6]

template<typename T>
int fl::anonymous_namespace{pins.cpp.hpp}::portValueToId ( T * ptr)

Definition at line 136 of file pins.cpp.hpp.

136 {
137 if (!ptr) return -1;
138 static T* seen[8] = {};
139 static int n = 0;
140 for (int i = 0; i < n; ++i) {
141 if (seen[i] == ptr) return i;
142 }
143 if (n < 8) {
144 seen[n] = ptr;
145 return n++;
146 }
147 return -1;
148}

References fl::FL_NO_EXCEPT, and portValueToId().

+ Here is the call graph for this function: