Merge rework of IT8297, IT5702, IT5711 driver code. Adds new controller IT82950.

This commit is contained in:
Daniel Clark 2025-08-18 19:46:00 +00:00 committed by Adam Honse
parent 1be1656ce8
commit 503ad36256
9 changed files with 3598 additions and 1128 deletions

View file

@ -5,6 +5,7 @@
| motherboard |
| |
| jackun 08 Jan 2020 |
| megadjc 31 Jul 2025 |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
@ -16,11 +17,13 @@
#include <vector>
#include "RGBController.h"
#include "GigabyteRGBFusion2USBController.h"
#include "RGBController_GigabyteRGBFusion2USBBoards.h"
#include "RGBController_GigabyteRGBFusion2USBLayouts.h"
#define RGBFusion2_Digital_LEDS_Min 0;
#define RGBFusion2_Digital_LEDS_Max 1024;
#define RGBFUSION2_BRIGHTNESS_MIN 0;
#define RGBFUSION2_BRIGHTNESS_MAX 5;
#define RGBFUSION2_BRIGHTNESS_MAX 255;
template<typename K, typename V>
static std::map<V, K> reverse_map(const std::map<K, V>& map)
@ -35,20 +38,6 @@ static std::map<V, K> reverse_map(const std::map<K, V>& map)
return reversed_map;
}
typedef std::map< std::string, int > FwdLedHeaders;
typedef std::map< int, std::string > RvrseLedHeaders;
struct LedPort
{
std::string name;
int header;
int count;
};
typedef std::map< std::string, std::string > MBName;
typedef std::map< std::string, std::vector<LedPort> > ZoneLeds;
typedef std::map< std::string, ZoneLeds> KnownLayout;
class RGBController_RGBFusion2USB: public RGBController
{
public:
@ -72,7 +61,8 @@ private:
RGBFusion2USBController* controller;
ZoneLeds layout;
uint16_t pid;
int device_num;
void Load_Device_Config();
void Init_Controller();
int GetLED_Zone(int led_idx);