This repository has been archived on 2025-07-31. You can view files and clone it, but cannot push or open issues or pull requests.
SP713_Upper_C/libs/Common.h
2025-07-17 17:54:51 +08:00

38 lines
861 B
C++
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include <minwindef.h>
#include <vector>
struct DevSimple {
unsigned char iIndex;
unsigned char DevicePath[MAX_PATH];
char DeviceID[64];
unsigned char CH347IfNum;
char ProductString[64];
char ManufacturerString[64];
};
struct SetCommandArg {
enum Command {
SP_CMD_NA = 0, // 无效命令
SP_CMD_ZERO = 1, // 参数归零
SP_CMD_SAME_VALUE = 2, // 同值配置
SP_CMD_DIF_VALUE = 3 // 异值配置
};
enum Group {
ALL = 0xAA, // 整体归零
AB = 0x00, // A/B组归零
OPA = 0x01, // OPA组归零
DAC = 0x02 // DAC组归零
};
Command cmd_; // cmd 控制命令
Group group_; // group 分组
int childGroup_; // groupDet 子分组 group为0时0/1代表对A/B操作group为2时代表操作编号为0~20的DAC
};
struct SetVotegeArg {
std::vector<uint16_t> votes_; // 同值设定只需要一个元素异值设定需要256个元素
};