mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
This patch adds a dummy PTP clock driver implementation that provides a software-based PTP clock for testing and development purposes. Key changes include: 1. Dummy PTP clock driver implementation: - Added drivers/timers/ptp_clock_dummy.c - Provides software-based PTP clock using system monotonic clock - Implements all required lower-half driver operations 2. Lower-half driver operations: - adjfine: Frequency adjustment (stores adjustment value) - adjtime: Time offset adjustment (applies delta to base time) - gettime: Returns current PTP clock time - settime: Sets PTP clock time - getcaps: Reports clock capabilities (1 billion PPB max adjustment) - getcrosststamp: Provides system/device cross-timestamp 3. Driver initialization: - Added ptp_clock_dummy_init() in drivers/drivers_initialize.c - Auto-registration under CONFIG_PTP_CLOCK_DUMMY configuration - Creates /dev/ptp0 character device node 4. Build system integration: - Added CONFIG_PTP_CLOCK_DUMMY Kconfig option (depends on PTP_CLOCK) - Updated CMakeLists.txt and Make.defs - Added include/nuttx/timers/ptp_clock_dummy.h header 5. Implementation details: - Uses clock_gettime(CLOCK_MONOTONIC) as time base - Tracks time offset and frequency adjustment internally - Suitable for testing PTP clock applications without hardware This dummy driver enables development and testing of PTP clock applications on platforms without dedicated PTP hardware support. Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com> |
||
|---|---|---|
| .. | ||
| android | ||
| arpa | ||
| crypto | ||
| cxx | ||
| net | ||
| netinet | ||
| netpacket | ||
| nuttx | ||
| ssp | ||
| sys | ||
| .gitignore | ||
| aio.h | ||
| alloca.h | ||
| assert.h | ||
| byteswap.h | ||
| ctype.h | ||
| debug.h | ||
| dirent.h | ||
| dlfcn.h | ||
| dsp.h | ||
| dspb16.h | ||
| elf.h | ||
| elf32.h | ||
| elf64.h | ||
| endian.h | ||
| err.h | ||
| errno.h | ||
| execinfo.h | ||
| fcntl.h | ||
| fixedmath.h | ||
| fnmatch.h | ||
| ftw.h | ||
| gcov.h | ||
| getopt.h | ||
| glob.h | ||
| grp.h | ||
| hex2bin.h | ||
| iconv.h | ||
| ifaddrs.h | ||
| imx_container.h | ||
| inttypes.h | ||
| iso646.h | ||
| langinfo.h | ||
| libgen.h | ||
| libintl.h | ||
| limits.h | ||
| locale.h | ||
| lzf.h | ||
| malloc.h | ||
| mqueue.h | ||
| netdb.h | ||
| nl_types.h | ||
| nxflat.h | ||
| obstack.h | ||
| poll.h | ||
| pthread.h | ||
| pty.h | ||
| pwd.h | ||
| regex.h | ||
| resolv.h | ||
| sched.h | ||
| search.h | ||
| semaphore.h | ||
| shadow.h | ||
| signal.h | ||
| spawn.h | ||
| stdbool.h | ||
| stddef.h | ||
| stdint.h | ||
| stdio.h | ||
| stdlib.h | ||
| stdnoreturn.h | ||
| string.h | ||
| strings.h | ||
| syscall.h | ||
| syslog.h | ||
| termios.h | ||
| threads.h | ||
| time.h | ||
| unistd.h | ||
| utime.h | ||
| uuid.h | ||
| wait.h | ||
| wchar.h | ||
| wctype.h | ||