7#ifndef ZEPHYR_INCLUDE_DRIVERS_PTP_CLOCK_H_
8#define ZEPHYR_INCLUDE_DRIVERS_PTP_CLOCK_H_
28#if !defined(PTP_CLOCK_NAME)
29#define PTP_CLOCK_NAME "PTP_CLOCK"
53 return api->
set(dev,
tm);
66static inline int z_impl_ptp_clock_get(
const struct device *dev,
72 return api->get(dev,
tm);
88 return api->
adjust(dev, increment);
111#include <zephyr/syscalls/ptp_clock.h>
static int ptp_clock_rate_adjust(const struct device *dev, double rate)
Adjust the PTP clock rate ratio based on its nominal frequency.
Definition ptp_clock.h:99
static int ptp_clock_set(const struct device *dev, struct net_ptp_time *tm)
Set the time of the PTP clock.
Definition ptp_clock.h:47
int ptp_clock_get(const struct device *dev, struct net_ptp_time *tm)
Get the time of the PTP clock.
static int ptp_clock_adjust(const struct device *dev, int increment)
Adjust the PTP clock time.
Definition ptp_clock.h:83
Public functions for the Precision Time Protocol time specification.
Runtime device structure (in ROM) per driver instance.
Definition device.h:510
const void * api
Address of the API structure exposed by the device instance.
Definition device.h:516
(Generalized) Precision Time Protocol Timestamp format.
Definition ptp_time.h:111
Definition ptp_clock.h:32
int(* get)(const struct device *dev, struct net_ptp_time *tm)
Definition ptp_clock.h:34
int(* adjust)(const struct device *dev, int increment)
Definition ptp_clock.h:35
int(* rate_adjust)(const struct device *dev, double ratio)
Definition ptp_clock.h:36
int(* set)(const struct device *dev, struct net_ptp_time *tm)
Definition ptp_clock.h:33