- Examples
- Pintest.ino.
Definition at line 96 of file Pintest.ino.
97{
99
100 void *systemThinksPortIs = (
void*)portOutputRegister(digitalPinToPort(
PIN));
101 RwReg systemThinksMaskIs = digitalPinToBitMask(
PIN);
102
103 Serial.print(
"Pin "); Serial.print(
PIN); Serial.print(
": Port ");
104
106 Serial.print("valid & mask ");
107 } else {
109 Serial.print(
getPort((
void*)systemThinksPortIs));
110 Serial.print(" & mask ");
111 }
112
114 Serial.println("valid.");
115 } else {
116 Serial.print(
"invalid, is "); Serial.print(
FastPin<PIN>::mask()); Serial.print(
" should be "); Serial.println(systemThinksMaskIs);
117 }
118}
const char * getPort(void *portRef)
static port_t mask()
Get the pin mask.
static port_ptr_t port()
Get the output state of the port.
References CheckPin(), getPort(), FastPin< PIN >::mask(), PIN, and FastPin< PIN >::port().
Referenced by CheckPin(), and loop().