mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-03-29 11:21:08 -04:00
Add Gigabyte AORUS RTX 5080 MASTER GPU controller
New controller for RTX 5080 AORUS MASTER 16G (GV-N5080AORUS M-16GD) with per-LED fan ring control. This GPU uses a different protocol than legacy RGB Fusion 2 cards and requires a separate controller. Hardware info: - PCI Device ID: 0x2C02 (NVIDIA Blackwell) - Subsystem ID: 0x4178 - I2C Address: 0x71 LED configuration: - 3 fan rings × 8 LEDs each = 24 fan LEDs - 1 logo LED - Total: 25 individually addressable zones Protocol details (reverse engineered from Gigabyte Control Center on Windows): - Mode command (0x88) must include zone selector byte (0x02/0x05/0x06) - Each fan requires mode command before color registers will respond - Color registers: 0xB0-0xB3 (left), 0xB4-0xB7 (middle), 0xB8-0xBB (right) - Logo: 0xBC with mode byte 0x00 (fans use 0x01) - Apply command (0xAA) must be sent after each zone for multi-zone updates Verified working on Linux with i2ctransfer and OpenRGB CLI: - All 24 fan LEDs individually addressable - Logo LED working - Color cycling and per-LED gradients tested Note: Fan LEDs only illuminate when fans are spinning.
This commit is contained in:
@@ -0,0 +1,203 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| GigabyteRGBFusion2AorusMasterGPUController.cpp |
|
||||
| |
|
||||
| Driver for Gigabyte AORUS MASTER GPU with fan ring LEDs |
|
||||
| |
|
||||
| Protocol reverse engineered from GCC on Windows |
|
||||
| Verified on Linux with i2ctransfer 2025-12-30 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "GigabyteRGBFusion2AorusMasterGPUController.h"
|
||||
#include "LogManager.h"
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
RGBFusion2AorusMasterGPUController::RGBFusion2AorusMasterGPUController(i2c_smbus_interface* bus, rgb_fusion_dev_id dev, std::string dev_name)
|
||||
{
|
||||
this->bus = bus;
|
||||
this->dev = dev;
|
||||
this->name = dev_name;
|
||||
}
|
||||
|
||||
RGBFusion2AorusMasterGPUController::~RGBFusion2AorusMasterGPUController()
|
||||
{
|
||||
}
|
||||
|
||||
std::string RGBFusion2AorusMasterGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", dev);
|
||||
return_string.append(", address ");
|
||||
return_string.append(addr);
|
||||
return("I2C: " + return_string);
|
||||
}
|
||||
|
||||
std::string RGBFusion2AorusMasterGPUController::GetDeviceName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Send mode command to select a fan zone |
|
||||
| Format: 88 01 06 63 08 <zone_id> 00 00 |
|
||||
| Byte 0: Mode register (0x88) |
|
||||
| Byte 1: Static mode (0x01) |
|
||||
| Byte 2: Unknown constant (0x06) |
|
||||
| Byte 3: Brightness (0x00-0x63) |
|
||||
| Byte 4: Unknown constant (0x08) |
|
||||
| Byte 5: Zone selector (0x02/0x05/0x06) |
|
||||
| Byte 6-7: Padding (0x00) |
|
||||
\*---------------------------------------------------------*/
|
||||
void RGBFusion2AorusMasterGPUController::SendModeCommand(uint8_t zone_id, uint8_t brightness)
|
||||
{
|
||||
uint8_t data_pkt[8] = {
|
||||
RGB_FUSION2_AORUS_MASTER_REG_MODE,
|
||||
RGB_FUSION2_AORUS_MASTER_MODE_STATIC,
|
||||
0x06,
|
||||
brightness,
|
||||
0x08,
|
||||
zone_id,
|
||||
0x00,
|
||||
0x00
|
||||
};
|
||||
|
||||
bus->i2c_write_block(dev, sizeof(data_pkt), data_pkt);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Send color to a register (controls 2 LEDs) |
|
||||
| Format: <reg> <mode> R1 G1 B1 R2 G2 B2 |
|
||||
| Byte 0: Register (0xB0-0xBC) |
|
||||
| Byte 1: Mode byte (0x01 for fans, 0x00 for logo) |
|
||||
| Byte 2-4: First LED RGB |
|
||||
| Byte 5-7: Second LED RGB |
|
||||
\*---------------------------------------------------------*/
|
||||
void RGBFusion2AorusMasterGPUController::SendColorRegister(uint8_t reg, uint8_t mode_byte, RGBColor color1, RGBColor color2)
|
||||
{
|
||||
uint8_t data_pkt[8] = {
|
||||
reg,
|
||||
mode_byte,
|
||||
(uint8_t)RGBGetRValue(color1),
|
||||
(uint8_t)RGBGetGValue(color1),
|
||||
(uint8_t)RGBGetBValue(color1),
|
||||
(uint8_t)RGBGetRValue(color2),
|
||||
(uint8_t)RGBGetGValue(color2),
|
||||
(uint8_t)RGBGetBValue(color2)
|
||||
};
|
||||
|
||||
bus->i2c_write_block(dev, sizeof(data_pkt), data_pkt);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Set colors for a fan zone (8 LEDs = 4 registers) |
|
||||
| Must send mode command before color commands |
|
||||
| |
|
||||
| fan_index: 0=left, 1=middle, 2=right |
|
||||
| colors: Array of 8 RGB colors for the 8 LEDs |
|
||||
\*---------------------------------------------------------*/
|
||||
void RGBFusion2AorusMasterGPUController::SetFanColors(uint8_t fan_index, RGBColor colors[8], uint8_t brightness)
|
||||
{
|
||||
uint8_t zone_id;
|
||||
uint8_t base_reg;
|
||||
|
||||
switch(fan_index)
|
||||
{
|
||||
case 0:
|
||||
zone_id = RGB_FUSION2_AORUS_MASTER_ZONE_LEFT;
|
||||
base_reg = RGB_FUSION2_AORUS_MASTER_REG_LEFT_FAN;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
zone_id = RGB_FUSION2_AORUS_MASTER_ZONE_MIDDLE;
|
||||
base_reg = RGB_FUSION2_AORUS_MASTER_REG_MIDDLE_FAN;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
zone_id = RGB_FUSION2_AORUS_MASTER_ZONE_RIGHT;
|
||||
base_reg = RGB_FUSION2_AORUS_MASTER_REG_RIGHT_FAN;
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_ERROR("[%s] Invalid fan index: %d", name.c_str(), fan_index);
|
||||
return;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| CRITICAL: Send mode command with zone ID first |
|
||||
| Without this, color commands have no effect |
|
||||
\*---------------------------------------------------------*/
|
||||
SendModeCommand(zone_id, brightness);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Delay after mode command - firmware needs time to process |
|
||||
| the zone selection before accepting color data |
|
||||
\*---------------------------------------------------------*/
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(5));
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Send 4 color registers (2 LEDs each) |
|
||||
| Register Bx+0: LEDs 0,1 (colors[0], colors[1]) |
|
||||
| Register Bx+1: LEDs 2,3 (colors[2], colors[3]) |
|
||||
| Register Bx+2: LEDs 4,5 (colors[4], colors[5]) |
|
||||
| Register Bx+3: LEDs 6,7 (colors[6], colors[7]) |
|
||||
\*---------------------------------------------------------*/
|
||||
for(int reg_offset = 0; reg_offset < 4; reg_offset++)
|
||||
{
|
||||
uint8_t reg = base_reg + reg_offset;
|
||||
int color_idx = reg_offset * 2;
|
||||
|
||||
SendColorRegister(reg, 0x01, colors[color_idx], colors[color_idx + 1]);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Apply after each zone - required for multi-zone update |
|
||||
\*---------------------------------------------------------*/
|
||||
ApplyChanges();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Set logo color |
|
||||
| Format: BC 00 R G B 00 00 00 |
|
||||
| Note: Logo uses mode byte 0x00, not 0x01 |
|
||||
\*---------------------------------------------------------*/
|
||||
void RGBFusion2AorusMasterGPUController::SetLogoColor(RGBColor color)
|
||||
{
|
||||
uint8_t data_pkt[8] = {
|
||||
RGB_FUSION2_AORUS_MASTER_REG_LOGO,
|
||||
0x00,
|
||||
(uint8_t)RGBGetRValue(color),
|
||||
(uint8_t)RGBGetGValue(color),
|
||||
(uint8_t)RGBGetBValue(color),
|
||||
0x00,
|
||||
0x00,
|
||||
0x00
|
||||
};
|
||||
|
||||
bus->i2c_write_block(dev, sizeof(data_pkt), data_pkt);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Apply all pending changes |
|
||||
| Format: AA 00 00 00 00 00 00 00 |
|
||||
\*---------------------------------------------------------*/
|
||||
void RGBFusion2AorusMasterGPUController::ApplyChanges()
|
||||
{
|
||||
uint8_t data_pkt[8] = {
|
||||
RGB_FUSION2_AORUS_MASTER_REG_APPLY,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x00
|
||||
};
|
||||
|
||||
bus->i2c_write_block(dev, sizeof(data_pkt), data_pkt);
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| GigabyteRGBFusion2AorusMasterGPUController.h |
|
||||
| |
|
||||
| Driver for Gigabyte AORUS MASTER GPU with fan ring LEDs |
|
||||
| |
|
||||
| Protocol reverse engineered from GCC on Windows |
|
||||
| Fan LEDs only illuminate when fans are spinning |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "i2c_smbus.h"
|
||||
#include "RGBController.h"
|
||||
|
||||
typedef unsigned char rgb_fusion_dev_id;
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Fan zone configuration |
|
||||
| Each fan has 8 LEDs controlled by 4 registers |
|
||||
| Each register controls 2 LEDs with dual RGB values |
|
||||
\*---------------------------------------------------------*/
|
||||
struct aorus_master_zone_colors
|
||||
{
|
||||
RGBColor led_colors[8]; // 8 LEDs per fan (or 1 for logo)
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Register definitions |
|
||||
\*---------------------------------------------------------*/
|
||||
enum
|
||||
{
|
||||
RGB_FUSION2_AORUS_MASTER_REG_MODE = 0x88,
|
||||
RGB_FUSION2_AORUS_MASTER_REG_APPLY = 0xAA,
|
||||
RGB_FUSION2_AORUS_MASTER_REG_LEFT_FAN = 0xB0, // B0-B3
|
||||
RGB_FUSION2_AORUS_MASTER_REG_MIDDLE_FAN = 0xB4, // B4-B7
|
||||
RGB_FUSION2_AORUS_MASTER_REG_RIGHT_FAN = 0xB8, // B8-BB
|
||||
RGB_FUSION2_AORUS_MASTER_REG_LOGO = 0xBC,
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Fan zone ID values for mode command (byte 5) |
|
||||
\*---------------------------------------------------------*/
|
||||
enum
|
||||
{
|
||||
RGB_FUSION2_AORUS_MASTER_ZONE_LEFT = 0x02, // IO side fan
|
||||
RGB_FUSION2_AORUS_MASTER_ZONE_MIDDLE = 0x05, // Center fan
|
||||
RGB_FUSION2_AORUS_MASTER_ZONE_RIGHT = 0x06, // Far side fan
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Mode definitions |
|
||||
\*---------------------------------------------------------*/
|
||||
enum
|
||||
{
|
||||
RGB_FUSION2_AORUS_MASTER_MODE_STATIC = 0x01,
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Speed and brightness |
|
||||
\*---------------------------------------------------------*/
|
||||
enum
|
||||
{
|
||||
RGB_FUSION2_AORUS_MASTER_BRIGHTNESS_MIN = 0x00,
|
||||
RGB_FUSION2_AORUS_MASTER_BRIGHTNESS_MAX = 0x63, // 99
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Zone count: 3 fans x 8 LEDs + 1 logo = 25 zones |
|
||||
\*---------------------------------------------------------*/
|
||||
#define RGB_FUSION_2_AORUS_MASTER_FAN_LEDS 8
|
||||
#define RGB_FUSION_2_AORUS_MASTER_TOTAL_ZONES 25
|
||||
|
||||
class RGBFusion2AorusMasterGPUController
|
||||
{
|
||||
public:
|
||||
RGBFusion2AorusMasterGPUController(i2c_smbus_interface* bus, rgb_fusion_dev_id dev, std::string dev_name);
|
||||
~RGBFusion2AorusMasterGPUController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetDeviceName();
|
||||
|
||||
void SetFanColors(uint8_t fan_index, RGBColor colors[8], uint8_t brightness);
|
||||
void SetLogoColor(RGBColor color);
|
||||
void ApplyChanges();
|
||||
|
||||
private:
|
||||
i2c_smbus_interface* bus;
|
||||
rgb_fusion_dev_id dev;
|
||||
std::string name;
|
||||
|
||||
void SendModeCommand(uint8_t zone_id, uint8_t brightness);
|
||||
void SendColorRegister(uint8_t reg, uint8_t mode_byte, RGBColor color1, RGBColor color2);
|
||||
};
|
||||
@@ -0,0 +1,82 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| GigabyteRGBFusion2AorusMasterGPUControllerDetect.cpp |
|
||||
| |
|
||||
| Detector for Gigabyte AORUS MASTER GPU |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "Detector.h"
|
||||
#include "GigabyteRGBFusion2AorusMasterGPUController.h"
|
||||
#include "i2c_smbus.h"
|
||||
#include "LogManager.h"
|
||||
#include "pci_ids.h"
|
||||
#include "RGBController_GigabyteRGBFusion2AorusMasterGPU.h"
|
||||
|
||||
|
||||
#define GIGABYTEGPU_CONTROLLER_NAME_AORUS_MASTER "Gigabyte RGB Fusion2 AORUS MASTER GPU"
|
||||
|
||||
bool TestForGigabyteRGBFusion2AorusMasterGPUController(i2c_smbus_interface* bus, unsigned char address)
|
||||
{
|
||||
bool pass = false;
|
||||
int res, pktsz;
|
||||
const int read_sz = 4;
|
||||
const int write_sz = 8;
|
||||
uint8_t data_pkt[write_sz] = { 0xAB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
uint8_t data_readpkt[read_sz] = {};
|
||||
|
||||
res = bus->i2c_write_block(address, write_sz, data_pkt);
|
||||
|
||||
if(res < 0)
|
||||
{
|
||||
LOG_DEBUG("[%s] Write probe failed at address 0x%02X", GIGABYTEGPU_CONTROLLER_NAME_AORUS_MASTER, address);
|
||||
return false;
|
||||
}
|
||||
|
||||
pktsz = read_sz;
|
||||
res = bus->i2c_read_block(address, &pktsz, data_readpkt);
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| All RGB Fusion 2 responses start with 0xAB |
|
||||
| RTX 5080 AORUS MASTER response: 0xAB 0x10 0x52 0x0B |
|
||||
\*-----------------------------------------------------*/
|
||||
if(res >= 0 && data_readpkt[0] == 0xAB)
|
||||
{
|
||||
pass = true;
|
||||
LOG_DEBUG("[%s] Detected at address 0x%02X with response: 0x%02X 0x%02X 0x%02X 0x%02X",
|
||||
GIGABYTEGPU_CONTROLLER_NAME_AORUS_MASTER, address,
|
||||
data_readpkt[0], data_readpkt[1], data_readpkt[2], data_readpkt[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string text = "";
|
||||
for(int idx = 0; idx < read_sz; ++idx)
|
||||
{
|
||||
char str[6];
|
||||
snprintf(str, 6, " 0x%02X", data_readpkt[idx]);
|
||||
text.append(str);
|
||||
}
|
||||
LOG_DEBUG("[%s] at address 0x%02X invalid. Expected 0xAB [0x*] but received:%s",
|
||||
GIGABYTEGPU_CONTROLLER_NAME_AORUS_MASTER, address, text.c_str());
|
||||
}
|
||||
|
||||
return(pass);
|
||||
}
|
||||
|
||||
void DetectGigabyteRGBFusion2AorusMasterGPUControllers(i2c_smbus_interface* bus, uint8_t i2c_addr, const std::string& name)
|
||||
{
|
||||
if(TestForGigabyteRGBFusion2AorusMasterGPUController(bus, i2c_addr))
|
||||
{
|
||||
RGBFusion2AorusMasterGPUController* controller = new RGBFusion2AorusMasterGPUController(bus, i2c_addr, name);
|
||||
RGBController_RGBFusion2AorusMasterGPU* rgb_controller = new RGBController_RGBFusion2AorusMasterGPU(controller);
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Nvidia GPUs |
|
||||
\*---------------------------------------------------------*/
|
||||
REGISTER_I2C_PCI_DETECTOR("Gigabyte AORUS GeForce RTX 5080 MASTER", DetectGigabyteRGBFusion2AorusMasterGPUControllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, GIGABYTE_SUB_VEN, GIGABYTE_AORUS_RTX5080_MASTER_16G_SUB_DEV, 0x71);
|
||||
@@ -0,0 +1,180 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_GigabyteRGBFusion2AorusMasterGPU.cpp |
|
||||
| |
|
||||
| RGBController for Gigabyte AORUS MASTER GPU |
|
||||
| |
|
||||
| Each fan has 8 individually addressable LEDs |
|
||||
| Plus 1 logo LED = 25 total LEDs |
|
||||
| |
|
||||
| Note: Fan LEDs only illuminate when fans are spinning |
|
||||
| Use nvidia-settings to force fans on for testing |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "RGBController_GigabyteRGBFusion2AorusMasterGPU.h"
|
||||
#include "LogManager.h"
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name Gigabyte AORUS MASTER GPU
|
||||
@category GPU
|
||||
@type I2C
|
||||
@save :white_check_mark:
|
||||
@direct :white_check_mark:
|
||||
@effects :x:
|
||||
@detectors DetectGigabyteRGBFusion2AorusMasterGPUControllers
|
||||
@comment Fan LEDs only work when fans are spinning. Each fan has 8
|
||||
individually addressable LEDs. Protocol uses zone-based
|
||||
mode commands before color commands.
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_RGBFusion2AorusMasterGPU::RGBController_RGBFusion2AorusMasterGPU(RGBFusion2AorusMasterGPUController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "Gigabyte";
|
||||
description = "Gigabyte AORUS MASTER GPU with Fan Ring LEDs";
|
||||
location = controller->GetDeviceLocation();
|
||||
type = DEVICE_TYPE_GPU;
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = RGB_FUSION2_AORUS_MASTER_MODE_STATIC;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR | MODE_FLAG_HAS_BRIGHTNESS | MODE_FLAG_MANUAL_SAVE;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
Direct.brightness_min = RGB_FUSION2_AORUS_MASTER_BRIGHTNESS_MIN;
|
||||
Direct.brightness_max = RGB_FUSION2_AORUS_MASTER_BRIGHTNESS_MAX;
|
||||
Direct.brightness = RGB_FUSION2_AORUS_MASTER_BRIGHTNESS_MAX;
|
||||
modes.push_back(Direct);
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
RGBController_RGBFusion2AorusMasterGPU::~RGBController_RGBFusion2AorusMasterGPU()
|
||||
{
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_RGBFusion2AorusMasterGPU::SetupZones()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Create 3 fan zones with 8 LEDs each (linear zones) |
|
||||
\*---------------------------------------------------------*/
|
||||
const char* fan_names[] = { "Left Fan", "Middle Fan", "Right Fan" };
|
||||
|
||||
for(int fan_idx = 0; fan_idx < 3; fan_idx++)
|
||||
{
|
||||
zone fan_zone;
|
||||
fan_zone.name = fan_names[fan_idx];
|
||||
fan_zone.type = ZONE_TYPE_LINEAR;
|
||||
fan_zone.leds_min = 8;
|
||||
fan_zone.leds_max = 8;
|
||||
fan_zone.leds_count = 8;
|
||||
fan_zone.matrix_map = NULL;
|
||||
|
||||
zones.push_back(fan_zone);
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Create 8 LEDs for this fan zone |
|
||||
\*-----------------------------------------------------*/
|
||||
for(int led_idx = 0; led_idx < 8; led_idx++)
|
||||
{
|
||||
led new_led;
|
||||
new_led.name = fan_names[fan_idx];
|
||||
new_led.name.append(" LED ");
|
||||
new_led.name.append(std::to_string(led_idx + 1));
|
||||
leds.push_back(new_led);
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Create logo zone with 1 LED |
|
||||
\*---------------------------------------------------------*/
|
||||
zone logo_zone;
|
||||
logo_zone.name = "Logo";
|
||||
logo_zone.type = ZONE_TYPE_SINGLE;
|
||||
logo_zone.leds_min = 1;
|
||||
logo_zone.leds_max = 1;
|
||||
logo_zone.leds_count = 1;
|
||||
logo_zone.matrix_map = NULL;
|
||||
|
||||
zones.push_back(logo_zone);
|
||||
|
||||
led logo_led;
|
||||
logo_led.name = "Logo";
|
||||
leds.push_back(logo_led);
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_RGBFusion2AorusMasterGPU::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_RGBFusion2AorusMasterGPU::DeviceUpdateLEDs()
|
||||
{
|
||||
uint8_t brightness = modes[active_mode].brightness;
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Update each fan zone |
|
||||
| LED indices: 0-7 (left), 8-15 (middle), 16-23 (right) |
|
||||
\*---------------------------------------------------------*/
|
||||
for(int fan_idx = 0; fan_idx < 3; fan_idx++)
|
||||
{
|
||||
RGBColor fan_colors[8];
|
||||
int base_led_idx = fan_idx * 8;
|
||||
|
||||
for(int led_idx = 0; led_idx < 8; led_idx++)
|
||||
{
|
||||
fan_colors[led_idx] = colors[base_led_idx + led_idx];
|
||||
}
|
||||
|
||||
controller->SetFanColors(fan_idx, fan_colors, brightness);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Update logo (LED index 24) |
|
||||
\*---------------------------------------------------------*/
|
||||
controller->SetLogoColor(colors[24]);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Apply all changes |
|
||||
\*---------------------------------------------------------*/
|
||||
controller->ApplyChanges();
|
||||
}
|
||||
|
||||
void RGBController_RGBFusion2AorusMasterGPU::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| For simplicity, update all LEDs when any zone changes |
|
||||
| The protocol requires sequential updates anyway |
|
||||
\*---------------------------------------------------------*/
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_RGBFusion2AorusMasterGPU::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| For simplicity, update all LEDs when any LED changes |
|
||||
| The protocol requires mode command + color sequence |
|
||||
\*---------------------------------------------------------*/
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_RGBFusion2AorusMasterGPU::DeviceUpdateMode()
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_RGBFusion2AorusMasterGPU::DeviceSaveMode()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Apply command also saves to device memory |
|
||||
\*---------------------------------------------------------*/
|
||||
controller->ApplyChanges();
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*---------------------------------------------------------*\
|
||||
| RGBController_GigabyteRGBFusion2AorusMasterGPU.h |
|
||||
| |
|
||||
| RGBController for Gigabyte AORUS MASTER GPU |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RGBController.h"
|
||||
#include "GigabyteRGBFusion2AorusMasterGPUController.h"
|
||||
|
||||
class RGBController_RGBFusion2AorusMasterGPU : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_RGBFusion2AorusMasterGPU(RGBFusion2AorusMasterGPUController* controller_ptr);
|
||||
~RGBController_RGBFusion2AorusMasterGPU();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
void DeviceSaveMode();
|
||||
|
||||
private:
|
||||
RGBFusion2AorusMasterGPUController* controller;
|
||||
};
|
||||
@@ -712,6 +712,7 @@
|
||||
#define GIGABYTE_RTX5080_GAMING_OC_16G_SUB_DEV 0x4176
|
||||
#define GIGABYTE_AORUS_RTX5080_XTREME_WATERFORCE_16G_SUB_DEV 0x418A
|
||||
#define GIGABYTE_RTX5080_XTREME_WATERFORCE_16G_SUB_DEV 0x418B
|
||||
#define GIGABYTE_AORUS_RTX5080_MASTER_16G_SUB_DEV 0x4178
|
||||
#define GIGABYTE_RTX5090_GAMING_OC_32G_SUB_DEV 0x416F
|
||||
#define GIGABYTE_AORUS_RTX5090_MASTER_32G_SUB_DEV 0x416E
|
||||
#define GIGABYTE_AORUS_RTX5090_MASTER_ICE_32G_SUB_DEV 0x4199
|
||||
|
||||
Reference in New Issue
Block a user