OpenRGB/Controllers/HyperXKeyboardController/RGBController_HyperXAlloyOriginsCore.h
mike 4a333e9b50 Fixed HyperX Alloy Origins Core HID communication on Windows
* Added serial number support
  * Amended to pass in HID device information for version number rather than enumerate a second time

Commits squashed and amended for code style by Adam Honse <calcprogrammer1@gmail.com>
2021-06-13 16:00:05 -05:00

40 lines
1.3 KiB
C++

/*------------------------------------------*\
| RGBController_HyperXAlloyOriginsCore.h |
| |
| Generic RGB Interface for HyperX Alloy |
| Origins Core RGB Keyboard |
| |
| Volodymyr Nazarchuk (Vavooon) 4/28/2021 |
\*------------------------------------------*/
#pragma once
#include <chrono>
#include "RGBController.h"
#include "HyperXAlloyOriginsCoreController.h"
class RGBController_HyperXAlloyOriginsCore : public RGBController
{
public:
RGBController_HyperXAlloyOriginsCore(HyperXAlloyOriginsCoreController* hyperx_ptr);
~RGBController_HyperXAlloyOriginsCore();
void SetupZones();
void ResizeZone(int zone, int new_size);
void DeviceUpdateLEDs();
void UpdateZoneLEDs(int zone);
void UpdateSingleLED(int led);
void SetCustomMode();
void DeviceUpdateMode();
void KeepaliveThread();
private:
HyperXAlloyOriginsCoreController* hyperx;
std::thread* keepalive_thread;
std::atomic<bool> keepalive_thread_run;
std::chrono::time_point<std::chrono::steady_clock> last_update_time;
};