0x8061 · extendedAdjustableReportRate
高频率轮询控制——按连接类型(有线或游戏无线)查询最高 8000 Hz 的支持轮询率,并读写当前活动轮询率。
高频率轮询控制。该功能在基础 0x8060 的基础上,将支持的轮询率从 125 Hz 扩展至最高 8000 Hz,
并允许调用者按连接类型——有线 USB 或 Logitech 游戏无线——分别查询设备能力。
get_device_capabilities 返回指定 ConnectionType 对应的 ExtendedReportRateList 位掩码;
get_actual_report_rate_list 进一步缩小范围,仅返回设备当前连接下可用的轮询率。
get_report_rate 读取某连接类型下的当前 ExtendedReportRate;set_report_rate
将新轮询率应用于当前主机端连接。
ConnectionType——Wired(USB)或GamingWireless(Logitech 游戏无线)。ExtendedReportRateList—— 各支持档位的位标志:HZ_125(8 ms)·HZ_250(4 ms)·HZ_500(2 ms)·HZ_1000(1 ms)·HZ_2000(500 µs)·HZ_4000(250 µs)·HZ_8000(125 µs)。ExtendedReportRate—— 涵盖相同七档的具体轮询率枚举,用作set_report_rate的参数 及get_report_rate的返回值。
规格: Logitech HID++ 2.0 —— extendedAdjustableReportRate。用于:
openlogi-hidpp中的类型化封装。
Function reference
The ExtendedReportRateFeature wrapper (0x8061) exposes:
Methods
| Function | HID++ fn | Signature | Returns |
|---|---|---|---|
get_device_capabilities | 0 | (connection_type: ConnectionType) | ExtendedReportRateList |
get_actual_report_rate_list | 1 | () | ExtendedReportRateList |
get_report_rate | 2 | (connection_type: ConnectionType) | ExtendedReportRate |
set_report_rate | 3 | (report_rate: ExtendedReportRate) | () |
All methods are async and return Result<…, Hidpp20Error>.
Types
ExtendedReportRateList
Report-rate values supported by a 0x8061 device, as a bitflags bitmask returned by get_device_capabilities and get_actual_report_rate_list.
| Flag | Bit/Value | Description |
|---|---|---|
HZ_125 | 1 << 0 | 125 Hz, equivalent to an 8 ms report interval. |
HZ_250 | 1 << 1 | 250 Hz, equivalent to a 4 ms report interval. |
HZ_500 | 1 << 2 | 500 Hz, equivalent to a 2 ms report interval. |
HZ_1000 | 1 << 3 | 1000 Hz, equivalent to a 1 ms report interval. |
HZ_2000 | 1 << 4 | 2000 Hz, equivalent to a 500 µs report interval. |
HZ_4000 | 1 << 5 | 4000 Hz, equivalent to a 250 µs report interval. |
HZ_8000 | 1 << 6 | 8000 Hz, equivalent to a 125 µs report interval. |
ConnectionType
A connection type used when querying capabilities or the active report rate.
| Variant | Value | Description |
|---|---|---|
Wired | 0 | Wired USB connection. |
GamingWireless | 1 | Logitech gaming wireless connection. |
ExtendedReportRate
A concrete report-rate setting used as the argument to set_report_rate and the return value of get_report_rate.
| Variant | Value | Description |
|---|---|---|
Hz125 | 0 | 125 Hz, equivalent to an 8 ms report interval. |
Hz250 | 1 | 250 Hz, equivalent to a 4 ms report interval. |
Hz500 | 2 | 500 Hz, equivalent to a 2 ms report interval. |
Hz1000 | 3 | 1000 Hz, equivalent to a 1 ms report interval. |
Hz2000 | 4 | 2000 Hz, equivalent to a 500 µs report interval. |
Hz4000 | 5 | 4000 Hz, equivalent to a 250 µs report interval. |
Hz8000 | 6 | 8000 Hz, equivalent to a 125 µs report interval. |
Wire format
All four functions use a 3-byte short request payload. Capability and rate-list responses are read from the first two bytes of the 16-byte long response payload (big-endian u16 bitmask); the active rate response is read from byte 0 only.
get_device_capabilities (fn 0)
Request: [connection_type as u8, 0x00, 0x00]
Response (byte → field):
| Byte | Field | Notes |
|---|---|---|
| 0 | ExtendedReportRateList high byte | Combined with byte 1 as big-endian u16 |
| 1 | ExtendedReportRateList low byte | Bit n set ↔ rate 1 << n is supported |
get_actual_report_rate_list (fn 1)
Request: [0x00, 0x00, 0x00]
Response (byte → field):
| Byte | Field | Notes |
|---|---|---|
| 0 | ExtendedReportRateList high byte | Same big-endian u16 bitmask as fn 0 |
| 1 | ExtendedReportRateList low byte | Reflects rates available on the current connection |
get_report_rate (fn 2)
Request: [connection_type as u8, 0x00, 0x00]
Response (byte → field):
| Byte | Field | Notes |
|---|---|---|
| 0 | ExtendedReportRate discriminant | 0=Hz125 … 6=Hz8000; other values → Hidpp20Error::UnsupportedResponse |
set_report_rate (fn 3)
Request: [report_rate as u8, 0x00, 0x00]
Response: acknowledged (no fields read).
Usage (Rust)
use hidpp::{
device::Device,
feature::extended_report_rate::{
ConnectionType, ExtendedReportRate, ExtendedReportRateFeature,
},
};
// mut device: Device, already created via Device::new(channel, index)
device.enumerate_features().await?;
if let Some(feat) = device.get_feature::<ExtendedReportRateFeature>() {
// Query which rates the wired connection supports.
let caps = feat.get_device_capabilities(ConnectionType::Wired).await?;
println!("Wired capabilities: {:?}", caps);
// Read the rate currently active on whichever connection is live.
let current = feat.get_report_rate(ConnectionType::Wired).await?;
println!("Current rate: {:?}", current);
// Switch to 1000 Hz on the current host-side connection.
feat.set_report_rate(ExtendedReportRate::Hz1000).await?;
}