32 lines
799 B
C
32 lines
799 B
C
#pragma once
|
|
|
|
#include "MID/Mid_Def.h"
|
|
|
|
/*
|
|
* 这份文件负责解析 report id 0x04 的 Vendor 包。
|
|
*
|
|
* 当前 0x04 不是旧 VIA 命令协议,而是“键盘物理状态镜像流”。
|
|
* 它的结构固定为:
|
|
* [report_id(1) | modifier(1) | usage_bitmap(29)]
|
|
*
|
|
* 也就是说:
|
|
* - 0x01 代表主机最终可见键盘态
|
|
* - 0x04 代表下位机物理键盘态
|
|
*/
|
|
struct Lgc_Vendor_Struct_Result
|
|
{
|
|
// 拆出来的 Vendor 状态。
|
|
Mid_Struct_VendorState VendorState;
|
|
|
|
// 是否匹配到 report id 0x04。
|
|
bool IsMatch = false;
|
|
|
|
// 长度是否符合 31 字节。
|
|
bool IsLengthOk = false;
|
|
|
|
// 给调试窗口看的中文解释。
|
|
QString TextExplain;
|
|
};
|
|
|
|
void Lgc_Vendor_Func_Parse(const QByteArray& ByteArray, Lgc_Vendor_Struct_Result* p_Result);
|