From: Michel Pollet Date: Sun, 11 Apr 2010 19:11:00 +0000 (+0100) Subject: timer: Changed timer config feom a bit array to a normal regbit X-Git-Tag: v1.0a2~2 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=685e0118e40fa4217d42a57b715ab6eab036e2bf;p=sx%2Fsimavr.git timer: Changed timer config feom a bit array to a normal regbit Since all the timer seems to have these 2 bits declared in the same way anyway... Signed-off-by: Michel Pollet --- diff --git a/simavr/sim/avr_timer.c b/simavr/sim/avr_timer.c index b52671b..803adf7 100644 --- a/simavr/sim/avr_timer.c +++ b/simavr/sim/avr_timer.c @@ -53,8 +53,7 @@ static avr_cycle_count_t avr_timer_comp(avr_timer_t *p, avr_cycle_count_t when, avr_raise_interrupt(avr, &p->comp[comp].interrupt); // check output compare mode and set/clear pins - uint8_t mode = avr_regbit_get_array(avr, p->comp[comp].com, - ARRAY_SIZE(p->comp[comp].com)); + uint8_t mode = avr_regbit_get(avr, p->comp[comp].com); avr_irq_t * irq = &p->io.irq[TIMER_IRQ_OUT_COMP + comp]; switch (mode) { diff --git a/simavr/sim/avr_timer.h b/simavr/sim/avr_timer.h index bb2a878..a69fcb3 100644 --- a/simavr/sim/avr_timer.h +++ b/simavr/sim/avr_timer.h @@ -100,7 +100,7 @@ typedef struct avr_timer_t { avr_int_vector_t interrupt; // interrupt vector avr_io_addr_t r_ocr; // comparator register low byte avr_io_addr_t r_ocrh; // comparator register hi byte - avr_regbit_t com[2]; // comparator output mode registers + avr_regbit_t com; // comparator output mode registers avr_regbit_t com_pin; // where comparator output is connected uint64_t comp_cycles; } comp[AVR_TIMER_COMP_COUNT];