#include #include "utils.h" #include "bitmanip.h" // TIMER #define PRESCALE_VALUE 1024 // can be 1, 8, 64, 256, 1024 // table 16-5 : prescale sets #define PRESCALE_SET(value) \ ((value) == 1 ? (0<= TIME_MS(500)) { // 16.11.4 : read timer with register TCNT1 (read/write allowed), that combines two 8 bits registers TOGGLE_PIN(LED2); TCNT1 = 0; // reset timer value, also in register TCNT1 } } }