diff --git a/avr-code/main.c b/avr-code/main.c index 203554b..7499f5e 100644 --- a/avr-code/main.c +++ b/avr-code/main.c @@ -16,11 +16,30 @@ static volatile enum {LOCKED, UNLOCKED} state = LOCKED; static volatile bool schnapper = false; +static inline void timer_init(void) +{ + // Config the timer + // The 16bit Timer1 is used for resetting the lock state, + // if the UART stops receiving the unlock command + TIMSK |= (1<