Commit 99547836 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] docs-rst: Convert CEC uAPI to use C function references

Name all ioctl references and make them match the ioctls that
are documented. That will improve the cross-reference index,
as it will have all ioctls and syscalls there.

While here, improve the documentation to make them to look more
like the rest of the document.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent cf8076c3
...@@ -21,12 +21,13 @@ Synopsis ...@@ -21,12 +21,13 @@ Synopsis
.. c:function:: int close( int fd ) .. c:function:: int close( int fd )
:name: cec-close
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open() <cec-open>`.
Description Description
......
...@@ -20,16 +20,17 @@ Synopsis ...@@ -20,16 +20,17 @@ Synopsis
.. c:function:: int ioctl( int fd, int request, void *argp ) .. c:function:: int ioctl( int fd, int request, void *argp )
:name: cec-ioctl
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open() <cec-open>`.
``request`` ``request``
CEC ioctl request code as defined in the cec.h header file, for CEC ioctl request code as defined in the cec.h header file, for
example :ref:`CEC_ADAP_G_CAPS`. example :c:func:`CEC_ADAP_G_CAPS`.
``argp`` ``argp``
Pointer to a request-specific structure. Pointer to a request-specific structure.
......
...@@ -20,6 +20,7 @@ Synopsis ...@@ -20,6 +20,7 @@ Synopsis
.. c:function:: int open( const char *device_name, int flags ) .. c:function:: int open( const char *device_name, int flags )
:name: cec-open
Arguments Arguments
......
...@@ -21,10 +21,20 @@ Synopsis ...@@ -21,10 +21,20 @@ Synopsis
.. c:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout ) .. c:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout )
:name: cec-poll
Arguments Arguments
========= =========
``ufds``
List of FD events to be watched
``nfds``
Number of FD efents at the \*ufds array
``timeout``
Timeout to wait for events
Description Description
=========== ===========
......
...@@ -14,7 +14,8 @@ CEC_ADAP_G_CAPS - Query device capabilities ...@@ -14,7 +14,8 @@ CEC_ADAP_G_CAPS - Query device capabilities
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, int request, struct cec_caps *argp ) .. c:function:: int ioctl( int fd, CEC_ADAP_G_CAPS, struct cec_caps *argp )
:name: CEC_ADAP_G_CAPS
Arguments Arguments
========= =========
...@@ -22,9 +23,6 @@ Arguments ...@@ -22,9 +23,6 @@ Arguments
``fd`` ``fd``
File descriptor returned by :ref:`open() <cec-func-open>`. File descriptor returned by :ref:`open() <cec-func-open>`.
``request``
CEC_ADAP_G_CAPS
``argp`` ``argp``
......
...@@ -17,20 +17,20 @@ CEC_ADAP_G_LOG_ADDRS, CEC_ADAP_S_LOG_ADDRS - Get or set the logical addresses ...@@ -17,20 +17,20 @@ CEC_ADAP_G_LOG_ADDRS, CEC_ADAP_S_LOG_ADDRS - Get or set the logical addresses
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, int request, struct cec_log_addrs *argp ) .. c:function:: int ioctl( int fd, CEC_ADAP_G_LOG_ADDRS, struct cec_log_addrs *argp )
:name: CEC_ADAP_G_LOG_ADDRS
.. c:function:: int ioctl( int fd, CEC_ADAP_S_LOG_ADDRS, struct cec_log_addrs *argp )
:name: CEC_ADAP_S_LOG_ADDRS
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <cec-func-open>`. File descriptor returned by :c:func:`open() <cec-open>`.
``request``
CEC_ADAP_G_LOG_ADDRS, CEC_ADAP_S_LOG_ADDRS
``argp`` ``argp``
Pointer to struct cec_log_addrs
Description Description
=========== ===========
......
...@@ -17,19 +17,20 @@ CEC_ADAP_G_PHYS_ADDR, CEC_ADAP_S_PHYS_ADDR - Get or set the physical address ...@@ -17,19 +17,20 @@ CEC_ADAP_G_PHYS_ADDR, CEC_ADAP_S_PHYS_ADDR - Get or set the physical address
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, int request, __u16 *argp ) .. c:function:: int ioctl( int fd, CEC_ADAP_G_PHYS_ADDR, __u16 *argp )
:name: CEC_ADAP_G_PHYS_ADDR
.. c:function:: int ioctl( int fd, CEC_ADAP_S_PHYS_ADDR, __u16 *argp )
:name: CEC_ADAP_S_PHYS_ADDR
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <cec-func-open>`. File descriptor returned by :c:func:`open() <cec-open>`.
``request``
CEC_ADAP_G_PHYS_ADDR, CEC_ADAP_S_PHYS_ADDR
``argp`` ``argp``
Pointer to the CEC address.
Description Description
=========== ===========
......
...@@ -15,7 +15,7 @@ CEC_DQEVENT - Dequeue a CEC event ...@@ -15,7 +15,7 @@ CEC_DQEVENT - Dequeue a CEC event
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, int request, struct cec_event *argp ) .. c:function:: int ioctl( int fd, CEC_DQEVENT, struct cec_event *argp )
:name: CEC_DQEVENT :name: CEC_DQEVENT
Arguments Arguments
...@@ -24,9 +24,6 @@ Arguments ...@@ -24,9 +24,6 @@ Arguments
``fd`` ``fd``
File descriptor returned by :ref:`open() <cec-func-open>`. File descriptor returned by :ref:`open() <cec-func-open>`.
``request``
CEC_DQEVENT
``argp`` ``argp``
......
...@@ -13,19 +13,20 @@ CEC_G_MODE, CEC_S_MODE - Get or set exclusive use of the CEC adapter ...@@ -13,19 +13,20 @@ CEC_G_MODE, CEC_S_MODE - Get or set exclusive use of the CEC adapter
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, int request, __u32 *argp ) .. c:function:: int ioctl( int fd, CEC_G_MODE, __u32 *argp )
:name: CEC_G_MODE
.. c:function:: int ioctl( int fd, CEC_S_MODE, __u32 *argp )
:name: CEC_S_MODE
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <cec-func-open>`. File descriptor returned by :c:func:`open() <cec-open>`.
``request``
CEC_G_MODE, CEC_S_MODE
``argp`` ``argp``
Pointer to CEC mode.
Description Description
=========== ===========
......
...@@ -16,19 +16,20 @@ CEC_RECEIVE, CEC_TRANSMIT - Receive or transmit a CEC message ...@@ -16,19 +16,20 @@ CEC_RECEIVE, CEC_TRANSMIT - Receive or transmit a CEC message
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, int request, struct cec_msg *argp ) .. c:function:: int ioctl( int fd, CEC_RECEIVE, struct cec_msg *argp )
:name: CEC_RECEIVE
.. c:function:: int ioctl( int fd, CEC_TRANSMIT, struct cec_msg *argp )
:name: CEC_TRANSMIT
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <cec-func-open>`. File descriptor returned by :c:func:`open() <cec-open>`.
``request``
CEC_RECEIVE, CEC_TRANSMIT
``argp`` ``argp``
Pointer to struct cec_msg.
Description Description
=========== ===========
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment