summaryrefslogtreecommitdiff
path: root/usrp2/firmware/lib
diff options
context:
space:
mode:
authormatt2009-06-19 19:41:04 +0000
committermatt2009-06-19 19:41:04 +0000
commitb7bc816f69b0950b31d9cdf1ec8ad45c0a2eaa7c (patch)
treeffc7965f79aa46e6140b76f8f0c387b15a053e8d /usrp2/firmware/lib
parent8a145afaab9a79eda76d0a3a6bcb420cc7c994bc (diff)
downloadgnuradio-b7bc816f69b0950b31d9cdf1ec8ad45c0a2eaa7c.tar.gz
gnuradio-b7bc816f69b0950b31d9cdf1ec8ad45c0a2eaa7c.tar.bz2
gnuradio-b7bc816f69b0950b31d9cdf1ec8ad45c0a2eaa7c.zip
test for clock lock
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11240 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'usrp2/firmware/lib')
-rw-r--r--usrp2/firmware/lib/clocks.c8
-rw-r--r--usrp2/firmware/lib/clocks.h5
2 files changed, 13 insertions, 0 deletions
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
@@ -44,6 +44,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)
*/
void clocks_enable_test_clk(bool enable, int divisor);