From: Michel Pollet Date: Thu, 5 Apr 2012 14:26:29 +0000 (+0100) Subject: uart: Trace the use of the x2 flag X-Git-Tag: v1.0b1~15 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=a69c1fc62beead0b65e01169d0116031dbfbb038;p=sx%2Fsimavr.git uart: Trace the use of the x2 flag No functional change Signed-off-by: Michel Pollet --- diff --git a/simavr/sim/avr_uart.c b/simavr/sim/avr_uart.c index 594a6f4..cfc02d0 100644 --- a/simavr/sim/avr_uart.c +++ b/simavr/sim/avr_uart.c @@ -131,8 +131,8 @@ static void avr_uart_baud_write(struct avr_t * avr, avr_io_addr_t addr, uint8_t int sb = 1 + avr_regbit_get(avr, p->usbs); int word_size = 1 /* start */ + db /* data bits */ + 1 /* parity */ + sb /* stops */; - printf("UART-%c configured to %04x = %d bps, %d data %d stop\n", - p->name, val, baud, db, sb); + printf("UART-%c configured to %04x = %d bps (x%d), %d data %d stop\n", + p->name, val, baud, avr_regbit_get(avr, p->u2x)?2:1, db, sb); // TODO: Use the divider value and calculate the straight number of cycles p->usec_per_byte = 1000000 / (baud / word_size); printf("Roughtly %d usec per bytes\n", (int)p->usec_per_byte);