From b7bc816f69b0950b31d9cdf1ec8ad45c0a2eaa7c Mon Sep 17 00:00:00 2001 From: matt Date: Fri, 19 Jun 2009 19:41:04 +0000 Subject: test for clock lock git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11240 221aa14e-8319-0410-a670-987f0aec2ac5 --- usrp2/firmware/lib/clocks.c | 8 ++++++++ usrp2/firmware/lib/clocks.h | 5 +++++ 2 files changed, 13 insertions(+) (limited to 'usrp2/firmware/lib') diff --git a/usrp2/firmware/lib/clocks.c b/usrp2/firmware/lib/clocks.c index 0b0467346..0dbf3f90e 100644 --- a/usrp2/firmware/lib/clocks.c +++ b/usrp2/firmware/lib/clocks.c @@ -113,6 +113,14 @@ clocks_mimo_config(int flags) clocks_enable_clkexp_out(false,0); } +bool +clocks_lock_detect() +{ + if(pic_regs->pending & PIC_CLKSTATUS) + return true; + return false; +} + int inline clocks_gen_div(int divisor) { diff --git a/usrp2/firmware/lib/clocks.h b/usrp2/firmware/lib/clocks.h index 4d44bca79..39a0893c1 100644 --- a/usrp2/firmware/lib/clocks.h +++ b/usrp2/firmware/lib/clocks.h @@ -43,6 +43,11 @@ void clocks_init(void); */ void clocks_mimo_config(int flags); +/*! + * \brief Lock Detect -- Return True if our PLL is locked + */ +bool clocks_lock_detect(); + /*! * \brief Enable or disable test clock (extra clock signal) */ -- cgit