mirror of
https://github.com/apache/nuttx.git
synced 2026-05-11 16:01:03 +08:00
57217a7983
This commit introduces a software-based fake capture driver that simulates a 10Hz square wave with 50% duty cycle, enabling development and testing of capture-related applications without requiring real hardware. Background: The capture driver subsystem requires hardware support (timers with input capture functionality) to measure external signal frequency and duty cycle. During development, testing, or on platforms without capture hardware, it's difficult to develop and test applications that use the capture API. Problem: Without a fake/simulator driver: - Developers cannot test capture applications without specific hardware - Continuous Integration (CI) systems cannot run capture-related tests - Applications cannot be developed on platforms lacking capture hardware - Testing edge notification features requires complex hardware setup - Difficult to reproduce specific timing scenarios for debugging Solution: This commit provides a software-simulated capture driver that generates predictable capture events using a watchdog timer. The fake driver produces a square wave signal at 10Hz frequency with 50% duty cycle, allowing applications to test the full capture API without hardware. Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>