요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
ADNS-3090 register access
sysfs-driver-hid-roccat-savu:71-774-byte transaction으로 mouse의 Avago ADNS-3090 sensor register를 읽고 씁니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/buttons
Date: Mai 2012
Contact: Stefan Achatz <[email protected]>
Description: The mouse can store 5 profiles which can be switched by the
press of a button. A profile is split into general settings and
button settings. The buttons variable holds information about
button layout. When written, this file lets one write the
respective profile buttons to the mouse. The data has to be
47 bytes long.
The mouse will reject invalid data.
Which profile to write is determined by the profile number
contained in the data.
Before reading this file, control has to be written to select
which profile to read.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/control
Date: Mai 2012
Contact: Stefan Achatz <[email protected]>
Description: When written, this file lets one select which data from which
profile will be read next. The data has to be 3 bytes long.
This file is writeonly.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/general
Date: Mai 2012
Contact: Stefan Achatz <[email protected]>
Description: The mouse can store 5 profiles which can be switched by the
press of a button. A profile is split into general settings and
button settings. A profile holds information like resolution,
sensitivity and light effects.
When written, this file lets one write the respective profile
settings back to the mouse. The data has to be 43 bytes long.
The mouse will reject invalid data.
Which profile to write is determined by the profile number
contained in the data.
This file is writeonly.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/info
Date: Mai 2012
Contact: Stefan Achatz <[email protected]>
Description: When read, this file returns general data like firmware version.
When written, the device can be reset.
The data is 8 bytes long.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/macro
Date: Mai 2012
Contact: Stefan Achatz <[email protected]>
Description: When written, this file lets one store macros with max 500
keystrokes for a specific button for a specific profile.
Button and profile numbers are included in written data.
The data has to be 2083 bytes long.
Before reading this file, control has to be written to select
which profile and key to read.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/profile
Date: Mai 2012
Contact: Stefan Achatz <[email protected]>
Description: The mouse can store 5 profiles which can be switched by the
press of a button. profile holds number of actual profile.
This value is persistent, so its value determines the profile
that's active when the mouse is powered on next time.
When written, the mouse activates the set profile immediately.
The data has to be 3 bytes long.
The mouse will reject invalid data.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>/sensor
Date: July 2012
Contact: Stefan Achatz <[email protected]>
Description: The mouse has a Avago ADNS-3090 sensor.
This file allows reading and writing of the mouse sensors registers.
The data has to be 4 bytes long.
Users: http://roccat.sourceforge.net
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Button, control과 general settings
1-46BASE=/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/savu/roccatsavu<minor>
$BASE/buttons
$BASE/control
$BASE/general
$BASE/info
별도 표시가 없는 항목의 Date는 2012년 5월, contact는 Stefan Achatz <[email protected]>, user는 http://roccat.sourceforge.net다.
| attribute | payload | access | 동작 |
|---|---|---|---|
| buttons | 47 byte | read/write | 선택 profile의 button layout |
| control | 3 byte | write-only | 다음 read의 profile과 data 선택 |
| general | 43 byte | write-only | profile별 resolution·sensitivity·light effect |
| info | 8 byte | read/write | firmware 등 일반 data 조회와 device reset |
mouse는 button으로 전환할 수 있는 profile 다섯 개를 저장하며 각 profile은 general settings와 button settings로 나뉜다.
buttons에 47 byte를 쓰면 payload 안의 profile 번호가 지정하는 button layout을 mouse에 기록한다. invalid data는 mouse가 거부한다. 읽기 전에는 control에 3 byte를 써서 profile을 선택해야 한다.
general에 43 byte를 쓰면 payload의 profile 번호가 지정하는 resolution, sensitivity, light effect 설정을 mouse에 기록한다. invalid data는 거부되며 이 file은 write-only다.
info를 읽으면 firmware version 같은 일반 data 8 byte를 반환한다. 8-byte data를 쓰면 device를 reset할 수 있다.
Macro와 persistent profile
48-69$BASE/macro
$BASE/profile
| attribute | payload | 동작 |
|---|---|---|
| macro | 2083 byte | 특정 profile·button에 최대 500-keystroke macro 저장 |
| profile | 3 byte | 현재 profile과 다음 power-on profile 저장·즉시 활성화 |
macro data에는 button 번호와 profile 번호가 포함된다. 읽기 전에는 control에 써서 profile과 key를 선택해야 한다.
profile은 현재 profile 번호를 담고 persistent하므로 다음 power-on 때 활성화될 profile을 결정한다. 3-byte data를 쓰면 profile을 즉시 활성화하며 invalid data는 mouse가 거부한다.
ADNS-3090 sensor register
71-77$BASE/sensor
| 항목 | 값 |
|---|---|
| Date | 2012년 7월 |
| Contact | Stefan Achatz <[email protected]> |
| Users | http://roccat.sourceforge.net |
| payload | 4 byte |
mouse는 Avago ADNS-3090 sensor를 사용한다. 이 file의 4-byte transaction으로 mouse sensor register를 읽고 쓸 수 있다.
Profile data와 macro
sysfs-driver-hid-roccat-savu:1-695개 profile의 47-byte button, 43-byte general settings, 2083-byte macro와 3-byte selector·persistent profile을 관리합니다.