summaryrefslogtreecommitdiff
path: root/usrp2/firmware/apps/app_common_v2.c
diff options
context:
space:
mode:
Diffstat (limited to 'usrp2/firmware/apps/app_common_v2.c')
-rw-r--r--usrp2/firmware/apps/app_common_v2.c17
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;