Since all the timer seems to have these 2 bits declared
in the same way anyway...
Signed-off-by: Michel Pollet <buserror@gmail.com>
2 files changed:
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) {
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];