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

Function PrintPins

examples/Pintest/Pintest.h:150–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148
149
150template<uint8_t PIN> void PrintPins() {
151 PrintPins<PIN - 1>();
152
153 RwReg *systemThinksPortIs = portOutputRegister(digitalPinToPort(PIN));
154 RwReg systemThinksMaskIs = digitalPinToBitMask(PIN);
155
156 int maskBit = 0;
157 while(systemThinksMaskIs > 1) { systemThinksMaskIs >>= 1; maskBit++; }
158
159 const char *pinport = GetPinPort((void*)systemThinksPortIs);
160 if (pinport) {
161 Serial.print("__FL_DEFPIN("); Serial.print(PIN);
162 Serial.print(","); Serial.print(maskBit);
163 Serial.print(","); Serial.print(pinport);
164 Serial.print("); ");
165 pcount++;
166 if(pcount == 4) { pcount = 0; Serial.println(""); }
167 } else {
168 // Serial.print("Not found for pin "); Serial.println(PIN);
169 }
170}
171
172template<> void PrintPins<0>() {
173 RwReg *systemThinksPortIs = portOutputRegister(digitalPinToPort(0));

Callers

nothing calls this directly

Calls 3

GetPinPortFunction · 0.85
printMethod · 0.45
printlnMethod · 0.45

Tested by

no test coverage detected