← Documents Documentation/ABI/testing/sysfs-driver-hid-wiimote GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

Nintendo Wiimote sysfs ABI

Wiimote LEDs, extension·device detection, Balance Board와 Pro Controller calibration readback 및 rescan/manual update formats를 설명합니다.

Source pathDocumentation/ABI/testing/sysfs-driver-hid-wiimote
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

LED and extension state

sysfs-driver-hid-wiimote:1-28

LED 4개를 0/1로 제어하고 initialized extension 조합을 읽으며 kernel 3.11 이후 Motion Plus hotplug는 별도 uevent로 보고됩니다.

Detected Wii device type

sysfs-driver-hid-wiimote:29-50

Detection 완료 시 change uevent를 보내고 pending·unknown·generic 및 gen10·gen20·balanceboard type을 보고합니다.

Balance Board and Pro Controller calibration

sysfs-driver-hid-wiimote:51-85

Balance Board는 0/17/34kg sensor calibration을 hexadecimal로, Pro Controller는 signed 16-bit stick offsets를 decimal로 제공합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 What: /sys/bus/hid/drivers/wiimote/<dev>/led1
2 What: /sys/bus/hid/drivers/wiimote/<dev>/led2
3 What: /sys/bus/hid/drivers/wiimote/<dev>/led3
4 What: /sys/bus/hid/drivers/wiimote/<dev>/led4
5 Date: July 2011
6 KernelVersion: 3.1
7 Contact: David Herrmann <dh.herrmann@googlemail.com>
8 Description: Make it possible to set/get current led state. Reading from it
9 returns 0 if led is off and 1 if it is on. Writing 0 to it
10 disables the led, writing 1 enables it.
11
12 What: /sys/bus/hid/drivers/wiimote/<dev>/extension
13 Date: August 2011
14 KernelVersion: 3.2
15 Contact: David Herrmann <dh.herrmann@gmail.com>
16 Description: This file contains the currently connected and initialized
17 extensions. It can be one of: none, motionp, nunchuck, classic,
18 motionp+nunchuck, motionp+classic
19 motionp is the official Nintendo Motion+ extension, nunchuck is
20 the official Nintendo Nunchuck extension and classic is the
21 Nintendo Classic Controller extension. The motionp extension can
22 be combined with the other two.
23
24 Starting with kernel-version 3.11 Motion Plus hotplugging is
25 supported and if detected, it's no longer reported as static
26 extension. You will get uevent notifications for the motion-plus
27 device then.
28
29 What: /sys/bus/hid/drivers/wiimote/<dev>/devtype
30 Date: May 2013
31 KernelVersion: 3.11
32 Contact: David Herrmann <dh.herrmann@gmail.com>
33 Description: While a device is initialized by the wiimote driver, we perform
34 a device detection and signal a "change" uevent after it is
35 done. This file shows the detected device type. "pending" means
36 that the detection is still ongoing, "unknown" means, that the
37 device couldn't be detected or loaded. "generic" means, that the
38 device couldn't be detected but supports basic Wii Remote
39 features and can be used.
40 Other strings for each device-type are available and may be
41 added if new device-specific detections are added.
42 Currently supported are:
43
44 ============= =======================================
45 gen10: First Wii Remote generation
46 gen20: Second Wii Remote Plus generation
47 (builtin MP)
48 balanceboard: Wii Balance Board
49 ============= =======================================
50
51 What: /sys/bus/hid/drivers/wiimote/<dev>/bboard_calib
52 Date: May 2013
53 KernelVersion: 3.11
54 Contact: David Herrmann <dh.herrmann@gmail.com>
55 Description: This attribute is only provided if the device was detected as a
56 balance board. It provides a single line with 3 calibration
57 values for all 4 sensors. The values are separated by colons and
58 are each 2 bytes long (encoded as 4 digit hexadecimal value).
59 First, 0kg values for all 4 sensors are written, followed by the
60 17kg values for all 4 sensors and last the 34kg values for all 4
61 sensors.
62
63 Calibration data is already applied by the kernel to all input
64 values but may be used by user-space to perform other
65 transformations.
66
67 What: /sys/bus/hid/drivers/wiimote/<dev>/pro_calib
68 Date: October 2013
69 KernelVersion: 3.13
70 Contact: David Herrmann <dh.herrmann@gmail.com>
71 Description: This attribute is only provided if the device was detected as a
72 pro-controller. It provides a single line with 4 calibration
73 values for all 4 analog sticks. Format is: "x1:y1 x2:y2". Data
74 is prefixed with a +/-. Each value is a signed 16bit number.
75 Data is encoded as decimal numbers and specifies the offsets of
76 the analog sticks of the pro-controller.
77
78 Calibration data is already applied by the kernel to all input
79 values but may be used by user-space to perform other
80 transformations.
81
82 Calibration data is detected by the kernel during device setup.
83 You can write "scan\n" into this file to re-trigger calibration.
84 You can also write data directly in the form "x1:y1 x2:y2" to
85 set the calibration values manually.
86

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Wii Remote player LEDs

1-11
항목한국어 전문 번역
What/sys/bus/hid/drivers/wiimote/<dev>/led1; /sys/bus/hid/drivers/wiimote/<dev>/led2; /sys/bus/hid/drivers/wiimote/<dev>/led3; /sys/bus/hid/drivers/wiimote/<dev>/led4
Date2011년 7월
KernelVersion3.1
ContactDavid Herrmann <dh.herrmann@googlemail.com>
DescriptionCurrent LED state를 set/get합니다. Read는 LED off이면 0, on이면 1을 반환합니다. 0을 write하면 LED를 disable하고 1을 write하면 enable합니다.
Wiimote LED controls
Paths01
led1, led2, led3, led4Off / disableOn / enable

네 player LEDs가 동일한 binary read/write semantics를 사용합니다.

Connected Wii Remote extension

12-28
항목한국어 전문 번역
What/sys/bus/hid/drivers/wiimote/<dev>/extension
Date2011년 8월
KernelVersion3.2
ContactDavid Herrmann <dh.herrmann@gmail.com>
DescriptionCurrently connected and initialized extension을 표시합니다. 값은 none, motionp, nunchuck, classic, motionp+nunchuck 또는 motionp+classic입니다. motionp는 official Nintendo Motion+ extension, nunchuck은 official Nintendo Nunchuck extension, classic은 Nintendo Classic Controller extension이며 motionp는 다른 두 extension과 결합할 수 있습니다. Kernel 3.11부터 Motion Plus hotplugging을 지원하므로 detected Motion Plus는 더 이상 static extension으로 report되지 않고 motion-plus device의 uevent notification을 보냅니다.
Wiimote extension values
ValueConnected extension
noneNo initialized extension
motionpNintendo Motion+
nunchuckNintendo Nunchuck
classicNintendo Classic Controller
motionp+nunchuckMotion+ with Nunchuck
motionp+classicMotion+ with Classic Controller

Standalone extensions와 Motion Plus combination values입니다.

Detected Wii device type

29-50
항목한국어 전문 번역
What/sys/bus/hid/drivers/wiimote/<dev>/devtype
Date2013년 5월
KernelVersion3.11
ContactDavid Herrmann <dh.herrmann@gmail.com>
Descriptionwiimote driver initialization 중 device detection을 수행하고 완료하면 "change" uevent를 보냅니다. "pending"은 detection 진행 중, "unknown"은 device를 detect하거나 load할 수 없음, "generic"은 detect하지 못했지만 basic Wii Remote features를 지원해 사용할 수 있음을 뜻합니다. Device-specific detection이 추가되면 다른 strings도 추가될 수 있습니다. 현재 지원 type은 gen10, gen20과 balanceboard입니다.
Wiimote detected device types
ValueMeaning
pendingDevice detection is still running
unknownDetection or loading failed
genericBasic Wii Remote features are usable
gen10First Wii Remote generation
gen20Second Wii Remote Plus generation, built-in MP
balanceboardWii Balance Board

원문의 currently-supported type 표와 detection states를 합쳤습니다.

Wii Balance Board calibration

51-66
항목한국어 전문 번역
What/sys/bus/hid/drivers/wiimote/<dev>/bboard_calib
Date2013년 5월
KernelVersion3.11
ContactDavid Herrmann <dh.herrmann@gmail.com>
DescriptionDevice가 balance board로 detected된 경우에만 제공합니다. 네 sensors 각각에 대한 세 calibration values를 single line으로 반환합니다. Values는 colon으로 구분하고 각각 2 bytes를 4-digit hexadecimal로 encode합니다. 먼저 네 sensors의 0kg values, 이어서 네 17kg values, 마지막으로 네 34kg values가 옵니다. Kernel은 이미 모든 input values에 calibration을 적용하지만 userspace가 다른 transformation에 사용할 수 있습니다.
Balance Board calibration line
Four sensor values at 0kgFour sensor values at 17kgFour sensor values at 34kgEach value: 2 bytes as 4-digit hexadecimalValues separated by colons

Single line의 load-point ordering과 value encoding입니다.

Wii Pro Controller stick calibration

67-85
항목한국어 전문 번역
What/sys/bus/hid/drivers/wiimote/<dev>/pro_calib
Date2013년 10월
KernelVersion3.13
ContactDavid Herrmann <dh.herrmann@gmail.com>
DescriptionDevice가 pro-controller로 detected된 경우에만 제공합니다. 네 analog sticks에 대한 네 calibration values를 "x1:y1 x2:y2" 형식의 single line으로 반환합니다. Data는 +/- prefix를 사용하고 각 value는 signed 16-bit decimal number이며 Pro Controller analog-stick offsets를 나타냅니다. Kernel은 input values에 calibration을 이미 적용하지만 userspace transformation에도 사용할 수 있습니다. Device setup 중 kernel이 calibration을 detect하며 "scan\n"을 write해 다시 trigger하거나 "x1:y1 x2:y2" 형식 data를 직접 write해 수동 설정할 수 있습니다.
Pro Controller calibration format
OperationValue
Read / manual writex1:y1 x2:y2
Each valueSigned 16-bit decimal with +/- prefix
Rescan writescan\n

Readback, rescan과 manual update contracts를 분리했습니다.