MCPcopy Create free account
hub / github.com/FastLED/FastLED / PrintPins<0>

Function PrintPins<0>

examples/Pintest/Pintest.h:172–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172template<> void PrintPins<0>() {
173 RwReg *systemThinksPortIs = portOutputRegister(digitalPinToPort(0));
174 RwReg systemThinksMaskIs = digitalPinToBitMask(0);
175
176 int maskBit = 0;
177 while(systemThinksMaskIs > 1) { systemThinksMaskIs >>= 1; maskBit++; }
178
179 const char *pinport = GetPinPort((void*)systemThinksPortIs);
180 if (pinport) {
181 Serial.print("__FL_DEFPIN("); Serial.print(0);
182 Serial.print(","); Serial.print(maskBit);
183 Serial.print(","); Serial.print(pinport);
184 Serial.print("); ");
185 pcount++;
186 if(pcount == 4) { pcount = 0; Serial.println(""); }
187 }
188}
189
190int counter = 0;
191void setup() {

Callers

nothing calls this directly

Calls 3

GetPinPortFunction · 0.85
printMethod · 0.45
printlnMethod · 0.45

Tested by

no test coverage detected