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

The entry point of the whole PTP-implementation. Calling reg_task_ptp() initializes the PTP-engine, invoking unreg_task_ptp() shuts it down. More...

#include <stdint.h>
#include <stdbool.h>
#include "event.h"
#include "ptp_types.h"

Go to the source code of this file.

Functions

void reg_task_ptp ()
 
void unreg_task_ptp ()
 
bool task_ptp_is_operating ()
 
void ptp_receive_enqueue (const void *pPayload, uint32_t len, uint32_t ts_sec, uint32_t ts_ns, int tp)
 
bool ptp_transmit_enqueue (const RawPtpMessage *pMsg)
 
bool ptp_event_enqueue (const PtpCoreEvent *event)
 

Detailed Description

The entry point of the whole PTP-implementation. Calling reg_task_ptp() initializes the PTP-engine, invoking unreg_task_ptp() shuts it down.

Definition in file task_ptp.h.

Function Documentation

◆ ptp_event_enqueue()

bool ptp_event_enqueue ( const PtpCoreEvent event)

Post an event.

Parameters
eventpointer to a filled event object
Returns
sucessful posting

Definition at line 136 of file task_ptp.c.

◆ ptp_receive_enqueue()

void ptp_receive_enqueue ( const void *  pPayload,
uint32_t  len,
uint32_t  ts_sec,
uint32_t  ts_ns,
int  tp 
)

Enqueue PTP message.

Parameters
pPayloadmessage payload
lenmessage length
ts_secreception timestamp seconds part
ts_nsreceptiopn timestamp nanoseconds part
tptransport portocol (L2/L4)

Definition at line 141 of file task_ptp.c.

◆ ptp_transmit_enqueue()

bool ptp_transmit_enqueue ( const RawPtpMessage pMsg)

Put a PTP message into the transmit queue.

Parameters
pMsgpointer to raw PTP message. Can be discarded after the function has returned.
Returns
successful insertion

Definition at line 171 of file task_ptp.c.

◆ reg_task_ptp()

void reg_task_ptp ( )

Register PTP task.

Definition at line 90 of file task_ptp.c.

◆ task_ptp_is_operating()

bool task_ptp_is_operating ( )

Is the PTP task operating?

Definition at line 237 of file task_ptp.c.

◆ unreg_task_ptp()

void unreg_task_ptp ( )

Unreg PTP task.

Definition at line 128 of file task_ptp.c.