From 1f1bac2029fa1259e233357dc1617343d9c5abfd Mon Sep 17 00:00:00 2001 From: Peter Ross Date: Thu, 29 Nov 2012 23:05:51 +1100 Subject: [PATCH] uart: default to 8-bit word length on reset --- simavr/sim/avr_uart.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/simavr/sim/avr_uart.c b/simavr/sim/avr_uart.c index c42edaf..f723ee4 100644 --- a/simavr/sim/avr_uart.c +++ b/simavr/sim/avr_uart.c @@ -231,6 +231,9 @@ void avr_uart_reset(struct avr_io_t *io) avr_cycle_timer_cancel(avr, avr_uart_txc_raise, p); uart_fifo_reset(&p->input); + avr_regbit_set(avr, p->ucsz); + avr_regbit_clear(avr, p->ucsz2); + // DEBUG allow printf without fiddling with enabling the uart avr_regbit_set(avr, p->txen); p->usec_per_byte = 100; -- 2.39.5