diff options
Diffstat (limited to 'src/peripherals/gpio.ts')
| -rw-r--r-- | src/peripherals/gpio.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/peripherals/gpio.ts b/src/peripherals/gpio.ts index cb21669..e0861d7 100644 --- a/src/peripherals/gpio.ts +++ b/src/peripherals/gpio.ts @@ -110,8 +110,10 @@ export class AVRIOPort { constructor(private cpu: CPU, private portConfig: AVRPortConfig) { cpu.writeHooks[portConfig.DDR] = (value: u8) => { const portValue = cpu.data[portConfig.PORT]; + cpu.data[portConfig.DDR] = value; this.updatePinRegister(portValue, value); this.writeGpio(portValue, value); + return true; }; cpu.writeHooks[portConfig.PORT] = (value: u8) => { const ddrMask = cpu.data[portConfig.DDR]; |
