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

◆ pinToPort()

int fl::pinToPort ( int pin)

Map a runtime pin number to an integer port ID using FastPin<N>::port().

Pins that share the same GPIO port register return the same ID.

Parameters
pinPin number (0-63)
Returns
Integer port ID (0-based), or -1 for out-of-range pins

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

151 {
152 if (pin < 0) return -1;
153 return portValueToId(digitalPinToPort(pin));
154}

References FL_NO_EXCEPT.

Referenced by fl::DigitalMultiWrite16::allSamePort(), fl::DigitalMultiWrite8::allSamePort(), fl::DigitalMultiWrite16::init(), fl::DigitalMultiWrite8::init(), and pinMap().

+ Here is the caller graph for this function: