This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit e1eca35c2c40e30a15d27c7b80ffa144b0fe05c1
Author: yangsong8 <[email protected]>
AuthorDate: Fri Nov 13 21:02:50 2026 +0800

    Documentation: describe the new capture ioctl commands.
    
    Document CAPIOC_SET_EDGE, CAPIOC_START_CAPTURE, CAPIOC_STOP_CAPTURE and
    CAPIOC_GET_INPUT_STATE, and how unknown commands reach the lower half.
    
    Assisted-by: Kiro:claude-opus-5-5
    Signed-off-by: yangsong8 <[email protected]>
---
 .../os/drivers/character/timers/capture.rst        | 40 ++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/Documentation/os/drivers/character/timers/capture.rst 
b/Documentation/os/drivers/character/timers/capture.rst
index 50208b54f37..a9edcd3f920 100644
--- a/Documentation/os/drivers/character/timers/capture.rst
+++ b/Documentation/os/drivers/character/timers/capture.rst
@@ -101,6 +101,46 @@ Supported ``ioctl`` Commands
 
    **Returns:** ``OK`` on success.
 
+.. c:macro:: CAPIOC_SET_EDGE
+
+   Set the capture edge polarity.  The command is handled by the lower
+   half ``ioctl`` method.
+
+   **Argument:** ``enum cap_edge_e`` (``CAP_EDGE_RISING``,
+   ``CAP_EDGE_FALLING`` or ``CAP_EDGE_BOTH``).
+
+.. c:macro:: CAPIOC_START_CAPTURE
+
+   Start capturing, using the optional lower half ``start_capture`` method.
+
+   **Argument:** None.
+
+   **Returns:** ``OK`` on success, ``-ENOSYS`` if the lower half does not
+   support it.
+
+.. c:macro:: CAPIOC_STOP_CAPTURE
+
+   Stop capturing, using the optional lower half ``stop_capture`` method.
+
+   **Argument:** None.
+
+   **Returns:** ``OK`` on success, ``-ENOSYS`` if the lower half does not
+   support it.
+
+.. c:macro:: CAPIOC_GET_INPUT_STATE
+
+   Read the current level of the input pin, using the optional lower half
+   ``get_input_state`` method.
+
+   **Argument:** ``uint8_t *`` (``CAP_STATE_IDLE`` or ``CAP_STATE_ACTIVE``).
+
+   **Returns:** ``OK`` on success, ``-ENOSYS`` if the lower half does not
+   support it.
+
+Commands that the upper half does not handle are passed to the lower half
+``ioctl`` method with the argument unchanged.  ``-ENOTTY`` is returned when
+the lower half has no ``ioctl`` method.
+
 Configuration
 -------------
 

Reply via email to