Files
0417_QT_code/DRI/Dri_Vendor.h

32 lines
942 B
C
Raw Permalink Normal View History

2026-04-17 16:25:19 +08:00
#pragma once
2026-03-26 10:45:29 +08:00
2026-04-17 16:25:19 +08:00
#include "DRI/Dri_Hid.h"
2026-03-26 10:45:29 +08:00
2026-04-17 16:25:19 +08:00
// USB vendor reader plus three write routes: vendor, command, and NKRO.
2026-03-26 10:45:29 +08:00
struct Dri_Vendor_Struct_Port
{
2026-04-17 16:25:19 +08:00
Dri_Hid_Struct_ReadPort ReadPort;
2026-03-26 10:45:29 +08:00
HANDLE HandleWriteVendor = INVALID_HANDLE_VALUE;
2026-04-17 16:25:19 +08:00
HANDLE HandleWriteCommand = INVALID_HANDLE_VALUE;
2026-03-26 10:45:29 +08:00
HANDLE HandleWriteNkro = INVALID_HANDLE_VALUE;
2026-04-17 16:25:19 +08:00
quint16 VendorWriteOutputLength = 0;
quint16 CommandWriteOutputLength = 0;
2026-03-26 10:45:29 +08:00
quint16 NkroWriteOutputLength = 0;
2026-04-17 16:25:19 +08:00
bool IsBluetoothTransport = false;
2026-03-26 10:45:29 +08:00
};
2026-04-17 16:25:19 +08:00
void Dri_Vendor_Close(Dri_Vendor_Struct_Port* p_Port);
bool Dri_Vendor_Init(
Dri_Vendor_Struct_Port* p_Port,
2026-03-26 10:45:29 +08:00
const Mid_Struct_DeviceConfig& DeviceConfig,
QString* p_TextStatus);
2026-04-17 16:25:19 +08:00
bool Dri_Vendor_Read(
Dri_Vendor_Struct_Port* p_Port,
2026-03-26 10:45:29 +08:00
Mid_Struct_RawPacket* p_Packet,
QString* p_TextStatus);
2026-04-17 16:25:19 +08:00
bool Dri_Vendor_Write(
Dri_Vendor_Struct_Port* p_Port,
2026-03-26 10:45:29 +08:00
const QByteArray& ByteArray,
QString* p_TextStatus);
2026-04-17 16:25:19 +08:00