OpenLogi
功能(Features)

0x8061 · extendedAdjustableReportRate

高频率轮询控制——按连接类型(有线或游戏无线)查询最高 8000 Hz 的支持轮询率,并读写当前活动轮询率。

高频率轮询控制。该功能在基础 0x8060 的基础上,将支持的轮询率从 125 Hz 扩展至最高 8000 Hz, 并允许调用者按连接类型——有线 USB 或 Logitech 游戏无线——分别查询设备能力。 get_device_capabilities 返回指定 ConnectionType 对应的 ExtendedReportRateList 位掩码; get_actual_report_rate_list 进一步缩小范围,仅返回设备当前连接下可用的轮询率。 get_report_rate 读取某连接类型下的当前 ExtendedReportRateset_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

FunctionHID++ fnSignatureReturns
get_device_capabilities0(connection_type: ConnectionType)ExtendedReportRateList
get_actual_report_rate_list1()ExtendedReportRateList
get_report_rate2(connection_type: ConnectionType)ExtendedReportRate
set_report_rate3(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.

FlagBit/ValueDescription
HZ_1251 << 0125 Hz, equivalent to an 8 ms report interval.
HZ_2501 << 1250 Hz, equivalent to a 4 ms report interval.
HZ_5001 << 2500 Hz, equivalent to a 2 ms report interval.
HZ_10001 << 31000 Hz, equivalent to a 1 ms report interval.
HZ_20001 << 42000 Hz, equivalent to a 500 µs report interval.
HZ_40001 << 54000 Hz, equivalent to a 250 µs report interval.
HZ_80001 << 68000 Hz, equivalent to a 125 µs report interval.

ConnectionType

A connection type used when querying capabilities or the active report rate.

VariantValueDescription
Wired0Wired USB connection.
GamingWireless1Logitech 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.

VariantValueDescription
Hz1250125 Hz, equivalent to an 8 ms report interval.
Hz2501250 Hz, equivalent to a 4 ms report interval.
Hz5002500 Hz, equivalent to a 2 ms report interval.
Hz100031000 Hz, equivalent to a 1 ms report interval.
Hz200042000 Hz, equivalent to a 500 µs report interval.
Hz400054000 Hz, equivalent to a 250 µs report interval.
Hz800068000 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):

ByteFieldNotes
0ExtendedReportRateList high byteCombined with byte 1 as big-endian u16
1ExtendedReportRateList low byteBit n set ↔ rate 1 << n is supported

get_actual_report_rate_list (fn 1)

Request: [0x00, 0x00, 0x00]

Response (byte → field):

ByteFieldNotes
0ExtendedReportRateList high byteSame big-endian u16 bitmask as fn 0
1ExtendedReportRateList low byteReflects rates available on the current connection

get_report_rate (fn 2)

Request: [connection_type as u8, 0x00, 0x00]

Response (byte → field):

ByteFieldNotes
0ExtendedReportRate discriminant0=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?;
}

本页目录