Synopsis
========
-.. cpp: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
Arguments
=========
``fd``
File descriptor returned by :ref:`open() <cec-func-open>`.
-``request``
- CEC_DQEVENT
-
``argp``
and is currently only available as a staging kernel module.
CEC devices can send asynchronous events. These can be retrieved by
-calling :ref:`ioctl CEC_DQEVENT <CEC_DQEVENT>`. If the file descriptor is in
+calling :c:func:`CEC_DQEVENT`. If the file descriptor is in
non-blocking mode and no event is pending, then it will return -1 and
set errno to the ``EAGAIN`` error code.
the same state). In that case the intermediate state changes were lost but
it is guaranteed that the state did change in between the two events.
-
-.. _cec-event-state-change_s:
-
.. tabularcolumns:: |p{1.2cm}|p{2.9cm}|p{13.4cm}|
+.. c:type:: cec_event_state_change
+
.. flat-table:: struct cec_event_state_change
:header-rows: 0
:stub-columns: 0
- ``phys_addr``
- - The current physical address.
+ - The current physical address. This is ``CEC_PHYS_ADDR_INVALID`` if no
+ valid physical address is set.
- .. row 2
- ``log_addr_mask``
- - The current set of claimed logical addresses.
+ - The current set of claimed logical addresses. This is 0 if no logical
+ addresses are claimed or if ``phys_addr`` is ``CEC_PHYS_ADDR_INVALID``.
+ If bit 15 is set (``1 << CEC_LOG_ADDR_UNREGISTERED``) then this device
+ has the unregistered logical address. In that case all other bits are 0.
-
-.. _cec-event-lost-msgs_s:
+.. c:type:: cec_event_lost_msgs
.. tabularcolumns:: |p{1.0cm}|p{2.0cm}|p{14.5cm}|
this is more than enough.
-
-.. _cec-event:
-
.. tabularcolumns:: |p{1.0cm}|p{4.2cm}|p{2.5cm}|p{8.8cm}|
+.. c:type:: cec_event
+
.. flat-table:: struct cec_event
:header-rows: 0
:stub-columns: 0
- :cspan:`1` Timestamp of the event in ns.
The timestamp has been taken from the ``CLOCK_MONOTONIC`` clock. To access
- the same clock from userspace use :c:func:`clock_gettime(2)`.
+ the same clock from userspace use :c:func:`clock_gettime`.
- .. row 2
event.
+.. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}|
.. _cec-events:
-.. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}|
-
.. flat-table:: CEC Events Types
:header-rows: 0
:stub-columns: 0
application didn't dequeue CEC messages fast enough.
+.. tabularcolumns:: |p{6.0cm}|p{0.6cm}|p{10.9cm}|
.. _cec-event-flags:
-.. tabularcolumns:: |p{6.0cm}|p{0.6cm}|p{10.9cm}|
-
.. flat-table:: CEC Event Flags
:header-rows: 0
:stub-columns: 0