From 5ccf9605ddfd0a226f7f1c6c3ecde8623b82c837 Mon Sep 17 00:00:00 2001 From: Gabriel Moyano Date: Fri, 20 May 2022 11:30:02 +0200 Subject: timecounter.h: Add _Timecounter_Discipline() Update #2349. --- cpukit/include/rtems/score/timecounter.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'cpukit/include/rtems/score/timecounter.h') diff --git a/cpukit/include/rtems/score/timecounter.h b/cpukit/include/rtems/score/timecounter.h index ae1e2612f8..6559801559 100644 --- a/cpukit/include/rtems/score/timecounter.h +++ b/cpukit/include/rtems/score/timecounter.h @@ -300,6 +300,23 @@ void _Timecounter_NTP_update_second(int64_t *adjustment, time_t *newsec); */ uint64_t _Timecounter_Get_frequency(void); +/** + * @brief Updates the timecounter frequency adjustment used by + * _Timecounter_Set_NTP_update_second(). + * + * This function is part of the time synchronization using a PPS + * (Pulse Per Second) signal. + * + * When an event (a rising or falling edge of the PPS signal) occurs, the + * functions pps_capture() and pps_event() are executed. Only if the kernel + * consumer is configured to be PPS_KC_HARDPPS, the timecounter is disciplined. + * + * @param[in] tsp is the time at PPS event + * + * @param[i] nsec is the time in nanoseconds from the last PPS event + */ +void _Timecounter_Discipline(struct timespec *tsp, long nsec); + /** @} */ #ifdef __cplusplus -- cgit v1.2.3