요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Profile button과 settings
sysfs-driver-hid-roccat-kovaplus:62-1165개 profile의 23-byte button layout과 16-byte resolution·sensitivity·light settings를 selector 기반 또는 profile별 read-only file로 제공합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_cpi
Date: January 2011
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The integer value of this attribute ranges from 1-4.
When read, this attribute returns the number of the active
cpi level.
This file is readonly.
Has never been used. If bookkeeping is done, it's done in userland tools.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_profile
Date: January 2011
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The integer value of this attribute ranges from 0-4.
When read, this attribute returns the number of the active
profile.
When written, the mouse activates this profile immediately.
The profile that's active when powered down is the same that's
active when the mouse is powered on.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_sensitivity_x
Date: January 2011
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The integer value of this attribute ranges from 1-10.
When read, this attribute returns the number of the actual
sensitivity in x direction.
This file is readonly.
Has never been used. If bookkeeping is done, it's done in userland tools.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/actual_sensitivity_y
Date: January 2011
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The integer value of this attribute ranges from 1-10.
When read, this attribute returns the number of the actual
sensitivity in y direction.
This file is readonly.
Has never been used. If bookkeeping is done, it's done in userland tools.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/firmware_version
Date: January 2011
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: When read, this file returns the raw integer version number of the
firmware reported by the mouse. Using the integer value eases
further usage in other programs. To receive the real version
number the decimal point has to be shifted 2 positions to the
left. E.g. a returned value of 121 means 1.21
This file is readonly.
Obsoleted by binary sysfs attribute "info".
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/info
Date: November 2012
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: When read, this file returns general data like firmware version.
When written, the device can be reset.
The data is 6 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>/kovaplus/roccatkovaplus<minor>/profile_buttons
Date: January 2011
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The mouse can store 5 profiles which can be switched by the
press of a button. A profile is split in settings and buttons.
profile_buttons holds information about button layout.
When written, this file lets one write the respective profile
buttons back to the mouse. The data has to be 23 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>/kovaplus/roccatkovaplus<minor>/profile[1-5]_buttons
Date: January 2011
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The mouse can store 5 profiles which can be switched by the
press of a button. A profile is split in settings and buttons.
profile_buttons holds information about button layout.
When read, these files return the respective profile buttons.
The returned data is 23 bytes in size.
This file is readonly.
Write control to select profile and read profile_buttons instead.
Users: http://roccat.sourceforge.net
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>/profile_settings
Date: January 2011
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The mouse can store 5 profiles which can be switched by the
press of a button. A profile is split in settings and buttons.
profile_settings 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 16 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>/kovaplus/roccatkovaplus<minor>/profile[1-5]_settings
Date: January 2011
Contact: Stefan Achatz <erazor_de@users.sourceforge.net>
Description: The mouse can store 5 profiles which can be switched by the
press of a button. A profile is split in settings and buttons.
profile_settings holds information like resolution, sensitivity
and light effects.
When read, these files return the respective profile settings.
The returned data is 16 bytes in size.
This file is readonly.
Write control to select profile and read profile_settings instead.
Users: http://roccat.sourceforge.net
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Active CPI, profile과 sensitivity
1-40BASE=/sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/kovaplus/roccatkovaplus<minor>
$BASE/actual_cpi
$BASE/actual_profile
$BASE/actual_sensitivity_x
$BASE/actual_sensitivity_y
별도 표시가 없는 항목의 Date는 2011년 1월, contact는 Stefan Achatz <erazor_de@users.sourceforge.net>, user는 http://roccat.sourceforge.net다.
| attribute | 값 범위 | access | 의미 |
|---|---|---|---|
| actual_cpi | 1-4 | read-only | active CPI level 번호 |
| actual_profile | 0-4 | read/write | active profile과 power cycle 뒤 유지할 profile |
| actual_sensitivity_x | 1-10 | read-only | X 방향 sensitivity |
| actual_sensitivity_y | 1-10 | read-only | Y 방향 sensitivity |
actual_cpi는 active CPI level 번호를 반환하지만 실제로 사용된 적이 없다. CPI 상태 bookkeeping이 필요하면 userland tool에서 수행한다.
actual_profile을 읽으면 현재 active profile을 반환한다. 값을 쓰면 선택한 profile을 즉시 활성화한다. power-down 때 active였던 profile은 다음 power-on 때도 active 상태로 복원된다.
actual_sensitivity_x와 actual_sensitivity_y는 각 방향의 현재 sensitivity 번호를 반환하지만 두 file도 실제로 사용된 적이 없다. sensitivity bookkeeping은 userland tool이 담당한다.
Firmware version과 binary info
42-60$BASE/firmware_version
$BASE/info
| attribute | Date | payload | access |
|---|---|---|---|
| firmware_version | 2011년 1월 | raw integer | read-only |
| info | 2012년 11월 | 6 byte | read/write |
firmware_version은 mouse가 보고한 firmware version의 raw integer를 반환한다. 실제 version은 decimal point를 왼쪽으로 두 자리 옮겨 구한다. 예를 들어 121은 1.21이다. 이 file은 binary sysfs attribute인 info로 대체되었다.
info를 읽으면 firmware version 같은 일반 data 6 byte를 반환한다. 6-byte data를 쓰면 device를 reset할 수 있다.
Profile button과 settings payload
62-116$BASE/profile_buttons
$BASE/profile[1-5]_buttons
$BASE/profile_settings
$BASE/profile[1-5]_settings
| attribute | payload | access | 내용 |
|---|---|---|---|
| profile_buttons | 23 byte | read/write | 선택 profile의 button layout |
| profile[1-5]_buttons | 23 byte | read-only | 번호별 profile button layout |
| profile_settings | 16 byte | read/write | 선택 profile의 resolution·sensitivity·light effect |
| profile[1-5]_settings | 16 byte | read-only | 번호별 profile settings |
mouse는 button press로 바꿀 수 있는 profile 다섯 개를 저장한다. profile은 settings와 buttons로 나뉜다.
profile_buttons에 23 byte를 쓰면 payload 안의 profile 번호가 지정하는 button layout을 mouse에 기록한다. invalid data는 mouse가 거부한다. 읽기 전에는 control에 써서 읽을 profile을 선택해야 한다.
profile1_buttons부터 profile5_buttons까지는 해당 profile button data 23 byte를 직접 반환하는 기존 read-only file이다. control로 profile을 선택하고 profile_buttons를 읽는 방식으로 대체되었다.
profile_settings에 16 byte를 쓰면 payload 안의 profile 번호가 지정하는 resolution, sensitivity, light effect를 기록한다. invalid data는 거부하며 읽기 전에는 control selector가 필요하다.
profile1_settings부터 profile5_settings까지는 해당 profile settings 16 byte를 직접 반환하는 기존 read-only file이다. control과 profile_settings 조합을 사용해야 한다.
Active state와 firmware
sysfs-driver-hid-roccat-kovaplus:1-60active CPI와 X/Y sensitivity 조회용 legacy attribute, 0-4 profile 전환, raw firmware version과 이를 대체한 binary info를 다룹니다.