From d9a5d9bf9376abad309d3efedac1c3be56243006 Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Wed, 22 Feb 2012 11:29:06 +0000 Subject: [PATCH] adc: Fix for non updating ADC values Patch from Peter Ross pross@xvid.org Signed-off-by: Michel Pollet --- simavr/sim/avr_adc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/simavr/sim/avr_adc.c b/simavr/sim/avr_adc.c index e771ff6..77e1d80 100644 --- a/simavr/sim/avr_adc.c +++ b/simavr/sim/avr_adc.c @@ -160,6 +160,7 @@ static void avr_adc_write(struct avr_t * avr, avr_io_addr_t addr, uint8_t v, voi // stop ADC avr_cycle_timer_cancel(avr, avr_adc_int_raise, p); avr_regbit_clear(avr, p->adsc); + v = avr->data[p->adsc.reg]; // Peter Ross pross@xvid.org } if (!adsc && avr_regbit_get(avr, p->adsc)) { // start one! -- 2.39.5