fix time macro name
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
#define SW2 4
|
||||
|
||||
#define PRESCALE_VALUE 1024
|
||||
#define TIME(ms) (((F_CPU / PRESCALE_VALUE) * ms) / 1000)
|
||||
#define TIME_MS(ms) (((F_CPU / PRESCALE_VALUE) * ms) / 1000)
|
||||
|
||||
int main() {
|
||||
MODE_OUTPUT(B, D2);
|
||||
@@ -44,7 +44,7 @@ int main() {
|
||||
TCCR1B |= ((1 << CS10 ) | (1 << CS12 ) ); // set timer with prescale
|
||||
|
||||
while(1) {
|
||||
if ( TCNT1 >= TIME(500)) {
|
||||
if ( TCNT1 >= TIME_MS(500)) {
|
||||
TOGGLE_LED(D2);
|
||||
TCNT1 = 0; // reset timer value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user