A list of functions, which external reference clock libraries must implement
#include <sensor/external_sensor_api.h>
typedef struct sensor_ext_reference_clock_t { sensor_error_t (*open)(sensor_unit_t); sensor_error_t (*get_time)(sensor_unit_t, int64_t *timestamp); sensor_error_t (*close)(sensor_unit_t); } sensor_ext_reference_clock_t;
This structure can be used when you configure these parameters in the sensor configuration file:
When configured as mentioned, the Sensor service looks for a sensor_ext_reference_clock_t structure instance, which must be named reference_clock_defs and dynamically loads it from the library to retrieve the function pointers used to interface with it.