← Documents Documentation/userspace-api/media/rc/lirc-get-timeout.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / Remote Controller

LIRC receive timeout 범위 조회

IR 수신 timeout의 최소값과 최대값을 microsecond 단위로 조회합니다.

Source pathDocumentation/userspace-api/media/rc/lirc-get-timeout.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

lirc-get-timeout.rst:1-57

IR 부재를 신호 종료로 판단하는 내부 timer 범위를 제공합니다. 최소값과 최대값이 같으면 고정 timeout일 수 있으며 설정 ioctl로 바꿀 수 없습니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
2 .. c:namespace:: RC
3
4 .. _lirc_get_min_timeout:
5 .. _lirc_get_max_timeout:
6
7 ****************************************************
8 ioctls LIRC_GET_MIN_TIMEOUT and LIRC_GET_MAX_TIMEOUT
9 ****************************************************
10
11 Name
12 ====
13
14 LIRC_GET_MIN_TIMEOUT / LIRC_GET_MAX_TIMEOUT - Obtain the possible timeout
15 range for IR receive.
16
17 Synopsis
18 ========
19
20 .. c:macro:: LIRC_GET_MIN_TIMEOUT
21
22 ``int ioctl(int fd, LIRC_GET_MIN_TIMEOUT, __u32 *timeout)``
23
24 .. c:macro:: LIRC_GET_MAX_TIMEOUT
25
26 ``int ioctl(int fd, LIRC_GET_MAX_TIMEOUT, __u32 *timeout)``
27
28 Arguments
29 =========
30
31 ``fd``
32 File descriptor returned by open().
33
34 ``timeout``
35 Timeout, in microseconds.
36
37 Description
38 ===========
39
40 Some devices have internal timers that can be used to detect when
41 there's no IR activity for a long time. This can help lircd in
42 detecting that a IR signal is finished and can speed up the decoding
43 process. Returns an integer value with the minimum/maximum timeout
44 that can be set.
45
46 .. note::
47
48 Some devices have a fixed timeout, in that case
49 both ioctls will return the same value even though the timeout
50 cannot be changed via :ref:`LIRC_SET_REC_TIMEOUT`.
51
52 Return Value
53 ============
54
55 On success 0 is returned, on error -1 and the ``errno`` variable is set
56 appropriately. The generic error codes are described at the
57 :ref:`Generic Error Codes <gen-errors>` chapter.
58

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

이름, 선언과 인자

1-36

`LIRC_GET_MIN_TIMEOUT`과 `LIRC_GET_MAX_TIMEOUT`은 IR 수신에 설정할 수 있는 timeout 범위의 하한과 상한을 microsecond 단위로 조회합니다.

int ioctl(int fd, LIRC_GET_MIN_TIMEOUT, __u32 *timeout);
int ioctl(int fd, LIRC_GET_MAX_TIMEOUT, __u32 *timeout);
Timeout 조회 인자
인자설명
fdopen()이 반환한 LIRC 장치 file descriptor
timeoutmicrosecond 단위 timeout을 받을 pointer

같은 pointer에 최소 또는 최대 값을 받습니다.

.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
.. c:namespace:: RC

.. _lirc_get_min_timeout:
.. _lirc_get_max_timeout:

****************************************************
ioctls LIRC_GET_MIN_TIMEOUT and LIRC_GET_MAX_TIMEOUT
****************************************************

Name
====

LIRC_GET_MIN_TIMEOUT / LIRC_GET_MAX_TIMEOUT - Obtain the possible timeout
range for IR receive.

Synopsis
========

.. c:macro:: LIRC_GET_MIN_TIMEOUT

``int ioctl(int fd, LIRC_GET_MIN_TIMEOUT, __u32 *timeout)``

.. c:macro:: LIRC_GET_MAX_TIMEOUT

``int ioctl(int fd, LIRC_GET_MAX_TIMEOUT, __u32 *timeout)``

Arguments
=========

``fd``
    File descriptor returned by open().

``timeout``
    Timeout, in microseconds.

IR 종료 감지와 고정 timeout

37-51

일부 장치는 IR 활동이 오랫동안 없음을 감지하는 내부 timer를 갖습니다. `lircd`는 이 event로 하나의 IR 신호가 끝났음을 더 빨리 판단해 decode 속도를 높일 수 있습니다.

두 ioctl은 설정 가능한 최소값과 최대값을 반환합니다. 장치 timeout이 고정이면 두 값이 같으며, 이 경우 `LIRC_SET_REC_TIMEOUT`으로 값을 바꿀 수 없더라도 조회 자체는 같은 값을 정상 반환합니다.

Timeout 범위 해석
관계의미
min < max범위 안에서 receive timeout 조정 가능
min = maxHardware timeout 고정, SET_REC_TIMEOUT 변경 불가 가능

최소값과 최대값의 관계로 가변 여부를 알 수 있습니다.

Description
===========

Some devices have internal timers that can be used to detect when
there's no IR activity for a long time. This can help lircd in
detecting that a IR signal is finished and can speed up the decoding
process. Returns an integer value with the minimum/maximum timeout
that can be set.

.. note::

   Some devices have a fixed timeout, in that case
   both ioctls will return the same value even though the timeout
   cannot be changed via :ref:`LIRC_SET_REC_TIMEOUT`.

반환값

52-57

성공하면 0, 오류이면 -1을 반환하고 `errno`를 설정합니다. 공통 오류는 Generic Error Codes 절을 따릅니다.

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.