#include #include #include "include/timer.h" void initCtcTimer0(void) { /* Initialize counter 0 */ TCNT0 = 0; /* Enable Counter0 Compare Match A Interrupt */ TIMSK0 |= (1 << OCIE0A); /* Select clock. Prescaler of 8 */ TCCR0B |= (1 << CS02) | (1 << CS00); /* Use CTC Mode */ TCCR0A |= (1 << WGM01); /* * OCR0A contains TOP value for counter: */ OCR0A = 100; } void initOverflowTimer0(void) { /* Prescaler = 0 */ TCCR0B |= (1<