diff options
Diffstat (limited to '')
| -rw-r--r-- | src/peripherals/gpio.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/peripherals/gpio.ts b/src/peripherals/gpio.ts index e0861d7..4130c82 100644 --- a/src/peripherals/gpio.ts +++ b/src/peripherals/gpio.ts @@ -204,7 +204,7 @@ export class AVRIOPort { } private writeGpio(value: u8, ddr: u8) { - const newValue = ((value & this.overrideMask) | this.overrideValue) & ddr; + const newValue = (((value & this.overrideMask) | this.overrideValue) & ddr) | (value & ~ddr); const prevValue = this.lastValue; if (newValue !== prevValue || ddr !== this.lastDdr) { this.lastValue = newValue; |
