요약·해설과 원문, 전문 번역을 서로 분리했습니다. 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_set_rec_carrier:
**************************
ioctl LIRC_SET_REC_CARRIER
**************************
Name
====
LIRC_SET_REC_CARRIER - Set carrier used to modulate IR receive.
Synopsis
========
.. c:macro:: LIRC_SET_REC_CARRIER
``int ioctl(int fd, LIRC_SET_REC_CARRIER, __u32 *frequency)``
Arguments
=========
``fd``
File descriptor returned by open().
``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.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
이름, 선언과 인자
1-30`LIRC_SET_REC_CARRIER`는 IR 수신용 PWM pulse와 space를 modulation하는 carrier frequency를 설정합니다.
int ioctl(int fd, LIRC_SET_REC_CARRIER, __u32 *frequency);
Frequency는 Hertz 단위입니다.
.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
.. c:namespace:: RC
.. _lirc_set_rec_carrier:
**************************
ioctl LIRC_SET_REC_CARRIER
**************************
Name
====
LIRC_SET_REC_CARRIER - Set carrier used to modulate IR receive.
Synopsis
========
.. c:macro:: LIRC_SET_REC_CARRIER
``int ioctl(int fd, LIRC_SET_REC_CARRIER, __u32 *frequency)``
Arguments
=========
``fd``
File descriptor returned by open().
``frequency``
Frequency of the carrier that modulates PWM data, in Hz.
단일 frequency와 range upper bound
31-40단독으로 호출하면 receiver가 사용할 receive carrier를 지정합니다. `LIRC_SET_REC_CARRIER_RANGE`와 함께 사용하면 이 호출의 frequency는 장치가 인식할 범위의 upper bound가 됩니다.
범위 설정에서는 먼저 RANGE ioctl로 lower bound를 지정한 뒤 이 ioctl로 upper bound를 지정합니다.
직전 range 설정 여부에 따라 역할이 달라집니다.
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.
반환값
41-46성공하면 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-set-rec-carrier.rst:1-46단독 호출은 receive carrier를 설정하고 RANGE ioctl 다음 호출은 인식 범위의 upper bound를 지정합니다.