return avr_timer_comp((avr_timer_t*)param, when, AVR_TIMER_COMPC);
}
+// timer overflow
static avr_cycle_count_t avr_timer_tov(struct avr_t * avr, avr_cycle_count_t when, void * param)
{
avr_timer_t * p = (avr_timer_t *)param;
avr_timer_wgm_t mode;
uint64_t tov_cycles;
- uint64_t tov_base; // we we last were called
+ uint64_t tov_base; // when we last were called
uint16_t tov_top; // current top value to calculate tnct
} avr_timer_t;
}
/*
- * check wether interrupts are pending. I so, check if the interrupt "latency" is reached,
+ * check whether interrupts are pending. If so, check if the interrupt "latency" is reached,
* and if so triggers the handlers and jump to the vector.
*/
void avr_service_interrupts(avr_t * avr)
// registers an IO module, so it's run(), reset() etc are called
// this is called by the AVR core init functions, you /could/ register an external
-// one after instanciation, for whatever purpose...
+// one after instantiation, for whatever purpose...
void
avr_register_io(
avr_t *avr,