diff options
| author | Uri Shaked | 2021-10-22 04:44:33 +0300 |
|---|---|---|
| committer | Uri Shaked | 2021-10-22 04:44:33 +0300 |
| commit | 8c15d5d1a3bdeb1f4c95248fc35b9ebe0a6aa235 (patch) | |
| tree | d72fc8560ea653141b2fafcceb270fb3d4ac08dd /src/peripherals/spi.ts | |
| parent | chore: add node 16 to CI test matrix (diff) | |
| download | avr8js-8c15d5d1a3bdeb1f4c95248fc35b9ebe0a6aa235.tar.gz avr8js-8c15d5d1a3bdeb1f4c95248fc35b9ebe0a6aa235.tar.bz2 avr8js-8c15d5d1a3bdeb1f4c95248fc35b9ebe0a6aa235.zip | |
fix(spi): setting SPIE doesn't fire pending interrupt
Diffstat (limited to '')
| -rw-r--r-- | src/peripherals/spi.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/peripherals/spi.ts b/src/peripherals/spi.ts index 9707307..7b753ab 100644 --- a/src/peripherals/spi.ts +++ b/src/peripherals/spi.ts @@ -78,6 +78,9 @@ export class AVRSPI { }, cyclesToComplete); return true; }; + cpu.writeHooks[SPCR] = (value: u8) => { + this.cpu.updateInterruptEnable(this.SPI, value); + }; cpu.writeHooks[SPSR] = (value: u8) => { this.cpu.data[SPSR] = value; this.cpu.clearInterruptByFlag(this.SPI, value); |
