Interfaces for Precision Time Protocol (PTP) clocks.
More...
|
file | ptp_clock.h |
| Main header file for PTP (Precision Time Protocol) clock driver API.
|
|
Interfaces for Precision Time Protocol (PTP) clocks.
◆ PTP_CLOCK_NAME
#define PTP_CLOCK_NAME "PTP_CLOCK" |
◆ ptp_clock_adjust()
static int ptp_clock_adjust |
( |
const struct device * |
dev, |
|
|
int |
increment |
|
) |
| |
|
inlinestatic |
#include <include/zephyr/drivers/ptp_clock.h>
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()
#include <include/zephyr/drivers/ptp_clock.h>
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 |
#include <include/zephyr/drivers/ptp_clock.h>
Adjust the PTP clock rate ratio based on its nominal frequency.
- Parameters
-
dev | PTP clock device |
rate | Rate ratio based on its nominal frequency |
- Returns
- 0 if ok, <0 if error
◆ ptp_clock_set()