// aes67_ptp: PTPv2 ordinary clock: BMCA, servo, master, multicast/hybrid, EMAC HW timestamps, stats. // Core component: must not depend on main/ (project code). #pragma once #include #include #include "esp_err.h" #include "esp_eth_driver.h" // Registers the "ptp" config group. Call early, before the config is used. esp_err_t aes67_ptp_init(void); // Start the EMAC PTP clock and the PTP task on this Ethernet interface. esp_err_t aes67_ptp_start(esp_eth_handle_t eth); // Current GM clockIdentity as "XX-XX-XX-XX-XX-XX-XX-XX" (RFC 7273 form). false if none selected. bool aes67_ptp_gm_id(char out[24]); // Servo locked to the GM. bool aes67_ptp_locked(void); // PTP time (EMAC hardware clock) in ns. esp_err_t aes67_ptp_now_ns(int64_t *ns);