nuttx-apps/include
Daniel P. Carvalho 585db4b657 netutils/ptpd: Add ingress latency compensation for RX timestamps.
The MAC latches a hardware receive timestamp later than the frame
reaches the wire, because of the PHY and the clock domain crossing.
This fixed delay is the ingressLatency port parameter of IEEE 1588 and
shows up as a constant phase error between the local and the master
clock.

Subtract the configured latency from every hardware receive timestamp
in ptp_getrxtime(), the single place where they enter the daemon, so
Sync, Delay_Resp and the peer delay messages are all corrected.

- Add CONFIG_NETUTILS_PTPD_INGRESS_LATENCY_NS (default 0, which applies
  no compensation).
- Add the -I option to override it at run time.
- Add ingress_latency_ns to struct ptpd_config_s.

Software timestamps are not affected.

Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Daniel P. Carvalho <danieloak@gmail.com>
2026-09-24 11:07:31 +08:00
..
audioutils include: migrate to SPDX identifier 2024-12-19 15:25:28 +08:00
builtin include: migrate to SPDX identifier 2024-12-19 15:25:28 +08:00
canutils style: Fix coding style violations in nuttx-apps 2026-01-12 00:54:48 +08:00
crypto/controlse include: migrate to SPDX identifier 2024-12-19 15:25:28 +08:00
fsutils !fsutils/passwd: Replace TEA with PBKDF2-HMAC-SHA256 2026-07-22 17:21:22 +08:00
graphics include/debug.h: Use <nuttx/debug.h> in apps 2026-04-11 10:39:27 -03:00
industry style: Fix coding style violations in nuttx-apps 2026-01-12 00:54:48 +08:00
interpreters include: migrate to SPDX identifier 2024-12-19 15:25:28 +08:00
logging/nxscope logging/nxscope: add UDP transfer interface 2026-03-18 12:43:50 -03:00
lte include: migrate to SPDX identifier 2024-12-19 15:25:28 +08:00
modbus include: migrate to SPDX identifier 2024-12-19 15:25:28 +08:00
netutils netutils/ptpd: Add ingress latency compensation for RX timestamps. 2026-09-24 11:07:31 +08:00
nshlib nshlib: Add stderr redirection support 2026-01-27 03:14:00 +08:00
nxmodbus modbus: add nxmodbus 2026-04-20 12:45:17 -03:00
platform include: migrate to SPDX identifier 2024-12-19 15:25:28 +08:00
system system/zbus: Port the Zephyr zbus message bus to NuttX 2026-09-21 18:46:31 -03:00
testing apps/unity: Add printf configuration 2025-08-07 11:21:57 +08:00
wasm include: migrate to SPDX identifier 2024-12-19 15:25:28 +08:00
wireless include: migrate to SPDX identifier 2024-12-19 15:25:28 +08:00
.gitignore audioutils/morsey: Add the Morsey library 2026-07-21 05:46:11 -03:00