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 "FreeRTOS.h"
18#include "event.h"
19#include "task.h"
20#include "timers.h"
21
22#include "ptp_types.h"
23
24#include <flexptp_options.h>
25
31void ptp_init(const uint8_t *hwa);
32
36void ptp_deinit();
37
41void ptp_reset();
42
49
55void ptp_process_event(const PtpCoreEvent * event);
56
62
68
70extern PtpCoreState gPtpCoreState;
71extern const TimestampI zeroTs; // a zero timestamp
73
74#endif /* PTP_CORE_H_ */
In this module are the core and user events defined.
void ptp_deinit()
Definition: ptp_core.c:140
void ptp_process_event(const PtpCoreEvent *event)
Definition: ptp_core.c:250
void ptp_init(const uint8_t *hwa)
Definition: ptp_core.c:113
void ptp_process_packet(RawPtpMessage *pRawMsg)
Definition: ptp_core.c:209
void ptp_set_sync_callback(PtpSyncCallback syncCb)
Definition: ptp_core.c:278
void ptp_reset()
Definition: ptp_core.c:165
void ptp_set_user_event_callback(PtpUserEventCallback userEventCb)
Definition: ptp_core.c:282
This module defines the fundamental PTP message and state machine type, flags, bitfields and the PTP ...
void(* PtpUserEventCallback)(PtpUserEventCode uev)
Definition: ptp_types.h:452
void(* PtpSyncCallback)(int64_t time_error, const PtpSyncCycleData *pSCD, uint32_t freqCodeWord)
Definition: ptp_types.h:447
Giant PTP core state object.
Definition: ptp_types.h:457
Raw PTP message structure.
Definition: ptp_types.h:162
Timestamp (signed)
Definition: timeutils.h:29