1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2
3.. _lirc_get_rec_mode:
4.. _lirc_set_rec_mode:
5
6**********************************************
7ioctls LIRC_GET_REC_MODE and LIRC_SET_REC_MODE
8**********************************************
9
10Name
11====
12
13LIRC_GET_REC_MODE/LIRC_SET_REC_MODE - Get/set current receive mode.
14
15Synopsis
16========
17
18.. c:function:: int ioctl( int fd, LIRC_GET_REC_MODE, __u32 *mode)
19	:name: LIRC_GET_REC_MODE
20
21.. c:function:: int ioctl( int fd, LIRC_SET_REC_MODE, __u32 *mode)
22	:name: LIRC_SET_REC_MODE
23
24Arguments
25=========
26
27``fd``
28    File descriptor returned by open().
29
30``mode``
31    Mode used for receive.
32
33Description
34===========
35
36Get and set the current receive mode. Only
37:ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>` and
38:ref:`LIRC_MODE_SCANCODE <lirc-mode-scancode>` are supported.
39Use :ref:`lirc_get_features` to find out which modes the driver supports.
40
41Return Value
42============
43
44.. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
45
46.. flat-table::
47    :header-rows:  0
48    :stub-columns: 0
49
50
51    -  .. row 1
52
53       -  ``ENODEV``
54
55       -  Device not available.
56
57    -  .. row 2
58
59       -  ``ENOTTY``
60
61       -  Device does not support receiving.
62
63    -  .. row 3
64
65       -  ``EINVAL``
66
67       -  Invalid mode or invalid mode for this device.
68