FastLED 3.9.15
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 150 of file pins.cpp.hpp.

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

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

+ Here is the caller graph for this function: