flexPTP 1.0
An IEEE 1588 PTP implementation designed for microcontrollers
Loading...
Searching...
No Matches
ptp_core.h
Go to the documentation of this file.
1
11#ifndef PTP_CORE_H_
12#define PTP_CORE_H_
13
14#include <stdint.h>
15#include <stdbool.h>
16
17#include "event.h"
18
19#include "ptp_types.h"
20
21#include <flexptp_options.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31void ptp_init(void);
32
36void ptp_deinit();
37
41void ptp_reset();
42
49
55void ptp_process_event(const PtpCoreEvent * event);
56
62uint32_t ptp_get_tick();
63
69
75
77extern PtpCoreState gPtpCoreState;
78extern const TimestampI zeroTs; // a zero timestamp
80
81#ifdef __cplusplus
82}
83#endif
84
85#endif /* PTP_CORE_H_ */
In this module are the core and user events defined.
void ptp_deinit()
Definition: ptp_core.c:101
void ptp_process_event(const PtpCoreEvent *event)
Definition: ptp_core.c:198
void ptp_process_packet(RawPtpMessage *pRawMsg)
Definition: ptp_core.c:157
void ptp_set_sync_callback(PtpSyncCallback syncCb)
Definition: ptp_core.c:241
uint32_t ptp_get_tick()
Definition: ptp_core.c:230
void ptp_reset()
Definition: ptp_core.c:234
void ptp_set_user_event_callback(PtpUserEventCallback userEventCb)
Definition: ptp_core.c:245
void ptp_init(void)
Definition: ptp_core.c:71
This module defines the fundamental PTP message and state machine type, flags, bitfields and the PTP ...
void(* PtpUserEventCallback)(PtpUserEventCode uev)
Definition: ptp_types.h:487
void(* PtpSyncCallback)(int64_t time_error, const PtpSyncCycleData *pSCD, uint32_t freqCodeWord)
Definition: ptp_types.h:476
Giant PTP core state object.
Definition: ptp_types.h:501
Timestamp (signed)
Definition: timeutils.h:33