From 9f4d192d318aedee0ff964033a7accf6e9b544ed Mon Sep 17 00:00:00 2001 From: Sami Liedes Date: Mon, 28 Feb 2011 23:33:08 +0200 Subject: [PATCH] Do not let code clear the UDRE flag in USART. It's a read only location and clearing it may break software that assumes it cannot be cleared. Signed-off-by: Sami Liedes --- simavr/sim/avr_uart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simavr/sim/avr_uart.c b/simavr/sim/avr_uart.c index a297bb9..4e6f0e5 100644 --- a/simavr/sim/avr_uart.c +++ b/simavr/sim/avr_uart.c @@ -158,14 +158,14 @@ static void avr_uart_write(struct avr_t * avr, avr_io_addr_t addr, uint8_t v, vo } if (addr == p->udrc.raised.reg) { // get the bits before the write - uint8_t udre = avr_regbit_get(avr, p->udrc.raised); + //uint8_t udre = avr_regbit_get(avr, p->udrc.raised); uint8_t txc = avr_regbit_get(avr, p->txc.raised); // no need to write this value in here, only the // interupt flags needs clearing! // avr_core_watch_write(avr, addr, v); - avr_clear_interupt_if(avr, &p->udrc, udre); + //avr_clear_interupt_if(avr, &p->udrc, udre); avr_clear_interupt_if(avr, &p->txc, txc); } } -- 2.39.5