diff options
| author | Uri Shaked | 2020-07-09 16:09:44 +0300 |
|---|---|---|
| committer | Uri Shaked | 2020-07-09 16:09:44 +0300 |
| commit | 6ee7d2f247afe4ac30c0a42a58806956a0bedc69 (patch) | |
| tree | 5212a3ada617ef7a5ced2d5cc899ae5b5ae2184c /src/peripherals/usart.ts | |
| parent | test(usart): extract constants (diff) | |
| download | avr8js-6ee7d2f247afe4ac30c0a42a58806956a0bedc69.tar.gz avr8js-6ee7d2f247afe4ac30c0a42a58806956a0bedc69.tar.bz2 avr8js-6ee7d2f247afe4ac30c0a42a58806956a0bedc69.zip | |
fix(usart): TXC interrupt triggered incorrectly
close #51
Diffstat (limited to '')
| -rw-r--r-- | src/peripherals/usart.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/peripherals/usart.ts b/src/peripherals/usart.ts index c1d6f13..eb6171e 100644 --- a/src/peripherals/usart.ts +++ b/src/peripherals/usart.ts @@ -100,7 +100,7 @@ export class AVRUSART { avrInterrupt(this.cpu, this.config.dataRegisterEmptyInterrupt); this.cpu.data[this.config.UCSRA] &= ~UCSRA_UDRE; } - if (ucsrb & UCSRA_TXC && ucsrb & UCSRB_TXCIE) { + if (ucsra & UCSRA_TXC && ucsrb & UCSRB_TXCIE) { avrInterrupt(this.cpu, this.config.txCompleteInterrupt); this.cpu.data[this.config.UCSRA] &= ~UCSRA_TXC; } |
