Subversion Repositories Projects

Rev

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

Rev 296 Rev 333
Line 5... Line 5...
5
#include "timer0.h"
5
#include "timer0.h"
Line 6... Line 6...
6
 
6
 
7
volatile uint16_t CountMilliseconds = 0;
7
volatile uint16_t CountMilliseconds = 0;
Line 8... Line -...
8
DateTime_t SystemTime;
-
 
9
 
8
DateTime_t SystemTime;
10
#ifdef USE_FOLLOWME
9
 
11
volatile uint16_t BeepTime = 0;
-
 
12
volatile uint16_t BeepModulation = 0xFFFF;
-
 
Line 13... Line 10...
13
#endif
10
volatile uint16_t BeepTime = 0;
14
 
11
volatile uint16_t BeepModulation = 0xFFFF;
15
 
12
 
16
/*****************************************************/
13
/*****************************************************/
Line 89... Line 86...
89
        {
86
        {
90
                cnt = 9;
87
                cnt = 9;
91
                CountMilliseconds++; // increment millisecond counter
88
                CountMilliseconds++; // increment millisecond counter
92
        }
89
        }
Line 93... Line -...
93
 
-
 
94
         #ifdef USE_FOLLOWME
90
 
95
        // beeper on if duration is not over
91
        // beeper on if duration is not over
96
        if(BeepTime)
92
        if(BeepTime)
97
        {
93
        {
98
                BeepTime--; // decrement BeepTime
94
                BeepTime--; // decrement BeepTime
Line 102... Line 98...
102
        else // beeper off if duration is over
98
        else // beeper off if duration is over
103
        {
99
        {
104
                Beeper_On = 0;
100
                Beeper_On = 0;
105
                BeepModulation = 0xFFFF;
101
                BeepModulation = 0xFFFF;
106
        }
102
        }
107
 
-
 
-
 
103
         #ifdef USE_FOLLOWME
108
        // if beeper is on
104
        // if beeper is on
109
        if(Beeper_On)
105
        if(Beeper_On)
110
        {
106
        {
111
                // set speaker port to high
107
                // set speaker port to high
112
                PORTC |= (1<<PORTC7); // Speaker at PC7
108
                PORTC |= (1<<PORTC7); // Speaker at PC7