요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
=============================
USB 7-Segment Numeric Display
=============================
Manufactured by Delcom Engineering
Device Information
------------------
USB VENDOR_ID 0x0fc5
USB PRODUCT_ID 0x1227
Both the 6 character and 8 character displays have PRODUCT_ID,
and according to Delcom Engineering no queryable information
can be obtained from the device to tell them apart.
Device Modes
------------
By default, the driver assumes the display is only 6 characters
The mode for 6 characters is:
MSB 0x06; LSB 0x3f
For the 8 character display:
MSB 0x08; LSB 0xff
The device can accept "text" either in raw, hex, or ascii textmode.
raw controls each segment manually,
hex expects a value between 0-15 per character,
ascii expects a value between '0'-'9' and 'A'-'F'.
The default is ascii.
Device Operation
----------------
1. Turn on the device:
echo 1 > /sys/bus/usb/.../powered
2. Set the device's mode:
echo $mode_msb > /sys/bus/usb/.../mode_msb
echo $mode_lsb > /sys/bus/usb/.../mode_lsb
3. Set the textmode:
echo $textmode > /sys/bus/usb/.../textmode
4. set the text (for example):
echo "123ABC" > /sys/bus/usb/.../text (ascii)
echo "A1B2" > /sys/bus/usb/.../text (ascii)
echo -ne "\x01\x02\x03" > /sys/bus/usb/.../text (hex)
5. Set the decimal places.
The device has either 6 or 8 decimal points.
to set the nth decimal place calculate 10 ** n
and echo it in to /sys/bus/usb/.../decimals
To set multiple decimals points sum up each power.
For example, to set the 0th and 3rd decimal place
echo 1001 > /sys/bus/usb/.../decimals
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
장치 정보
1-14Delcom Engineering이 제조한 USB 7-segment 숫자 표시기용 문서입니다.
USB Vendor ID는 `0x0fc5`, Product ID는 `0x1227`입니다. 6-character와 8-character 제품이 같은 Product ID를 사용하고 장치에서 둘을 구분할 정보를 query할 수 없습니다.
6자리와 8자리 모델이 동일 ID를 공유합니다.
=============================
USB 7-Segment Numeric Display
=============================
Manufactured by Delcom Engineering
Device Information
------------------
USB VENDOR_ID 0x0fc5
USB PRODUCT_ID 0x1227
Both the 6 character and 8 character displays have PRODUCT_ID,
and according to Delcom Engineering no queryable information
can be obtained from the device to tell them apart.
장치 mode
15-31드라이버는 기본적으로 6-character display라고 가정합니다. 6자리 mode는 MSB `0x06`, LSB `0x3f`입니다.
8자리 display mode는 MSB `0x08`, LSB `0xff`입니다.
`text`는 raw, hex, ascii textmode를 받습니다. raw는 segment를 직접 제어하고 hex는 문자마다 0~15 값, ascii는 `0`~`9`와 `A`~`F`를 받습니다.
기본 textmode는 ascii입니다.
자리 수 bit mask와 입력 해석 방식을 구분합니다.
Device Modes
------------
By default, the driver assumes the display is only 6 characters
The mode for 6 characters is:
MSB 0x06; LSB 0x3f
For the 8 character display:
MSB 0x08; LSB 0xff
The device can accept "text" either in raw, hex, or ascii textmode.
raw controls each segment manually,
hex expects a value between 0-15 per character,
ascii expects a value between '0'-'9' and 'A'-'F'.
The default is ascii.
장치 조작
32-51먼저 sysfs의 `powered`에 1을 써서 장치를 켭니다.
`mode_msb`와 `mode_lsb`에 표시 자리 수에 맞는 값을 쓴 뒤 `textmode`를 설정합니다.
ascii mode는 `echo "123ABC" > .../text`, hex byte 입력은 `echo -ne "\x01\x02\x03" > .../text`처럼 기록합니다.
장치에는 6개 또는 8개의 decimal point가 있습니다. n번째 점의 값은 `10 ** n`이며 여러 점은 각 값을 더합니다.
0번과 3번 decimal point를 켜려면 `10**0 + 10**3 = 1001`을 `decimals`에 씁니다.
전원, 자리 수 mode, 입력 mode, text, decimal point 순으로 sysfs를 설정합니다.
표시기 상태와 내용을 직접 설정합니다.
Device Operation
----------------
1. Turn on the device:
echo 1 > /sys/bus/usb/.../powered
2. Set the device's mode:
echo $mode_msb > /sys/bus/usb/.../mode_msb
echo $mode_lsb > /sys/bus/usb/.../mode_lsb
3. Set the textmode:
echo $textmode > /sys/bus/usb/.../textmode
4. set the text (for example):
echo "123ABC" > /sys/bus/usb/.../text (ascii)
echo "A1B2" > /sys/bus/usb/.../text (ascii)
echo -ne "\x01\x02\x03" > /sys/bus/usb/.../text (hex)
5. Set the decimal places.
The device has either 6 or 8 decimal points.
to set the nth decimal place calculate 10 ** n
and echo it in to /sys/bus/usb/.../decimals
To set multiple decimals points sum up each power.
For example, to set the 0th and 3rd decimal place
echo 1001 > /sys/bus/usb/.../decimals
요약·해설
misc_usbsevseg.rst:1-51Delcom USB 7-segment 표시기의 ID, 6/8자리 mode, textmode와 sysfs 조작법을 설명합니다.
원문 명령, symbol, source path, 수치와 ABI 이름을 그대로 유지하면서 각 절의 의미와 주의 사항을 한국어로 옮겼습니다.