diff options
author | Christian Koch <christian_koch@gmx.de> | 2012-05-06 15:29:24 +0200 |
---|---|---|
committer | Christian Koch <christian_koch@gmx.de> | 2012-05-06 15:29:24 +0200 |
commit | f7a48dc590f5e8bf2d6d9d92248734566c175cf2 (patch) | |
tree | b8c5f2f5b60ec9e39a5f3dd80566533ad74e86ea /timebase.c | |
parent | f714cacefc9a04fbae7249cc4b707a27cedabc36 (diff) |
Diffstat (limited to 'timebase.c')
-rw-r--r-- | timebase.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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
|