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:
1f3f065
)
Commit
f65ac1a207cc940757cd33dc05346adb7a9c60b9
author
bsekisser
<squirmyworms@embarqmail.com>
Sun, 26 Apr 2015 12:34:36 +0000
(08:34 -0400)
committer
bsekisser
<squirmyworms@embarqmail.com>
Sun, 26 Apr 2015 12:42:30 +0000
(08:42 -0400)
fix issue #118
modified: simavr/sim/avr_adc.c
simavr/sim/avr_adc.c
patch
|
blob
|
history
|
download
diff --git
a/simavr/sim/avr_adc.c
b/simavr/sim/avr_adc.c
index 712bfb73a3b59bd8195a6d0622300f3d743897fe..b1c5f553366280521c361fe9e20a051a8145ce3b 100644
(file)
--- a/
simavr/sim/avr_adc.c
+++ b/
simavr/sim/avr_adc.c
@@
-326,7
+326,8
@@
void avr_adc_init(avr_t * avr, avr_adc_t * p)
avr_io_setirqs(&p->io, AVR_IOCTL_ADC_GETIRQ, ADC_IRQ_COUNT, NULL);
avr_register_io_write(avr, p->r_adcsra, avr_adc_write_adcsra, p);
- avr_register_io_write(avr, p->r_adcsrb, avr_adc_write_adcsrb, p);
+ if (p->r_adcsrb)
+ avr_register_io_write(avr, p->r_adcsrb, avr_adc_write_adcsrb, p);
avr_register_io_read(avr, p->r_adcl, avr_adc_read_l, p);
avr_register_io_read(avr, p->r_adch, avr_adc_read_h, p);
}