13#ifndef ZEPHYR_INCLUDE_DRIVERS_PTP_CLOCK_H_
14#define ZEPHYR_INCLUDE_DRIVERS_PTP_CLOCK_H_
34#if !defined(PTP_CLOCK_NAME)
35#define PTP_CLOCK_NAME "PTP_CLOCK"
115static inline int z_impl_ptp_clock_get(
const struct device *dev,
151#include <zephyr/syscalls/ptp_clock.h>
#define DEVICE_API_GET(_class, _dev)
Expands to the pointer of a device's API for a given class.
Definition device.h:1425
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:142
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:99
int ptp_clock_get(const struct device *dev, struct net_ptp_time *tm)
Get the time of the PTP clock.
int(* ptp_clock_api_get_t)(const struct device *dev, struct net_ptp_time *tm)
Get the time of the PTP clock.
Definition ptp_clock.h:53
static int ptp_clock_adjust(const struct device *dev, int increment)
Adjust the PTP clock time.
Definition ptp_clock.h:129
int(* ptp_clock_api_adjust_t)(const struct device *dev, int increment)
Adjust the PTP clock time.
Definition ptp_clock.h:59
int(* ptp_clock_api_rate_adjust_t)(const struct device *dev, double ratio)
Adjust the PTP clock rate ratio based on its nominal frequency.
Definition ptp_clock.h:65
int(* ptp_clock_api_set_t)(const struct device *dev, struct net_ptp_time *tm)
@def_driverbackendgroup{PTP Clock,ptp_clock_interface}
Definition ptp_clock.h:47
Public functions for the Precision Time Protocol time specification.
Runtime device structure (in ROM) per driver instance.
Definition device.h:513
(Generalized) Precision Time Protocol Timestamp format.
Definition ptp_time.h:111
@driver_ops{PTP Clock}
Definition ptp_clock.h:70
ptp_clock_api_set_t set
@driver_ops_mandatory Set the time of the PTP clock.
Definition ptp_clock.h:74
ptp_clock_api_get_t get
@driver_ops_mandatory Get the time of the PTP clock.
Definition ptp_clock.h:78
ptp_clock_api_rate_adjust_t rate_adjust
@driver_ops_mandatory Adjust the PTP clock rate ratio based on its nominal frequency.
Definition ptp_clock.h:86
ptp_clock_api_adjust_t adjust
@driver_ops_mandatory Adjust the PTP clock time.
Definition ptp_clock.h:82