0001 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
0002 .. c:namespace:: RC
0003
0004 .. _lirc_get_rec_mode:
0005 .. _lirc_set_rec_mode:
0006
0007 **********************************************
0008 ioctls LIRC_GET_REC_MODE and LIRC_SET_REC_MODE
0009 **********************************************
0010
0011 Name
0012 ====
0013
0014 LIRC_GET_REC_MODE/LIRC_SET_REC_MODE - Get/set current receive mode.
0015
0016 Synopsis
0017 ========
0018
0019 .. c:macro:: LIRC_GET_REC_MODE
0020
0021 ``int ioctl(int fd, LIRC_GET_REC_MODE, __u32 *mode)``
0022
0023 .. c:macro:: LIRC_SET_REC_MODE
0024
0025 ``int ioctl(int fd, LIRC_SET_REC_MODE, __u32 *mode)``
0026
0027 Arguments
0028 =========
0029
0030 ``fd``
0031 File descriptor returned by open().
0032
0033 ``mode``
0034 Mode used for receive.
0035
0036 Description
0037 ===========
0038
0039 Get and set the current receive mode. Only
0040 :ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>` and
0041 :ref:`LIRC_MODE_SCANCODE <lirc-mode-scancode>` are supported.
0042 Use :ref:`lirc_get_features` to find out which modes the driver supports.
0043
0044 Return Value
0045 ============
0046
0047 .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
0048
0049 .. flat-table::
0050 :header-rows: 0
0051 :stub-columns: 0
0052
0053 - .. row 1
0054
0055 - ``ENODEV``
0056
0057 - Device not available.
0058
0059 - .. row 2
0060
0061 - ``ENOTTY``
0062
0063 - Device does not support receiving.
0064
0065 - .. row 3
0066
0067 - ``EINVAL``
0068
0069 - Invalid mode or invalid mode for this device.