From: Ryan Pipkin Date: Wed, 18 Jan 2017 01:35:54 +0000 (-0600) Subject: ensure that the adsrb is written to memory X-Git-Tag: v1.5~17^2 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=1308b8233e80359aeaad14d5e3eca4957c1745eb;p=sx%2Fsimavr.git ensure that the adsrb is written to memory process avr_adc_configure_trigger after writing the value to memory --- diff --git a/simavr/sim/avr_adc.c b/simavr/sim/avr_adc.c index 3508bd0..4565b89 100644 --- a/simavr/sim/avr_adc.c +++ b/simavr/sim/avr_adc.c @@ -206,7 +206,6 @@ static void avr_adc_write_adcsra( struct avr_t * avr, avr_io_addr_t addr, uint8_t v, void * param) { - avr_adc_configure_trigger(avr, addr, v, param); avr_adc_t * p = (avr_adc_t *)param; uint8_t adsc = avr_regbit_get(avr, p->adsc); @@ -253,12 +252,14 @@ avr_adc_write_adcsra( avr_adc_int_raise, p); } avr_core_watch_write(avr, addr, v); + avr_adc_configure_trigger(avr, addr, v, param); } static void avr_adc_write_adcsrb( struct avr_t * avr, avr_io_addr_t addr, uint8_t v, void * param) { + avr_core_watch_write(avr, addr, v); avr_adc_configure_trigger(avr, addr, v, param); }