![]() |
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 "FreeRTOS.h"
#include "event.h"
#include "task.h"
#include "timers.h"
#include "ptp_types.h"
#include <flexptp_options.h>
Go to the source code of this file.
Functions | |
void | ptp_init (const uint8_t *hwa) |
void | ptp_deinit () |
void | ptp_reset () |
void | ptp_process_packet (RawPtpMessage *pRawMsg) |
void | ptp_process_event (const PtpCoreEvent *event) |
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 140 of file ptp_core.c.
void ptp_init | ( | const uint8_t * | hwa | ) |
Initialize flexPTP module.
hwa | network interface hardware address over which the flexPTP operates |
Definition at line 113 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 250 of file ptp_core.c.
void ptp_process_packet | ( | RawPtpMessage * | pRawMsg | ) |
Process a PTP packet.
pRawMsg | pointer to raw PTP message |
Definition at line 209 of file ptp_core.c.
void ptp_reset | ( | ) |
Reset PTP subsystem.
Definition at line 165 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 278 of file ptp_core.c.
void ptp_set_user_event_callback | ( | PtpUserEventCallback | userEventCb | ) |
Set user event callback.
userEventCb | callback function pointer |
Definition at line 282 of file ptp_core.c.