diff options
author | jcorgan | 2009-02-10 16:35:17 +0000 |
---|---|---|
committer | jcorgan | 2009-02-10 16:35:17 +0000 |
commit | 776f05255fbed9d7beecf03759215641c74188c5 (patch) | |
tree | fb86fce24ebb455217c165239006c5f8fcc9da32 /usrp2/firmware/apps/app_common_v2.c | |
parent | 9f6bc9d5da0e504008b7d692fd6c9cbe55753d90 (diff) | |
download | gnuradio-776f05255fbed9d7beecf03759215641c74188c5.tar.gz gnuradio-776f05255fbed9d7beecf03759215641c74188c5.tar.bz2 gnuradio-776f05255fbed9d7beecf03759215641c74188c5.zip |
Merged r10418:10423 from jcorgan/pps into trunk. Adds usrp2::sync_every_pps
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10424 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'usrp2/firmware/apps/app_common_v2.c')
-rw-r--r-- | usrp2/firmware/apps/app_common_v2.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/usrp2/firmware/apps/app_common_v2.c b/usrp2/firmware/apps/app_common_v2.c index c277d12f0..df943a4ee 100644 --- a/usrp2/firmware/apps/app_common_v2.c +++ b/usrp2/firmware/apps/app_common_v2.c @@ -55,6 +55,18 @@ sync_to_pps(const op_generic_t *p) } static bool +sync_every_pps(const op_generic_t *p) +{ + // FIXME use bit fields or defined masks + if (p->ok) + timesync_regs->tick_control |= 16; + else + timesync_regs->tick_control &= ~16; + + return true; +} + +static bool config_mimo_cmd(const op_config_mimo_t *p) { clocks_mimo_config(p->flags); @@ -505,6 +517,11 @@ handle_control_chan_frame(u2_eth_packet_t *pkt, size_t len) subpktlen = generic_reply(gp, reply_payload, reply_payload_space, true); break; + case OP_SYNC_EVERY_PPS: + subpktlen = generic_reply(gp, reply_payload, reply_payload_space, + sync_every_pps((op_generic_t *) payload)); + break; + default: printf("app_common_v2: unhandled opcode = %d\n", gp->opcode); break; |