mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
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:
commit
eee42c5099
3 changed files with 5 additions and 4 deletions
|
|
@ -20,7 +20,10 @@ public:
|
|||
digitalWrite(_pin, _active);
|
||||
}
|
||||
}
|
||||
|
||||
void release() {
|
||||
if (_claims == 0) return; // avoid negative _claims
|
||||
|
||||
_claims--;
|
||||
if (_claims == 0) {
|
||||
digitalWrite(_pin, !_active);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue