projects
/
sx
/
simavr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
regExp
home
|
summary
|
tags
|
heads
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
raw
|
patch
| inline |
side by side
(parent:
f35aeb7
)
Commit
a29ada2d37fed04f6c4f568d99f3538f29fbc8f5
author
bsekisser
<squirmyworms@embarqmail.com>
Wed, 20 Nov 2013 16:37:49 +0000
(11:37 -0500)
committer
bsekisser
<squirmyworms@embarqmail.com>
Wed, 20 Nov 2013 16:37:49 +0000
(11:37 -0500)
modified: simavr/sim/avr_uart.c
simavr/sim/avr_uart.c
patch
|
blob
|
history
|
download
diff --git
a/simavr/sim/avr_uart.c
b/simavr/sim/avr_uart.c
index 149d8b9e56fd4b38ac1c02407c3e2391036ede0e..9eff694438e0ce78a52f1beb47ee377e0ba1f533 100644
(file)
--- a/
simavr/sim/avr_uart.c
+++ b/
simavr/sim/avr_uart.c
@@
-192,8
+192,11
@@
static void avr_uart_write(struct avr_t * avr, avr_io_addr_t addr, uint8_t v, vo
//uint8_t udre = avr_regbit_get(avr, p->udrc.raised);
uint8_t txc = avr_regbit_get(avr, p->txc.raised);
- // required for u2x (double uart transmission speed)
- avr_core_watch_write(avr, addr, v);
+ // setting u2x (double uart transmission speed) may also involve
+ // overwriting read only flags, therefore set u2x explicitly.
+ if(addr == p->u2x.reg) {
+ avr_regbit_setto_raw(avr, p->u2x, v);
+ }
//avr_clear_interrupt_if(avr, &p->udrc, udre);
avr_clear_interrupt_if(avr, &p->txc, txc);