Subversion Repositories Projects

Rev

Rev 271 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 271 Rev 274
Line 1... Line 1...
1
#include <inttypes.h>
1
#include <inttypes.h>
2
#include <avr/io.h>
2
#include <avr/io.h>
3
#include <avr/interrupt.h>
3
#include <avr/interrupt.h>
Line 4... Line 4...
4
 
4
 
Line 5... Line 5...
5
#include "main.h"
5
#include "timer0.h"
-
 
6
 
-
 
7
volatile uint16_t CountMilliseconds = 0;
6
 
8
DateTime_t SystemTime;
7
volatile uint16_t CountMilliseconds = 0;
9
 
8
#ifdef USE_FOLLOWME
10
#ifdef USE_FOLLOWME
9
volatile uint16_t BeepTime = 0;
11
volatile uint16_t BeepTime = 0;
Line 60... Line 62...
60
        // Timer/Counter 0 Interrupt Mask Register
62
        // Timer/Counter 0 Interrupt Mask Register
61
        // enable timer overflow interrupt only
63
        // enable timer overflow interrupt only
62
        TIMSK0 &= ~((1<<OCIE0B)|(1<<OCIE0A));
64
        TIMSK0 &= ~((1<<OCIE0B)|(1<<OCIE0A));
63
        TIMSK0 |= (1<<TOIE0);
65
        TIMSK0 |= (1<<TOIE0);
Line -... Line 66...
-
 
66
 
-
 
67
 
-
 
68
        SystemTime.Year = 0;
-
 
69
        SystemTime.Month = 0;
-
 
70
        SystemTime.Day = 0;
-
 
71
        SystemTime.Hour = 0;
-
 
72
        SystemTime.Min = 0;
-
 
73
        SystemTime.Sec = 0;
-
 
74
        SystemTime.mSec = 0;
-
 
75
        SystemTime.Valid = 0;
-
 
76
 
-
 
77
        CountMilliseconds = 0;
-
 
78
 
64
 
79
 
65
        SREG = sreg;
80
        SREG = sreg;