MCPcopy Create free account
hub / github.com/FastLED/FastLED / portValueToId

Function portValueToId

src/fl/system/pins.cpp.hpp:117–117  ·  view source on GitHub ↗

Convert digitalPinToPort() result to int. Most platforms return integers; SAM3X8E returns Pio* which needs mapping to sequential port IDs.

Source from the content-addressed store, hash-verified

115// Convert digitalPinToPort() result to int. Most platforms return integers;
116// SAM3X8E returns Pio* which needs mapping to sequential port IDs.
117inline int portValueToId(unsigned char v) { return v; }
118inline int portValueToId(unsigned short v) { return static_cast<int>(v); }
119inline int portValueToId(int v) { return v; }
120inline int portValueToId(long v) { return static_cast<int>(v); }

Callers 1

pinToPortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected