Skip to content

Commit a843df1

Browse files
committed
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.
1 parent fad0506 commit a843df1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/peripherals/gpio.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ export class AVRIOPort {
239239
const pinMask = 1 << pin;
240240
if (mode === PinOverrideMode.None) {
241241
this.overrideMask |= pinMask;
242+
this.overrideValue &= ~pinMask;
242243
} else {
243244
this.overrideMask &= ~pinMask;
244245
switch (mode) {

0 commit comments

Comments
 (0)