/FollowMe/timer0.c |
---|
2,9 → 2,11 |
#include <avr/io.h> |
#include <avr/interrupt.h> |
#include "main.h" |
#include "timer0.h" |
volatile uint16_t CountMilliseconds = 0; |
DateTime_t SystemTime; |
#ifdef USE_FOLLOWME |
volatile uint16_t BeepTime = 0; |
volatile uint16_t BeepModulation = 0xFFFF; |
62,6 → 64,19 |
TIMSK0 &= ~((1<<OCIE0B)|(1<<OCIE0A)); |
TIMSK0 |= (1<<TOIE0); |
SystemTime.Year = 0; |
SystemTime.Month = 0; |
SystemTime.Day = 0; |
SystemTime.Hour = 0; |
SystemTime.Min = 0; |
SystemTime.Sec = 0; |
SystemTime.mSec = 0; |
SystemTime.Valid = 0; |
CountMilliseconds = 0; |
SREG = sreg; |
} |