| 148 | |
| 149 | |
| 150 | template<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 | |
| 172 | template<> void PrintPins<0>() { |
| 173 | RwReg *systemThinksPortIs = portOutputRegister(digitalPinToPort(0)); |
nothing calls this directly
no test coverage detected