From a843df1829e4d5a06bb6000007c2e930e29327e6 Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Mon, 9 Aug 2021 23:31:55 +0300 Subject: fix(gpio): PWM may leaves pins in high state Disabling PWM when a GPIO pin is high will cause the pin to get stuck in high state. --- src/peripherals/gpio.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/peripherals/gpio.ts b/src/peripherals/gpio.ts index 01d7da3..f787c23 100644 --- a/src/peripherals/gpio.ts +++ b/src/peripherals/gpio.ts @@ -239,6 +239,7 @@ export class AVRIOPort { const pinMask = 1 << pin; if (mode === PinOverrideMode.None) { this.overrideMask |= pinMask; + this.overrideValue &= ~pinMask; } else { this.overrideMask &= ~pinMask; switch (mode) { -- cgit v1.2.3