From: Sami Liedes Date: Mon, 28 Feb 2011 21:33:08 +0000 (+0200) Subject: Do not let code clear the UDRE flag in USART. X-Git-Tag: v1.0a7~2 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=9f4d192d318aedee0ff964033a7accf6e9b544ed;p=sx%2Fsimavr.git 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 --- 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); } }