diff options
Diffstat (limited to 'cpukit/include/rtems/score/timecounter.h')
-rw-r--r-- | cpukit/include/rtems/score/timecounter.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/cpukit/include/rtems/score/timecounter.h b/cpukit/include/rtems/score/timecounter.h index 1ecfc02085..ced3d7c60c 100644 --- a/cpukit/include/rtems/score/timecounter.h +++ b/cpukit/include/rtems/score/timecounter.h @@ -10,7 +10,7 @@ */ /* - * Copyright (c) 2015, 2021 embedded brains GmbH. All rights reserved. + * Copyright (C) 2015, 2021 embedded brains GmbH & Co. KG * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -292,6 +292,31 @@ void _Timecounter_Set_NTP_update_second( */ void _Timecounter_NTP_update_second(int64_t *adjustment, time_t *newsec); +/** + * @brief Gets the frequency in Hz of the current timecounter at some time + * point during the call. + * + * @return Returns the frequency in Hz. + */ +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 |