Commit bbd88426 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

show AUX clock status in the monitor UI

parent 1c96295c
......@@ -544,4 +544,17 @@ int spll_update_aux_clocks()
break;
}
}
}
int spll_get_aux_status(int channel)
{
int rval = 0;
if(softpll.aux_fsm[channel].state != AUX_DISABLED)
rval |= SPLL_AUX_ENABLED;
if(softpll.aux_fsm[channel].state == AUX_READY)
rval |= SPLL_AUX_LOCKED;
return rval;
}
\ No newline at end of file
......@@ -10,9 +10,11 @@
#define SPLL_MODE_SLAVE 3
#define SPLL_MODE_DISABLED 4
#define SPLL_ALL_CHANNELS 0xffff
#define SPLL_AUX_ENABLED (1<<0)
#define SPLL_AUX_LOCKED (1<<1)
void spll_init(int mode, int slave_ref_channel, int align_pps);
void spll_shutdown();
void spll_start_channel(int channel);
......@@ -24,6 +26,8 @@ int spll_read_ptracker(int channel, int32_t *phase_ps, int *enabled);
void spll_get_num_channels(int *n_ref, int *n_out);
int spll_shifter_busy(int channel);
int spll_get_delock_count();
int spll_update_aux_clocks();
int spll_get_aux_status(int channel);
#endif
......@@ -76,13 +76,14 @@ int wrc_mon_gui(void)
m_cprintf(C_GREY, "Synchronization source: "); m_cprintf(C_WHITE, "%s\n", cur_servo_state.sync_source);
m_cprintf(C_GREY, "Aux clock status: ");
//aux_stat = spll_check_lock(1); //GGDD softpll_get_aux_status();
//if(aux_stat & SOFTPLL_AUX_ENABLED)
// m_cprintf(C_GREEN,"enabled");
aux_stat = spll_get_aux_status(0);
//if(aux_stat & SOFTPLL_AUX_LOCKED)
// m_cprintf(C_GREEN,", locked");
if(aux_stat & SPLL_AUX_ENABLED)
m_cprintf(C_GREEN,"enabled");
if(aux_stat & SPLL_AUX_LOCKED)
m_cprintf(C_GREEN,", locked");
mprintf("\n");
m_cprintf(C_BLUE, "\nTiming parameters:\n\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment