refclock_phc: add support for timestamping of external PPS

Add extpps driver option to the PHC refclock to enable external
timestamping of PPS signal and also options to configure the channel and
pin index. In this mode, the driver polling function accumulates samples
for hwclock, which is used to convert received timestamping events to
local time.
This commit is contained in:
Miroslav Lichvar
2017-05-05 16:07:34 +02:00
parent 4ba92bb6d6
commit eceb8d9937
3 changed files with 80 additions and 6 deletions

View File

@@ -522,6 +522,12 @@ RCL_GetPrecision(RCL_Instance instance)
return instance->precision;
}
int
RCL_GetDriverPoll(RCL_Instance instance)
{
return instance->driver_poll;
}
static int
valid_sample_time(RCL_Instance instance, struct timespec *sample_time)
{