요약·해설과 원문, 전문 번역을 서로 분리했습니다. 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_send_duty_cycle:
******************************
ioctl LIRC_SET_SEND_DUTY_CYCLE
******************************
Name
====
LIRC_SET_SEND_DUTY_CYCLE - Set the duty cycle of the carrier signal for
IR transmit.
Synopsis
========
.. c:macro:: LIRC_SET_SEND_DUTY_CYCLE
``int ioctl(int fd, LIRC_SET_SEND_DUTY_CYCLE, __u32 *duty_cycle)``
Arguments
=========
``fd``
File descriptor returned by open().
``duty_cycle``
Duty cycle, describing the pulse width in percent (from 1 to 99) of
the total cycle. Values 0 and 100 are reserved.
Description
===========
Get/set the duty cycle of the carrier signal for IR transmit.
Currently, no special meaning is defined for 0 or 100, but this
could be used to switch off carrier generation in the future, so
these values should be reserved.
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-32`LIRC_SET_SEND_DUTY_CYCLE`은 IR 송신 carrier signal의 duty cycle을 설정합니다. 값은 한 주기에서 pulse가 차지하는 폭의 백분율입니다.
int ioctl(int fd, LIRC_SET_SEND_DUTY_CYCLE, __u32 *duty_cycle);
현재 허용 범위와 예약 값을 구분합니다.
.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
.. c:namespace:: RC
.. _lirc_set_send_duty_cycle:
******************************
ioctl LIRC_SET_SEND_DUTY_CYCLE
******************************
Name
====
LIRC_SET_SEND_DUTY_CYCLE - Set the duty cycle of the carrier signal for
IR transmit.
Synopsis
========
.. c:macro:: LIRC_SET_SEND_DUTY_CYCLE
``int ioctl(int fd, LIRC_SET_SEND_DUTY_CYCLE, __u32 *duty_cycle)``
Arguments
=========
``fd``
File descriptor returned by open().
``duty_cycle``
Duty cycle, describing the pulse width in percent (from 1 to 99) of
the total cycle. Values 0 and 100 are reserved.
예약 값과 미래 호환성
33-41문서는 carrier signal의 duty cycle을 get/set한다고 표현하지만 제시된 ABI command는 `LIRC_SET_SEND_DUTY_CYCLE`입니다. Application은 1~99 범위의 설정 값으로 사용합니다.
0과 100에는 현재 특별한 의미가 없지만 향후 carrier generation을 끄는 용도로 정의될 수 있으므로 사용하지 않고 예약 상태로 남겨야 합니다.
호출 전에 `LIRC_CAN_SET_SEND_DUTY_CYCLE` feature를 확인해야 합니다.
Description
===========
Get/set the duty cycle of the carrier signal for IR transmit.
Currently, no special meaning is defined for 0 or 100, but this
could be used to switch off carrier generation in the future, so
these values should be reserved.
반환값
42-47성공하면 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-send-duty-cycle.rst:1-47Duty cycle 0과 100은 현재 의미가 없지만 미래 carrier off 기능을 위해 예약되어 있으므로 사용하지 않습니다.