gcc testptp.c -o testptpHere we use Intel I210 for example.
Set SDP0 channel 0 as PPS output with 1Hz
sudo ./testptp -d /dev/ptp0 -L0,2 -i 0
sudo ./testptp -d /dev/ptp0 -p 1000000000Set SDP1 channel 1 as PPS input
sudo ./testptp -d /dev/ptp0 -L1,1 -i 1Listen PPS input event for channel 1
sudo ./testptp -d /dev/ptp0 -e 100 -i 1