summaryrefslogtreecommitdiff
path: root/timebase.c
diff options
context:
space:
mode:
Diffstat (limited to 'timebase.c')
-rw-r--r--timebase.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/timebase.c b/timebase.c
index ea8f8b9..07a5fe7 100644
--- a/timebase.c
+++ b/timebase.c
@@ -2,10 +2,10 @@
#include "timebase.h"
// at 12MHz:
-#define T0COUNT (XTAL / 1024 / 64) // 183
-#define T0SECERR (XTAL - 1024L * 64 * T0COUNT) // 6912
+#define T0COUNT (F_CPU / 1024 / 64) // 183
+#define T0SECERR (F_CPU - 1024L * 64 * T0COUNT) // 6912
#define T0COUNTSEC (T0COUNT + T0SECERR / 1024) // 189
-#define T0MINERR (XTAL - 1024 * (63 * T0COUNT + T0COUNTSEC)) // 768
+#define T0MINERR (F_CPU - 1024 * (63 * T0COUNT + T0COUNTSEC)) // 768
#define T0COUNTMIN (T0COUNTSEC + (T0MINERR * 60 + 512) / 1024) // 234
// 234 = 12000000 Hz
@@ -26,7 +26,7 @@ void timebase_init( void )
extern uint8_t waitctr;
-SIGNAL (TIMER0_OVF0_vect)
+ISR (TIMER0_OVF0_vect)
{
static u8 dcf77_time, old_dcf77;
// DCF77 receive