#include <zephyr/kernel.h>
#include <stdint.h>
#include <zephyr/device.h>
#include <zephyr/sys/util.h>
#include <zephyr/net/ptp_time.h>
#include <syscalls/ptp_clock.h>
Go to the source code of this file.
◆ PTP_CLOCK_NAME
#define PTP_CLOCK_NAME "PTP_CLOCK" |
◆ ptp_clock_adjust()
static int ptp_clock_adjust |
( |
const struct device * |
dev, |
|
|
int |
increment |
|
) |
| |
|
inlinestatic |
Adjust the PTP clock time.
- Parameters
-
dev | PTP clock device |
increment | Increment of the clock in nanoseconds |
- Returns
- 0 if ok, <0 if error
◆ ptp_clock_get()
Get the time of the PTP clock.
- Parameters
-
dev | PTP clock device |
tm | Where to store the current time. |
- Returns
- 0 if ok, <0 if error
◆ ptp_clock_rate_adjust()
static int ptp_clock_rate_adjust |
( |
const struct device * |
dev, |
|
|
double |
rate |
|
) |
| |
|
inlinestatic |
Adjust the PTP clock time change rate when compared to its neighbor.
- Parameters
-
dev | PTP clock device |
rate | Rate of the clock time change |
- Returns
- 0 if ok, <0 if error
◆ ptp_clock_set()
Set the time of the PTP clock.
- Parameters
-
dev | PTP clock device |
tm | Time to set |
- Returns
- 0 if ok, <0 if error