![]() |
flexPTP 1.0
An IEEE 1588 PTP implementation designed for microcontrollers
|
The entry point of the whole PTP-implementation. Calling reg_task_ptp() initializes the PTP-engine, invoking unreg_task_ptp() shuts it down. More...
Go to the source code of this file.
Functions | |
| void | ptp_start_heartbeat_tmr () |
| void | ptp_stop_heartbeat_tmr () |
| bool | reg_task_ptp () |
| void | unreg_task_ptp () |
| bool | is_flexPTP_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) |
| void | ptp_transmit_timestamp_cb (uint32_t uid, uint32_t seconds, uint32_t nanoseconds) |
| bool | ptp_read_and_clear_transmit_timestamp (uint32_t tag, TimestampI *pTs) |
| bool | ptp_event_enqueue (const PtpCoreEvent *event) |
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.
| bool is_flexPTP_operating | ( | ) |
Is the PTP task operating?
Definition at line 786 of file task_ptp.c.
| bool ptp_event_enqueue | ( | const PtpCoreEvent * | event | ) |
Post an event.
| event | pointer to a filled event object |
Definition at line 430 of file task_ptp.c.
| bool ptp_read_and_clear_transmit_timestamp | ( | uint32_t | tag, |
| TimestampI * | pTs | ||
| ) |
Read transmit timestamp and release message buffer area.
| tag | unique message tag |
| pTs | pointer to a TimestampI object |
Definition at line 564 of file task_ptp.c.
| void ptp_receive_enqueue | ( | const void * | pPayload, |
| uint32_t | len, | ||
| uint32_t | ts_sec, | ||
| uint32_t | ts_ns, | ||
| int | tp | ||
| ) |
Enqueue PTP message.
| pPayload | message payload |
| len | message length |
| ts_sec | reception timestamp seconds part |
| ts_ns | reception timestamp nanoseconds part |
| tp | transport protocol (L2/L4) |
Definition at line 457 of file task_ptp.c.
| void ptp_start_heartbeat_tmr | ( | ) |
Start the heartbeat timer.
Definition at line 210 of file task_ptp.c.
| void ptp_stop_heartbeat_tmr | ( | ) |
Stop the heartbeat timer.
Definition at line 225 of file task_ptp.c.
| bool ptp_transmit_enqueue | ( | const RawPtpMessage * | pMsg | ) |
Put a PTP message into the transmit queue.
| pMsg | pointer to raw PTP message. Can be discarded after the function has returned. |
Definition at line 502 of file task_ptp.c.
| void ptp_transmit_timestamp_cb | ( | uint32_t | uid, |
| uint32_t | seconds, | ||
| uint32_t | nanoseconds | ||
| ) |
Transmit timestamp callback handler.
| tag | unique message tag |
| seconds | transmit timestamp seconds part |
| nanoseconds | transmit timestamp nanoseconds part |
Definition at line 537 of file task_ptp.c.
| bool reg_task_ptp | ( | ) |
| void unreg_task_ptp | ( | ) |
Unreg PTP task.
Definition at line 404 of file task_ptp.c.