Usb HID电源设备规格示例不';t表示数值
我正在尝试报告电池供电的HID设备的电池信息(插入时为USB,否则为BLE)。通过阅读的附录A中的示例中的报告描述符,我看到了两个向主机报告电池数据的集合:Usb HID电源设备规格示例不';t表示数值,usb,hid,Usb,Hid,我正在尝试报告电池供电的HID设备的电池信息(插入时为USB,否则为BLE)。通过阅读的附录A中的示例中的报告描述符,我看到了两个向主机报告电池数据的集合: UsagePage(Power Device), Unit(none), Usage(PresentStatus), Collection(Logical), ; Present status collection Usage(Good), UsagePage(Battery System), Usage(BelowRema
UsagePage(Power Device), Unit(none),
Usage(PresentStatus), Collection(Logical), ; Present status collection
Usage(Good),
UsagePage(Battery System), Usage(BelowRemainingCapacityLimit),
Usage(Charging), Usage(Discharging),
ReportSize(1), ReportCount(4), Logical Minimum (0), Logical Maximum (1), Unit(0),
Feature(Constant, Variable, Absolute, Volatile),
End Collection(), ; End of Present Status collection
UsagePage(Power Device),
Usage(ChangedStatus), Collection(Logical), ; Changed Status collection
Usage(Good),
UsagePage(Battery System), Usage(BelowRemainingCapacityLimit),
Usage(Charging), Usage(Discharging),
ReportSize(2), ReportCount(4), Logical Minimum (0), Logical Maximum (1),
Input(Data, Variable, Absolute, Volatile),
End Collection(), ; End of Changed Status collection
我只有一个LiPo电池和一个二极管给它充电,所以我计划去掉大部分剩余的电源设备,因为我想我可以从电池系统使用页面上得到我想要的一切。因此,我看到的东西更像(请随时告诉我,这是否从一开始就注定了):
查看规范中的报告,我有两个问题:
啊,我不知道你可以设置比它们的值更宽的位域。。。那很方便。
UsagePage(Battery System), Usage(BelowRemainingCapacityLimit),
Usage(Charging), Usage(Discharging),
ReportSize(1), ReportCount(3), Logical Minimum (0), Logical Maximum (1), Unit(0),
Feature(Constant, Variable, Absolute, Volatile),