Add initial support for AMD Radeon 6000 series reference cards

Commits from edbgon, bobris, and Dr_No squashed and code style changes by Adam Honse <calcprogrammer1@gmail.com>
This commit is contained in:
edbgon 2021-02-04 22:47:43 +01:00 committed by Adam Honse
parent 16c34572ed
commit f7bcadd9ed
6 changed files with 468 additions and 0 deletions

View file

@ -1,9 +1,11 @@
#include "Detector.h"
#include "CMMP750Controller.h"
#include "CMARGBcontroller.h"
#include "CMR6000Controller.h"
#include "RGBController.h"
#include "RGBController_CMMP750Controller.h"
#include "RGBController_CMARGBController.h"
#include "RGBController_CMR6000Controller.h"
#include <hidapi/hidapi.h>
#define COOLERMASTER_VID 0x2516
@ -11,6 +13,7 @@
#define COOLERMASTER_MP750_XL_PID 0x0109
#define COOLERMASTER_MP750_MEDIUM_PID 0x0105
#define COOLERMASTER_ARGB_PID 0x1011
#define COOLERMASTER_RADEON_6000_PID 0x014D
/******************************************************************************************\
* *
@ -47,6 +50,19 @@ void DetectCoolerMasterARGB(hid_device_info* info, const std::string&)
}
}
void DetectCoolerMasterGPU(hid_device_info* info, const std::string&)
{
hid_device* dev = hid_open_path(info->path);
if(dev)
{
CMR6000Controller* controller = new CMR6000Controller(dev, info->path);
RGBController_CMR6000Controller* rgb_controller = new RGBController_CMR6000Controller(controller);
// Constructor sets the name
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
REGISTER_HID_DETECTOR_IPU("Cooler Master MP750 XL", DetectCoolerMasterMousemats, COOLERMASTER_VID, COOLERMASTER_MP750_XL_PID, 0, 0xFF00, 1);
REGISTER_HID_DETECTOR_IPU("Cooler Master MP750 Medium", DetectCoolerMasterMousemats, COOLERMASTER_VID, COOLERMASTER_MP750_MEDIUM_PID, 0, 0xFF00, 1);
REGISTER_HID_DETECTOR_IPU("Cooler Master ARGB", DetectCoolerMasterARGB, COOLERMASTER_VID, COOLERMASTER_ARGB_PID, 0, 0xFF00, 1);
REGISTER_HID_DETECTOR_I("Cooler Master Radeon 6000 GPU",DetectCoolerMasterGPU, COOLERMASTER_VID, COOLERMASTER_RADEON_6000_PID, 1);