flexPTP 1.0
An IEEE 1588 PTP implementation designed for microcontrollers
Loading...
Searching...
No Matches
ptp_port_stm32f407_etherlib.c File Reference
#include "ptp_port_stm32f407_etherlib.h"
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include <math.h>
#include <cmsis_os2.h>
#include "flexptp_options.h"

Go to the source code of this file.

Functions

void ptphw_init (uint32_t increment, uint32_t addend)
 
void ptphw_gettime (TimestampU *pTime)
 

Variables

ETH_HandleTypeDef EthHandle
 
static unsigned sFreq = 1
 

Function Documentation

◆ ptphw_gettime()

void ptphw_gettime ( TimestampU pTime)

Get time right from the hardware clock.

Parameters
pTimepointer to a TimestampU object.

Definition at line 131 of file ptp_port_stm32f407_etherlib.c.

◆ ptphw_init()

void ptphw_init ( uint32_t  increment,
uint32_t  addend 
)

Initialize PTP hardware.

Parameters
incrementPTP hardware clock tick increment in nanoseconds
addendinitialize frequency tuning code word

Definition at line 88 of file ptp_port_stm32f407_etherlib.c.

Variable Documentation

◆ EthHandle

ETH_HandleTypeDef EthHandle
extern

◆ sFreq

unsigned sFreq = 1
static

Definition at line 14 of file ptp_port_stm32f407_etherlib.c.