요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. 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.
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`.
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.
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);
같은 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`으로 값을 바꿀 수 없더라도 조회 자체는 같은 값을 정상 반환합니다.
최소값과 최대값의 관계로 가변 여부를 알 수 있습니다.
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.
요약·해설
lirc-get-timeout.rst:1-57IR 부재를 신호 종료로 판단하는 내부 timer 범위를 제공합니다. 최소값과 최대값이 같으면 고정 timeout일 수 있으며 설정 ioctl로 바꿀 수 없습니다.