mirror of
https://github.com/apache/nuttx.git
synced 2026-08-02 04:38:59 +00:00
This patch introduces the foundational PTP (Precision Time Protocol) clock driver framework for NuttX, enabling precise time synchronization support based on IEEE 1588 standard. Key changes include: 1. New PTP clock driver infrastructure: - Added drivers/timers/ptp_clock.c implementing upper-half driver - Created include/nuttx/timers/ptp_clock.h with PTP clock interfaces - Implemented upper/lower half driver architecture for hardware abstraction 2. Core functionality: - Clock time get/set operations (gettime, settime) - Frequency adjustment support (adjtime, adjfine) - Phase adjustment capabilities - System-device cross-timestamping for precise synchronization 3. IOCTL commands: - PTP_CLOCK_SETTIME/GETTIME for time manipulation - PTP_CLOCK_GETRES for resolution queries - PTP_CLOCK_ADJTIME for time adjustment - PTP_CLOCK_GETCAPS for capability queries - PTP_SYS_OFFSET* for system offset measurements 4. Supporting structures: - struct ptp_lowerhalf_s: lower-half driver interface - struct ptp_clock_caps: clock capabilities descriptor - struct ptp_sys_offset: system time offset measurement - Added timex structures in include/sys/timex.h for ADJ_* operations 5. Build system integration: - Added CONFIG_PTP_CLOCK Kconfig option - Updated CMakeLists.txt and Make.defs - Added PTPCLK debug macros in include/debug.h This framework provides the base for PTP clock implementations, allowing hardware-specific drivers to register and provide precise time services through a standardized interface. Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com> |
||
|---|---|---|
| .. | ||
| boardctl.h | ||
| custom_file.h | ||
| endian.h | ||
| epoll.h | ||
| eventfd.h | ||
| fcntl.h | ||
| file.h | ||
| gmon.h | ||
| inotify.h | ||
| ioctl.h | ||
| ipc.h | ||
| mman.h | ||
| mount.h | ||
| msg.h | ||
| param.h | ||
| pciio.h | ||
| poll.h | ||
| prctl.h | ||
| queue.h | ||
| random.h | ||
| resource.h | ||
| select.h | ||
| sem.h | ||
| sendfile.h | ||
| shm.h | ||
| signal.h | ||
| signalfd.h | ||
| socket.h | ||
| sockio.h | ||
| stat.h | ||
| statfs.h | ||
| statvfs.h | ||
| syscall.h | ||
| syscall_lookup.h | ||
| sysinfo.h | ||
| sysmacros.h | ||
| time.h | ||
| timerfd.h | ||
| times.h | ||
| timex.h | ||
| tree.h | ||
| types.h | ||
| uio.h | ||
| un.h | ||
| utsname.h | ||
| vfs.h | ||
| video_controls.h | ||
| videoio.h | ||
| wait.h | ||