diff options
| author | Uri Shaked | 2021-08-09 23:31:55 +0300 |
|---|---|---|
| committer | Uri Shaked | 2021-08-09 23:31:55 +0300 |
| commit | a843df1829e4d5a06bb6000007c2e930e29327e6 (patch) | |
| tree | 01c8c0aac9205a52645ea4bdd116519700770f3e /src | |
| parent | style(spi): remove redundant whitespace from comments (diff) | |
| download | avr8js-a843df1829e4d5a06bb6000007c2e930e29327e6.tar.gz avr8js-a843df1829e4d5a06bb6000007c2e930e29327e6.tar.bz2 avr8js-a843df1829e4d5a06bb6000007c2e930e29327e6.zip | |
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.
Diffstat (limited to '')
| -rw-r--r-- | src/peripherals/gpio.ts | 1 |
1 files changed, 1 insertions, 0 deletions
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) { |
