flexPTP 1.0
An IEEE 1588 PTP implementation designed for microcontrollers
Loading...
Searching...
No Matches
ptp_core.h File Reference

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)
 

Detailed Description

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.

Function Documentation

◆ ptp_deinit()

void ptp_deinit ( )

Deinitialize flexPTP module.

Definition at line 140 of file ptp_core.c.

◆ ptp_init()

void ptp_init ( const uint8_t *  hwa)

Initialize flexPTP module.

Parameters
hwanetwork interface hardware address over which the flexPTP operates

Definition at line 113 of file ptp_core.c.

◆ ptp_process_event()

void ptp_process_event ( const PtpCoreEvent event)

Process a core event.

Parameters
eventpointer to an event object

Definition at line 250 of file ptp_core.c.

◆ ptp_process_packet()

void ptp_process_packet ( RawPtpMessage pRawMsg)

Process a PTP packet.

Parameters
pRawMsgpointer to raw PTP message

Definition at line 209 of file ptp_core.c.

◆ ptp_reset()

void ptp_reset ( )

Reset PTP subsystem.

Definition at line 165 of file ptp_core.c.

◆ ptp_set_sync_callback()

void ptp_set_sync_callback ( PtpSyncCallback  syncCb)

Set callback invoked each synchronization cycle.

Parameters
syncCBcallback function pointer

Definition at line 278 of file ptp_core.c.

◆ ptp_set_user_event_callback()

void ptp_set_user_event_callback ( PtpUserEventCallback  userEventCb)

Set user event callback.

Parameters
userEventCbcallback function pointer

Definition at line 282 of file ptp_core.c.