From 5a8330c20db9ef1ee7fa555e40c16a58c81c860d Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Thu, 9 Jul 2020 16:16:42 +0300 Subject: fix(usart): bitsPerChar looking at the wrong register close #52 --- src/peripherals/usart.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/peripherals/usart.ts') diff --git a/src/peripherals/usart.ts b/src/peripherals/usart.ts index eb6171e..16d86f8 100644 --- a/src/peripherals/usart.ts +++ b/src/peripherals/usart.ts @@ -115,7 +115,7 @@ export class AVRUSART { get bitsPerChar() { const ucsz = - ((this.cpu.data[this.config.UCSRA] & (UCSRC_UCSZ1 | UCSRC_UCSZ0)) >> 1) | + ((this.cpu.data[this.config.UCSRC] & (UCSRC_UCSZ1 | UCSRC_UCSZ0)) >> 1) | (this.cpu.data[this.config.UCSRB] & UCSRB_UCSZ2); switch (ucsz) { case 0: -- cgit v1.2.3