comejv commented on code in PR #16830:
URL: https://github.com/apache/nuttx/pull/16830#discussion_r2270107339


##########
Documentation/components/drivers/character/timers/capture.rst:
##########
@@ -0,0 +1,138 @@
+=======
+Capture
+=======
+
+The **capture driver** is a character device driver that allows capturing
+timer values on specific events. This is useful for tasks such as
+measuring the frequency, duty cycle, or pulse count of an input signal.
+
+This documentation is based on the STM32H7 timer capture driver.
+
+Usage
+=====
+
+The capture driver is accessed via a device file (e.g., ``/dev/capture0``).
+You can use standard file operations along with ``ioctl()`` calls to
+retrieve captured values or configure the driver.
+
+Supported ``ioctl`` Commands
+----------------------------
+
+.. c:macro:: CAPIOC_DUTYCYCLE
+
+   Get the PWM duty cycle from the capture unit.
+
+   **Argument:** ``int8_t *`` (pointer to duty cycle percentage).
+
+.. c:macro:: CAPIOC_FREQUENCE

Review Comment:
   We would have to update 
https://github.com/apache/nuttx-apps/blob/master/examples%2Fcapture%2Fcap_main.c
 too, because changing the macro would be a breaking change



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to