From 6d3a824e1cdae6e28146b7de380724b49488f3c2 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 25 Feb 2021 19:12:38 +0000 Subject: tim --- app/pll.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/pll.c') diff --git a/app/pll.c b/app/pll.c index 986034c..19681d8 100644 --- a/app/pll.c +++ b/app/pll.c @@ -8,7 +8,7 @@ static int64_t offset; static int64_t phase; -int64_t pll_freq = HZ; +int64_t pll_freq = HW_CLOCK_HZ; static int out_of_lock = JUMP_TICKS + 1; @@ -102,7 +102,7 @@ static void modify_pll_freq (uint64_t now, int d) uint64_t make_happy (uint64_t abs, int64_t shift) { - shift *= HZ; + shift *= HW_CLOCK_HZ; if (shift < 0) { shift = -shift; @@ -170,7 +170,7 @@ void pll_dispatch (uint64_t happy, uint64_t edge, const char *src) if (happy < msf_last_happy) return; - if (!pll_ready && (edge < ((uint64_t) WARM_UP * (uint64_t) HZ))) + if (!pll_ready && (edge < ((uint64_t) WARM_UP * (uint64_t) HW_CLOCK_HZ))) return; led_blink (100); @@ -211,7 +211,7 @@ void pll_dispatch (uint64_t happy, uint64_t edge, const char *src) phase += pd; out_of_lock = 0; printf ("PLL - jumping\r\n"); - pll_freq = HZ; + pll_freq = HW_CLOCK_HZ; pll_ready = 1; } else { -- cgit v1.2.3