[media] doc-rst: document LIRC set carrier ioctls

Put each ioctl on its own page and improve documentation, adding
cross-references for LIRC_SET_REC_CARRIER_RANGE and LIRC_SET_REC_CARRIER,
with can be used together to set a carrier frequency range.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Mauro Carvalho Chehab 2016-07-12 07:21:23 -03:00
parent 5413b648d0
commit 910f4461d1
5 changed files with 143 additions and 18 deletions

View File

@ -0,0 +1,49 @@
.. -*- coding: utf-8; mode: rst -*-
.. _lirc_set_rec_carrier_range:
********************************
ioctl LIRC_SET_REC_CARRIER_RANGE
********************************
Name
====
LIRC_SET_REC_CARRIER_RANGE - Set lower bond of the carrier used to modulate
IR receive.
Synopsis
========
.. cpp:function:: int ioctl( int fd, int request, __u32 *frequency )
Arguments
=========
``fd``
File descriptor returned by open().
``request``
LIRC_SET_REC_CARRIER_RANGE
``frequency``
Frequency of the carrier that modulates PWM data, in Hz.
Description
===========
This ioctl sets the upper range of carrier frequency that will be recognized
by the IR receiver.
.. note::
To set a range use :ref:`LIRC_SET_REC_CARRIER_RANGE
<LIRC_SET_REC_CARRIER_RANGE>` with the lower bound first and later call
:ref:`LIRC_SET_REC_CARRIER <LIRC_SET_REC_CARRIER>` with the upper bound.
Return Value
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.

View File

@ -0,0 +1,48 @@
.. -*- coding: utf-8; mode: rst -*-
.. _lirc_set_rec_carrier:
**************************
ioctl LIRC_SET_REC_CARRIER
**************************
Name
====
LIRC_SET_REC_CARRIER - Set carrier used to modulate IR receive.
Synopsis
========
.. cpp:function:: int ioctl( int fd, int request, __u32 *frequency )
Arguments
=========
``fd``
File descriptor returned by open().
``request``
LIRC_SET_REC_CARRIER
``frequency``
Frequency of the carrier that modulates PWM data, in Hz.
Description
===========
Set receive carrier used to modulate IR PWM pulses and spaces.
.. note::
If called together with :ref:`LIRC_SET_REC_CARRIER_RANGE`, this ioctl
sets the upper bound frequency that will be recognized by the device.
Return Value
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.

View File

@ -0,0 +1,43 @@
.. -*- coding: utf-8; mode: rst -*-
.. _lirc_set_send_carrier:
***************************
ioctl LIRC_SET_SEND_CARRIER
***************************
Name
====
LIRC_SET_SEND_CARRIER - Set send carrier used to modulate IR TX.
Synopsis
========
.. cpp:function:: int ioctl( int fd, int request, __u32 *frequency )
Arguments
=========
``fd``
File descriptor returned by open().
``request``
LIRC_SET_SEND_CARRIER
``frequency``
Frequency of the carrier to be modulated, in Hz.
Description
===========
Set send carrier used to modulate IR PWM pulses and spaces.
Return Value
============
On success 0 is returned, on error -1 and the ``errno`` variable is set
appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter.

View File

@ -19,4 +19,7 @@ LIRC Device Interface
lirc-set-send-duty-cycle
lirc-get-timeout
lirc-get-length
lirc-set-rec-carrier
lirc-set-rec-carrier-range
lirc-set-send-carrier
lirc_ioctl

View File

@ -54,13 +54,6 @@ device can rely on working with the default settings initially.
Set send/receive mode. Largely obsolete for send, as only
``LIRC_MODE_PULSE`` is supported.
.. _LIRC_SET_SEND_CARRIER:
.. _LIRC_SET_REC_CARRIER:
``LIRC_SET_{SEND,REC}_CARRIER``
Set send/receive carrier (in Hz).
.. _LIRC_SET_TRANSMITTER_MASK:
``LIRC_SET_TRANSMITTER_MASK``
@ -99,17 +92,6 @@ device can rely on working with the default settings initially.
press on, the driver will send ``LIRC_MODE2_FREQUENCY`` packets. By
default this should be turned off.
.. _LIRC_SET_REC_CARRIER_RANGE:
``LIRC_SET_REC_CARRIER_RANGE``
To set a range use
``LIRC_SET_REC_CARRIER_RANGE``
with the lower bound first and later
``LIRC_SET_REC_CARRIER`` with the upper
bound.
.. _LIRC_SET_WIDEBAND_RECEIVER:
``LIRC_SET_WIDEBAND_RECEIVER``