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

◆ PrintPins()

template<uint8_t PIN>
void PrintPins ( )

Definition at line 150 of file Pintest.h.

150 {
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}
#define PIN
Definition PinMode.ino:7
void PrintPins()
Definition Pintest.h:150
const char * GetPinPort(void *ptr)
Definition Pintest.h:143
static uint8_t pcount
Definition Pintest.h:147

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: