OpenRGB/Controllers/CorsairPeripheralV2Controller/CorsairPeripheralV2HardwareController.h
Chris baf5d30b27 Initial commit for the Corsair M55 mouse
* Added config to CorsairPeripheralV2Devices
* Adding device config to CorsairPeripheralV2Devices.cpp
* Extending the base CorsairPeripheralV2Controller to CorsairPeripheralV2HWController to account for HW modes
* Minor adjustments to the CorsairPeripheralV2SWController to accommodate
* Resolves #1951
2023-03-15 06:19:38 +11:00

32 lines
1.3 KiB
C++

/*---------------------------------------------------------------------*\
| CorsairPeripheralV2HardwareController.h |
| |
| Driver for the newer Corsair peripherals that use the '08' |
| based USB protocol and support hardware lighting modes. |
| |
| Chris M (Dr_No) 07 Dec 2022 |
\*---------------------------------------------------------------------*/
#pragma once
#include "RGBController.h"
#include "CorsairPeripheralV2Controller.h"
#include <string>
#include <hidapi/hidapi.h>
#undef CORSAIR_V2_WRITE_SIZE
#define CORSAIR_V2_WRITE_SIZE 1025
#define CORSAIR_V2HW_DATA_OFFSET 2
class CorsairPeripheralV2HWController : public CorsairPeripheralV2Controller
{
public:
CorsairPeripheralV2HWController(hid_device* dev_handle, const char* path, std::string name, uint16_t pid);
~CorsairPeripheralV2HWController();
void SetLedsDirect(std::vector<RGBColor *> colors);
private:
void SetLedsDirectColourBlocks(std::vector<RGBColor *> colors);
void SetLedsDirectTriplets(std::vector<RGBColor *> colors);
};