요약·해설과 원문, 전문 번역을 서로 분리했습니다. 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_transmitter_mask:
*******************************
ioctl LIRC_SET_TRANSMITTER_MASK
*******************************
Name
====
LIRC_SET_TRANSMITTER_MASK - Enables send codes on a given set of transmitters
Synopsis
========
.. c:macro:: LIRC_SET_TRANSMITTER_MASK
``int ioctl(int fd, LIRC_SET_TRANSMITTER_MASK, __u32 *mask)``
Arguments
=========
``fd``
File descriptor returned by open().
``mask``
Mask with channels to enable tx. Channel 0 is the least significant bit.
Description
===========
Some IR TX devices have multiple output channels, in such case,
:ref:`LIRC_CAN_SET_TRANSMITTER_MASK <LIRC-CAN-SET-TRANSMITTER-MASK>` is
returned via :ref:`LIRC_GET_FEATURES` and this ioctl sets what channels will
send IR codes.
This ioctl enables the given set of transmitters. The first transmitter is
encoded by the least significant bit and so on.
When an invalid bit mask is given, i.e. a bit is set, even though the device
does not have so many transitters, then this ioctl returns the number of
available transitters and does nothing otherwise.
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_TRANSMITTER_MASK`는 여러 IR TX output 중 실제로 code를 보낼 transmitter 집합을 선택합니다.
int ioctl(int fd, LIRC_SET_TRANSMITTER_MASK, __u32 *mask);
Channel 번호를 bit 위치로 encode합니다.
.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
.. c:namespace:: RC
.. _lirc_set_transmitter_mask:
*******************************
ioctl LIRC_SET_TRANSMITTER_MASK
*******************************
Name
====
LIRC_SET_TRANSMITTER_MASK - Enables send codes on a given set of transmitters
Synopsis
========
.. c:macro:: LIRC_SET_TRANSMITTER_MASK
``int ioctl(int fd, LIRC_SET_TRANSMITTER_MASK, __u32 *mask)``
Arguments
=========
``fd``
File descriptor returned by open().
``mask``
Mask with channels to enable tx. Channel 0 is the least significant bit.
다중 channel 선택과 invalid mask
31-45여러 output channel을 가진 장치는 `LIRC_GET_FEATURES`에서 `LIRC_CAN_SET_TRANSMITTER_MASK`를 알립니다. 이 ioctl은 mask에 설정된 모든 transmitter를 활성화하며 첫 transmitter는 least significant bit입니다.
장치에 존재하지 않는 channel bit가 설정된 invalid mask를 전달하면 ioctl은 사용 가능한 transmitter 수를 반환하고 아무 설정도 바꾸지 않습니다. 원문은 이 경로를 일반적인 -1 오류와 구분해 설명합니다.
Bit가 channel 번호에 직접 대응합니다.
Description
===========
Some IR TX devices have multiple output channels, in such case,
:ref:`LIRC_CAN_SET_TRANSMITTER_MASK <LIRC-CAN-SET-TRANSMITTER-MASK>` is
returned via :ref:`LIRC_GET_FEATURES` and this ioctl sets what channels will
send IR codes.
This ioctl enables the given set of transmitters. The first transmitter is
encoded by the least significant bit and so on.
When an invalid bit mask is given, i.e. a bit is set, even though the device
does not have so many transitters, then this ioctl returns the number of
available transitters and does nothing otherwise.
반환값
46-51정상 성공은 0입니다. 일반 오류는 -1과 `errno`로 보고합니다. Invalid channel bit의 특수 경로는 사용 가능한 transmitter 수를 반환하고 설정을 적용하지 않습니다.
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-transmitter-mask.rst:1-51Least significant bit가 channel 0입니다. 존재하지 않는 channel bit가 있으면 장치는 transmitter 수를 반환하고 설정을 바꾸지 않습니다.