Merge pull request #1569 from IoTThinks/MCdev-Fixed-Incorrect-Release-of-RefCountedDigitalPin

Fixed RefCountedDigitalPin.h and SSD1306Display for Heltec v4
This commit is contained in:
Liam Cottle 2026-02-28 17:35:17 +13:00 committed by GitHub
commit eee42c5099
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 4 deletions

View file

@ -20,7 +20,10 @@ public:
digitalWrite(_pin, _active);
}
}
void release() {
if (_claims == 0) return; // avoid negative _claims
_claims--;
if (_claims == 0) {
digitalWrite(_pin, !_active);