FastLED 3.9.15
Loading...
Searching...
No Matches

◆ PrintPins()

template<uint8_t PIN>
void PrintPins ( )
Examples
Pintest.ino.

Definition at line 141 of file Pintest.ino.

141 {
142 PrintPins<PIN - 1>();
143
144 RwReg *systemThinksPortIs = portOutputRegister(digitalPinToPort(PIN));
145 RwReg systemThinksMaskIs = digitalPinToBitMask(PIN);
146
147 int maskBit = 0;
148 while(systemThinksMaskIs > 1) { systemThinksMaskIs >>= 1; maskBit++; }
149
150 const char *pinport = GetPinPort((void*)systemThinksPortIs);
151 if (pinport) {
152 Serial.print("__FL_DEFPIN("); Serial.print(PIN);
153 Serial.print(","); Serial.print(maskBit);
154 Serial.print(","); Serial.print(pinport);
155 Serial.print("); ");
156 pcount++;
157 if(pcount == 4) { pcount = 0; Serial.println(""); }
158 } else {
159 // Serial.print("Not found for pin "); Serial.println(PIN);
160 }
161}
#define PIN
Definition PinMode.ino:7
void PrintPins()
Definition Pintest.ino:141
const char * GetPinPort(void *ptr)
Definition Pintest.ino:134
static uint8_t pcount
Definition Pintest.ino:138

References GetPinPort(), pcount, PIN, and PrintPins().

Referenced by loop(), and PrintPins().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: