Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
precision_clock_ptp.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright The Zephyr Project Contributors
3 * SPDX-FileCopyrightText: Copyright (c) 2026 Philipp Steiner
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
12
13#ifndef ZEPHYR_INCLUDE_ZEPHYR_PRECISION_TIMING_PRECISION_CLOCK_PTP_H_
14#define ZEPHYR_INCLUDE_ZEPHYR_PRECISION_TIMING_PRECISION_CLOCK_PTP_H_
15
16#include <zephyr/device.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
31
39
47 const struct device *dev);
48
56static inline const struct precision_clock *
58{
59 return &adapter->precision_clk;
60}
61
63
64#ifdef __cplusplus
65}
66#endif
67
68#endif /* ZEPHYR_INCLUDE_ZEPHYR_PRECISION_TIMING_PRECISION_CLOCK_PTP_H_ */
APIs and macros for the Zephyr device model.
void precision_clock_ptp_init(struct precision_clock_ptp_adapter *adapter, const struct device *dev)
Initialize an adapter for a PTP clock device.
static const struct precision_clock * precision_clock_ptp_get(const struct precision_clock_ptp_adapter *adapter)
Get the precision clock exposed by a PTP adapter.
Definition precision_clock_ptp.h:57
Protocol-neutral precision clock operations.
Runtime device structure (in ROM) per driver instance.
Definition device.h:543
Adapter that exposes a PTP clock device as a precision clock.
Definition precision_clock_ptp.h:33
const struct device * dev
Wrapped PTP clock device.
Definition precision_clock_ptp.h:37
struct precision_clock precision_clk
Protocol-neutral precision clock.
Definition precision_clock_ptp.h:35
Protocol-neutral precision clock instance.
Definition precision_clock.h:59