-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathkbscan.h
76 lines (62 loc) · 1.61 KB
/
kbscan.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef KBSCAN_H
#define KBSCAN_H
#include "kbproto.h"
#include "rawhid/hiddevice.h"
#include "zstring.h"
#include "zpointer.h"
using namespace LibChaos;
enum DeviceType {
DEV_NONE = 0,
DEV_POK3R, //!< Vortex POK3R
DEV_POK3R_RGB, //!< Vortex POK3R RGB
DEV_POK3R_RGB2, //!< Vortex POK3R RGB (PCB v2)
DEV_VORTEX_CORE, //!< Vortex Core
DEV_VORTEX_RACE3, //!< Vortex Race 3
// DEV_VORTEX_TESTER, //!< Vortex 22-Key Switch Tester (same as MD200)
DEV_VORTEX_VIBE, //!< Vortex ViBE
DEV_VORTEX_CYPHER, //!< Vortex Cypher
DEV_VORTEX_TAB60, //!< Vortex Tab 60
DEV_VORTEX_TAB75, //!< Vortex Tab 75
DEV_VORTEX_TAB90, //!< Vortex Tab 90
DEV_KBP_V60, //!< KBParadise v60 Mini
DEV_KBP_V80, //!< KBParadise v80
DEV_TEX_YODA_II, //!< Tex Yoda II
DEV_MISTEL_MD600, //!< Mistel Barocco MD600
DEV_MISTEL_MD200, //!< Mistel Freeboard MD200
DEV_QMK_POK3R,
DEV_QMK_POK3R_RGB,
DEV_QMK_VORTEX_CORE,
};
struct DeviceInfo {
ZString slug;
ZString name;
zu16 vid;
zu16 pid;
zu16 boot_pid;
KBType type;
zu32 fw_addr;
};
struct ListDevice {
DeviceType devtype;
DeviceInfo dev;
ZPointer<HIDDevice> hid;
bool boot;
};
struct KBDevice {
KBType type;
DeviceType devtype;
DeviceInfo info;
ZPointer<KBProto> iface;
};
class KBScan {
public:
KBScan();
zu32 find(DeviceType devtype);
zu32 scan();
void dbgScan();
ZList<KBDevice> open();
static ZPointer<HIDDevice> openConsole(DeviceType devtype);
private:
ZList<ListDevice> devices;
};
#endif // KBSCAN_H