Documentation/userspace-api/media/rc/lirc-set-send-duty-cycle.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API / Media / Remote Controller

ioctl LIRC_SET_SEND_DUTY_CYCLE

IR 송신 carrier의 pulse width 비율을 1~99%로 설정합니다.

Source pathDocumentation/userspace-api/media/rc/lirc-set-send-duty-cycle.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설, 영어 원문, 전체 번역을 구분해 실었습니다. API 이름, 코드 심벌, 소스 경로는 원문 표기를 유지합니다.

1. 요약·해설

원문의 핵심 내용을 정리하고 커널 프로그래밍에 필요한 설명을 덧붙였습니다. 아래의 전체 번역과는 별도로 작성한 해설입니다.

요약·해설

lirc-set-send-duty-cycle.rst:1-47

Duty cycle 0과 100은 현재 의미가 없지만 미래 carrier off 기능을 위해 예약되어 있으므로 사용하지 않습니다.

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_set_send_duty_cycle:
5
6 ******************************
7 ioctl LIRC_SET_SEND_DUTY_CYCLE
8 ******************************
9
10 Name
11 ====
12
13 LIRC_SET_SEND_DUTY_CYCLE - Set the duty cycle of the carrier signal for
14 IR transmit.
15
16 Synopsis
17 ========
18
19 .. c:macro:: LIRC_SET_SEND_DUTY_CYCLE
20
21 ``int ioctl(int fd, LIRC_SET_SEND_DUTY_CYCLE, __u32 *duty_cycle)``
22
23 Arguments
24 =========
25
26 ``fd``
27 File descriptor returned by open().
28
29 ``duty_cycle``
30 Duty cycle, describing the pulse width in percent (from 1 to 99) of
31 the total cycle. Values 0 and 100 are reserved.
32
33 Description
34 ===========
35
36 Get/set the duty cycle of the carrier signal for IR transmit.
37
38 Currently, no special meaning is defined for 0 or 100, but this
39 could be used to switch off carrier generation in the future, so
40 these values should be reserved.
41
42 Return Value
43 ============
44
45 On success 0 is returned, on error -1 and the ``errno`` variable is set
46 appropriately. The generic error codes are described at the
47 :ref:`Generic Error Codes <gen-errors>` chapter.
48

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미에 맞춰 전체 내용을 번역했습니다. 코드, 함수명, 코드 심벌, 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);
Duty cycle 값
값의미
1~99한 carrier 주기에서 pulse가 켜지는 비율(%)
0예약됨
100예약됨

현재 허용 범위와 예약 값을 구분합니다.

.. 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.