Merge pull request #387 from Next-Door-Tech/fix-386

Fix-386
This commit is contained in:
mstroh
2025-08-19 17:30:05 +02:00
committed by GitHub

View File

@@ -2300,10 +2300,10 @@ int digitalRead (int pin)
}
if (ISRP1MODEL) {
switch(gpio[2*pin] & RP1_STATUS_LEVEL_MASK) {
default: // 11 or 00 not allowed, give LOW!
case RP1_STATUS_LEVEL_LOW: return LOW ;
case RP1_STATUS_LEVEL_HIGH: return HIGH ;
if ((gpio[2*pin] & RP1_STATUS_LEVEL_MASK) == RP1_STATUS_LEVEL_HIGH) {
return HIGH;
} else { // 11 or 00 not allowed, give LOW!
return LOW;
}
} else {
if ((*(gpio + gpioToGPLEV [pin]) & (1 << (pin & 31))) != 0)