-
-
Notifications
You must be signed in to change notification settings - Fork 328
Expand file tree
/
Copy pathHyperXAlloyOriginsController.h
More file actions
45 lines (35 loc) · 1.54 KB
/
HyperXAlloyOriginsController.h
File metadata and controls
45 lines (35 loc) · 1.54 KB
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
/*---------------------------------------------------------*\
| HyperXAlloyOriginsController.h |
| |
| Driver for HyperX Alloy Origins keyboard |
| |
| Adam Honse (CalcProgrammer1) 11 Jul 2020 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#pragma once
#include <string>
#include <hidapi.h>
#include "RGBController.h"
class HyperXAlloyOriginsController
{
public:
HyperXAlloyOriginsController(hid_device* dev_handle, const char* path);
~HyperXAlloyOriginsController();
std::string GetDeviceLocation();
std::string GetSerialString();
void SaveSettings(std::vector<RGBColor> colors);
void SetLEDsDirect(std::vector<RGBColor> colors);
private:
hid_device* dev;
std::string location;
void write_led_data(std::vector<RGBColor> colors, int memory_loc, int modifier);
void SendCommandRaw(unsigned int val1, unsigned int val2, unsigned int val3);
void SendDirectInitialization(int memory_loc);
void SendDirectFinalization();
void SendDirectColorPacket
(RGBColor* color_data,
unsigned int color_count
, int modifier);
};