From 9bbf1d200534cd946c4776e29457f989147b45b2 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 19 Feb 2019 18:08:31 +0000 Subject: everything working, even with fucked phy --- app/msf.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'app/msf.c') diff --git a/app/msf.c b/app/msf.c index 241998e..72ad024 100644 --- a/app/msf.c +++ b/app/msf.c @@ -1,10 +1,10 @@ #include "project.h" #define P1 (GPIO1) -#define P1_PORT GPIOB +#define P1_PORT GPIOE #define T (GPIO0) -#define T_PORT GPIOB +#define T_PORT GPIOE static Event_ring msf_ring; @@ -34,7 +34,6 @@ void exti0_isr (void) static uint8_t bitsa[60], bitsb[60]; -static int time_known; @@ -91,12 +90,11 @@ static void process_bits (uint64_t abs) msf_time = time_utc_to_epoch (u); msf_time.s -= 59; - pll_set_offset (msf_time, abs); - time_known = 1; +// pll_set_offset (msf_time, abs); stats_stamp (u, abs); - dump_bits("msfa",bitsa); - dump_bits("msfb",bitsb); + dump_bits ("msfa", bitsa); + dump_bits ("msfb", bitsb); printf ("MSF: Next minute is: %02d-%02d-%02d %02d:%02d\r\n", u.year, u.month, u.mday, u.hour, u.minute); //time_print_epoch (msf_time); @@ -116,9 +114,9 @@ static void report_bits (uint64_t abs, int second, int a, int b) static void report_time (uint64_t abs) { -#if 0 +#if 1 EPOCH e = pll_decompose (abs); - time_print_epoch ("MSF: ", e); + time_print_epoch ("MSF : ", e); #endif } @@ -185,7 +183,7 @@ void msf_dispatch (void) if (time_known) report_time (abs); - stats(); +// stats(); } -- cgit v1.2.3