![]() |
flexPTP 1.0
An IEEE 1588 PTP implementation designed for microcontrollers
|
Core of the PTP implementation. Defines functions for message processing, clock tuning, storing and loading configurations and managing event callbacks. More...
#include <stdint.h>
#include <stdbool.h>
#include "event.h"
#include "ptp_types.h"
#include <flexptp_options.h>
Go to the source code of this file.
Functions | |
void | ptp_init (void) |
void | ptp_deinit () |
void | ptp_reset () |
void | ptp_process_packet (RawPtpMessage *pRawMsg) |
void | ptp_process_event (const PtpCoreEvent *event) |
uint32_t | ptp_get_tick () |
void | ptp_set_sync_callback (PtpSyncCallback syncCb) |
void | ptp_set_user_event_callback (PtpUserEventCallback userEventCb) |
Core of the PTP implementation. Defines functions for message processing, clock tuning, storing and loading configurations and managing event callbacks.
Definition in file ptp_core.h.
void ptp_deinit | ( | ) |
Deinitialize flexPTP module.
Definition at line 101 of file ptp_core.c.
uint32_t ptp_get_tick | ( | ) |
void ptp_init | ( | void | ) |
Initialize flexPTP module.
Definition at line 71 of file ptp_core.c.
void ptp_process_event | ( | const PtpCoreEvent * | event | ) |
Process a core event.
event | pointer to an event object |
Definition at line 198 of file ptp_core.c.
void ptp_process_packet | ( | RawPtpMessage * | pRawMsg | ) |
Process a PTP packet.
pRawMsg | pointer to raw PTP message |
Definition at line 157 of file ptp_core.c.
void ptp_reset | ( | ) |
Reset PTP subsystem.
Definition at line 234 of file ptp_core.c.
void ptp_set_sync_callback | ( | PtpSyncCallback | syncCb | ) |
Set callback invoked each synchronization cycle.
syncCB | callback function pointer |
Definition at line 241 of file ptp_core.c.
void ptp_set_user_event_callback | ( | PtpUserEventCallback | userEventCb | ) |
Set user event callback.
userEventCb | callback function pointer |
Definition at line 245 of file ptp_core.c.