Commit 38ce673e authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

userspace/wrsw_hal: added enable/disable PPS command

parent c7a89d70
......@@ -23,6 +23,7 @@ int halexp_lock_cmd(const char *port_name, int command, int priority)
{
int rval;
TRACE(TRACE_INFO, "halexp_lock_cmd: cmd=%d port=%s tics =%lld\n", command, port_name, shw_get_tics());
switch(command)
{
......@@ -101,6 +102,10 @@ int halexp_pps_cmd(int cmd, hexp_pps_params_t *params)
case HEXP_PPSG_CMD_POLL:
busy = shw_pps_gen_busy() || hal_phase_shifter_busy();
return busy ? 0 : 1;
case HEXP_PPSG_CMD_SET_VALID:
return shw_pps_gen_enable_output(params->pps_valid);
}
return -1; /* fixme: real error code */
}
......
......@@ -37,6 +37,7 @@
#define HEXP_PPSG_CMD_ADJUST_UTC 2
#define HEXP_PPSG_CMD_ADJUST_NSEC 3
#define HEXP_PPSG_CMD_POLL 4
#define HEXP_PPSG_CMD_SET_VALID 5
#define HEXP_ON 1
#define HEXP_OFF 0
......@@ -65,6 +66,8 @@ typedef struct {
char port_name[16];
int pps_valid;
uint32_t current_phase_shift;
int32_t adjust_phase_shift;
......
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