From c1d67aa740995c87a496fe88b207cfcfbc345c09 Mon Sep 17 00:00:00 2001 From: Chris M Date: Sat, 23 Aug 2025 22:19:12 +1000 Subject: [PATCH] Refactored Gigabyte Fusion2USB controller * Refactored RGBController_GigabyteRGBFusion2USBBoards & RGBController_GigabyteRGBFusion2USBLayouts into single GigabyteFusion2USB_Devices to align with structure of RazerDevices and CorsairV2Devices. * Replaced definition for `gb_fusion2_layout` * Adjusted code paths to suit new variable structures * Removed redundant files --- .../GigabyteFusion2USB_Devices.cpp | 3847 +++++++++++++++++ .../GigabyteFusion2USB_Devices.h | 115 + .../GigabyteRGBFusion2USBController.cpp | 173 +- .../GigabyteRGBFusion2USBController.h | 132 +- .../RGBController_GigabyteRGBFusion2USB.cpp | 491 +-- .../RGBController_GigabyteRGBFusion2USB.h | 45 +- ...Controller_GigabyteRGBFusion2USBBoards.cpp | 315 -- ...GBController_GigabyteRGBFusion2USBBoards.h | 25 - ...ontroller_GigabyteRGBFusion2USBLayouts.cpp | 1967 --------- ...BController_GigabyteRGBFusion2USBLayouts.h | 36 - 10 files changed, 4337 insertions(+), 2809 deletions(-) create mode 100644 Controllers/GigabyteRGBFusion2USBController/GigabyteFusion2USB_Devices.cpp create mode 100644 Controllers/GigabyteRGBFusion2USBController/GigabyteFusion2USB_Devices.h delete mode 100644 Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USBBoards.cpp delete mode 100644 Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USBBoards.h delete mode 100644 Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USBLayouts.cpp delete mode 100644 Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USBLayouts.h diff --git a/Controllers/GigabyteRGBFusion2USBController/GigabyteFusion2USB_Devices.cpp b/Controllers/GigabyteRGBFusion2USBController/GigabyteFusion2USB_Devices.cpp new file mode 100644 index 000000000..d1e610478 --- /dev/null +++ b/Controllers/GigabyteRGBFusion2USBController/GigabyteFusion2USB_Devices.cpp @@ -0,0 +1,3847 @@ +/*---------------------------------------------------------*\ +| Gigabyte_Fusion2_USB_Devices.cpp | +| | +| Gigabyte Fusion 2 USB Device layouts and | +| and mapping to the device IDs stored on chip | +| | +| megadjc 31 Jul 2025 | +| chrism 29 Aug 2025 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + +#include "GigabyteRGBFusion2USBController.h" + +/*-------------------------------------------------------------------------*\ +| GB Fusion2 - Common Zone Definitions | +\*-------------------------------------------------------------------------*/ +static const gb_fusion2_zone common_d_led1_zone = +{ + HDR_D_LED1, + 0, + 1024, + "Digital LED 1" +}; + +static const gb_fusion2_zone common_d_led2_zone = +{ + HDR_D_LED2, + 0, + 1024, + "Digital LED 2" +}; + +static const gb_fusion2_zone common_d_led3_zone = +{ + HDR_D_LED3, + 0, + 1024, + "Digital LED 3" +}; + +static const gb_fusion2_zone common_d_led4_zone = +{ + HDR_D_LED4, + 0, + 1024, + "Digital LED 4" +}; + +static const gb_fusion2_zone common_led1_zone = +{ + LED1, + 1, + 1, + "Name for Led 1" +}; + +static const gb_fusion2_zone common_led2_zone = +{ + LED2, + 1, + 1, + "Name for Led 2" +}; + +static const gb_fusion2_zone common_led3_zone = +{ + LED3, + 1, + 1, + "Name for Led 3" +}; + +static const gb_fusion2_zone common_led4_zone = +{ + LED4, + 1, + 1, + "Name for Led 4" +}; + +static const gb_fusion2_zone common_led5_zone = +{ + LED5, + 1, + 1, + "Name for Led 5" +}; + +static const gb_fusion2_zone common_led9_zone = +{ + LED9, + 1, + 1, + "Name for Led 9" +}; + +static const gb_fusion2_zone common_led10_zone = +{ + LED10, + 1, + 1, + "Name for Led 10" +}; + +static const gb_fusion2_zone common_led11_zone = +{ + LED11, + 1, + 1, + "Name for Led 11" +}; + +static const gb_fusion2_zone common_accent_led1_zone = +{ + LED1, + 1, + 1, + "Accent", +}; + +static const gb_fusion2_zone common_accent_led2_zone = +{ + LED2, + 1, + 1, + "Accent", +}; + +static const gb_fusion2_zone common_accent_led3_zone = +{ + LED3, + 1, + 1, + "Accent", +}; + +static const gb_fusion2_zone common_accent_led4_zone = +{ + LED4, + 1, + 1, + "Accent", +}; + +static const gb_fusion2_zone common_accent_led5_zone = +{ + LED5, + 1, + 1, + "Accent", +}; + +static const gb_fusion2_zone common_accent_led11_zone = +{ + LED11, + 1, + 1, + "Accent", +}; + +static const gb_fusion2_zone common_aorus_logo_led1_zone = +{ + LED1, + 1, + 1, + "Aorus Logo", +}; + +static const gb_fusion2_zone common_cover_left_led4_zone = +{ + LED4, + 1, + 1, + "Cover Left", +}; + +static const gb_fusion2_zone common_cover_right_led1_zone = +{ + LED1, + 1, + 1, + "Cover Right", +}; + +static const gb_fusion2_zone common_cpu_hdr_led3_zone = +{ + LED3, + 1, + 1, + "CPU Header", +}; + +static const gb_fusion2_zone common_logo_led3_zone = +{ + LED3, + 1, + 1, + "Logo" +}; + +static const gb_fusion2_zone common_logo_led10_zone = +{ + LED10, + 1, + 1, + "Logo" +}; + +static const gb_fusion2_zone common_pcie_led4_zone = +{ + LED4, + 1, + 1, + "PCIe" +}; + +static const gb_fusion2_zone common_12v_led2_zone = +{ + LED2, + 1, + 1, + "12V RGB Strip" +}; + +static const gb_fusion2_zone common_12v_led4_zone = +{ + LED4, + 1, + 1, + "12V RGB Strip" +}; + +static const gb_fusion2_zone common_12v_led5_zone = +{ + LED5, + 1, + 1, + "12V RGB Strip" +}; + + +/*-------------------------------------------------------------------------*\ +| GB Fusion2 Layouts | +\*-------------------------------------------------------------------------*/ + +/*-------------------------------------------------------------*\ +| A620MH 048D:5702 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout a620mh_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_12v_led2_zone, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr +}; + +static const gb_fusion2_device a620m_ds3h_5702_device = +{ + &a620mh_layout, + 0xCDE4CFFE, + 1, + "A620M DS3H", +}; + +static const gb_fusion2_device a620m_gaming_x_5702_device = +{ + &a620mh_layout, + 0xCDE4CFFE, + 1, + "A620M GAMING X", +}; + +static const gb_fusion2_device a620m_gaming_x_ax_5702_device = +{ + &a620mh_layout, + 0xCDE4CFFE, + 1, + "A620M GAMING X AX", +}; + +static const gb_fusion2_device a620m_h_5702_device = +{ + &a620mh_layout, + 0xCDE4CFFE, + 1, + "A620M H", +}; + +/*-------------------------------------------------------------*\ +| B650M-DS3H 048D:5702 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout b650m_ds3h_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_12v_led5_zone, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr +}; + +static const gb_fusion2_device a620m_ds3h_5711_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "A620M DS3H", +}; + + +static const gb_fusion2_device a620m_gaming_x_5711_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "A620M GAMING X", +}; + +static const gb_fusion2_device a620m_gaming_x_ax_5711_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "A620M GAMING X AX", +}; + +static const gb_fusion2_device a620m_h_5711_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "A620M H", +}; + + +static const gb_fusion2_device a620m_s2h_5711_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "A620M S2H", +}; + +static const gb_fusion2_device b650_eagle_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B650 EAGLE", +}; + +static const gb_fusion2_device b650_eagle_ax_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B650 EAGLE AX", +}; + +static const gb_fusion2_device b650m_d2hp_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B650M D2HP", +}; + +static const gb_fusion2_device b650m_d3hp_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B650M D3HP", +}; + +static const gb_fusion2_device b650m_d3hp_ax_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B650M D3HP AX", +}; + +static const gb_fusion2_device b650m_ds3h_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B650M DS3H", +}; + +static const gb_fusion2_device b650m_gaming_plus_wifi_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B650M GAMING PLUS WIFI", +}; + +static const gb_fusion2_device b650m_gaming_wifi_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B650M GAMING WIFI", +}; + +static const gb_fusion2_device b650m_gaming_wifi6_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B650M GAMING WIFI6", +}; + +static const gb_fusion2_device b650m_gaming_x_ax_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B650M GAMING X AX", +}; + +static const gb_fusion2_device b650m_k_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B650M K", +}; + +static const gb_fusion2_device b760_ds3h_gen5_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B760 DS3H GEN5", +}; + +static const gb_fusion2_device b760_ds3h_wifi6e_gen5_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B760 DS3H WIFI6E GEN5", +}; + +static const gb_fusion2_device b760_gaming_x_ddr4_gen5_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B760 GAMING X DDR4 GEN5", +}; + +static const gb_fusion2_device b760_gaming_x_gen5_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B760 GAMING X GEN5", +}; + +static const gb_fusion2_device b760_gaming_x_wifi6_gen5_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B760 GAMING X WIFI6 GEN5", +}; + +static const gb_fusion2_device b840m_d2h_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B840M D2H", +}; + +static const gb_fusion2_device b840m_ds3h_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B840M DS3H", +}; + +static const gb_fusion2_device b840m_eagle_wifi6_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B840M EAGLE WIFI6", +}; + +static const gb_fusion2_device b850i_aorus_pro_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B850I AORUS PRO", +}; + +static const gb_fusion2_device b850m_d3hp_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "B850M D3HP", +}; + +static const gb_fusion2_device x670_gaming_x_ax_v2_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "X670 GAMING X AX V2", +}; + +static const gb_fusion2_device x870i_aorus_pro_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "X870I AORUS PRO", +}; + +static const gb_fusion2_device x870i_aorus_pro_ice_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "X870I AORUS PRO ICE", +}; + +static const gb_fusion2_device z890m_gaming_x_device = +{ + &b650m_ds3h_layout, + 0xCDE4CFFE, + 1, + "Z890M GAMING X", +}; + +/*-------------------------------------------------------------*\ +| B550I-AORUS-PRO-AX 048D:5702 | +| | +| Zone "Digital LED 1" : Linear | +| Zone "Top LED" : Single | +| Zone "Upper Middle LED" : Single | +| Zone "Lower Middle LED" : Single | +| Zone "Bottom LED" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static const gb_fusion2_zone top_led_zone = +{ + LED1, + 1, + 1, + "Top LED" +}; + +static const gb_fusion2_zone upper_middle_led_zone = +{ + LED2, + 1, + 1, + "Upper Middle LED" +}; + +static const gb_fusion2_zone lower_middle_led_zone = +{ + LED3, + 1, + 1, + "Lower Middle LED" +}; + +static const gb_fusion2_zone bottom_led_zone = +{ + LED4, + 1, + 1, + "Bottom LED" +}; + +static gb_fusion2_layout b550i_aorus_pro_ax_layout = +{ + &common_d_led1_zone, + &top_led_zone, + &upper_middle_led_zone, + &lower_middle_led_zone, + &bottom_led_zone, + &common_12v_led5_zone, + nullptr, + nullptr +}; + +static const gb_fusion2_device b550i_aorus_pro_ax_device = +{ + &b550i_aorus_pro_ax_layout, + 0xCDE4CFFE, + 1, + "B550I AORUS PRO AX", +}; + +static const gb_fusion2_device b760i_aorus_pro_device = +{ + &b550i_aorus_pro_ax_layout, + 0xCDE4CFFE, + 1, + "B760I AORUS PRO", +}; + +static const gb_fusion2_device b760i_aorus_pro_ddr4_device = +{ + &b550i_aorus_pro_ax_layout, + 0xCDE4CFFE, + 1, + "B760I AORUS PRO DDR4", +}; + +static const gb_fusion2_device x570i_aorus_pro_wifi_device = +{ + &b550i_aorus_pro_ax_layout, + 0xCDE4CFFE, + 1, + "X570 I AORUS PRO WIFI", +}; + +static const gb_fusion2_device x570si_aorus_pro_ax_device = +{ + &b550i_aorus_pro_ax_layout, + 0xCDE4CFFE, + 1, + "X570SI AORUS PRO AX", +}; + +static const gb_fusion2_device z790i_aorus_ultra_device = +{ + &b550i_aorus_pro_ax_layout, + 0xCDE4CFFE, + 1, + "Z790I AORUS ULTRA", +}; + +/*-------------------------------------------------------------*\ +| B650-C-V2 048D:5702 | +| | +| Zone "Digital LED 1" : Linear | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout b650i_ax_layout = +{ + &common_d_led1_zone, + &common_12v_led2_zone, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr +}; + +static const gb_fusion2_device a620i_ax_5702_device = +{ + &b650i_ax_layout, + 0xCDE4CFFE, + 1, + "A620I AX", //The DMI name for both the 5702 & 5711 PID are the smae +}; + +static const gb_fusion2_device a620m_s2h_5702_device = +{ + &b650i_ax_layout, + 0xCDE4CFFE, + 1, + "A620M S2H", +}; + +static const gb_fusion2_device b650i_ax_device = +{ + &b650i_ax_layout, + 0xCDE4CFFE, + 1, + "B650I AX", +}; + +static const gb_fusion2_device b650m_c_v2_device = +{ + &b650i_ax_layout, + 0xCDE4CFFE, + 1, + "B650M C V2", +}; + +static const gb_fusion2_device b650m_c_v3_device = +{ + &b650i_ax_layout, + 0xCDE4CFFE, + 1, + "B650M C V3", +}; + +/*-------------------------------------------------------------*\ +| B650-D2H 048D:5702 | +| | +| Zone "Digital LED 1" : Linear | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout b650_d2h_layout = +{ + &common_d_led1_zone, + &common_12v_led5_zone, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr +}; + +static const gb_fusion2_device a620i_ax_5711_device = +{ + &b650_d2h_layout, + 0xCDE4CFFE, + 1, + "A620I AX", //The DMI name for both the 5702 & 5711 PID are the smae +}; + +static const gb_fusion2_device a620m_c_device = +{ + &b650_d2h_layout, + 0xCDE4CFFE, + 1, + "A620M C", +}; + +static const gb_fusion2_device a620m_d2h_device = +{ + &b650_d2h_layout, + 0xCDE4CFFE, + 1, + "A620M D2H", +}; + +static const gb_fusion2_device b650i_aorus_ultra_device = +{ + &b650_d2h_layout, + 0xCDE4CFFE, + 1, + "B650I AORUS ULTRA", +}; + +static const gb_fusion2_device b650m_d2h_device = +{ + &b650_d2h_layout, + 0xCDE4CFFE, + 1, + "B650M D2H", +}; + +static const gb_fusion2_device b650m_h_device = +{ + &b650_d2h_layout, + 0xCDE4CFFE, + 1, + "B650M H", +}; + + +static const gb_fusion2_device b650m_s2h_device = +{ + &b650_d2h_layout, + 0xCDE4CFFE, + 1, + "B650M S2H", +}; + +static const gb_fusion2_device b650_ud_ac_device = +{ + &b650_d2h_layout, + 0xCDE4CFFE, + 1, + "B650 UD AC", +}; + +static const gb_fusion2_device b650_ud_ax_device = +{ + &b650_d2h_layout, + 0xCDE4CFFE, + 1, + "B650 UD AX", +}; + +/*-------------------------------------------------------------*\ +| B650E-AORUS-MSTR 048D:5702 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Gen2 ARGB 2" : Linear | +| Zone "Cover Left : Single | +| Zone "Cover Right : Single | +| Zone "CPU Header" : Single | +| Zone "12V RGB Strip" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout b650e_aorus_mstr_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_cover_left_led4_zone, + &common_cover_right_led1_zone, + &common_cpu_hdr_led3_zone, + &common_12v_led2_zone, + &common_12v_led5_zone, + nullptr, +}; + +static const gb_fusion2_device b650e_aorus_mstr_device = +{ + &b650e_aorus_mstr_layout, + 0xCDE4CFFE, + 1, + "B650E AORUS MASTER", +}; + +static const gb_fusion2_device x670e_aorus_mstr_device = +{ + &b650e_aorus_mstr_layout, + 0xCDE4CFFE, + 1, + "X670E AORUS MASTER", +}; + +static const gb_fusion2_device x670e_aorus_xtrm_device = +{ + &b650e_aorus_mstr_layout, + 0xCDE4CFFE, + 1, + "X670E AORUS XTREME", +}; + +/*-------------------------------------------------------------*\ +| B650E-AORUS-STEALTH 048D:5711 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Gen2 ARGB 2" : Linear | +| Zone "Accent" : Single | +| Zone "Logo" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout b650e_aorus_stealth_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_accent_led11_zone, + &common_logo_led10_zone, + &common_12v_led5_zone, + nullptr, + nullptr, + nullptr, +}; + +static const gb_fusion2_device b650e_aorus_stealth_ice_device = +{ + &b650e_aorus_stealth_layout, + 0xCDE4CFFE, + 1, + "B650E AORUS STEALTH ICE", +}; + +/*-------------------------------------------------------------*\ +| B650-ELITE 048D:5702 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +| Zone "Accent" : Single | +| Zone "CPU Header" : Single | +| Zone "12V RGB Strip" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout b650_elite_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_accent_led4_zone, + &common_cpu_hdr_led3_zone, + &common_12v_led2_zone, + &common_12v_led5_zone, + nullptr, + nullptr, +}; + +static const gb_fusion2_device b650_aorus_elite_device = +{ + &b650_elite_layout, + 0xCDE4CFFE, + 1, + "B650 AORUS ELITE", +}; + +static const gb_fusion2_device b650_aorus_elite_ax_device = +{ + &b650_elite_layout, + 0xCDE4CFFE, + 1, + "B650 AORUS ELITE AX", +}; + +static const gb_fusion2_device b650m_aorus_elite_device = +{ + &b650_elite_layout, + 0xCDE4CFFE, + 1, + "B650M AORUS ELITE", +}; + +static const gb_fusion2_device b650m_aorus_elite_ax_device = +{ + &b650_elite_layout, + 0xCDE4CFFE, + 1, + "B650M AORUS ELITE AX", +}; + +static const gb_fusion2_device b650m_aorus_elite_ax_ice_device = +{ + &b650_elite_layout, + 0xCDE4CFFE, + 1, + "B650M AORUS ELITE AX ICE", +}; + +static const gb_fusion2_device b650m_aorus_pro_device = +{ + &b650_elite_layout, + 0xCDE4CFFE, + 1, + "B650M AORUS PRO", +}; + +static const gb_fusion2_device b650m_aorus_pro_ax_device = +{ + &b650_elite_layout, + 0xCDE4CFFE, + 1, + "B650M AORUS PRO AX", +}; + +static const gb_fusion2_device x570s_aorus_elite_device = +{ + &b650_elite_layout, + 0xCDE4CFFE, + 1, + "X570S AORUS ELITE", +}; + +static const gb_fusion2_device x570s_aorus_elite_ax_device = +{ + &b650_elite_layout, + 0xCDE4CFFE, + 1, + "X570S AORUS ELITE AX", +}; + +static const gb_fusion2_device x570s_gaming_x_device = +{ + &b650_elite_layout, + 0xCDE4CFFE, + 1, + "X570S GAMING X", +}; + +/*-------------------------------------------------------------*\ +| B650-ELITE-V2 048D:5702 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +| Zone "Accent" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout b650_elite_v2_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_accent_led4_zone, + &common_12v_led5_zone, + nullptr, + nullptr, + nullptr, + nullptr, +}; + +static const gb_fusion2_device b650_aorus_elite_ax_ice_device = +{ + &b650_elite_v2_layout, + 0xCDE4CFFE, + 1, + "B650 AORUS ELITE AX ICE", +}; + +static const gb_fusion2_device b650_aorus_elite_ax_v2_device = +{ + &b650_elite_v2_layout, + 0xCDE4CFFE, + 1, + "B650 AORUS ELITE AX V2", +}; + +static const gb_fusion2_device b650_aorus_elite_v2_device = +{ + &b650_elite_v2_layout, + 0xCDE4CFFE, + 1, + "B650 AORUS ELITE V2", +}; + +static const gb_fusion2_device b650e_aorus_elite_x_ax_ice_device = +{ + &b650_elite_v2_layout, + 0xCDE4CFFE, + 1, + "B650E AORUS ELITE X AX ICE", +}; + +/*-------------------------------------------------------------*\ +| B650-TACH 048D:5702 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Accent" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout b650_tach_layout = +{ + &common_d_led1_zone, + &common_accent_led3_zone, + &common_12v_led2_zone, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr +}; + +static const gb_fusion2_device b650e_aorus_tachyon_device = +{ + &b650_tach_layout, + 0xCDE4CFFE, + 1, + "B650E AORUS TACHYON", +}; + +/*-------------------------------------------------------------*\ +| B650-USB4 048D:5702 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +| Zone "Accent" : Single | +| Zone "Accent" : Single | +| Zone "Logo" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout b650_usb4_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_accent_led3_zone, + &common_accent_led4_zone, + &common_aorus_logo_led1_zone, + &common_12v_led5_zone, + nullptr, + nullptr, +}; + +static const gb_fusion2_device b650e_aorus_pro_x_usb4_device = +{ + &b650_usb4_layout, + 0xCDE4CFFE, + 1, + "B650E AORUS PRO X USB4", +}; + +/*-------------------------------------------------------------*\ +| B760_AORUS_ELITE 048D:5702 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +| Zone "12V RGB Strip" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout b760_aorus_elite_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_12v_led2_zone, + &common_12v_led5_zone, + nullptr, + nullptr, + nullptr, + nullptr +}; + +static const gb_fusion2_device b760_aorus_elite_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760 AORUS ELITE", +}; + +static const gb_fusion2_device b760_aorus_elite_ax_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760 AORUS ELITE AX", +}; + +static const gb_fusion2_device b760_ds3h_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760 DS3H", +}; + +static const gb_fusion2_device b760_ds3h_ac_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760 DS3H AC", +}; + +static const gb_fusion2_device b760_ds3h_ac_ddr4_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760 DS3H AC DDR4", +}; + +static const gb_fusion2_device b760_ds3h_ax_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760 DS3H AX", +}; + +static const gb_fusion2_device b760_ds3h_ax_ddr4_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760 DS3H AX DDR4", +}; + +static const gb_fusion2_device b760_ds3h_ax_v2_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760 DS3H AX V2", +}; + +static const gb_fusion2_device b760_ds3h_ddr4_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760 DS3H DDR4", +}; + +static const gb_fusion2_device b760_gaming_x_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760 GAMING X", +}; + +static const gb_fusion2_device b760_gaming_x_ax_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760 GAMING X AX", +}; + +static const gb_fusion2_device b760_gaming_x_ax_ddr4_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760 GAMING X AX DDR4", +}; + +static const gb_fusion2_device b760_gaming_x_ddr4_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760 GAMING X DDR4", +}; + +static const gb_fusion2_device b760m_c_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760M C", +}; + +static const gb_fusion2_device b760m_c_v2_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760M C V2", +}; + +static const gb_fusion2_device b760m_gaming_x_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760M GAMING X", +}; + +static const gb_fusion2_device b760m_gaming_x_ax_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760M GAMING X AX", +}; + +static const gb_fusion2_device b760m_gaming_x_ax_ddr4_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760M GAMING X AX DDR4", +}; + +static const gb_fusion2_device b760m_gaming_x_ddr4_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "B760M GAMING X DDR4", +}; + +static const gb_fusion2_device z790_aero_g_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "Z790 AERO G", +}; + +static const gb_fusion2_device z790_gaming_plus_ax_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "Z790 GAMING PLUS AX", +}; + +static const gb_fusion2_device z790_gaming_x_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "Z790 GAMING X", +}; + +static const gb_fusion2_device z790_gaming_x_ax_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "Z790 GAMING X AX", +}; + +static const gb_fusion2_device z790_s_ddr4_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "Z790 S DDR4", +}; + +static const gb_fusion2_device z790_s_wifi_ddr4_device = +{ + &b760_aorus_elite_layout, + 0xCDE4CFFE, + 1, + "Z790 S WIFI DDR4", +}; + +/*-------------------------------------------------------------*\ +| B760M-D2H 048D:5702 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Accent" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout b760m_d2h_layout = +{ + &common_d_led1_zone, + &common_accent_led3_zone, + &common_12v_led5_zone, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr +}; + +static const gb_fusion2_device b760m_d2h_device = +{ + &b760m_d2h_layout, + 0xCDE4CFFE, + 1, + "B760M D2H", +}; + +static const gb_fusion2_device b760m_d2h_ddr4_device = +{ + &b760m_d2h_layout, + 0xCDE4CFFE, + 1, + "B760M D2H DDR4", +}; + +static const gb_fusion2_device b760m_d3h_device = +{ + &b760m_d2h_layout, + 0xCDE4CFFE, + 1, + "B760M D3H", +}; + +static const gb_fusion2_device b760m_d3h_ddr4_device = +{ + &b760m_d2h_layout, + 0xCDE4CFFE, + 1, + "B760M D3H DDR4", +}; + +static const gb_fusion2_device b760m_d3hp_device = +{ + &b760m_d2h_layout, + 0xCDE4CFFE, + 1, + "B760M D3HP", +}; + +static const gb_fusion2_device b760m_d3hp_ddr4_device = +{ + &b760m_d2h_layout, + 0xCDE4CFFE, + 1, + "B760M D3HP DDR4", +}; + +static const gb_fusion2_device b760m_d3hp_wifi6_device = +{ + &b760m_d2h_layout, + 0xCDE4CFFE, + 1, + "B760M D3HP WIFI6", +}; + +static const gb_fusion2_device b760m_ds3h_device = +{ + &b760m_d2h_layout, + 0xCDE4CFFE, + 1, + "B760M DS3H", +}; + +static const gb_fusion2_device b760m_ds3h_ax_device = +{ + &b760m_d2h_layout, + 0xCDE4CFFE, + 1, + "B760M DS3H AX", +}; + +static const gb_fusion2_device b760m_ds3h_ax_ddr4_device = +{ + &b760m_d2h_layout, + 0xCDE4CFFE, + 1, + "B760M DS3H AX DDR4", +}; + +static const gb_fusion2_device b760m_ds3h_ddr4_device = +{ + &b760m_d2h_layout, + 0xCDE4CFFE, + 1, + "B760M DS3H DDR4", +}; + +static const gb_fusion2_device b760m_gaming_ac_ddr4_device = +{ + &b760m_d2h_layout, + 0xCDE4CFFE, + 1, + "B760M GAMING AC DDR4", +}; + +static const gb_fusion2_device b760m_gaming_ddr4_device = +{ + &b760m_d2h_layout, + 0xCDE4CFFE, + 1, + "B760M GAMING DDR4", +}; + +static const gb_fusion2_device b760m_gaming_plus_wifi_ddr4_device = +{ + &b760m_d2h_layout, + 0xCDE4CFFE, + 1, + "B760M GAMING PLUS WIFI DDR4", +}; + +static const gb_fusion2_device b760m_power_device = +{ + &b760m_d2h_layout, + 0xCDE4CFFE, + 1, + "B760M POWER", +}; + +static const gb_fusion2_device b760m_power_ddr4_device = +{ + &b760m_d2h_layout, + 0xCDE4CFFE, + 1, + "B760M POWER DDR4", +}; + +/*-------------------------------------------------------------*\ +| B760_DS3H_DR_G5 048D:5711 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Gen2 ARGB 2" : Linear | +| Zone "Gen2 ARGB 3" : Linear | +| Zone "Accent" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout b760_ds3h_dr_g5_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_accent_led1_zone, + &common_12v_led5_zone, + nullptr, + nullptr, + nullptr, + nullptr, +}; + +static const gb_fusion2_device b760m_ds3h_ddr4_gen_5_device = +{ + &b760_ds3h_dr_g5_layout, + 0xCDE4CFFE, + 1, + "B760M DS3H DDR4 GEN 5", +}; + +static const gb_fusion2_device b760m_ds3h_gen_5_device = +{ + &b760_ds3h_dr_g5_layout, + 0xCDE4CFFE, + 1, + "B760M DS3H GEN 5", +}; + +static const gb_fusion2_device b760m_ds3h_wifi6e_ddr4_gen_5_device = +{ + &b760_ds3h_dr_g5_layout, + 0xCDE4CFFE, + 1, + "B760M DS3H WIFI6E DDR4 GEN 5", +}; + +static const gb_fusion2_device b760m_gaming_wifi6e_gen_5_device = +{ + &b760_ds3h_dr_g5_layout, + 0xCDE4CFFE, + 1, + "B760M GAMING WIFI6E GEN 5", +}; + +static const gb_fusion2_device b760m_gaming_wifi6_plus_gen5_device = +{ + &b760_ds3h_dr_g5_layout, + 0xCDE4CFFE, + 1, + "B760M GAMING WIFI6 PLUS GEN5", +}; + +static const gb_fusion2_device z790_aorus_mstr_device = +{ + &b760_ds3h_dr_g5_layout, + 0xCDE4CFFE, + 1, + "Z790 AORUS MASTER", +}; + +/*-------------------------------------------------------------*\ +| B760M-EXAX 048D:5702 | +| | +| Zone "Digital LED 1" : Linear | +| Zone "Top Logo" : Single | +| Zone "Upper Middle Logo" : Single | +| Zone "Lower Middle Logo" : Single | +| Zone "Bottom Logo" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static const gb_fusion2_zone top_logo_zone = +{ + LED4, + 1, + 1, + "Top Logo", +}; + +static const gb_fusion2_zone upper_middle_logo_zone = +{ + LED3, + 1, + 1, + "Upper Middle Logo", +}; + +static const gb_fusion2_zone lower_middle_logo_zone = +{ + LED2, + 1, + 1, + "Lower Middle Logo", +}; + +static const gb_fusion2_zone bottom_logo_zone = +{ + LED1, + 1, + 1, + "Bottom Logo", +}; + +static gb_fusion2_layout b760m_elite_x_ax_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &top_logo_zone, + &upper_middle_logo_zone, + &lower_middle_logo_zone, + &bottom_logo_zone, + &common_12v_led5_zone, + nullptr, +}; + +static const gb_fusion2_device b760m_elite_x_ax_device = +{ + &b760m_elite_x_ax_layout, + 0xCDE4CFFE, + 1, + "B760M AORUS ELITE X AX", +}; + +/*-------------------------------------------------------------*\ +| B760M-GAX 048D:5702 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +| Zone "Accent" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout b760m_gax_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_accent_led5_zone, + &common_12v_led2_zone, + nullptr, + nullptr, + nullptr, + nullptr, +}; + +static const gb_fusion2_device b760m_gaming_device = +{ + &b760m_gax_layout, + 0xCDE4CFFE, + 1, + "B760M GAMING", +}; + +static const gb_fusion2_device b760m_gaming_ac_device = +{ + &b760m_gax_layout, + 0xCDE4CFFE, + 1, + "B760M GAMING AC", +}; + +static const gb_fusion2_device b760m_gaming_wifi_device = +{ + &b760m_gax_layout, + 0xCDE4CFFE, + 1, + "B760M GAMING WIFI", +}; + +static const gb_fusion2_device b760m_gaming_wifi_plus_device = +{ + &b760m_gax_layout, + 0xCDE4CFFE, + 1, + "B760M GAMING WIFI PLUS", +}; + +static const gb_fusion2_device b760m_g_ax_device = +{ + &b760m_gax_layout, + 0xCDE4CFFE, + 1, + "B760M G AX", +}; + +/*-------------------------------------------------------------*\ +| B860M-D2H 048D:5711 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Gen2 ARGB 2" : Linear | +| Zone "Gen2 ARGB 3" : Linear | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout b860m_d2h_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_d_led3_zone, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, +}; + +static const gb_fusion2_device b860m_d2h_device = +{ + &b860m_d2h_layout, + 0xCDE4CFFE, + 1, + "B860M D2H", +}; + +/*-------------------------------------------------------------*\ +| B860-WIFI7 048D:5711 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Gen2 ARGB 2" : Linear | +| Zone "Gen2 ARGB 3" : Linear | +| Zone "Accent" : Single | +| Zone "Logo" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout b860_wifi7_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_d_led3_zone, + &common_accent_led3_zone, + &common_logo_led10_zone, + &common_12v_led5_zone, + nullptr, + nullptr, +}; + +static const gb_fusion2_device b850m_aorus_pro_wifi7_device = +{ + &b860_wifi7_layout, + 0xCDE4CFFE, + 1, + "B850M AORUS PRO WIFI7", +}; + +static const gb_fusion2_device b860_aorus_elite_wifi7_ice_device = +{ + &b860_wifi7_layout, + 0xCDE4CFFE, + 1, + "B860 AORUS ELITE WIFI7 ICE", +}; + +static const gb_fusion2_device b860m_aorus_elite_device = +{ + &b860_wifi7_layout, + 0xCDE4CFFE, + 1, + "B860M AORUS ELITE", +}; + +static const gb_fusion2_device b860m_aorus_elite_wifi6e_device = +{ + &b860_wifi7_layout, + 0xCDE4CFFE, + 1, + "B860M AORUS ELITE WIFI6E", +}; + +static const gb_fusion2_device b860m_aorus_elite_wifi6e_ice_device = +{ + &b860_wifi7_layout, + 0xCDE4CFFE, + 1, + "B860M AORUS ELITE WIFI6E ICE", +}; + +static const gb_fusion2_device b860m_aorus_pro_wifi7_device = +{ + &b860_wifi7_layout, + 0xCDE4CFFE, + 1, + "B860M AORUS PRO WIFI7", +}; + +static const gb_fusion2_device z890_aorus_elite_wifi7_device = +{ + &b860_wifi7_layout, + 0xCDE4CFFE, + 1, + "Z890 AORUS ELITE WIFI7", +}; + +static const gb_fusion2_device z890_aorus_elite_wifi7_ice_device = +{ + &b860_wifi7_layout, + 0xCDE4CFFE, + 1, + "Z890 AORUS ELITE WIFI7 ICE", +}; + +static const gb_fusion2_device z890_aorus_elite_x_ice_device = +{ + &b860_wifi7_layout, + 0xCDE4CFFE, + 1, + "Z890 AORUS ELITE X ICE", +}; + +static const gb_fusion2_device z890_aorus_pro_ice_device = +{ + &b860_wifi7_layout, + 0xCDE4CFFE, + 1, + "Z890 AORUS PRO ICE", +}; + +static const gb_fusion2_device z890_eagle_device = +{ + &b860_wifi7_layout, + 0xCDE4CFFE, + 1, + "Z890 EAGLE", +}; + +static const gb_fusion2_device z890_eagle_wifi7_device = +{ + &b860_wifi7_layout, + 0xCDE4CFFE, + 1, + "Z890 EAGLE WIFI7", +}; + +static const gb_fusion2_device z890_gaming_x_wifi7_device = +{ + &b860_wifi7_layout, + 0xCDE4CFFE, + 1, + "Z890 GAMING X WIFI7", +}; + +static const gb_fusion2_device z890m_aorus_elite_wifi7_device = +{ + &b860_wifi7_layout, + 0xCDE4CFFE, + 1, + "Z890M AORUS ELITE WIFI7", +}; + +static const gb_fusion2_device z890m_aorus_elite_wifi7_ice_device = +{ + &b860_wifi7_layout, + 0xCDE4CFFE, + 1, + "Z890M AORUS ELITE WIFI7 ICE", +}; + +/*-------------------------------------------------------------*\ +| H810M 048D:8950 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Gen2 ARGB 2" : Linear | +\*-------------------------------------------------------------*/ +static const gb_fusion2_zone gen2_argb1_zone = +{ + LED3, + 0, + 1024, + "Gen2 ARGB 1" +}; + +static const gb_fusion2_zone gen2_argb2_zone = +{ + LED4, + 0, + 1024, + "Gen2 ARGB 2" +}; + +static gb_fusion2_layout h810m_layout = +{ + &gen2_argb1_zone, + &gen2_argb2_zone, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr +}; + +static const gb_fusion2_device h810m_gaming_wifi6_device = +{ + &h810m_layout, + 0xCDE4CFFE, + 1, + "H810M GAMING WIFI6", +}; + +static const gb_fusion2_device h810m_h_device = +{ + &h810m_layout, + 0xCDE4CFFE, + 1, + "H810M H", +}; + +static const gb_fusion2_device h810m_s2h_device = +{ + &h810m_layout, + 0xCDE4CFFE, + 1, + "H810M S2H", +}; + +/*-------------------------------------------------------------*\ +| MSTR_ATX 048D:8297 | +| | +| Zone "Digital LED 1" : Linear | +| Zone "Back IO & Digital LED 2" : Linear | +| Zone "Chipset Logo" : Single | +| Zone "PCIe" : Single | +| Zone "XMP Logo" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static const gb_fusion2_zone back_io_dled_zone = +{ + HDR_D_LED2, + 8, + 1024, + "Back IO & Digital LED 2" +}; + +static const gb_fusion2_zone xmp_logo_zone = +{ + LED2, + 1, + 1, + "XMP Logo" +}; + +static gb_fusion2_layout mstr_atx_layout = +{ + &common_d_led1_zone, + &back_io_dled_zone, + &common_logo_led3_zone, + &common_pcie_led4_zone, + &xmp_logo_zone, + &common_12v_led5_zone, + nullptr, + nullptr +}; + +static const gb_fusion2_device z390_aorus_master_cf_device = +{ + &mstr_atx_layout, + 0xCDE4CFFE, + 1, + "Z390 AORUS MASTER-CF", +}; + +/*-------------------------------------------------------------*\ +| MSTR_ATX_3 048D:8297 | +| | +| Zone "Digital LED 1" : Linear | +| Zone "Digital LED 2" : Linear | +| Zone "Chipset Logo" : Single | +| Zone "XMP Logo" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static const gb_fusion2_zone aorus_logo_zone = +{ + LED7, + 1, + 1, + "Aorus Logo", +}; + +static const gb_fusion2_zone ess_logo_zone = +{ + LED4, + 1, + 1, + "ESS Logo", +}; + +static gb_fusion2_layout mstr_atx_3_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &aorus_logo_zone, + &ess_logo_zone, + &common_12v_led5_zone, + nullptr, + nullptr, + nullptr +}; + +static const gb_fusion2_device x570_aorus_master_device = +{ + &mstr_atx_3_layout, + 0xCDE4CFFE, + 1, + "X570 AORUS MASTER", +}; + +/*-------------------------------------------------------------*\ +| STD_ATX 048D:8297 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +| Zone "Back I/O" : Single | +| Zone "PCIe" : Single | +| Zone "CPU Header" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static const gb_fusion2_zone back_io_zone = +{ + LED1, + 1, + 1, + "Back I/O", +}; + +static const gb_fusion2_zone cpu_hdr_led2_zone = +{ + LED2, + 1, + 1, + "CPU Header", +}; + +static gb_fusion2_layout std_atx_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &back_io_zone, + &common_pcie_led4_zone, + &cpu_hdr_led2_zone, + &common_12v_led5_zone, + nullptr, + nullptr +}; + +static const gb_fusion2_device b550_aorus_elite_device = +{ + &std_atx_layout, + 0xCDE4CFFE, + 1, + "B550 AORUS ELITE", +}; + +static const gb_fusion2_device b550_aorus_pro_device = +{ + &std_atx_layout, + 0xCDE4CFFE, + 1, + "B550 AORUS PRO", +}; + +static const gb_fusion2_device x570_aorus_elite_device = +{ + &std_atx_layout, + 0xCDE4CFFE, + 1, + "X570 AORUS ELITE", +}; + +static const gb_fusion2_device x570_aorus_elite_wifi_device = +{ + &std_atx_layout, + 0xCDE4CFFE, + 1, + "X570 AORUS ELITE WIFI", +}; + +static const gb_fusion2_device x570_aorus_pro_device = +{ + &std_atx_layout, + 0xCDE4CFFE, + 1, + "X570 AORUS PRO", +}; + +static const gb_fusion2_device x570_aorus_pro_wifi_device = +{ + &std_atx_layout, + 0x0130005F, + 1, + "X570 AORUS PRO WIFI", +}; + +static const gb_fusion2_device x570_aorus_ultra_device = +{ + &std_atx_layout, + 0xCDE4CFFE, + 1, + "X570 AORUS ULTRA", +}; + +/*-------------------------------------------------------------------------*\ +| Generic Layout (Used when no match found) | +\*-------------------------------------------------------------------------*/ +static const gb_fusion2_device generic_device = +{ + &std_atx_layout, + 0xCDE4CFFE, + 1, + "GENERIC LAYOUT", +}; + +/*-------------------------------------------------------------*\ +| TRX50_AERO_D 048D:5702 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +| Zone "Accent" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout trx50_aero_d_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_accent_led3_zone, + &common_12v_led5_zone, + nullptr, + nullptr, + nullptr, + nullptr, +}; + +static const gb_fusion2_device trx50_aero_d_device = +{ + &trx50_aero_d_layout, + 0xCDE4CFFE, + 1, + "TRX50 AERO D", +}; + +static const gb_fusion2_device z790_aorus_elite_x_device = +{ + &trx50_aero_d_layout, + 0xCDE4CFFE, + 1, + "Z790 AORUS ELITE X", +}; + +static const gb_fusion2_device z790_aorus_elite_x_ax_device = +{ + &trx50_aero_d_layout, + 0xCDE4CFFE, + 1, + "Z790 AORUS ELITE X AX", +}; + +static const gb_fusion2_device z790_aorus_elite_x_wifi7_device = +{ + &trx50_aero_d_layout, + 0xCDE4CFFE, + 1, + "Z790 AORUS ELITE X WIFI7", +}; + +/*-------------------------------------------------------------*\ +| X570-PRO-AX 048D:5702 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +| Zone "Logo" : Single | +| Zone "Accent" : Single | +| Zone "CPU Header" : Single | +| Zone "12V RGB Strip" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout x570_pro_ax_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_aorus_logo_led1_zone, + &common_accent_led4_zone, + &common_cpu_hdr_led3_zone, + &common_12v_led2_zone, + &common_12v_led5_zone, + nullptr, +}; + +static const gb_fusion2_device b550_aorus_elite_ax_v2_device = +{ + &x570_pro_ax_layout, + 0xCDE4CFFE, + 1, + "B550 AORUS ELITE AX V2", +}; + +static const gb_fusion2_device x570s_aorus_pro_ax_device = +{ + &x570_pro_ax_layout, + 0xCDE4CFFE, + 1, + "X570S AORUS PRO AX", +}; + +/*-------------------------------------------------------------*\ +| X570S-AORUS_MSTR 048D:5702 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +| Zone "Logo" : Single | +| Zone "CPU Header" : Single | +| Zone "12V RGB Strip" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout x570s_aorus_mstr_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_aorus_logo_led1_zone, + &common_cpu_hdr_led3_zone, + &common_12v_led2_zone, + &common_12v_led5_zone, + nullptr, + nullptr, +}; + +static const gb_fusion2_device x570s_aorus_mstr_device = +{ + &x570s_aorus_mstr_layout, + 0xCDE4CFFE, + 1, + "X570S AORUS MASTER", +}; + +/*-------------------------------------------------------------*\ +| X670-ELITE 048D:8297 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +| Zone "CPU Header" : Single | +| Zone "12V RGB Strip" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout x670_elite_ax_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_cpu_hdr_led3_zone, + &common_12v_led2_zone, + &common_12v_led5_zone, + nullptr, + nullptr, + nullptr +}; + +static const gb_fusion2_device b650_aero_g_device = +{ + &x670_elite_ax_layout, + 0xCDE4CFFE, + 1, + "B650 AERO G", +}; + +static const gb_fusion2_device b650_aorus_pro_ax_device = +{ + &x670_elite_ax_layout, + 0xCDE4CFFE, + 1, + "B650 AORUS PRO AX", +}; + +static const gb_fusion2_device b650_gaming_x_device = +{ + &x670_elite_ax_layout, + 0xCDE4CFFE, + 1, + "B650 GAMING X", +}; + +static const gb_fusion2_device b650_gaming_x_ax_device = +{ + &x670_elite_ax_layout, + 0xCDE4CFFE, + 1, + "B650 GAMING X AX", +}; + +static const gb_fusion2_device b650_gaming_x_ax_v2_device = +{ + &x670_elite_ax_layout, + 0xCDE4CFFE, + 1, + "B650 GAMING X AX V2", +}; + +static const gb_fusion2_device b650_gaming_x_v2_device = +{ + &x670_elite_ax_layout, + 0xCDE4CFFE, + 1, + "B650 GAMING X V2", +}; + +static const gb_fusion2_device x570s_aero_g_device = +{ + &x670_elite_ax_layout, + 0xCDE4CFFE, + 1, + "X570S AERO G", +}; + +static const gb_fusion2_device x570s_ud_device = +{ + &x670_elite_ax_layout, + 0xCDE4CFFE, + 1, + "X570S UD", +}; + +static const gb_fusion2_device x670_aorus_elite_ax_device = +{ + &x670_elite_ax_layout, + 0xCDE4CFFE, + 1, + "X670 AORUS ELITE AX", +}; + +static const gb_fusion2_device x670_gaming_x_ax_device = +{ + &x670_elite_ax_layout, + 0xCDE4CFFE, + 1, + "X670 GAMING X AX", +}; + +/*-------------------------------------------------------------*\ +| X670-A-PRO-X 048D:5702 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Gen2 ARGB 2" : Linear | +| Zone "Cover Left : Single | +| Zone "Cover Right : Single | +| Zone "CPU Header" : Single | +| Zone "12V RGB Strip" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout x670_aorus_pro_x_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_cover_left_led4_zone, + &common_cover_right_led1_zone, + &common_12v_led2_zone, + &common_12v_led5_zone, + nullptr, + nullptr, +}; + +static const gb_fusion2_device x670_aorus_pro_x_device = +{ + &x670_aorus_pro_x_layout, + 0xCDE4CFFE, + 1, + "X670E AORUS PRO X", +}; + +/*-------------------------------------------------------------*\ +| B860-GAMING-X 048D:5711 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Gen2 ARGB 2" : Linear | +| Zone "Gen2 ARGB 3" : Linear | +| Zone "Accent" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout b860_gaming_x_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_d_led3_zone, + &common_accent_led1_zone, + &common_12v_led5_zone, + nullptr, + nullptr, + nullptr +}; + +static const gb_fusion2_device b860m_eagle_device = +{ + &b860_gaming_x_layout, + 0xCDE4CFFE, + 1, + "B860M EAGLE", +}; + +static const gb_fusion2_device b860m_eagle_ds3h_device = +{ + &b860_gaming_x_layout, + 0xCDE4CFFE, + 1, + "B860M EAGLE DS3H", +}; + +static const gb_fusion2_device b860m_eagle_ds3h_wifi6e_device = +{ + &b860_gaming_x_layout, + 0xCDE4CFFE, + 1, + "B860M EAGLE DS3H WIFI6E", +}; + +static const gb_fusion2_device b860m_eagle_plus_wifi6e_device = +{ + &b860_gaming_x_layout, + 0xCDE4CFFE, + 1, + "B860M EAGLE PLUS WIFI6E", +}; + +static const gb_fusion2_device b860m_eagle_wifi6_device = +{ + &b860_gaming_x_layout, + 0xCDE4CFFE, + 1, + "B860M EAGLE WIFI6", +}; + +static const gb_fusion2_device b860m_eagle_wifi6_v2_device = +{ + &b860_gaming_x_layout, + 0xCDE4CFFE, + 1, + "B860M EAGLE WIFI6 V2", +}; + +static const gb_fusion2_device b860m_gaming_x_device = +{ + &b860_gaming_x_layout, + 0xCDE4CFFE, + 1, + "B860M GAMING X", +}; + +static const gb_fusion2_device b860m_gaming_x_wifi6e_device = +{ + &b860_gaming_x_layout, + 0xCDE4CFFE, + 1, + "B860M GAMING X WIFI6E", +}; + +static const gb_fusion2_device b860m_power_device = +{ + &b860_gaming_x_layout, + 0xCDE4CFFE, + 1, + "B860M POWER", +}; + +/*-------------------------------------------------------------*\ +| X870-EGL-WIFI6 048D:5711 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Gen2 ARGB 2" : Linear | +| Zone "Gen2 ARGB 3" : Linear | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout x870_egl_wifi6_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_d_led3_zone, + &common_12v_led5_zone, + nullptr, + nullptr, + nullptr, + nullptr, +}; + +static const gb_fusion2_device b760m_c_v3_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "B760M C V3", +}; + +static const gb_fusion2_device b760m_gaming_x_ddr4_gen5_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "B760M GAMING X DDR4 GEN5", +}; + +static const gb_fusion2_device b760m_gaming_x_gen5_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "B760M GAMING X GEN5", +}; + +static const gb_fusion2_device b760m_gaming_x_wifi6e_ddr4_gen5_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "B760M GAMING X WIFI6E DDR4 GEN5", +}; + +static const gb_fusion2_device b760m_gaming_x_wifi6e_gen5_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "B760M GAMING X WIFI6E GEN5", +}; + +static const gb_fusion2_device b850_ai_top_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "B850 AI TOP", +}; + +static const gb_fusion2_device b850_eagle_ice_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "B850 EAGLE ICE", +}; + +static const gb_fusion2_device b850_eagle_wifi6e_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "B850 EAGLE WIFI6E", +}; + +static const gb_fusion2_device b850_eagle_wifi7_ice_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "B850 EAGLE WIFI7 ICE", +}; + +static const gb_fusion2_device b850_gaming_wifi6_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "B850 GAMING WIFI6", +}; + +static const gb_fusion2_device b850m_ds3h_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "B850M DS3H", +}; + +static const gb_fusion2_device b850m_ds3h_ice_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "B850M DS3H ICE", +}; + +static const gb_fusion2_device b850m_eagle_wifi6e_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "B850M EAGLE WIFI6E", +}; + +static const gb_fusion2_device b850m_eagle_wifi6e_ice_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "B850M EAGLE WIFI6E ICE", +}; + +static const gb_fusion2_device b850m_force_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "B850M FORCE", +}; + +static const gb_fusion2_device b850m_force_wifi6e_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "B850M FORCE WIFI6E", +}; + +static const gb_fusion2_device b860_force_wifi6e_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "B860 EAGLE WIFI6E", +}; + +static const gb_fusion2_device b860m_gaming_wifi6_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "B860M GAMING WIFI6", +}; + +static const gb_fusion2_device trx50_ai_top_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "TRX50 AI TOP", +}; + +static const gb_fusion2_device w790_ai_top_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "W790 AI TOP", +}; + +static const gb_fusion2_device w880_ai_top_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "W880 AI TOP", +}; + +static const gb_fusion2_device z890_aero_d_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "Z890 AERO D", +}; + +static const gb_fusion2_device z890_aero_g_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "Z890 AERO G", +}; + +static const gb_fusion2_device z890_ai_top_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "Z890 AI TOP", +}; + +static const gb_fusion2_device z890_aorus_tachyon_ice_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "Z890 AORUS TACHYON ICE", +}; + +static const gb_fusion2_device z890_ud_wifi6e_device = +{ + &x870_egl_wifi6_layout, + 0xCDE4CFFE, + 1, + "Z890 UD WIFI6E", +}; + +/*-------------------------------------------------------------*\ +| X870E-PRO 048D:5711 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Gen2 ARGB 2" : Linear | +| Zone "Gen2 ARGB 3" : Linear | +| Zone "Accent" : Single | +| Zone "Logo" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout x870e_pro_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_d_led3_zone, + &common_accent_led11_zone, + &common_logo_led10_zone, + &common_12v_led5_zone, + nullptr, + nullptr, +}; + +static const gb_fusion2_device x870e_aorus_pro_device = +{ + &x870e_pro_layout, + 0xCDE4CFFE, + 1, + "X870E AORUS PRO", +}; + +static const gb_fusion2_device x870e_aorus_pro_ice_device = +{ + &x870e_pro_layout, + 0xCDE4CFFE, + 1, + "X870E AORUS PRO ICE", +}; + +static const gb_fusion2_device x870e_aorus_master_device = +{ + &x870e_pro_layout, + 0xCDE4CFFE, + 1, + "X870E AORUS MASTER", +}; + +/*-------------------------------------------------------------*\ +| X870-WIFI7 048D:5711 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Gen2 ARGB 2" : Linear | +| Zone "Gen2 ARGB 3" : Linear | +| Zone "Accent" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout x870_wifi7_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_d_led3_zone, + &common_accent_led3_zone, + &common_12v_led5_zone, + nullptr, + nullptr, + nullptr +}; + +static const gb_fusion2_device b760m_aorus_elite_ddr4_gen5_device = +{ + &x870_wifi7_layout, + 0xCDE4CFFE, + 1, + "B760M AORUS ELITE DDR4 GEN5", +}; + +static const gb_fusion2_device b760m_aorus_elite_gen5_device = +{ + &x870_wifi7_layout, + 0xCDE4CFFE, + 1, + "B760M AORUS ELITE GEN5", +}; + +static const gb_fusion2_device b760m_aorus_elite_wifi6_ddr4_gen5_device = +{ + &x870_wifi7_layout, + 0xCDE4CFFE, + 1, + "B760M AORUS ELITE WIFI6 DDR4 GEN5", +}; + +static const gb_fusion2_device b760m_aorus_elite_wifi6_gen5_device = +{ + &x870_wifi7_layout, + 0xCDE4CFFE, + 1, + "B760M AORUS ELITE WIFI6 GEN5", +}; + +static const gb_fusion2_device b840_aorus_elite_wifi6e_device = +{ + &x870_wifi7_layout, + 0xCDE4CFFE, + 1, + "B840M AORUS ELITE WIFI6E", +}; + +static const gb_fusion2_device b850_aorus_elite_wifi7_device = +{ + &x870_wifi7_layout, + 0xCDE4CFFE, + 1, + "B850 AORUS ELITE WIFI7", +}; + +static const gb_fusion2_device b850_aorus_elite_wifi7_ice_device = +{ + &x870_wifi7_layout, + 0xCDE4CFFE, + 1, + "B850 AORUS ELITE WIFI7 ICE", +}; + +static const gb_fusion2_device b850_gaming_x_wifi6e_device = +{ + &x870_wifi7_layout, + 0xCDE4CFFE, + 1, + "B850 GAMING X WIFI6E", +}; + +static const gb_fusion2_device b850m_aorus_elite_device = +{ + &x870_wifi7_layout, + 0xCDE4CFFE, + 1, + "B850M AORUS ELITE", +}; + +static const gb_fusion2_device b850m_aorus_elite_wifi6e_device = +{ + &x870_wifi7_layout, + 0xCDE4CFFE, + 1, + "B850M AORUS ELITE WIFI6E", +}; + +static const gb_fusion2_device b850m_aorus_elite_wifi6e_ice_device = +{ + &x870_wifi7_layout, + 0xCDE4CFFE, + 1, + "B850M AORUS ELITE WIFI6E ICE", +}; + +static const gb_fusion2_device b850m_gaming_x_wifi6e_device = +{ + &x870_wifi7_layout, + 0xCDE4CFFE, + 1, + "B850M GAMING X WIFI6E", +}; + +static const gb_fusion2_device x870_aorus_elite_wifi7_device = +{ + &x870_wifi7_layout, + 0xCDE4CFFE, + 1, + "X870 AORUS ELITE WIFI7", +}; + +static const gb_fusion2_device x870_aorus_elite_wifi7_ice_device = +{ + &x870_wifi7_layout, + 0xCDE4CFFE, + 1, + "X870 AORUS ELITE WIFI7 ICE", +}; + +static const gb_fusion2_device x870_eagle_wifi7_device = +{ + &x870_wifi7_layout, + 0xCDE4CFFE, + 1, + "X870 EAGLE WIFI7", +}; + +static const gb_fusion2_device x870_gaming_wifi6_device = +{ + &x870_wifi7_layout, + 0xCDE4CFFE, + 1, + "X870 GAMING WIFI6", +}; + +static const gb_fusion2_device x870_gaming_x_wifi_device = +{ + &x870_wifi7_layout, + 0xCDE4CFFE, + 1, + "X870 GAMING X WIFI", +}; + +/*-------------------------------------------------------------*\ +| X870E-WIFI7 048D:5711 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Gen2 ARGB 2" : Linear | +| Zone "Gen2 ARGB 3" : Linear | +| Zone "Accent" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout x870e_wifi7_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_d_led3_zone, + &common_accent_led11_zone, + &common_12v_led5_zone, + nullptr, + nullptr, + nullptr +}; + +static const gb_fusion2_device x870e_aorus_elite_wifi7_device = +{ + &x870e_wifi7_layout, + 0xCDE4CFFE, + 1, + "X870E AORUS ELITE WIFI7", +}; + +static const gb_fusion2_device x870e_aorus_elite_wifi7_ice_device = +{ + &x870e_wifi7_layout, + 0xCDE4CFFE, + 1, + "X870E AORUS ELITE WIFI7 ICE", +}; + +/*-------------------------------------------------------------*\ +| X870E-XTRM-AI 048D:5711 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Gen2 ARGB 2" : Linear | +| Zone "Gen2 ARGB 3" : Linear | +| Zone "Accent" : Single | +| Zone "Logo" : Single | +| Zone "Antenna Accent" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static const gb_fusion2_zone antenna_zone = +{ + LED9, + 1, + 1, + "Antenna Accent" +}; + +static gb_fusion2_layout x870e_xtrm_ai_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_d_led3_zone, + &common_accent_led11_zone, + &common_logo_led10_zone, + &antenna_zone, + &common_12v_led5_zone, + nullptr, +}; + +static const gb_fusion2_device x870e_aorus_xtrm_ai_device = +{ + &x870e_xtrm_ai_layout, + 0xCDE4CFFE, + 1, + "X870E AORUS XTREME AI TOP", +}; + +/*-------------------------------------------------------------*\ +| Z690-ELITE 048D:5702 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +| Zone "Accent" : Single | +| Zone "Accent" : Single | +| Zone "Logo" : Single | +| Zone "12V RGB Strip" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout z690_elite_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_accent_led3_zone, + &common_accent_led4_zone, + &common_aorus_logo_led1_zone, + &common_12v_led2_zone, + &common_12v_led5_zone, + nullptr, +}; + +static const gb_fusion2_device b760_aorus_master_ddr4_device = +{ + &z690_elite_layout, + 0xCDE4CFFE, + 1, + "B760 AORUS MASTER DDR4", +}; + +static const gb_fusion2_device z690_aorus_elite_device = +{ + &z690_elite_layout, + 0xCDE4CFFE, + 1, + "Z690 AORUS ELITE", +}; + +static const gb_fusion2_device z690_aorus_elite_ax_device = +{ + &z690_elite_layout, + 0xCDE4CFFE, + 1, + "Z690 AORUS ELITE AX", +}; + +static const gb_fusion2_device z690_aorus_elite_ax_ddr4_device = +{ + &z690_elite_layout, + 0xCDE4CFFE, + 1, + "Z690 AORUS ELITE AX DDR4", +}; + +static const gb_fusion2_device z690_aorus_elite_ddr4_device = +{ + &z690_elite_layout, + 0xCDE4CFFE, + 1, + "Z690 AORUS ELITE DDR4", +}; + +/*-------------------------------------------------------------*\ +| Z790-D 048D:5702 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout z790_d_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr +}; + +static const gb_fusion2_device b860i_aorus_pro_ice_device = +{ + &z790_d_layout, + 0xCDE4CFFE, + 1, + "B860I AORUS PRO ICE", +}; + +static const gb_fusion2_device h610m_d3h_ddr4_device = +{ + &z790_d_layout, + 0xCDE4CFFE, + 1, + "H610M D3H DDR4", +}; + +static const gb_fusion2_device h610m_d3h_wifi_ddr4_device = +{ + &z790_d_layout, + 0xCDE4CFFE, + 1, + "H610M D3H WIFI DDR4", +}; + +static const gb_fusion2_device h610m_gaming_wifi_ddr4_device = +{ + &z790_d_layout, + 0xCDE4CFFE, + 1, + "H610M GAMING WIFI DDR4", +}; + +static const gb_fusion2_device z790_d_device = +{ + &z790_d_layout, + 0xCDE4CFFE, + 1, + "Z790 D", +}; + +static const gb_fusion2_device z790_d_ac_device = +{ + &z790_d_layout, + 0xCDE4CFFE, + 1, + "Z790 D AC", +}; + +static const gb_fusion2_device z790_d_ax_device = +{ + &z790_d_layout, + 0xCDE4CFFE, + 1, + "Z790 D AX", +}; + +static const gb_fusion2_device z790_d_wifi_device = +{ + &z790_d_layout, + 0xCDE4CFFE, + 1, + "Z790 D WIFI", +}; + +static const gb_fusion2_device z790_eagle_device = +{ + &z790_d_layout, + 0xCDE4CFFE, + 1, + "Z790 EAGLE", +}; + +static const gb_fusion2_device z790_eagle_ax_device = +{ + &z790_d_layout, + 0xCDE4CFFE, + 1, + "Z790 EAGLE AX", +}; + +static const gb_fusion2_device z790_ud_device = +{ + &z790_d_layout, + 0xCDE4CFFE, + 1, + "Z790 UD", +}; + +static const gb_fusion2_device z790_ud_ac_device = +{ + &z790_d_layout, + 0xCDE4CFFE, + 1, + "Z790 UD AC", +}; + +static const gb_fusion2_device z790_ud_ax_device = +{ + &z790_d_layout, + 0xCDE4CFFE, + 1, + "Z790 UD AX", +}; + +/*-------------------------------------------------------------*\ +| Z790-ELITE 048D:5702 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +| Zone "Logo" : Single | +| Zone "12V RGB Strip" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout z790_elite_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_logo_led3_zone, + &common_12v_led2_zone, + &common_12v_led5_zone, + nullptr, + nullptr, + nullptr +}; + +static const gb_fusion2_device z790_aorus_elite_device = +{ + &z790_elite_layout, + 0xCDE4CFFE, + 1, + "Z790 AORUS ELITE", +}; + +static const gb_fusion2_device z790_aorus_elite_ax_device = +{ + &z790_elite_layout, + 0xCDE4CFFE, + 1, + "Z790 AORUS ELITE AX", +}; + +static const gb_fusion2_device z790_aorus_elite_ax_ddr4_device = +{ + &z790_elite_layout, + 0xCDE4CFFE, + 1, + "Z790 AORUS ELITE AX DDR4", +}; + +static const gb_fusion2_device z790_aorus_elite_ax_ice_device = +{ + &z790_elite_layout, + 0xCDE4CFFE, + 1, + "Z790 AORUS ELITE AX ICE", +}; + +static const gb_fusion2_device z790_aorus_elite_ax_w_device = +{ + &z790_elite_layout, + 0xCDE4CFFE, + 1, + "Z790 AORUS ELITE AX-W", +}; + +static const gb_fusion2_device z790_aorus_elite_ddr4_device = +{ + &z790_elite_layout, + 0xCDE4CFFE, + 1, + "Z790 AORUS ELITE DDR4", +}; + +static const gb_fusion2_device z790m_aorus_elite_device = +{ + &z790_elite_layout, + 0xCDE4CFFE, + 1, + "Z790M AORUS ELITE", +}; + +static const gb_fusion2_device z790m_aorus_elite_ax_device = +{ + &z790_elite_layout, + 0xCDE4CFFE, + 1, + "Z790M AORUS ELITE AX", +}; + +static const gb_fusion2_device z790m_aorus_elite_ax_ice_device = +{ + &z790_elite_layout, + 0xCDE4CFFE, + 1, + "Z790M AORUS ELITE AX ICE", +}; + +/*-------------------------------------------------------------*\ +| Z790-MSTR-X 048D:5702 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +| Zone "Logo" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout z790_mstr_x_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_aorus_logo_led1_zone, + &common_12v_led5_zone, + nullptr, + nullptr, + nullptr, + nullptr, +}; + +static const gb_fusion2_device z790_aorus_master_x_device = +{ + &z790_mstr_x_layout, + 0xCDE4CFFE, + 1, + "Z790 AORUS MASTER X", +}; + +static const gb_fusion2_device z790_aorus_tachyon_x_device = +{ + &z790_mstr_x_layout, + 0xCDE4CFFE, + 1, + "Z790 AORUS TACHYON X", +}; + +/*-------------------------------------------------------------*\ +| Z790-PRO-X 048D:5702 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +| Zone "Logo" : Single | +| Zone "Accent" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout z790_pro_x_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_aorus_logo_led1_zone, + &common_accent_led4_zone, + &common_12v_led5_zone, + nullptr, + nullptr, + nullptr, +}; + +static const gb_fusion2_device z790_aorus_pro_x_device = +{ + &z790_pro_x_layout, + 0xCDE4CFFE, + 1, + "Z790 AORUS PRO X", +}; + +static const gb_fusion2_device z790_aorus_pro_x_wifi7_device = +{ + &z790_pro_x_layout, + 0xCDE4CFFE, + 1, + "Z790 AORUS PRO X WIFI7", +}; + +/*-------------------------------------------------------------*\ +| Z790-XTRM 048D:5702 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +| Zone "Accent" : Single | +| Zone "12V RGB Strip" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout z790_xtrm_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_accent_led3_zone, + &common_12v_led2_zone, + &common_12v_led5_zone, + nullptr, + nullptr, + nullptr, +}; + +static const gb_fusion2_device b760m_aorus_elite_device = +{ + &z790_xtrm_layout, + 0xCDE4CFFE, + 1, + "B760M AORUS ELITE", +}; + +static const gb_fusion2_device b760m_aorus_elite_ax_device = +{ + &z790_xtrm_layout, + 0xCDE4CFFE, + 1, + "B760M AORUS ELITE AX", +}; + +static const gb_fusion2_device b760m_aorus_elite_ax_ddr4_device = +{ + &z790_xtrm_layout, + 0xCDE4CFFE, + 1, + "B760M AORUS ELITE AX DDR4", +}; + +static const gb_fusion2_device b760m_aorus_elite_ddr4_device = +{ + &z790_xtrm_layout, + 0xCDE4CFFE, + 1, + "B760M AORUS ELITE DDR4", +}; + +static const gb_fusion2_device b760m_aorus_pro_device = +{ + &z790_xtrm_layout, + 0xCDE4CFFE, + 1, + "B760M AORUS PRO", +}; + +static const gb_fusion2_device b760m_aorus_pro_ax_device = +{ + &z790_xtrm_layout, + 0xCDE4CFFE, + 1, + "B760M AORUS PRO AX", +}; + +static const gb_fusion2_device b760m_aorus_pro_ax_ddr4_device = +{ + &z790_xtrm_layout, + 0xCDE4CFFE, + 1, + "B760M AORUS PRO AX DDR4", +}; + +static const gb_fusion2_device b760m_aorus_pro_ddr4_device = +{ + &z790_xtrm_layout, + 0xCDE4CFFE, + 1, + "B760M AORUS PRO DDR4", +}; + +static const gb_fusion2_device z790_aorus_tachyon_device = +{ + &z790_xtrm_layout, + 0xCDE4CFFE, + 1, + "Z790 AORUS TACHYON", +}; + +static const gb_fusion2_device z790_aorus_xtreme_device = +{ + &z790_xtrm_layout, + 0xCDE4CFFE, + 1, + "Z790 AORUS XTREME", +}; + +/*-------------------------------------------------------------*\ +| Z790-XTRM-X 048D:5702 | +| | +| Zone "D_LED1" : Linear | +| Zone "D_LED2" : Linear | +| Zone "Accent" : Single | +| Zone "12V RGB Strip" : Single | +| Zone "12V RGB Strip" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout z790_xtrm_x_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_accent_led3_zone, + &common_12v_led5_zone, + &common_12v_led4_zone, + &common_12v_led2_zone, + nullptr, + nullptr, +}; + +static const gb_fusion2_device z790_aorus_xtreme_x_device = +{ + &z790_xtrm_x_layout, + 0xCDE4CFFE, + 1, + "Z790 AORUS XTREME X", +}; + +static const gb_fusion2_device z790_aorus_xtreme_x_ice_device = +{ + &z790_xtrm_x_layout, + 0xCDE4CFFE, + 1, + "Z790 AORUS XTREME X ICE", +}; + +/*-------------------------------------------------------------*\ +| Z890-MSTR 048D:5711 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Gen2 ARGB 2" : Linear | +| Zone "Gen2 ARGB 3" : Linear | +| Zone "Gen2 ARGB 4" : Linear | +| Zone "Accent" : Single | +| Zone "Logo" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout z890_mstr_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_d_led3_zone, + &common_d_led4_zone, + &common_accent_led3_zone, + &common_logo_led10_zone, + &common_12v_led5_zone, + nullptr, +}; + +static const gb_fusion2_device z890_aorus_mstr_device = +{ + &z890_mstr_layout, + 0xCDE4CFFE, + 1, + "Z890 AORUS MASTER", +}; + +/*-------------------------------------------------------------*\ +| Z890-MSTR-AI-TOP 048D:5711 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Gen2 ARGB 2" : Linear | +| Zone "Gen2 ARGB 3" : Linear | +| Zone "Gen2 ARGB 4" : Linear | +| Zone "Accent" : Single | +| Zone "Logo" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout z890_mstr_ai_top_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_d_led3_zone, + &common_d_led4_zone, + &common_accent_led11_zone, + &common_logo_led10_zone, + &common_12v_led5_zone, + nullptr, +}; + +static const gb_fusion2_device z890_aorus_mstr_ai_top_device = +{ + &z890_mstr_ai_top_layout, + 0xCDE4CFFE, + 1, + "Z890 AORUS MASTER AI TOP", +}; + +/*-------------------------------------------------------------*\ +| Z890-ULTRA 048D:5711 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Gen2 ARGB 2" : Linear | +| Zone "Logo" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout z890_ultra_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_logo_led10_zone, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, +}; + +static const gb_fusion2_device z890i_aorus_ultra_device = +{ + &z890_ultra_layout, + 0xCDE4CFFE, + 1, + "Z890I AORUS ULTRA", +}; + +/*-------------------------------------------------------------*\ +| Z890-XTRM-AI 048D:5711 | +| | +| Zone "Gen2 ARGB 1" : Linear | +| Zone "Gen2 ARGB 2" : Linear | +| Zone "Gen2 ARGB 3" : Linear | +| Zone "Gen2 ARGB 4" : Linear | +| Zone "Logo" : Single | +| Zone "Antenna Accent" : Single | +| Zone "12V RGB Strip" : Single | +\*-------------------------------------------------------------*/ +static gb_fusion2_layout z890_xtrm_ai_layout = +{ + &common_d_led1_zone, + &common_d_led2_zone, + &common_d_led3_zone, + &common_d_led4_zone, + &common_logo_led10_zone, + &antenna_zone, + &common_12v_led5_zone, + nullptr, +}; + +static const gb_fusion2_device z890_aorus_xtrm_ai_top_device = +{ + &z890_xtrm_ai_layout, + 0xCDE4CFFE, + 1, + "Z890 AORUS XTREME AI TOP", +}; + +/*-------------------------------------------------------------------------*\ +| DEVICE MASTER LIST | +\*-------------------------------------------------------------------------*/ +const gb_fusion2_device* gb_fusion2_device_list_data[] = +{ +/*-------------------------------------------------------------------------*\ +| Generic Layout (Used when no match found) | +\*-------------------------------------------------------------------------*/ + &generic_device, +/*-----------------------------------------------------------------*\ +| IT5702 Devices | +\*-----------------------------------------------------------------*/ + &a620i_ax_5702_device, + &a620m_c_device, + &a620m_ds3h_5702_device, + &a620m_d2h_device, + &a620m_gaming_x_5702_device, + &a620m_gaming_x_ax_5702_device, + &a620m_h_5702_device, + &a620m_s2h_5702_device, + &b550_aorus_elite_device, + &b550_aorus_pro_device, + &b550_aorus_elite_ax_v2_device, + &b550i_aorus_pro_ax_device, + &b650_aorus_elite_device, + &b650_aorus_elite_ax_device, + &b650_aorus_elite_ax_ice_device, + &b650_aorus_elite_ax_v2_device, + &b650_aorus_elite_v2_device, + &b650_aorus_pro_ax_device, + &b650_aero_g_device, + &b650i_aorus_ultra_device, + &b650i_ax_device, + &b650_eagle_device, + &b650_eagle_ax_device, + &b650_gaming_x_device, + &b650_gaming_x_ax_device, + &b650_gaming_x_ax_v2_device, + &b650_gaming_x_v2_device, + &b650_ud_ac_device, + &b650_ud_ax_device, + &b650e_aorus_elite_x_ax_ice_device, + &b650e_aorus_mstr_device, + &b650e_aorus_pro_x_usb4_device, + &b650e_aorus_tachyon_device, + &b650m_aorus_elite_device, + &b650m_aorus_elite_ax_device, + &b650m_aorus_elite_ax_ice_device, + &b650m_aorus_pro_device, + &b650m_aorus_pro_ax_device, + &b650m_c_v2_device, + &b650m_c_v3_device, + &b650m_d2h_device, + &b650m_d2hp_device, + &b650m_d3hp_device, + &b650m_d3hp_ax_device, + &b650m_ds3h_device, + &b650m_gaming_plus_wifi_device, + &b650m_gaming_wifi_device, + &b650m_gaming_wifi6_device, + &b650m_gaming_x_ax_device, + &b650m_h_device, + &b650m_k_device, + &b650m_s2h_device, + &b760_aorus_elite_device, + &b760_aorus_elite_ax_device, + &b760_aorus_master_ddr4_device, + &b760_ds3h_device, + &b760_ds3h_ac_device, + &b760_ds3h_ac_ddr4_device, + &b760_ds3h_ax_device, + &b760_ds3h_ax_ddr4_device, + &b760_ds3h_ax_v2_device, + &b760_ds3h_ddr4_device, + &b760i_aorus_pro_device, + &b760i_aorus_pro_ddr4_device, + &b760_gaming_x_device, + &b760_gaming_x_ax_device, + &b760_gaming_x_ax_ddr4_device, + &b760_gaming_x_ddr4_device, + &b760m_aorus_elite_device, + &b760m_aorus_elite_ax_device, + &b760m_aorus_elite_ax_ddr4_device, + &b760m_aorus_elite_ddr4_device, + &b760m_aorus_pro_device, + &b760m_aorus_pro_ax_device, + &b760m_aorus_pro_ax_ddr4_device, + &b760m_aorus_pro_ddr4_device, + &b760m_c_device, + &b760m_c_v2_device, + &b760m_d2h_device, + &b760m_d2h_ddr4_device, + &b760m_d3h_device, + &b760m_d3h_ddr4_device, + &b760m_d3hp_device, + &b760m_d3hp_ddr4_device, + &b760m_d3hp_wifi6_device, + &b760m_ds3h_device, + &b760m_ds3h_ax_device, + &b760m_ds3h_ax_ddr4_device, + &b760m_ds3h_ddr4_device, + &b760m_ds3h_gen_5_device, + &b760m_elite_x_ax_device, + &b760m_g_ax_device, + &b760m_gaming_device, + &b760m_gaming_ac_device, + &b760m_gaming_ac_ddr4_device, + &b760m_gaming_ddr4_device, + &b760m_gaming_plus_wifi_ddr4_device, + &b760m_gaming_wifi_device, + &b760m_gaming_wifi_plus_device, + &b760m_gaming_x_device, + &b760m_gaming_x_ax_device, + &b760m_gaming_x_ax_ddr4_device, + &b760m_gaming_x_ddr4_device, + &b760m_power_device, + &b760m_power_ddr4_device, + &h610m_d3h_ddr4_device, + &h610m_d3h_wifi_ddr4_device, + &h610m_gaming_wifi_ddr4_device, + &trx50_aero_d_device, + &x570s_aero_g_device, + &x570s_aorus_elite_device, + &x570s_aorus_elite_ax_device, + &x570s_aorus_mstr_device, + &x570s_aorus_pro_ax_device, + &x570s_gaming_x_device, + &x570si_aorus_pro_ax_device, + &x570s_ud_device, + &x670_aorus_elite_ax_device, + &x670_gaming_x_ax_device, + &x670_gaming_x_ax_v2_device, + &x670e_aorus_mstr_device, + &x670_aorus_pro_x_device, + &x670e_aorus_xtrm_device, + &z690_aorus_elite_device, + &z690_aorus_elite_ax_device, + &z690_aorus_elite_ax_ddr4_device, + &z690_aorus_elite_ddr4_device, + &z790_aero_g_device, + &z790_aorus_elite_device, + &z790_aorus_elite_ax_device, + &z790_aorus_elite_ax_ddr4_device, + &z790_aorus_elite_ax_ice_device, + &z790_aorus_elite_ax_w_device, + &z790_aorus_elite_ddr4_device, + &z790_aorus_elite_x_device, + &z790_aorus_elite_x_ax_device, + &z790_aorus_elite_x_wifi7_device, + &z790_aorus_pro_x_device, + &z790_aorus_pro_x_wifi7_device, + &z790_aorus_mstr_device, + &z790_aorus_master_x_device, + &z790_aorus_tachyon_device, + &z790_aorus_tachyon_x_device, + &z790_aorus_xtreme_device, + &z790_aorus_xtreme_x_device, + &z790_aorus_xtreme_x_ice_device, + &z790_d_device, + &z790_d_ac_device, + &z790_d_ax_device, + &z790_d_wifi_device, + &z790_eagle_device, + &z790_eagle_ax_device, + &z790_gaming_plus_ax_device, + &z790_gaming_x_device, + &z790_gaming_x_ax_device, + &z790i_aorus_ultra_device, + &z790m_aorus_elite_device, + &z790m_aorus_elite_ax_device, + &z790m_aorus_elite_ax_ice_device, + &z790_s_ddr4_device, + &z790_s_wifi_ddr4_device, + &z790_ud_device, + &z790_ud_ac_device, + &z790_ud_ax_device, + +/*-----------------------------------------------------------------*\ +| IT5711 Devices | +\*-----------------------------------------------------------------*/ + &a620i_ax_5711_device, + &a620m_ds3h_5711_device, + &a620m_gaming_x_5711_device, + &a620m_gaming_x_ax_5711_device, + &a620m_h_5711_device, + &a620m_s2h_5711_device, + &b650e_aorus_stealth_ice_device, + &b760_ds3h_gen5_device, + &b760_ds3h_wifi6e_gen5_device, + &b760_gaming_x_ddr4_gen5_device, + &b760_gaming_x_gen5_device, + &b760_gaming_x_wifi6_gen5_device, + &b760m_aorus_elite_ddr4_gen5_device, + &b760m_aorus_elite_gen5_device, + &b760m_aorus_elite_wifi6_ddr4_gen5_device, + &b760m_aorus_elite_wifi6_gen5_device, + &b760m_c_v3_device, + &b760m_ds3h_ddr4_gen_5_device, + &b760m_ds3h_wifi6e_ddr4_gen_5_device, + &b760m_gaming_wifi6_plus_gen5_device, + &b760m_gaming_wifi6e_gen_5_device, + &b760m_gaming_x_ddr4_gen5_device, + &b760m_gaming_x_gen5_device, + &b760m_gaming_x_wifi6e_ddr4_gen5_device, + &b760m_gaming_x_wifi6e_gen5_device, + &b840_aorus_elite_wifi6e_device, + &b840m_d2h_device, + &b840m_ds3h_device, + &b840m_eagle_wifi6_device, + &b850_ai_top_device, + &b850_aorus_elite_wifi7_device, + &b850_aorus_elite_wifi7_ice_device, + &b850_eagle_ice_device, + &b850_eagle_wifi6e_device, + &b850_eagle_wifi7_ice_device, + &b850_gaming_wifi6_device, + &b850_gaming_x_wifi6e_device, + &b850i_aorus_pro_device, + &b850m_aorus_elite_device, + &b850m_aorus_elite_wifi6e_device, + &b850m_aorus_elite_wifi6e_ice_device, + &b850m_d3hp_device, + &b850m_aorus_pro_wifi7_device, + &b850m_ds3h_device, + &b850m_ds3h_ice_device, + &b850m_eagle_wifi6e_device, + &b850m_eagle_wifi6e_ice_device, + &b850m_force_device, + &b850m_force_wifi6e_device, + &b850m_gaming_x_wifi6e_device, + &b860_aorus_elite_wifi7_ice_device, + &b860i_aorus_pro_ice_device, + &b860m_aorus_elite_device, + &b860m_aorus_elite_wifi6e_device, + &b860m_aorus_elite_wifi6e_ice_device, + &b860m_aorus_pro_wifi7_device, + &b860m_d2h_device, + &b860m_eagle_device, + &b860m_eagle_ds3h_device, + &b860m_eagle_ds3h_wifi6e_device, + &b860m_eagle_plus_wifi6e_device, + &b860m_eagle_wifi6_device, + &b860m_eagle_wifi6_v2_device, + &b860m_gaming_x_device, + &b860m_gaming_x_wifi6e_device, + &b860m_gaming_wifi6_device, + &b860m_power_device, + &trx50_ai_top_device, + &w790_ai_top_device, + &w880_ai_top_device, + &x870_aorus_elite_wifi7_device, + &x870_aorus_elite_wifi7_ice_device, + &x870_eagle_wifi7_device, + &x870e_aorus_elite_wifi7_device, + &x870e_aorus_elite_wifi7_ice_device, + &x870e_aorus_master_device, + &x870e_aorus_pro_device, + &x870e_aorus_pro_ice_device, + &x870e_aorus_xtrm_ai_device, + &x870_gaming_wifi6_device, + &x870_gaming_x_wifi_device, + &x870i_aorus_pro_device, + &x870i_aorus_pro_ice_device, + &z890_aorus_elite_wifi7_device, + &z890_aorus_elite_wifi7_ice_device, + &z890_aorus_elite_x_ice_device, + &z890_aorus_mstr_device, + &z890_aorus_mstr_ai_top_device, + &z890_aorus_pro_ice_device, + &z890_aero_d_device, + &z890_aero_g_device, + &z890_eagle_device, + &z890_eagle_wifi7_device, + &z890_ai_top_device, + &z890_aorus_tachyon_ice_device, + &z890_aorus_xtrm_ai_top_device, + &z890_ud_wifi6e_device, + &z890_gaming_x_wifi7_device, + &z890i_aorus_ultra_device, + &z890m_aorus_elite_wifi7_device, + &z890m_aorus_elite_wifi7_ice_device, + &z890m_gaming_x_device, + +/*-----------------------------------------------------------------*\ +| IT8297 Devices | +\*-----------------------------------------------------------------*/ + &x570_aorus_elite_device, + &x570_aorus_elite_wifi_device, + &x570_aorus_master_device, + &x570_aorus_pro_device, + &x570_aorus_pro_wifi_device, + &x570_aorus_ultra_device, + &x570i_aorus_pro_wifi_device, + &z390_aorus_master_cf_device, + +/*-----------------------------------------------------------------*\ +| IT8950 Devices | +\*-----------------------------------------------------------------*/ + &h810m_gaming_wifi6_device, + &h810m_h_device, + &h810m_s2h_device, +}; + +const unsigned int GB_FUSION2_DEVICE_COUNT = (sizeof(gb_fusion2_device_list_data) / sizeof(gb_fusion2_device_list_data[ 0 ])); +const gb_fusion2_device** gb_fusion2_device_list = gb_fusion2_device_list_data; + diff --git a/Controllers/GigabyteRGBFusion2USBController/GigabyteFusion2USB_Devices.h b/Controllers/GigabyteRGBFusion2USBController/GigabyteFusion2USB_Devices.h new file mode 100644 index 000000000..e4baf973f --- /dev/null +++ b/Controllers/GigabyteRGBFusion2USBController/GigabyteFusion2USB_Devices.h @@ -0,0 +1,115 @@ +/*---------------------------------------------------------*\ +| Gigabyte_Fusion2_USB_Devices.h | +| | +| Gigabyte Fusion 2 USB Device layouts and | +| and mapping to the device IDs stored on chip | +| | +| megadjc 31 Jul 2025 | +| chrism 29 Aug 2025 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-only | +\*---------------------------------------------------------*/ + +#pragma once + +#include +#include "RGBController.h" + +#define GB_FUSION2_ZONES_MAX 8 + +/*--------------------------------------------------------*\ +| Base LED mappings found on all controllers. | +\*--------------------------------------------------------*/ +enum GB_FUSION2_LED_IDX +{ + LED1 = 0, + LED2 = 1, + LED3 = 2, + LED4 = 3, + LED5 = 4, + LED6 = 5, + LED7 = 6, + LED8 = 7, + +/*--------------------------------------------------------*\ +| IT8297/IT5701/IT5702 ARGB Headers | +\*--------------------------------------------------------*/ + HDR_D_LED1 = 5, + HDR_D_LED2 = 6, + HDR_D_LED1_ARGB = 0x58, + HDR_D_LED2_ARGB = 0x59, + +/*--------------------------------------------------------*\ +| Additional LED mappings found on IT5711 controllers. | +\*--------------------------------------------------------*/ + LED9 = 8, + LED10 = 9, + LED11 = 10, + +/*--------------------------------------------------------*\ +| IT5711 additional ARGB Headers. | +\*--------------------------------------------------------*/ + HDR_D_LED3 = 7, + HDR_D_LED4 = 8, + HDR_D_LED3_ARGB = 0x62, + HDR_D_LED4_ARGB = 0x63, +}; + +/*-------------------------------------------------*\ +| LED mapping | +\*-------------------------------------------------*/ +using FwdLedHeaders = std::map; +using RvrseLedHeaders = std::map; +const FwdLedHeaders LedLookup = +{ + {"LED1", LED1 }, + {"LED2", LED2 }, + {"LED3", LED3 }, + {"LED4", LED4 }, + {"LED5", LED5 }, + {"LED6", LED6 }, + {"LED7", LED7 }, + {"LED8", LED8 }, + {"LED9", LED9 }, + {"LED10", LED10 }, + {"LED11", LED11 }, + {"HDR_D_LED1", HDR_D_LED1 }, + {"HDR_D_LED2", HDR_D_LED2 }, + {"HDR_D_LED3", HDR_D_LED3 }, + {"HDR_D_LED4", HDR_D_LED4 }, + /*-------------------------------------------------*\ + | The DLED ARGB index is not required for parsing | + \*-------------------------------------------------*/ + /*-------------------------------------------------*\ + {"HDR_D_LED1_RGB", HDR_D_LED1_ARGB }, + {"HDR_D_LED2_RGB", HDR_D_LED2_ARGB }, + {"HDR_D_LED3_RGB", HDR_D_LED3_ARGB }, + {"HDR_D_LED4_RGB", HDR_D_LED4_ARGB }, + \*-------------------------------------------------*/ +}; + +typedef struct +{ + GB_FUSION2_LED_IDX idx = LED1; + uint16_t leds_min = 0; + uint16_t leds_max = 0; + std::string name; +} gb_fusion2_zone; + +typedef const gb_fusion2_zone* gb_fusion2_layout[GB_FUSION2_ZONES_MAX]; + +typedef struct +{ + gb_fusion2_layout* zones; + uint32_t layout_id; + uint8_t device_num; + std::string name; +} gb_fusion2_device; + +/*---------------------------------------------------------------------*\ +| These constant values are defined in GigabyteFusion2USB_Devices.cpp | +\*---------------------------------------------------------------------*/ +extern const unsigned int GB_FUSION2_DEVICE_COUNT; +extern const gb_fusion2_device** gb_fusion2_device_list; + diff --git a/Controllers/GigabyteRGBFusion2USBController/GigabyteRGBFusion2USBController.cpp b/Controllers/GigabyteRGBFusion2USBController/GigabyteRGBFusion2USBController.cpp index 284a34b2e..06827dc4f 100644 --- a/Controllers/GigabyteRGBFusion2USBController/GigabyteRGBFusion2USBController.cpp +++ b/Controllers/GigabyteRGBFusion2USBController/GigabyteRGBFusion2USBController.cpp @@ -57,9 +57,9 @@ static LEDCount LedCountToEnum(unsigned int c) RGBFusion2USBController::RGBFusion2USBController(hid_device* handle, const char* path, std::string mb_name, uint16_t pid): dev(handle), product_id(pid) { - name = mb_name; - location = path; - + name = mb_name; + location = path; + if(!RefreshHardwareInfo()) { return; @@ -85,7 +85,7 @@ bool RGBFusion2USBController::RefreshHardwareInfo() { unsigned char buffer[FUSION2_USB_BUFFER_SIZE] = {0}; - SendPacket(0x60, 0x00); + SendCCReport(0x60, 0x00); buffer[0] = report_id; int res = hid_get_feature_report(dev, buffer, sizeof(buffer)); @@ -95,6 +95,7 @@ bool RGBFusion2USBController::RefreshHardwareInfo() return false; } + IT8297Report report; std::memcpy(&report, buffer, sizeof(IT8297Report)); report_loaded = true; @@ -106,19 +107,17 @@ bool RGBFusion2USBController::RefreshHardwareInfo() } { - char text[32]{}; + char text[16]{}; - uint32_t fw_ver = ((report.fw_ver & 0x000000FFu) << 24) - | ((report.fw_ver & 0x0000FF00u) << 8) - | ((report.fw_ver & 0x00FF0000u) >> 8) - | ((report.fw_ver & 0xFF000000u) >> 24); - - uint8_t b0 = static_cast((fw_ver >> 24) & 0xFFu); - uint8_t b1 = static_cast((fw_ver >> 16) & 0xFFu); - uint8_t b2 = static_cast((fw_ver >> 8) & 0xFFu); - uint8_t b3 = static_cast( fw_ver & 0xFFu); - - std::snprintf(text, sizeof(text), "%u.%u.%u.%u", b0, b1, b2, b3); + std::snprintf( + text, + sizeof(text), + "%u.%u.%u.%u", + (report.fw_ver ) & 0xFF, + (report.fw_ver >> 8) & 0xFF, + (report.fw_ver >> 16) & 0xFF, + (report.fw_ver >> 24) & 0xFF + ); version = text; std::snprintf(text, sizeof(text), "0x%08X", report.chip_id); chip_id = text; @@ -139,12 +138,14 @@ bool RGBFusion2USBController::RefreshHardwareInfo() if(product_id == 0x5711) { unsigned char buffer2[FUSION2_USB_BUFFER_SIZE] = {0}; - SendPacket(0x61, 0x00); + SendCCReport(0x61, 0x00); buffer2[0] = report_id; int res2 = hid_get_feature_report(dev, buffer2, sizeof(buffer2)); if(res2 >= static_cast(sizeof(IT5711Calibration))) { + IT5711Calibration cali; + std::memcpy(&cali, buffer2, sizeof(IT5711Calibration)); cali_loaded = true; @@ -173,25 +174,23 @@ bool RGBFusion2USBController::RefreshHardwareInfo() return report_loaded; } -void RGBFusion2USBController::SetMode(int m) -{ - mode = m; -} - std::string RGBFusion2USBController::DecodeCalibrationBuffer(uint32_t value) const { - if(value==0) return "OFF"; + std::string out = "OFF"; + if(value == 0) + { + return out; + } uint8_t bo_b = value & 0xFF; - uint8_t bo_g = (value >> 8) & 0xFF; + uint8_t bo_g = (value >> 8 ) & 0xFF; uint8_t bo_r = (value >> 16) & 0xFF; - bool in_range = (bo_r<3 && bo_g<3 && bo_b<3); - bool distinct = (bo_r!=bo_g && bo_r!=bo_b && bo_g!=bo_b); + bool in_range = (bo_r < 3 && bo_g < 3 && bo_b < 3); + bool distinct = (bo_r != bo_g && bo_r != bo_b && bo_g != bo_b); if(in_range && distinct) { - std::string out(3, '?'); out[bo_r] = 'R'; out[bo_g] = 'G'; out[bo_b] = 'B'; @@ -224,7 +223,7 @@ uint32_t RGBFusion2USBController::EncodeCalibrationBuffer(const std::string& rgb } const RGBA &rgb_cal = it->second; - return (uint32_t(rgb_cal.raw[0])) + return (uint32_t(rgb_cal.raw[0])) | (uint32_t(rgb_cal.raw[1]) << 8) | (uint32_t(rgb_cal.raw[2]) << 16) | (uint32_t(rgb_cal.raw[3]) << 24); @@ -268,12 +267,9 @@ EncodedCalibration RGBFusion2USBController::GetCalibration(bool refresh_from_hw) bool RGBFusion2USBController::SetCalibration(const EncodedCalibration& cal, bool refresh_from_hw) { - if(refresh_from_hw) + if(refresh_from_hw && !RefreshHardwareInfo()) { - if(!RefreshHardwareInfo()) - { - return false; - } + return false; } if(EncodeCalibrationBuffer(cal.dled[0]) == cal_data.dled[0] @@ -290,27 +286,23 @@ bool RGBFusion2USBController::SetCalibration(const EncodedCalibration& cal, bool return true; } - CMD_0x33 desired{}; - std::memset(&desired, 0, sizeof(desired)); - desired.report_id = report_id; - desired.command_id = 0x33; + CMD_0x33 desired; - desired.d_strip_c0 = EncodeCalibrationBuffer(cal.dled[0]); - desired.d_strip_c1 = EncodeCalibrationBuffer(cal.dled[1]); - desired.rgb_cali = EncodeCalibrationBuffer(cal.mainboard); - desired.c_spare0 = EncodeCalibrationBuffer(cal.spare[0]); - desired.c_spare1 = EncodeCalibrationBuffer(cal.spare[1]); + desired.c.d_strip_c0 = EncodeCalibrationBuffer(cal.dled[0]); + desired.c.d_strip_c1 = EncodeCalibrationBuffer(cal.dled[1]); + desired.c.rgb_cali = EncodeCalibrationBuffer(cal.mainboard); + desired.c.c_spare0 = EncodeCalibrationBuffer(cal.spare[0]); + desired.c.c_spare1 = EncodeCalibrationBuffer(cal.spare[1]); if(product_id == 0x5711) { - desired.d_strip_c2 = EncodeCalibrationBuffer(cal.dled[2]); - desired.d_strip_c3 = EncodeCalibrationBuffer(cal.dled[3]); - desired.c_spare2 = EncodeCalibrationBuffer(cal.spare[2]); - desired.c_spare3 = EncodeCalibrationBuffer(cal.spare[3]); + desired.c.d_strip_c2 = EncodeCalibrationBuffer(cal.dled[2]); + desired.c.d_strip_c3 = EncodeCalibrationBuffer(cal.dled[3]); + desired.c.c_spare2 = EncodeCalibrationBuffer(cal.spare[2]); + desired.c.c_spare3 = EncodeCalibrationBuffer(cal.spare[3]); } - std::memset(desired.reserved, 0, sizeof(desired.reserved)); - int rc = SendPacket(reinterpret_cast(&desired)); + int rc = SendPacket(desired.buffer); if(rc < 0) { return false; @@ -321,18 +313,18 @@ bool RGBFusion2USBController::SetCalibration(const EncodedCalibration& cal, bool SaveCalState(); std::this_thread::sleep_for(std::chrono::milliseconds(20)); - cal_data.dled[0] = desired.d_strip_c0; - cal_data.dled[1] = desired.d_strip_c1; - cal_data.mainboard = desired.rgb_cali; - cal_data.spare[0] = desired.c_spare0; - cal_data.spare[1] = desired.c_spare1; + cal_data.dled[0] = desired.c.d_strip_c0; + cal_data.dled[1] = desired.c.d_strip_c1; + cal_data.mainboard = desired.c.rgb_cali; + cal_data.spare[0] = desired.c.c_spare0; + cal_data.spare[1] = desired.c.c_spare1; if(product_id == 0x5711) { - cal_data.dled[2] = desired.d_strip_c2; - cal_data.dled[3] = desired.d_strip_c3; - cal_data.spare[2] = desired.c_spare2; - cal_data.spare[3] = desired.c_spare3; + cal_data.dled[2] = desired.c.d_strip_c2; + cal_data.dled[3] = desired.c.d_strip_c3; + cal_data.spare[2] = desired.c.c_spare2; + cal_data.spare[3] = desired.c.c_spare3; } else { @@ -347,27 +339,22 @@ bool RGBFusion2USBController::SetCalibration(const EncodedCalibration& cal, bool void RGBFusion2USBController::SetLedCount(unsigned int c0, unsigned int c1, unsigned int c2, unsigned int c3) { - new_d1 = LedCountToEnum(c0); - new_d2 = LedCountToEnum(c1); - new_d3 = LedCountToEnum(c2); - new_d4 = LedCountToEnum(c3); + LEDCount new_d1 = LedCountToEnum(c0); + LEDCount new_d2 = LedCountToEnum(c1); + LEDCount new_d3 = LedCountToEnum(c2); + LEDCount new_d4 = LedCountToEnum(c3); if(new_d1 == D_LED1_count && new_d2 == D_LED2_count && new_d3 == D_LED3_count && new_d4 == D_LED4_count) { return; } - D_LED1_count = new_d1; - D_LED2_count = new_d2; - D_LED3_count = new_d3; - D_LED4_count = new_d4; + D_LED1_count = new_d1; + D_LED2_count = new_d2; + D_LED3_count = new_d3; + D_LED4_count = new_d4; - unsigned char buffer[FUSION2_USB_BUFFER_SIZE] = { 0 }; - buffer[0] = report_id; - buffer[1] = 0x34; - buffer[2] = (new_d2 << 4) | new_d1; - buffer[3] = (new_d4 << 4) | new_d3; - SendPacket(buffer); + SendCCReport(0x34, (new_d2 << 4) | new_d1, (new_d4 << 4) | new_d3); } /*---------------------------------------------------------*\ @@ -388,15 +375,15 @@ bool RGBFusion2USBController::SetStripBuiltinEffectState(int hdr, bool enable) { case LED4: case HDR_D_LED2: - case HDR_D_LED2_RGB: + case HDR_D_LED2_ARGB: bitmask = 0x02; break; case HDR_D_LED3: - case HDR_D_LED3_RGB: + case HDR_D_LED3_ARGB: bitmask = 0x08; break; case HDR_D_LED4: - case HDR_D_LED4_RGB: + case HDR_D_LED4_ARGB: bitmask = 0x10; break; default: @@ -416,7 +403,7 @@ bool RGBFusion2USBController::SetStripBuiltinEffectState(int hdr, bool enable) first_call = false; effect_disabled = new_effect_disabled; - int res = SendPacket(0x32, effect_disabled); + int res = SendCCReport(0x32, effect_disabled); std::this_thread::sleep_for(std::chrono::milliseconds(50)); return res; } @@ -426,7 +413,7 @@ bool RGBFusion2USBController::SetStripBuiltinEffectState(int hdr, bool enable) \*---------------------------------------------------------*/ bool RGBFusion2USBController::SaveLEDState(bool e) { - return SendPacket(0x47, e ? 1 : 0); + return SendCCReport(0x47, e ? 1 : 0); } /*---------------------------------------------------------*\ @@ -434,7 +421,7 @@ bool RGBFusion2USBController::SaveLEDState(bool e) \*---------------------------------------------------------*/ bool RGBFusion2USBController::SaveCalState() { - return SendPacket(0x5E, 0); + return SendCCReport(0x5E, 0); } /*---------------------------------------------------------*\ @@ -442,7 +429,7 @@ bool RGBFusion2USBController::SaveCalState() \*---------------------------------------------------------*/ bool RGBFusion2USBController::EnableBeat(bool e) { - return SendPacket(0x31, e ? 1 : 0); + return SendCCReport(0x31, e ? 1 : 0); } /*---------------------------------------------------------*\ @@ -450,7 +437,7 @@ bool RGBFusion2USBController::EnableBeat(bool e) \*---------------------------------------------------------*/ bool RGBFusion2USBController::EnableLampArray(bool enable) { - return SendPacket(0x48, enable ? 1 : 0); + return SendCCReport(0x48, enable ? 1 : 0); } std::string RGBFusion2USBController::GetDeviceName() @@ -483,7 +470,7 @@ std::string RGBFusion2USBController::GetSerial() \*---------------------------------------------------------*/ uint16_t RGBFusion2USBController::GetProductID() { - return (product_id); + return(product_id); } /*---------------------------------------------------------*\ @@ -491,7 +478,7 @@ uint16_t RGBFusion2USBController::GetProductID() \*---------------------------------------------------------*/ uint8_t RGBFusion2USBController::GetDeviceNum() { - return (device_num); + return(device_num); } /*---------------------------------------------------------*\ @@ -505,13 +492,13 @@ void RGBFusion2USBController::SetStripColors(unsigned int hdr, RGBColor* colors, switch(pkt.s.header) { - case HDR_D_LED2_RGB: + case HDR_D_LED2_ARGB: byteorder = cal_data.dled[1]; break; - case HDR_D_LED3_RGB: + case HDR_D_LED3_ARGB: byteorder = cal_data.dled[2]; break; - case HDR_D_LED4_RGB: + case HDR_D_LED4_ARGB: byteorder = cal_data.dled[3]; break; default: @@ -659,11 +646,11 @@ bool RGBFusion2USBController::ApplyEffect(bool fast_apply) { if(product_id == 0x5711) { - return SendPacket(0x28, 0xFF, 0x07); + return SendCCReport(0x28, 0xFF, 0x07); } else { - return SendPacket(0x28, 0xFF, 0x00); + return SendCCReport(0x28, 0xFF, 0x00); } } @@ -674,11 +661,17 @@ bool RGBFusion2USBController::ApplyEffect(bool fast_apply) return SendPacket(pkt.buffer); } -bool RGBFusion2USBController::SendPacket(uint8_t a, uint8_t b, uint8_t c) +bool RGBFusion2USBController::SendCCReport(uint8_t a, uint8_t b, uint8_t c) +{ + return(SendReport(report_id, a, b, c)); +} + +bool RGBFusion2USBController::SendReport(uint8_t id, uint8_t a, uint8_t b, uint8_t c) { unsigned char buffer[FUSION2_USB_BUFFER_SIZE] {}; + std::memset(buffer, 0, FUSION2_USB_BUFFER_SIZE); - buffer[0] = report_id; + buffer[0] = id; buffer[1] = a; buffer[2] = b; buffer[3] = c; @@ -698,14 +691,14 @@ void RGBFusion2USBController::ResetController() { for(uint8_t reg = 0x20; reg <= 0x27; ++reg) { - SendPacket(reg, 0x00, 0x00); + SendCCReport(reg, 0x00, 0x00); } if(product_id == 0x5711) { for(uint8_t reg = 0x90; reg <= 0x92; ++reg) { - SendPacket(reg, 0x00, 0x00); + SendCCReport(reg, 0x00, 0x00); } } ApplyEffect(true); diff --git a/Controllers/GigabyteRGBFusion2USBController/GigabyteRGBFusion2USBController.h b/Controllers/GigabyteRGBFusion2USBController/GigabyteRGBFusion2USBController.h index 956ec0599..fd382a168 100644 --- a/Controllers/GigabyteRGBFusion2USBController/GigabyteRGBFusion2USBController.h +++ b/Controllers/GigabyteRGBFusion2USBController/GigabyteRGBFusion2USBController.h @@ -17,44 +17,10 @@ #include #include #include "RGBController.h" +#include "GigabyteFusion2USB_Devices.h" #define FUSION2_USB_BUFFER_SIZE 64 -/*--------------------------------------------------------*\ -| Base LED mappings found on all controllers. | -\*--------------------------------------------------------*/ -const uint8_t LED1 = 0; -const uint8_t LED2 = 1; -const uint8_t LED3 = 2; -const uint8_t LED4 = 3; -const uint8_t LED5 = 4; -const uint8_t LED6 = 5; -const uint8_t LED7 = 6; -const uint8_t LED8 = 7; - -/*--------------------------------------------------------*\ -| IT8297/IT5701/IT5702 ARGB Headers | -\*--------------------------------------------------------*/ -const uint8_t HDR_D_LED1 = LED6; -const uint8_t HDR_D_LED2 = LED7; -const uint8_t HDR_D_LED1_RGB = 0x58; -const uint8_t HDR_D_LED2_RGB = 0x59; - -/*--------------------------------------------------------*\ -| Additional LED mappings found on IT5711 controllers. | -\*--------------------------------------------------------*/ -const uint8_t LED9 = 8; -const uint8_t LED10 = 9; -const uint8_t LED11 = 10; - -/*--------------------------------------------------------*\ -| IT5711 additional ARGB Headers. | -\*--------------------------------------------------------*/ -const uint8_t HDR_D_LED3 = LED8; -const uint8_t HDR_D_LED4 = LED9; -const uint8_t HDR_D_LED3_RGB = 0x62; -const uint8_t HDR_D_LED4_RGB = 0x63; - /*---------------------------------------------------------*\ | Effects mode list | \*---------------------------------------------------------*/ @@ -102,8 +68,8 @@ struct LEDs \*---------------------------------------------------------*/ struct CalibrationData { - uint32_t dled[4] = {0}; - uint32_t spare[4] = {0}; + uint32_t dled[4] = {0, 0, 0, 0}; + uint32_t spare[4] = {0, 0, 0, 0}; uint32_t mainboard = 0; }; @@ -187,16 +153,16 @@ union PktRGB { case LED4: case HDR_D_LED2: - header = HDR_D_LED2_RGB; + header = HDR_D_LED2_ARGB; break; case HDR_D_LED3: - header = HDR_D_LED3_RGB; + header = HDR_D_LED3_ARGB; break; case HDR_D_LED4: - header = HDR_D_LED4_RGB; + header = HDR_D_LED4_ARGB; break; default: - header = HDR_D_LED1_RGB; + header = HDR_D_LED1_ARGB; break; } s.report_id = report_id; @@ -250,7 +216,7 @@ union PktEffect void Init(int led, uint8_t report_id, uint16_t pid) { - memset(e.padding0, 0, sizeof(e.padding0)); + memset(buffer, 0, sizeof(buffer)); e.report_id = report_id; if(led == -1) @@ -316,20 +282,29 @@ struct IT5711Calibration /*---------------------------------------------------------*\ | CC33 Set Calibration Struct | \*---------------------------------------------------------*/ -struct CMD_0x33 +union CMD_0x33 { - uint8_t report_id; - uint8_t command_id; - uint32_t d_strip_c0; - uint32_t d_strip_c1; - uint32_t rgb_cali; - uint32_t c_spare0; - uint32_t c_spare1; - uint32_t d_strip_c2; - uint32_t d_strip_c3; - uint32_t c_spare2; - uint32_t c_spare3; - uint8_t reserved[25]; + unsigned char buffer[FUSION2_USB_BUFFER_SIZE]; + struct Calibration + { + uint8_t report_id = 0xCC; + uint8_t command_id = 0x33; + uint32_t d_strip_c0 = 0; + uint32_t d_strip_c1 = 0; + uint32_t rgb_cali = 0; + uint32_t c_spare0 = 0; + uint32_t c_spare1 = 0; + uint32_t d_strip_c2 = 0; + uint32_t d_strip_c3 = 0; + uint32_t c_spare2 = 0; + uint32_t c_spare3 = 0; + uint8_t reserved[25]; + } c; + + CMD_0x33() : c{} + { + memset(c.reserved, 0, sizeof(c.reserved)); + } }; #pragma pack(pop) @@ -340,54 +315,51 @@ public: RGBFusion2USBController(hid_device* handle, const char *path, std::string mb_name, uint16_t pid); ~RGBFusion2USBController(); - bool RefreshHardwareInfo(); - void ResetController(); - uint16_t GetProductID(); - uint8_t GetDeviceNum(); - void SetStripColors(unsigned int hdr, RGBColor * colors, unsigned int num_colors, int single_led = -1); - void SetLEDEffect(int led, int mode, unsigned int speed, unsigned char brightness, bool random, uint32_t* color); - void SetLedCount(unsigned int c0, unsigned int c1, unsigned int c2, unsigned int c3); - void SetMode(int mode); bool ApplyEffect(bool batch_commit = false); - bool SetStripBuiltinEffectState(int hdr, bool enable); - EncodedCalibration GetCalibration(bool refresh_from_hw = false); bool SetCalibration(const EncodedCalibration& cal, bool refresh_from_hw); + void SetLedCount(unsigned int c0, unsigned int c1, unsigned int c2, unsigned int c3); + void SetLEDEffect(int led, int mode, unsigned int speed, unsigned char brightness, bool random, uint32_t* color); + bool SetStripBuiltinEffectState(int hdr, bool enable); + void SetStripColors(unsigned int hdr, RGBColor * colors, unsigned int num_colors, int single_led = -1); + + EncodedCalibration GetCalibration(bool refresh_from_hw = false); std::string GetDeviceName(); + uint8_t GetDeviceNum(); std::string GetDeviceDescription(); std::string GetDeviceLocation(); std::string GetFWVersion(); + uint16_t GetProductID(); std::string GetSerial(); private: - bool SaveLEDState(bool enable); - bool SaveCalState(); + std::string DecodeCalibrationBuffer(uint32_t value) const; bool EnableLampArray(bool enable); bool EnableBeat(bool enable); - bool SendPacket(uint8_t a, uint8_t b, uint8_t c = 0); - int SendPacket(unsigned char* packet); uint32_t EncodeCalibrationBuffer(const std::string& rgb_order); - std::string DecodeCalibrationBuffer(uint32_t value) const; + bool RefreshHardwareInfo(); + void ResetController(); + bool SaveLEDState(bool enable); + bool SaveCalState(); + bool SendCCReport(uint8_t a, uint8_t b, uint8_t c = 0); + bool SendReport(uint8_t id, uint8_t a, uint8_t b, uint8_t c = 0); + int SendPacket(unsigned char* packet); + hid_device* dev; int device_num; uint16_t product_id; - uint32_t effect_zone_mask = 0; + uint32_t effect_zone_mask = 0; int mode; IT8297Report report; - IT5711Calibration cali; CalibrationData cal_data; std::string name; std::string description; std::string location; std::string version; std::string chip_id; - int effect_disabled = 0; - int report_id = 0xCC; - bool report_loaded = false; - bool cali_loaded = false; - LEDCount new_d1; - LEDCount new_d2; - LEDCount new_d3; - LEDCount new_d4; + int effect_disabled = 0; + int report_id = 0xCC; + bool report_loaded = false; + bool cali_loaded = false; LEDCount D_LED1_count; LEDCount D_LED2_count; LEDCount D_LED3_count; diff --git a/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USB.cpp b/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USB.cpp index 00c9f8d3e..3d3785923 100644 --- a/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USB.cpp +++ b/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USB.cpp @@ -11,11 +11,10 @@ | SPDX-License-Identifier: GPL-2.0-or-later | \*---------------------------------------------------------*/ +#include "GigabyteFusion2USB_Devices.h" +#include "LogManager.h" #include "RGBController_GigabyteRGBFusion2USB.h" -#include "RGBController_GigabyteRGBFusion2USBBoards.h" -#include "RGBController_GigabyteRGBFusion2USBLayouts.h" #include "ResourceManager.h" -#include "SettingsManager.h" /**------------------------------------------------------------------*\ @name Gigabyte RGB Fusion 2 USB @@ -29,138 +28,6 @@ Intel mainboards from the x570 and z390 chipsets onwards. \*-------------------------------------------------------------------*/ -/*---------------------------------------------------------*\ -| Convert calibration data to JSON | -\*---------------------------------------------------------*/ -static nlohmann::json WriteCalJsonFrom(const EncodedCalibration& src, uint16_t pid) -{ - nlohmann::json calib_json; - calib_json["HDR_D_LED1"] = src.dled[0]; - calib_json["HDR_D_LED2"] = src.dled[1]; - - if(pid == 0x5711) - { - calib_json["HDR_D_LED3"] = src.dled[2]; - calib_json["HDR_D_LED4"] = src.dled[3]; - } - calib_json["Mainboard"] = src.mainboard; - calib_json["Spare0"] = src.spare[0]; - calib_json["Spare1"] = src.spare[1]; - - if(pid == 0x5711) - { - calib_json["Spare2"] = src.spare[2]; - calib_json["Spare3"] = src.spare[3]; - } - return calib_json; -} - -/*---------------------------------------------------------*\ -| Fill missing JSON calibration keys | -\*---------------------------------------------------------*/ -static void FillMissingWith(nlohmann::json& dst, const EncodedCalibration& fb, uint16_t pid) -{ - struct SetIfMissing - { - nlohmann::json& dst; - - void operator()(const char* key, const std::string& val) const - { - if(!dst.contains(key)) - { - dst[key] = val; - } - } - }; - - SetIfMissing set_if_missing{dst}; - - set_if_missing("HDR_D_LED1", fb.dled[0]); - set_if_missing("HDR_D_LED2", fb.dled[1]); - if(pid==0x5711) - { - set_if_missing("HDR_D_LED3", fb.dled[2]); - set_if_missing("HDR_D_LED4", fb.dled[3]); - } - set_if_missing("Mainboard", fb.mainboard); - set_if_missing("Spare0", fb.spare[0]); - set_if_missing("Spare1", fb.spare[1]); - if(pid==0x5711) - { - set_if_missing("Spare2", fb.spare[2]); - set_if_missing("Spare3", fb.spare[3]); - } -} - -/*---------------------------------------------------------*\ -| JSON safe string fetch (calibration) | -\*---------------------------------------------------------*/ -static std::string GetOrOff(const nlohmann::json& obj, const char* key) -{ - return obj.contains(key) ? obj.at(key).get() : std::string("OFF"); -} - -/*---------------------------------------------------------*\ -| Build custom layout in JSON | -\*---------------------------------------------------------*/ -static nlohmann::json BuildCustomLayoutJson(const ZoneLeds& src_layout, const RvrseLedHeaders& reverseLookup) -{ - nlohmann::json json_HCL; - for(ZoneLeds::const_iterator zl = src_layout.begin(); zl != src_layout.end(); ++zl) - { - const std::string& zone_name = zl->first; - const std::vector& v_lp = zl->second; - - nlohmann::json json_zl; - for(std::vector::const_iterator it = v_lp.begin(); it != v_lp.end(); ++it) - { - const LedPort& lp = *it; - nlohmann::json json_lp; - json_lp["name"] = lp.name; - json_lp["header"] = reverseLookup.at(lp.header); - json_lp["count"] = lp.count; - json_zl.push_back(json_lp); - } - json_HCL.emplace(zone_name, json_zl); - } - return json_HCL; -} - -/*---------------------------------------------------------*\ -| Build custom layout from JSON | -\*---------------------------------------------------------*/ -static void LoadCustomLayoutFromJson(const nlohmann::json& json_HCL, const FwdLedHeaders& forwardLookup, ZoneLeds& out_layout) -{ - out_layout.clear(); - - for(nlohmann::json::const_iterator json_layout_it = json_HCL.begin(); - json_layout_it != json_HCL.end(); - ++json_layout_it) - { - const std::string& zone_name = json_layout_it.key(); - const nlohmann::json& json_zl = json_layout_it.value(); - - std::vector v_lp; - - for(nlohmann::json::const_iterator zl_it = json_zl.begin(); - zl_it != json_zl.end(); - ++zl_it) - { - const nlohmann::json& zl = *zl_it; - nlohmann::json jv = zl; - LedPort lp; - - lp.name = jv["name"].get(); - lp.header = forwardLookup.at(jv["header"].get()); - lp.count = jv.contains("count") ? jv["count"].get() : 1; - - v_lp.push_back(lp); - } - - out_layout.insert(std::pair>(zone_name, v_lp)); - } -} - RGBController_RGBFusion2USB::RGBController_RGBFusion2USB(RGBFusion2USBController* controller_ptr, std::string detector) { controller = controller_ptr; @@ -172,7 +39,6 @@ RGBController_RGBFusion2USB::RGBController_RGBFusion2USB(RGBFusion2USBController version = controller->GetFWVersion(); location = controller->GetDeviceLocation(); serial = controller->GetSerial(); - pid = controller->GetProductID(); device_num = controller->GetDeviceNum(); mode Direct; @@ -334,7 +200,6 @@ RGBController_RGBFusion2USB::RGBController_RGBFusion2USB(RGBFusion2USBController Wave4.color_mode = MODE_COLORS_NONE; modes.push_back(Wave4); - Load_Device_Config(); Init_Controller(); SetupZones(); } @@ -347,7 +212,7 @@ RGBController_RGBFusion2USB::~RGBController_RGBFusion2USB() /*---------------------------------------------------------*\ | Loads JSON config data | \*---------------------------------------------------------*/ -void RGBController_RGBFusion2USB::Load_Device_Config() +void RGBController_RGBFusion2USB::Init_Controller() { const std::string SectionCustom = "CustomLayout"; const std::string SectionCalibration = "Calibration"; @@ -355,40 +220,24 @@ void RGBController_RGBFusion2USB::Load_Device_Config() SettingsManager* settings_manager = ResourceManager::get()->GetSettingsManager(); nlohmann::json device_settings = settings_manager->GetSettings(detector_name); - if(pid == 0x5711) - { - layout = HardcodedCustom_Gen2.find("Custom")->second; - } - else - { - layout = HardcodedCustom_Gen1.find("Custom")->second; - } - /*---------------------------------------------------------*\ - | Remove legacy top-level "MotherboardLayouts" | + | Create the custom layout from the generic_device | \*---------------------------------------------------------*/ - if(device_settings.contains("MotherboardLayouts")) - { - device_settings.erase("MotherboardLayouts"); - settings_manager->SetSettings(detector_name, device_settings); - settings_manager->SaveSettings(); - } + gb_fusion2_device* layout = const_cast(gb_fusion2_device_list[device_index]); if(!device_settings.contains(SectionCustom)) { - nlohmann::json json_HCL = BuildCustomLayoutJson(layout, ReverseLedLookup); - device_settings[SectionCustom]["Enabled"] = false; - device_settings[SectionCustom]["Data"] = BuildCustomLayoutJson(layout, ReverseLedLookup); + device_settings[SectionCustom]["Enabled"] = false; + device_settings[SectionCustom]["Data"] = BuildCustomLayoutJson(layout, ReverseLedLookup); settings_manager->SetSettings(detector_name, device_settings); settings_manager->SaveSettings(); } - custom_layout = device_settings[SectionCustom]["Enabled"]; + bool custom_layout = device_settings[SectionCustom]["Enabled"]; if(custom_layout) { - const nlohmann::json json_HCL = device_settings[SectionCustom]["Data"]; - LoadCustomLayoutFromJson(json_HCL, LedLookup, layout); + LoadCustomLayoutFromJson(device_settings[SectionCustom]["Data"], LedLookup, layout); } EncodedCalibration hw_cal = controller->GetCalibration(false); @@ -396,7 +245,7 @@ void RGBController_RGBFusion2USB::Load_Device_Config() if(!device_settings.contains(SectionCalibration)) { device_settings[SectionCalibration]["Enabled"] = false; - device_settings[SectionCalibration]["Data"] = WriteCalJsonFrom(hw_cal, pid); + device_settings[SectionCalibration]["Data"] = WriteCalJsonFrom(hw_cal); settings_manager->SetSettings(detector_name, device_settings); settings_manager->SaveSettings(); } @@ -407,18 +256,18 @@ void RGBController_RGBFusion2USB::Load_Device_Config() if(!cal_sec.contains("Data") || !cal_sec["Data"].is_object()) { - cal_sec["Data"] = WriteCalJsonFrom(hw_cal, pid); + cal_sec["Data"] = WriteCalJsonFrom(hw_cal); settings_manager->SetSettings(detector_name, device_settings); settings_manager->SaveSettings(); } else { nlohmann::json& cdata = cal_sec["Data"]; - FillMissingWith(cdata, hw_cal, pid); + FillMissingWith(cdata, hw_cal); if(!cal_enable) { - cal_sec["Data"] = WriteCalJsonFrom(hw_cal, pid); + cal_sec["Data"] = WriteCalJsonFrom(hw_cal); settings_manager->SetSettings(detector_name, device_settings); settings_manager->SaveSettings(); } @@ -429,18 +278,18 @@ void RGBController_RGBFusion2USB::Load_Device_Config() const nlohmann::json& cdata = cal_sec["Data"]; EncodedCalibration desired; - desired.dled[0] = GetOrOff(cdata, "HDR_D_LED1"); - desired.dled[1] = GetOrOff(cdata, "HDR_D_LED2"); - desired.mainboard = GetOrOff(cdata, "Mainboard"); - desired.spare[0] = GetOrOff(cdata, "Spare0"); - desired.spare[1] = GetOrOff(cdata, "Spare1"); + desired.dled[0] = GET_JSON_VAL_ELSE_OFF(cdata, "HDR_D_LED1"); + desired.dled[1] = GET_JSON_VAL_ELSE_OFF(cdata, "HDR_D_LED2"); + desired.mainboard = GET_JSON_VAL_ELSE_OFF(cdata, "Mainboard"); + desired.spare[0] = GET_JSON_VAL_ELSE_OFF(cdata, "Spare0"); + desired.spare[1] = GET_JSON_VAL_ELSE_OFF(cdata, "Spare1"); - if(pid == 0x5711) + if(controller->GetProductID() == 0x5711) { - desired.dled[2] = GetOrOff(cdata, "HDR_D_LED3"); - desired.dled[3] = GetOrOff(cdata, "HDR_D_LED4"); - desired.spare[2] = GetOrOff(cdata, "Spare2"); - desired.spare[3] = GetOrOff(cdata, "Spare3"); + desired.dled[2] = GET_JSON_VAL_ELSE_OFF(cdata, "HDR_D_LED3"); + desired.dled[3] = GET_JSON_VAL_ELSE_OFF(cdata, "HDR_D_LED4"); + desired.spare[2] = GET_JSON_VAL_ELSE_OFF(cdata, "Spare2"); + desired.spare[3] = GET_JSON_VAL_ELSE_OFF(cdata, "Spare3"); } else { @@ -452,110 +301,51 @@ void RGBController_RGBFusion2USB::Load_Device_Config() controller->SetCalibration(desired, false); } } -} -/*---------------------------------------------------------*\ -| Loads layout and zone data for controller | -\*---------------------------------------------------------*/ -void RGBController_RGBFusion2USB::Init_Controller() -{ - /*---------------------------------------------------------*\ - | Look up channel map based on device name | - \*---------------------------------------------------------*/ + /*---------------------------------------------------------------------*\ + | When no match found the first entry (generic_device) will be used | + | otherwise look up channel map based on device name | + \*---------------------------------------------------------------------*/ if(!custom_layout) { - std::string layout_key; - - bool found = false; - - switch(pid) + /*-----------------------------------------------------------------*\ + | Loop through all known devices to look for a name match | + | NB: Can be switched to device IDs lookup when acpi table | + | is able to be probed accurately | + \*-----------------------------------------------------------------*/ + for(unsigned int i = 0; i < GB_FUSION2_DEVICE_COUNT; i++) { - case 0x5711: - if(MBName2LayoutLookup5711.count(name)) - { - layout_key = MBName2LayoutLookup5711.at(name); - found = true; - } - break; - - case 0x5702: - if(MBName2LayoutLookup5702.count(name)) - { - layout_key = MBName2LayoutLookup5702.at(name); - found = true; - } - break; - - case 0x8950: - if(MBName2LayoutLookup8950.count(name)) - { - layout_key = MBName2LayoutLookup8950.at(name); - found = true; - } - break; - - case 0x8297: - if(MBName2LayoutLookup8297.count(name)) - { - layout_key = MBName2LayoutLookup8297.at(name); - found = true; - } - break; - - default: - break; - } - - if(found) - { - layout = knownLayoutsLookup.at(layout_key); - } - else - { - switch(pid) + if(gb_fusion2_device_list[i]->name == name) { - case 0x8297: - case 0x8950: - case 0x5702: - layout = knownLayoutsLookup.at("STD_ATX"); - break; - - default: - layout = knownLayoutsLookup.at("IT5711-Generic"); - break; + /*---------------------------------------------------------*\ + | Set device ID | + \*---------------------------------------------------------*/ + device_index = i; + layout = const_cast(gb_fusion2_device_list[i]); + break; } } } - /*---------------------------------------------------------*\ - | Initialize the number of zones from the layout | - \*---------------------------------------------------------*/ - zones.resize(layout.size()); - /*---------------------------------------------------------*\ | Iterate through layout and process each zone | \*---------------------------------------------------------*/ - int zone_idx = 0; - for(ZoneLeds::iterator zl = layout.begin(); zl != layout.end(); zl++) + for(uint8_t zone_idx = 0; zone_idx < GB_FUSION2_ZONES_MAX; zone_idx++) { - std::vector lp = zl->second; - int LED_count = 0; - bool single_zone = true; - - for(std::size_t lp_idx = 0; lp_idx < lp.size(); lp_idx++) + if(!layout->zones[0][zone_idx]) { - int lp_count = lp[lp_idx].count; - single_zone = single_zone && (lp_count == 1); - LED_count += lp_count; + continue; } + const gb_fusion2_zone* zone_at_idx = layout->zones[0][zone_idx]; - zones[zone_idx].name = zl->first; - zones[zone_idx].leds_min = (single_zone) ? LED_count : RGBFUSION2_DIGITAL_LEDS_MIN; - zones[zone_idx].leds_max = (single_zone) ? LED_count : RGBFUSION2_DIGITAL_LEDS_MAX; - zones[zone_idx].leds_count = (single_zone) ? LED_count : 0; - zones[zone_idx].type = (single_zone) ? ZONE_TYPE_SINGLE : ZONE_TYPE_LINEAR; - zones[zone_idx].matrix_map = NULL; - zone_idx++; + zone new_zone; + new_zone.name = zone_at_idx->name; + new_zone.leds_min = zone_at_idx->leds_min; + new_zone.leds_max = zone_at_idx->leds_max; + new_zone.leds_count = new_zone.leds_min; + new_zone.type = (new_zone.leds_min == new_zone.leds_max) ? ZONE_TYPE_SINGLE : ZONE_TYPE_LINEAR; + new_zone.matrix_map = NULL; + zones.emplace_back(new_zone); } } @@ -572,16 +362,19 @@ void RGBController_RGBFusion2USB::SetupZones() /*---------------------------------------------------------*\ | Set up zones (Fixed so as to not spam the controller) | \*---------------------------------------------------------*/ - int zone_idx = 0; - for (ZoneLeds::iterator zl = layout.begin(); zl != layout.end(); zl++) + + for(uint8_t zone_idx = 0; zone_idx < GB_FUSION2_ZONES_MAX; zone_idx++) { - bool single_zone = (zones[zone_idx].type == ZONE_TYPE_SINGLE); - - if (!single_zone) + const gb_fusion2_zone* zone_at_idx = gb_fusion2_device_list[device_index]->zones[0][zone_idx]; + if(!zone_at_idx) { - unsigned char hdr = zl->second.at(0).header; + continue; + } + bool single_zone = (zone_at_idx->leds_min == zone_at_idx->leds_max); - switch (hdr) + if(!single_zone) + { + switch(zone_at_idx->idx) { case LED4: case HDR_D_LED2: @@ -599,26 +392,20 @@ void RGBController_RGBFusion2USB::SetupZones() } } - for (unsigned int lp_idx = 0; lp_idx < zones[zone_idx].leds_count; lp_idx++) + for(unsigned int led_idx = 0; led_idx < zones[zone_idx].leds_count; led_idx++) { led new_led; - if (single_zone) + new_led.name = zone_at_idx->name; + new_led.value = zone_at_idx->idx; + + if(!single_zone) { - new_led.name = zl->second.at(lp_idx).name; - new_led.value = zl->second.at(lp_idx).header; - } - else - { - new_led.name = zl->second.at(0).name; - new_led.name.append(" LED " + std::to_string(lp_idx)); - new_led.value = zl->second.at(0).header; + new_led.name.append(" LED " + std::to_string(led_idx)); } leds.push_back(new_led); } - - zone_idx++; } controller->SetLedCount(d1, d2, d3, d4); @@ -911,3 +698,145 @@ int RGBController_RGBFusion2USB::GetLED_Zone(int led_idx) \*---------------------------------------------------------*/ return(-1); } + +/*---------------------------------------------------------*\ +| Convert calibration data to JSON | +\*---------------------------------------------------------*/ +nlohmann::json RGBController_RGBFusion2USB::WriteCalJsonFrom(const EncodedCalibration& src) +{ + nlohmann::json calib_json; + calib_json["HDR_D_LED1"] = src.dled[0]; + calib_json["HDR_D_LED2"] = src.dled[1]; + calib_json["HDR_D_LED3"] = src.dled[2]; + calib_json["HDR_D_LED4"] = src.dled[3]; + calib_json["Mainboard"] = src.mainboard; + calib_json["Spare0"] = src.spare[0]; + calib_json["Spare1"] = src.spare[1]; + calib_json["Spare2"] = src.spare[2]; + calib_json["Spare3"] = src.spare[3]; + + return calib_json; +} + +/*---------------------------------------------------------*\ +| Fill missing JSON calibration keys | +\*---------------------------------------------------------*/ +void RGBController_RGBFusion2USB::FillMissingWith(nlohmann::json& dst, const EncodedCalibration& fb) +{ + struct SetIfMissing + { + nlohmann::json& dst; + + void operator()(const char* key, const std::string& val) const + { + if(!dst.contains(key)) + { + dst[key] = val; + } + } + }; + + SetIfMissing set_if_missing{dst}; + + set_if_missing("HDR_D_LED1", fb.dled[0]); + set_if_missing("HDR_D_LED2", fb.dled[1]); + set_if_missing("Mainboard", fb.mainboard); + set_if_missing("Spare0", fb.spare[0]); + set_if_missing("Spare1", fb.spare[1]); + + if(controller->GetProductID() == 0x5711) + { + set_if_missing("HDR_D_LED3", fb.dled[2]); + set_if_missing("HDR_D_LED4", fb.dled[3]); + set_if_missing("Spare2", fb.spare[2]); + set_if_missing("Spare3", fb.spare[3]); + } +} + +/*---------------------------------------------------------*\ +| Build custom layout in JSON | +\*---------------------------------------------------------*/ +nlohmann::json RGBController_RGBFusion2USB::BuildCustomLayoutJson( + const gb_fusion2_device* layout, + const RvrseLedHeaders& reverseLookup) +{ + nlohmann::json json_custom; + for(uint8_t zone_idx = 0; zone_idx < GB_FUSION2_ZONES_MAX; zone_idx++) + { + if(!layout->zones[0][zone_idx]) + { + continue; + } + + nlohmann::json json_zone; + json_zone["name"] = layout->zones[0][zone_idx]->name; + json_zone["header"] = reverseLookup.at(layout->zones[0][zone_idx]->idx); + json_zone["leds_min"] = layout->zones[0][zone_idx]->leds_min; + json_zone["leds_max"] = layout->zones[0][zone_idx]->leds_max; + + json_custom[layout->name].push_back(json_zone); + } + return json_custom; +} + +/*---------------------------------------------------------*\ +| Build custom layout from JSON | +\*---------------------------------------------------------*/ +void RGBController_RGBFusion2USB::LoadCustomLayoutFromJson( + const nlohmann::json& json_custom, + const FwdLedHeaders& forwardLookup, + gb_fusion2_device* layout) +{ + for(uint8_t zone_idx = 0; zone_idx < GB_FUSION2_ZONES_MAX; zone_idx++) + { + /*---------------------------------------------------------*\ + | Check if there are more JSON objects to parse | + \*---------------------------------------------------------*/ + if(json_custom[layout->name].size() <= zone_idx) + { + layout->zones[0][zone_idx] = nullptr; + continue; + } + nlohmann::json json_zone = json_custom[layout->name].at(zone_idx); + gb_fusion2_zone* new_zone = new gb_fusion2_zone(); + + new_zone->name = json_zone["name"].get(); + std::string header = json_zone["header"].get(); + new_zone->idx = forwardLookup.at(header); + if( header == "HDR_D_LED1" + || header == "HDR_D_LED2" + || header == "HDR_D_LED3" + || header == "HDR_D_LED4") + { + new_zone->leds_min = std::max(json_zone["leds_min"].get(), 1); + new_zone->leds_max = std::min(json_zone["leds_max"].get(), 1024); + } + else + { + new_zone->leds_min = 1; + new_zone->leds_max = 1; + } + + /*---------------------------------------------------------*\ + | Check for valid values from JSON | + \*---------------------------------------------------------*/ + if(new_zone->name != "" + && new_zone->leds_min <= new_zone->leds_max + && new_zone->idx >= GB_FUSION2_LED_IDX::LED1 + && new_zone->idx <= GB_FUSION2_LED_IDX::LED11) + { + layout->zones[0][zone_idx] = new_zone; + } + else + { + LOG_ERROR("[%s] Error creating zone %d: Validation failed for %s @ index %d (LEDs min %d to %d max)", + controller->GetDeviceName().c_str(), + zone_idx, + new_zone->name.c_str(), + new_zone->idx, + new_zone->leds_min, + new_zone->leds_max); + } + } +} + diff --git a/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USB.h b/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USB.h index 8d3d48a4d..3efb7a553 100644 --- a/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USB.h +++ b/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USB.h @@ -15,9 +15,9 @@ #include #include "RGBController.h" +#include "GigabyteFusion2USB_Devices.h" #include "GigabyteRGBFusion2USBController.h" -#include "RGBController_GigabyteRGBFusion2USBBoards.h" -#include "RGBController_GigabyteRGBFusion2USBLayouts.h" +#include "SettingsManager.h" #define RGBFUSION2_DIGITAL_LEDS_MIN 0 #define RGBFUSION2_DIGITAL_LEDS_MAX 1024 @@ -27,6 +27,8 @@ #define RGBFUSION2_SPEED_MID 4 #define RGBFUSION2_SPEED_MAX 0 +#define GET_JSON_VAL_ELSE_OFF(obj, key) obj.contains(key) ? obj.at(key).get() : std::string("OFF") + template static std::map reverse_map(const std::map& map) { @@ -46,28 +48,41 @@ public: RGBController_RGBFusion2USB(RGBFusion2USBController* controller_ptr, std::string _detector_name); ~RGBController_RGBFusion2USB(); - void SetupZones(); + void SetupZones(); - void ResizeZone(int zone, int new_size); + void ResizeZone(int zone, int new_size); - void DeviceUpdateLEDs(); - void UpdateZoneLEDs(int zone); - void UpdateSingleLED(int led); + void DeviceUpdateLEDs(); + void UpdateZoneLEDs(int zone); + void UpdateSingleLED(int led); - void DeviceUpdateMode(); + void DeviceUpdateMode(); private: - MBName MBName2Layout; - bool custom_layout; std::string detector_name; RGBFusion2USBController* controller; int device_num; - ZoneLeds layout; RGBColor null_color = 0; - uint16_t pid; + /*---------------------------------------------------------*\ + | The intial value of device_index should point to the | + | layout for the generic_device | + \*---------------------------------------------------------*/ + uint32_t device_index = 0; - void Load_Device_Config(); - void Init_Controller(); - int GetLED_Zone(int led_idx); + void Init_Controller(); + int GetLED_Zone(int led_idx); + + nlohmann::json WriteCalJsonFrom( + const EncodedCalibration& src); + void FillMissingWith( + nlohmann::json& dst, + const EncodedCalibration& fb); + nlohmann::json BuildCustomLayoutJson( + const gb_fusion2_device* layout, + const RvrseLedHeaders& reverseLookup); + void LoadCustomLayoutFromJson( + const nlohmann::json& json_custom, + const FwdLedHeaders& forwardLookup, + gb_fusion2_device* layout); }; diff --git a/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USBBoards.cpp b/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USBBoards.cpp deleted file mode 100644 index 58bdd3ae8..000000000 --- a/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USBBoards.cpp +++ /dev/null @@ -1,315 +0,0 @@ - -/*---------------------------------------------------------*\ -| RGBController_GigabyteRGBFusion2USBBoards.cpp | -| | -| RGBController for Gigabyte Aorus RGB Fusion 2 USB | -| motherboard | -| | -| megadjc 31 Jul 2025 | -| | -| This file is part of the OpenRGB project | -| SPDX-License-Identifier: GPL-2.0-or-later | -\*---------------------------------------------------------*/ - -#include "RGBController_GigabyteRGBFusion2USBBoards.h" - -/*---------------------------------------------------------*\ -| This is a list of known layouts listed by controller | -\*---------------------------------------------------------*/ - -const MBName MBName2LayoutLookup8297 = -{ - {"X570 AORUS ELITE", "STD_ATX" }, - {"X570 AORUS ELITE WIFI", "STD_ATX" }, - {"X570 AORUS MASTER", "MSTR_ATX_3" }, - {"X570 AORUS PRO", "STD_ATX" }, - {"X570 AORUS PRO WIFI", "STD_ATX" }, - {"X570 AORUS ULTRA", "STD_ATX" }, - {"X570 I AORUS PRO WIFI", "B550I-AORUS-PRO-AX" }, - {"Z390 AORUS MASTER-CF", "MSTR_ATX" }, -}; - -const MBName MBName2LayoutLookup8950 = -{ - {"H810M GAMING WIFI6", "H810M" }, - {"H810M H", "H810M" }, - {"H810M S2H", "H810M" }, -}; - -const MBName MBName2LayoutLookup5702 = -{ - {"A620I AX", "B650-C-V2" }, - {"A620M C", "B650-D2H" }, - {"A620M D2H", "B650-D2H" }, - {"A620M DS3H", "A620M-H" }, - {"A620M GAMING X", "A620M-H" }, - {"A620M GAMING X AX", "A620M-H" }, - {"A620M H", "A620M-H" }, - {"A620M S2H", "B650-C-V2" }, - {"B550 AORUS ELITE", "STD_ATX" }, - {"B550 AORUS ELITE AX V2", "B550-AORUS-ELITE" }, - {"B550 AORUS PRO", "STD_ATX" }, - {"B550I AORUS PRO AX", "B550I-AORUS-PRO-AX" }, - {"B650 AERO G", "X670-ELITE" }, - {"B650 AORUS ELITE", "B650-ELITE" }, - {"B650 AORUS ELITE AX", "B650-ELITE" }, - {"B650 AORUS ELITE AX ICE", "B650-ELITE-V2" }, - {"B650 AORUS ELITE AX V2", "B650-ELITE-V2" }, - {"B650 AORUS ELITE V2", "B650-ELITE-V2" }, - {"B650 AORUS PRO AX", "B650-PRO" }, - {"B650 EAGLE", "B650-Eagle-AX" }, - {"B650 EAGLE AX", "B650-Eagle-AX" }, - {"B650 GAMING X", "B650-PRO" }, - {"B650 GAMING X AX", "B650-PRO" }, - {"B650 GAMING X AX V2", "B650-PRO" }, - {"B650 GAMING X V2", "B650-PRO" }, - {"B650 UD AC", "B650-UD" }, - {"B650 UD AX", "B650-UD" }, - {"B650E AORUS ELITE X AX ICE", "B650-ELITE-V2" }, - {"B650E AORUS MASTER", "MSTR_ATX_2" }, - {"B650E AORUS PRO X USB4", "B650-USB4" }, - {"B650E AORUS TACHYON", "B650-TACH" }, - {"B650I AORUS ULTRA", "B650-D2H" }, - {"B650I AX", "B650-C-V2" }, - {"B650M AORUS ELITE", "B650-ELITE" }, - {"B650M AORUS ELITE AX", "B650-ELITE" }, - {"B650M AORUS ELITE AX ICE", "B650-ELITE" }, - {"B650M AORUS PRO", "B650-ELITE" }, - {"B650M AORUS PRO AX", "B650-ELITE" }, - {"B650M C V2", "B650-C-V2" }, - {"B650M C V3", "B650-C-V2" }, - {"B650M D2H", "B650-D2H" }, - {"B650M D2HP", "B650M-DS3H" }, - {"B650M D3HP", "B650M-DS3H" }, - {"B650M D3HP AX", "B650M-DS3H" }, - {"B650M DS3H", "B650M-DS3H" }, - {"B650M GAMING PLUS WIFI", "B650M-DS3H" }, - {"B650M GAMING WIFI", "B650M-DS3H" }, - {"B650M GAMING WIFI6", "B650M-DS3H" }, - {"B650M GAMING X AX", "B650M-DS3H" }, - {"B650M H", "B650-D2H" }, - {"B650M K", "B650M-DS3H" }, - {"B650M S2H", "B650-D2H" }, - {"B760 AORUS ELITE", "Z790-S-DDR4" }, - {"B760 AORUS ELITE AX", "Z790-S-DDR4" }, - {"B760 AORUS MASTER DDR4", "Z690-ELITE" }, - {"B760 DS3H", "Z790-S-DDR4" }, - {"B760 DS3H AC", "Z790-S-DDR4" }, - {"B760 DS3H AC DDR4", "Z790-S-DDR4" }, - {"B760 DS3H AX", "Z790-S-DDR4" }, - {"B760 DS3H AX DDR4", "Z790-S-DDR4" }, - {"B760 DS3H AX V2", "Z790-S-DDR4" }, - {"B760 DS3H DDR4", "Z790-S-DDR4" }, - {"B760 GAMING X", "Z790-S-DDR4" }, - {"B760 GAMING X AX", "Z790-S-DDR4" }, - {"B760 GAMING X AX DDR4", "Z790-S-DDR4" }, - {"B760 GAMING X DDR4", "Z790-S-DDR4" }, - {"B760I AORUS PRO", "B550I-AORUS-PRO-AX" }, - {"B760I AORUS PRO DDR4", "B550I-AORUS-PRO-AX" }, - {"B760M AORUS ELITE", "Z790-XTRM" }, - {"B760M AORUS ELITE AX", "Z790-XTRM" }, - {"B760M AORUS ELITE AX DDR4", "Z790-XTRM" }, - {"B760M AORUS ELITE DDR4", "Z790-XTRM" }, - {"B760M AORUS ELITE X AX", "B760M-EXAX" }, - {"B760M AORUS PRO", "Z790-XTRM" }, - {"B760M AORUS PRO AX", "Z790-XTRM" }, - {"B760M AORUS PRO AX DDR4", "Z790-XTRM" }, - {"B760M AORUS PRO DDR4", "Z790-XTRM" }, - {"B760M C", "Z790-S-DDR4" }, - {"B760M C V2", "Z790-S-DDR4" }, - {"B760M D2H", "B760M-D2H" }, - {"B760M D2H DDR4", "B760M-D2H" }, - {"B760M D3H", "B760M-D2H" }, - {"B760M D3H DDR4", "B760M-D2H" }, - {"B760M D3HP", "B760M-D2H" }, - {"B760M D3HP DDR4", "B760M-D2H" }, - {"B760M D3HP WIFI6", "B760M-D2H" }, - {"B760M DS3H", "B760M-D2H" }, - {"B760M DS3H AX", "B760M-D2H" }, - {"B760M DS3H AX DDR4", "B760M-D2H" }, - {"B760M DS3H DDR4", "B760M-D2H" }, - {"B760M DS3H GEN 5", "B760M-DS3H-DR-G5" }, - {"B760M G AX", "B760M-GAX" }, - {"B760M GAMING", "B760M-GAX" }, - {"B760M GAMING AC", "B760M-GAX" }, - {"B760M GAMING AC DDR4", "B760M-D2H" }, - {"B760M GAMING DDR4", "B760M-D2H" }, - {"B760M GAMING PLUS WIFI DDR4", "B760M-D2H" }, - {"B760M GAMING WIFI", "B760M-GAX" }, - {"B760M GAMING WIFI PLUS", "B760M-GAX" }, - {"B760M GAMING X", "Z790-S-DDR4" }, - {"B760M GAMING X AX", "Z790-S-DDR4" }, - {"B760M GAMING X AX DDR4", "Z790-S-DDR4" }, - {"B760M GAMING X DDR4", "Z790-S-DDR4" }, - {"B760M POWER", "B760M-D2H" }, - {"B760M POWER DDR4", "B760M-D2H" }, - {"H610M D3H DDR4", "B860I-Pro" }, - {"H610M D3H WIFI DDR4", "B860I-Pro" }, - {"H610M GAMING WIFI DDR4", "B860I-Pro" }, - {"TRX50 AERO D", "TRX50-AERO-D" }, - {"X570S AERO G", "X670-ELITE" }, - {"X570S AORUS ELITE", "X570S-ELITE" }, - {"X570S AORUS ELITE AX", "X570S-ELITE" }, - {"X570S AORUS MASTER", "X570S-A-MSTR" }, - {"X570S AORUS PRO AX", "X570S-PRO-AX" }, - {"X570S GAMING X", "X570S-ELITE" }, - {"X570S UD", "X670-ELITE" }, - {"X570SI AORUS PRO AX", "B550I-AORUS-PRO-AX" }, - {"X670 AORUS ELITE AX", "X670-ELITE" }, - {"X670 GAMING X AX", "X670-ELITE" }, - {"X670 GAMING X AX V2", "B650-Eagle-AX" }, - {"X670E AORUS MASTER", "MSTR_ATX_2" }, - {"X670E AORUS PRO X", "X670-A-PRO-X" }, - {"X670E AORUS XTREME", "MSTR_ATX_2" }, - {"Z690 AORUS ELITE", "Z690-ELITE" }, - {"Z690 AORUS ELITE AX", "Z690-ELITE" }, - {"Z690 AORUS ELITE AX DDR4", "Z690-ELITE" }, - {"Z690 AORUS ELITE DDR4", "Z690-ELITE" }, - {"Z790 AERO G", "Z790-S-DDR4" }, - {"Z790 AORUS ELITE", "Z790-ELITE" }, - {"Z790 AORUS ELITE AX", "Z790-ELITE" }, - {"Z790 AORUS ELITE AX DDR4", "Z790-ELITE" }, - {"Z790 AORUS ELITE AX ICE", "Z790-ELITE" }, - {"Z790 AORUS ELITE AX-W", "Z790-ELITE" }, - {"Z790 AORUS ELITE DDR4", "Z790-ELITE" }, - {"Z790 AORUS ELITE X", "TRX50-AERO-D" }, - {"Z790 AORUS ELITE X AX", "TRX50-AERO-D" }, - {"Z790 AORUS ELITE X WIFI7", "TRX50-AERO-D" }, - {"Z790 AORUS MASTER", "Z790-MSTR" }, - {"Z790 AORUS MASTER X", "Z790-MSTR-X" }, - {"Z790 AORUS PRO X", "Z790-PRO-X" }, - {"Z790 AORUS PRO X WIFI7", "Z790-PRO-X" }, - {"Z790 AORUS TACHYON", "Z790-XTRM" }, - {"Z790 AORUS TACHYON X", "Z790-MSTR-X" }, - {"Z790 AORUS XTREME", "Z790-XTRM" }, - {"Z790 AORUS XTREME X", "Z790-XTRM-X" }, - {"Z790 AORUS XTREME X ICE", "Z790-XTRM-X" }, - {"Z790 D", "Z790-D" }, - {"Z790 D AC", "Z790-D" }, - {"Z790 D AX", "Z790-D" }, - {"Z790 D WIFI", "Z790-D" }, - {"Z790 EAGLE", "Z790-D" }, - {"Z790 EAGLE AX", "Z790-D" }, - {"Z790 GAMING PLUS AX", "Z790-S-DDR4" }, - {"Z790 GAMING X", "Z790-S-DDR4" }, - {"Z790 GAMING X AX", "Z790-S-DDR4" }, - {"Z790 S DDR4", "Z790-S-DDR4" }, - {"Z790 S WIFI DDR4", "Z790-S-DDR4" }, - {"Z790 UD", "Z790-D" }, - {"Z790 UD AC", "Z790-D" }, - {"Z790 UD AX", "Z790-D" }, - {"Z790I AORUS ULTRA", "B550I-AORUS-PRO-AX" }, - {"Z790M AORUS ELITE", "Z790-ELITE" }, - {"Z790M AORUS ELITE AX", "Z790-ELITE" }, - {"Z790M AORUS ELITE AX ICE", "Z790-ELITE" }, -}; - -const MBName MBName2LayoutLookup5711 = -{ - {"A620I AX", "B650-D2H" }, - {"A620M DS3H", "B650M-DS3H" }, - {"A620M GAMING X", "B650M-DS3H" }, - {"A620M GAMING X AX", "B650M-DS3H" }, - {"A620M H", "B650M-DS3H" }, - {"A620M S2H", "B650M-DS3H" }, - {"B650E AORUS STEALTH ICE", "B650E-AORUS-STEALTH" }, - {"B760 DS3H GEN5", "B840M-DS3H" }, - {"B760 DS3H WIFI6E GEN5", "B840M-DS3H" }, - {"B760 GAMING X DDR4 GEN5", "B840M-DS3H" }, - {"B760 GAMING X GEN5", "B840M-DS3H" }, - {"B760 GAMING X WIFI6 GEN5", "B840M-DS3H" }, - {"B760M AORUS ELITE DDR4 GEN5", "X870-WIFI7" }, - {"B760M AORUS ELITE GEN5", "X870-WIFI7" }, - {"B760M AORUS ELITE WIFI6 DDR4 GEN5", "X870-WIFI7" }, - {"B760M AORUS ELITE WIFI6 GEN5", "X870-WIFI7" }, - {"B760M C V3", "B850-EGL-WIFI6" }, - {"B760M DS3H DDR4 GEN 5", "B760M-DS3H-DR-G5" }, - {"B760M DS3H WIFI6E DDR4 GEN 5", "B760M-DS3H-DR-G5" }, - {"B760M GAMING WIFI6 PLUS GEN5", "B760M-DS3H-DR-G5" }, - {"B760M GAMING WIFI6E GEN 5", "B760M-DS3H-DR-G5" }, - {"B760M GAMING X DDR4 GEN5", "B850-AI-TOP" }, - {"B760M GAMING X GEN5", "B850-AI-TOP" }, - {"B760M GAMING X WIFI6E DDR4 GEN5", "B850-AI-TOP" }, - {"B760M GAMING X WIFI6E GEN5", "B850-AI-TOP" }, - {"B840M AORUS ELITE WIFI6E", "B840M-WIFI6E" }, - {"B840M D2H", "B840M-DS3H" }, - {"B840M DS3H", "B840M-DS3H" }, - {"B840M EAGLE WIFI6", "B840M-DS3H" }, - {"B850 AI Top", "B850-AI-TOP" }, - {"B850 AORUS ELITE WIFI7", "X870-WIFI7" }, - {"B850 AORUS ELITE WIFI7 ICE", "X870-WIFI7" }, - {"B850 EAGLE ICE", "B850-EGL-WIFI6" }, - {"B850 EAGLE WIFI6E", "B850-EGL-WIFI6" }, - {"B850 EAGLE WIFI7 ICE", "B850-EGL-WIFI6" }, - {"B850 GAMING WIFI6", "B850-EGL-WIFI6" }, - {"B850 GAMING X WIFI6E", "B850-GMX-WIFI6" }, - {"B850I AORUS PRO", "X870I-PRO" }, - {"B850M AORUS ELITE", "B850-GMX-WIFI6" }, - {"B850M AORUS ELITE WIFI6E", "B850-GMX-WIFI6" }, - {"B850M AORUS ELITE WIFI6E ICE", "B850-GMX-WIFI6" }, - {"B850M AORUS PRO WIFI7", "Z890-WIFI7" }, - {"B850M D3HP", "X870I-PRO" }, - {"B850M DS3H", "B850-EGL-WIFI6" }, - {"B850M DS3H ICE", "B850-EGL-WIFI6" }, - {"B850M EAGLE WIFI6E", "B850-EGL-WIFI6" }, - {"B850M EAGLE WIFI6E ICE", "B850-EGL-WIFI6" }, - {"B850M FORCE", "B850-EGL-WIFI6" }, - {"B850M FORCE WIFI6E", "B850-EGL-WIFI6" }, - {"B850M GAMING X WIFI6E", "B850-GMX-WIFI6" }, - {"B860 AORUS ELITE WIFI7 ICE", "B860-WIFI7" }, - {"B860 DS3H", "B860-DS3H" }, - {"B860 DS3H WIFI6E", "B860-DS3H" }, - {"B860 EAGLE WIFI6E", "B860-EGL-WIFI6" }, - {"B860 GAMING X WIFI6E", "B860-DS3H" }, - {"B860I AORUS PRO ICE", "B860I-Pro" }, - {"B860M AORUS ELITE", "B860-WIFI7" }, - {"B860M AORUS ELITE WIFI6E", "B860-WIFI7" }, - {"B860M AORUS ELITE WIFI6E ICE", "B860-WIFI7" }, - {"B860M AORUS PRO WIFI7", "B860-WIFI7" }, - {"B860M D2H", "B860M-D2H" }, - {"B860M EAGLE", "B860-EGL-P-WIFI6" }, - {"B860M EAGLE DS3H", "B860-EGL-P-WIFI6" }, - {"B860M EAGLE DS3H WIFI6E", "B860-EGL-P-WIFI6" }, - {"B860M EAGLE PLUS WIFI6E", "B860-EGL-P-WIFI6" }, - {"B860M EAGLE WIFI6", "B860-EGL-P-WIFI6" }, - {"B860M EAGLE WIFI6 V2", "B860-EGL-P-WIFI6" }, - {"B860M GAMING WIFI6", "B860M-D2H" }, - {"B860M GAMING X", "B860-EGL-P-WIFI6" }, - {"B860M GAMING X WIFI6E", "B860-EGL-P-WIFI6" }, - {"B860M POWER", "B860-EGL-P-WIFI6" }, - {"TRX50 AI TOP", "TRX50-A-TP" }, - {"W790 AI TOP", "B850-AI-TOP" }, - {"W880 AI TOP", "B850-AI-TOP" }, - {"X870 AORUS ELITE WIFI7", "X870-WIFI7" }, - {"X870 AORUS ELITE WIFI7 ICE", "X870-WIFI7" }, - {"X870 EAGLE WIFI7", "X870-WIFI7" }, - {"X870 GAMING WIFI6", "X870-WIFI7" }, - {"X870 GAMING X WIFI", "X870-WIFI7" }, - {"X870E AORUS ELITE WIFI7", "X870E-WIFI7" }, - {"X870E AORUS ELITE WIFI7 ICE", "X870E-WIFI7" }, - {"X870E AORUS MASTER", "X870E-MSTR" }, - {"X870E AORUS PRO", "X870E-PRO" }, - {"X870E AORUS PRO ICE", "X870E-PRO" }, - {"X870E AORUS XTREME AI TOP", "X870E-XTRM-AI-TOP" }, - {"X870I AORUS PRO", "X870I-PRO" }, - {"X870I AORUS PRO ICE", "X870I-PRO" }, - {"Z890 AERO D", "B850-AI-TOP" }, - {"Z890 AERO G", "B850-AI-TOP" }, - {"Z890 AI TOP", "B850-AI-TOP" }, - {"Z890 AORUS ELITE WIFI7", "Z890-WIFI7" }, - {"Z890 AORUS ELITE WIFI7 ICE", "Z890-WIFI7" }, - {"Z890 AORUS ELITE X ICE", "Z890-WIFI7" }, - {"Z890 AORUS MASTER", "Z890-MSTR" }, - {"Z890 AORUS MASTER AI TOP", "Z890-MSTR-AI-TOP" }, - {"Z890 AORUS PRO ICE", "Z890-WIFI7" }, - {"Z890 AORUS TACHYON ICE", "B850-AI-TOP" }, - {"Z890 AORUS XTREME AI TOP", "Z890-XTRM-AI-TOP" }, - {"Z890 EAGLE", "Z890-WIFI7" }, - {"Z890 EAGLE WIFI7", "Z890-WIFI7" }, - {"Z890 GAMING X WIFI7", "Z890-WIFI7" }, - {"Z890 UD WIFI6E", "B850-AI-TOP" }, - {"Z890I AORUS ULTRA", "Z890-A-ULTRA" }, - {"Z890M AORUS ELITE WIFI7", "Z890-WIFI7" }, - {"Z890M AORUS ELITE WIFI7 ICE", "Z890-WIFI7" }, - {"Z890M GAMING X", "X870I-PRO" }, -}; diff --git a/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USBBoards.h b/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USBBoards.h deleted file mode 100644 index 41c6b8f83..000000000 --- a/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USBBoards.h +++ /dev/null @@ -1,25 +0,0 @@ -/*---------------------------------------------------------*\ -| RGBController_GigabyteRGBFusion2USBBoards.h | -| | -| RGBController for Gigabyte Aorus RGB Fusion 2 USB | -| motherboard | -| | -| megadjc 31 Jul 2025 | -| | -| This file is part of the OpenRGB project | -| SPDX-License-Identifier: GPL-2.0-or-later | -\*---------------------------------------------------------*/ - -#pragma once - -#include -#include - -using MBName = std::map; - -extern const MBName MBName2LayoutLookup8297; -extern const MBName MBName2LayoutLookup8950; -extern const MBName MBName2LayoutLookup5702; -extern const MBName MBName2LayoutLookup5711; - - diff --git a/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USBLayouts.cpp b/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USBLayouts.cpp deleted file mode 100644 index 517572a6d..000000000 --- a/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USBLayouts.cpp +++ /dev/null @@ -1,1967 +0,0 @@ -/*---------------------------------------------------------*\ -| RGBController_GigabyteRGBFusion2USBLayouts.cpp | -| | -| RGBController for Gigabyte Aorus RGB Fusion 2 USB | -| motherboard | -| | -| megadjc 31 Jul 2025 | -| | -| This file is part of the OpenRGB project | -| SPDX-License-Identifier: GPL-2.0-or-later | -\*---------------------------------------------------------*/ - -#include "RGBController_GigabyteRGBFusion2USBLayouts.h" -#include "GigabyteRGBFusion2USBController.h" - -/*-------------------------------------------------*\ -| LedHeaders is a map of the led header addresses | -\*-------------------------------------------------*/ -const FwdLedHeaders LedLookup = -{ - {"LED1", 0}, - {"LED2", 1}, - {"LED3", 2}, - {"LED4", 3}, - {"LED5", 4}, - {"LED6", 5}, - {"LED7", 6}, - {"LED8", 7}, - {"LED9", 8}, - {"LED10", 9}, - {"LED11", 10}, - {"HDR_D_LED1", 5}, - {"HDR_D_LED2", 6}, - {"HDR_D_LED3", 7}, - {"HDR_D_LED4", 8}, - {"HDR_D_LED1_RGB", 0x58}, - {"HDR_D_LED2_RGB", 0x59}, - {"HDR_D_LED3_RGB", 0x62}, - {"HDR_D_LED4_RGB", 0x63}, -}; - -/*-------------------------------------------------*\ -| These are the default Custom layouts that will | -| be written into config if they doesn't exist | -\*-------------------------------------------------*/ -const KnownLayout HardcodedCustom_Gen1 = -{ - { - "Custom", - { - { - "D_LED2 Top", - { - { "Name for LED Strip 2", HDR_D_LED2, 0 }, - } - }, - { - "D_LED1 Bottom", - { - { "Name for LED Strip 1", HDR_D_LED1, 0 }, - } - }, - { - "Motherboard", - { - { "Name for Led 1", LED1, 1 }, - { "Name for Led 2", LED2, 1 }, - { "Name for Led 3", LED3, 1 }, - { "Name for Led 4", LED4, 1 }, - { "Name for Led 5", LED5, 1 }, - { "Name for Led 8", LED8, 1 }, - } - } - } - } -}; - -const KnownLayout HardcodedCustom_Gen2 = -{ - { - "Custom", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "ARGB_V2_4", - { - { "ARGB_V2_4", HDR_D_LED4, 0 }, - } - }, - { - "Motherboard", - { - { "0x20", LED1, 1 }, - { "0x21", LED2, 1 }, - { "0x22", LED3, 1 }, - { "0x23", LED4, 1 }, - { "0x90", LED9, 1 }, - { "0x91", LED10, 1 }, - { "0x92", LED11, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, -}; - - -/*-------------------------------------------------*\ -| KnownLayoutsLookup contains zone mapping data | -| for each motherboard. | -\*-------------------------------------------------*/ -const KnownLayout knownLayoutsLookup = -{ - { - "STD_ATX", - { - { - "D_LED1 Bottom", - { - { "D_LED1 Bottom", HDR_D_LED1, 0 }, - } - }, - { - "D_LED2 Top", - { - { "D_LED2 Top", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Back I/O", LED1, 1 }, - { "PCIe", LED4, 1 }, - } - }, - { - "12V RGB Strips", - { - { "CPU Header", LED2, 1 }, - { "LED_C1/C2", LED5, 1 }, - } - } - } - }, - { - "A620M-H", - { - { - "D_LED1", - { - { "D_LED1", HDR_D_LED1, 0 }, - } - }, - { - "D_LED2", - { - { "D_LED2", HDR_D_LED2, 0 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED2, 1 }, - } - } - } - }, - { - "B550-AORUS-ELITE", - { - { - "D_LED1 Bottom", - { - { "D_LED1", LED6, 0 }, - } - }, - { - "D_LED2 Top", - { - { "D_LED2", LED7, 0 }, - } - }, - { - "Motherboard", - { - { "Top LED", LED1, 1 }, - { "Bottom LED", LED4, 1 }, - } - }, - { - "12V RGB Strip", - { - { "CPU Header", LED3, 1 }, - { "C_LED1", LED2, 1 }, - { "C_LED2", LED5, 1 }, - } - } - } - }, - { - "B550I-AORUS-PRO-AX", - { - { - "D_LED", - { - { "D_LED", HDR_D_LED1, 0 }, - } - }, - { - "Motherboard", - { - { "Top LED", LED1, 1 }, - { "Top Middle LED", LED2, 1 }, - { "Bottom Middle LED", LED3, 1 }, - { "Bottom LED", LED4, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B650-C-V2", - { - { - "D_LED", - { - { "D_LED", HDR_D_LED1, 0 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED2, 1 }, - } - } - } - }, - { - "B650-D2H", - { - { - "D_LED", - { - { "D_LED", HDR_D_LED1, 0 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B650-Eagle-AX", - { - { - "ARGB_V2_1/V2.3", - { - { "ARGB_V2_1/V2.3", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B650-ELITE", - { - { - "D_LED2 Top", - { - { "D_LED2 Top", HDR_D_LED1, 0 }, - } - }, - { - "D_LED1 Bottom", - { - { "D_LED1 Bottom", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED4, 1 }, - } - }, - { - "12V RGB Strips", - { - { "CPU Header", LED3, 1 }, - { "LED_C1", LED2, 1 }, - { "LED_C2", LED5, 1 }, - } - } - } - }, - { - "B650-ELITE-V2", - { - { - "D_LED2 Top", - { - { "D_LED2 Top", HDR_D_LED1, 0 }, - } - }, - { - "D_LED1 Bottom", - { - { "D_LED1 Bottom", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED4, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B650-PRO", - { - { - "D_LED2 Top", - { - { "D_LED2 Top", HDR_D_LED1, 0 }, - } - }, - { - "D_LED1 Bottom", - { - { "D_LED1 Bottom", HDR_D_LED2, 0 }, - } - }, - { - "12V RGB Strips", - { - { "CPU Header", LED3, 1 }, - { "LED_C1", LED2, 1 }, - { "LED_C2", LED5, 1 }, - } - } - } - }, - { - "B650-UD", - { - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED1, 0 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B650E-AORUS-STEALTH", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED11, 1 }, - { "Logo", LED10, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B650-TACH", - { - { - "D_LED", - { - { "D_LED", HDR_D_LED1, 0 }, - } - }, - { - "12V RGB Strips", - { - { "CPU Header", LED3, 1 }, - { "LED_C", LED2, 1 }, - } - } - } - }, - { - "B650-USB4", - { - { - "ARGB_V2_1/V2.3", - { - { "ARGB_V2_1/V2.3", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED3, 1 }, - { "Cover Left", LED4, 1 }, - { "Cover Right", LED1, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B650M-DS3H", - { - { - "D_LED1", - { - { "D_LED1", HDR_D_LED1, 0 }, - } - }, - { - "D_LED2", - { - { "D_LED2", HDR_D_LED2, 0 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B760M-D2H", - { - { - "D_LED", - { - { "D_LED", HDR_D_LED1, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED4, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED2, 1 }, - } - } - } - }, - { - "B760M-EXAX", - { - { - "ARGB_V2_1/V2.3", - { - { "ARGB_V2_1/V2.3", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Top Logo", LED4, 1 }, - { "Top Middle Logo", LED3, 1 }, - { "Bottom Middle Logo", LED2, 1 }, - { "Bottom Logo", LED1, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B760M-GAX", - { - { - "D_LED1", - { - { "D_LED1", HDR_D_LED1, 0 }, - } - }, - { - "D_LED2", - { - { "D_LED2", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED2, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED2, 1 }, - } - } - } - }, - { - "B760M-DS3H-DR-G5", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED1, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B840M-WIFI6E", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED3, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B840M-DS3H", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B850-AI-TOP", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B850-EGL-WIFI6", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B850-GMX-WIFI6", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED3, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B860-DS3H", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED3, 1 }, - { "Logo", LED10, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B860-EGL-WIFI6", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B860-EGL-P-WIFI6", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED1, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B860-WIFI7", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED3, 1 }, - { "Logo", LED10, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "B860I-Pro", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - } - } - }, - { - "H810M", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", LED3, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", LED4, 0 }, - } - }, - } - }, - { - "MSTR_ATX", - { - { - "D_LED1 Bottom", - { - { "D_LED1 Bottom", HDR_D_LED1, 0 }, - } - }, - { - "D_LED2 Top", - { - { "D_LED2 Top", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Back IO / VRM", LED7, 0 }, - { "Chipset Logo", LED3, 1 }, - { "PCIe", LED4, 1 }, - { "XMP Logo", LED2, 1 }, - } - }, - { - "12V RGB Strips", - { - { "LED_C1/C2", LED5, 1 }, - } - } - } - }, - { - "MSTR_ATX_2", - { - { - "D_LED2 Top", - { - { "D_LED2 Top", HDR_D_LED1, 0 }, - } - }, - { - "D_LED1 Bottom", - { - { "D_LED1 Bottom", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Cover Left", LED4, 1 }, - { "Cover Right", LED1, 1 }, - } - }, - { - "12V RGB Strips", - { - { "CPU Header", LED3, 1 }, - { "LED_C1", LED2, 1 }, - { "LED_C2", LED5, 1 }, - } - } - } - }, - { - "MSTR_ATX_3", - { - { - "D_LED2 Top", - { - { "D_LED2 Top", HDR_D_LED1, 0 }, - } - }, - { - "D_LED1 Bottom", - { - { "D_LED1 Bottom", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Aorus Logo", LED7, 1 }, - { "ESS Logo", LED4, 1 }, - } - }, - { - "12V RGB Strips", - { - { "LED_C1/C2", LED5, 1 }, - } - } - } - }, - { - "TRX50-AERO-D", - { - { - "ARGB_V2_1/V2.3", - { - { "ARGB_V2_1/V2.3", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED3, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "TRX50-A-TP", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "X570S-ELITE", - { - { - "D_LED2 Top", - { - { "D_LED2 Top", HDR_D_LED1, 0 }, - } - }, - { - "D_LED1 Bottom", - { - { "D_LED1 Bottom", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Top Right Accents", LED4, 1 }, - } - }, - { - "12V RGB Strips", - { - { "CPU Header", LED3, 1 }, - { "LED_C1", LED2, 1 }, - { "LED_C2", LED5, 1 }, - } - } - } - }, - { - "X570S-A-MSTR", - { - { - "D_LED2 Top", - { - { "D_LED2 Top", HDR_D_LED1, 0 }, - } - }, - { - "D_LED1 Bottom", - { - { "D_LED1 Bottom", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Logo", LED1, 1 }, - } - }, - { - "12V RGB Strips", - { - { "CPU Header", LED3, 1 }, - { "LED_C1", LED2, 1 }, - { "LED_C2", LED5, 1 }, - } - } - } - }, - { - "X570S-PRO-AX", - { - { - "D_LED2 Top", - { - { "D_LED2 Top", HDR_D_LED1, 0 }, - } - }, - { - "D_LED1 Bottom", - { - { "D_LED1 Bottom", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Logo", LED1, 1 }, - { "ESS Logo", LED4, 1 }, - } - }, - { - "12V RGB Strips", - { - { "CPU Header", LED3, 1 }, - { "LED_C1", LED2, 1 }, - { "LED_C2", LED5, 1 }, - } - } - } - }, - { - "X670-ELITE", - { - { - "D_LED2 Top", - { - { "D_LED2 Top", HDR_D_LED1, 0 }, - } - }, - { - "D_LED1 Bottom", - { - { "D_LED1 Bottom", HDR_D_LED2, 0 }, - } - }, - { - "12V RGB Strips", - { - { "CPU Header", LED3, 1 }, - { "LED_C1", LED2, 1 }, - { "LED_C2", LED5, 1 }, - } - } - } - }, - { - "X670-A-PRO-X", - { - { - "D_LED2 Top", - { - { "D_LED2 Top", HDR_D_LED1, 0 }, - } - }, - { - "D_LED1 Bottom", - { - { "D_LED1 Bottom", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Cover Left", LED4, 1 }, - { "Cover Right", LED1, 1 }, - } - }, - { - "12V RGB Strips", - { - { "LED_C1", LED2, 1 }, - { "LED_C2", LED5, 1 }, - } - } - } - }, - { - "X870-WIFI7", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED3, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "X870E-WIFI7", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED11, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - }, - } - }, - { - "X870E-PRO", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED11, 1 }, - { "Logo", LED10, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "X870E-MSTR", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "ARGB_V2_4", - { - { "ARGB_V2_4", HDR_D_LED4, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED11, 1 }, - { "Logo", LED10, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "X870E-XTRM-AI-TOP", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED11, 1 }, - { "Logo", LED10, 1 }, - { "Wifi Antenna Accent", LED9, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "X870I-PRO", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "Z690-ELITE", - { - { - "D_LED1", - { - { "D_LED1", HDR_D_LED1, 0 }, - } - }, - { - "D_LED2", - { - { "D_LED2", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Top Right Accent", LED3, 1 }, - { "Middle Right Accent", LED4, 1 }, - { "Logo", LED1, 1 }, - } - }, - { - "12V RGB Strips", - { - { "LED_C1", LED2, 1 }, - { "LED_C2", LED5, 1 }, - } - } - } - }, - { - "Z790-D", - { - { - "D_LED1", - { - { "D_LED1", HDR_D_LED1, 0 }, - } - }, - { - "D_LED2", - { - { "D_LED2", HDR_D_LED2, 0 }, - } - } - } - }, - { - "Z790-PRO-X", - { - { - "ARGB_V2_1/ARGB V 2.3", - { - { "ARGB_V2_1/ARGB V 2.3", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Logo", LED1, 1 }, - { "Logo 2", LED4, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "Z790-MSTR", - { - { - "D_LED1", - { - { "D_LED1", HDR_D_LED1, 0 }, - } - }, - { - "D_LED2", - { - { "D_LED2", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Logo", LED1, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "Z790-MSTR-X", - { - { - "ARGB_V2_1/V2.3", - { - { "ARGB_V2_1/V2.3", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Logo", LED1, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "Z790-ELITE", - { - { - "D_LED1", - { - { "D_LED1", HDR_D_LED1, 0 }, - } - }, - { - "D_LED2", - { - { "D_LED2", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Logo", LED3, 1 }, - } - }, - { - "12V RGB Strips", - { - { "LED_C1", LED2, 1 }, - { "LED_C2", LED5, 1 }, - } - } - } - }, - { - "Z790-S-DDR4", - { - { - "D_LED1", - { - { "D_LED1", HDR_D_LED1, 0 }, - } - }, - { - "D_LED2", - { - { "D_LED2", HDR_D_LED2, 0 }, - } - }, - { - "12V RGB Strips", - { - { "LED_C1", LED2, 1 }, - { "LED_C2", LED5, 1 }, - } - } - } - }, - { - "Z790-XTRM", - { - { - "D_LED1", - { - { "D_LED1", HDR_D_LED1, 0 }, - } - }, - { - "D_LED2", - { - { "D_LED2", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED3, 1 }, - } - }, - { - "12V RGB Strips", - { - { "LED_C1", LED2, 1 }, - { "LED_C2", LED5, 1 }, - } - } - } - }, - { - "Z790-XTRM-X", - { - { - "ARGB_V2_1/V2.3", - { - { "ARGB_V2_1/V2.3", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED3, 1 }, - } - }, - { - "12V RGB Strips", - { - { "LED_C1", LED5, 1 }, - { "LED_C2", LED4, 1 }, - { "LED_C3", LED2, 1 }, - } - } - } - }, - { - "Z890-WIFI7", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED3, 1 }, - { "Logo", LED10, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "Z890-MSTR", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "ARGB_V2_4", - { - { "ARGB_V2_4", HDR_D_LED4, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED3, 1 }, - { "Logo", LED10, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "Z890-MSTR-AI-TOP", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "ARGB_V2_4", - { - { "ARGB_V2_4", HDR_D_LED4, 0 }, - } - }, - { - "Motherboard", - { - { "Accent", LED11, 1 }, - { "Logo", LED10, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "Z890-XTRM-AI-TOP", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "ARGB_V2_4", - { - { "ARGB_V2_4", HDR_D_LED4, 0 }, - } - }, - { - "Motherboard", - { - { "Logo", LED10, 1 }, - { "WIFI Antenna Accent", LED11, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "Z890-A-ULTRA", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "Motherboard", - { - { "Logo", LED10, 1 }, - } - } - } - }, - { - "IT5711-Generic", - { - { - "ARGB_V2_1", - { - { "ARGB_V2_1", HDR_D_LED1, 0 }, - } - }, - { - "ARGB_V2_2", - { - { "ARGB_V2_2", HDR_D_LED2, 0 }, - } - }, - { - "ARGB_V2_3", - { - { "ARGB_V2_3", HDR_D_LED3, 0 }, - } - }, - { - "ARGB_V2_4", - { - { "ARGB_V2_4", HDR_D_LED4, 0 }, - } - }, - { - "Motherboard", - { - { "0x20", LED1, 1 }, - { "Ox21", LED2, 1 }, - { "0x22", LED3, 1 }, - { "0x23", LED4, 1 }, - { "0x90", LED9, 1 }, - { "0x91", LED10, 1 }, - { "0x92", LED11, 1 }, - } - }, - { - "12V RGB Strip", - { - { "LED_C", LED5, 1 }, - } - } - } - }, - { - "IT8297BX-GBX570", - { - { - "D_LED2 Top", - { - { "Name for LED Strip 2", HDR_D_LED2, 0 }, - } - }, - { - "D_LED1 Bottom", - { - { "Name for LED Strip 1", HDR_D_LED1, 0 }, - } - }, - { - "Motherboard", - { - { "Name for Led 1", LED1, 1 }, - { "Name for Led 2", LED2, 1 }, - { "Name for Led 3", LED3, 1 }, - { "Name for Led 4", LED4, 1 }, - { "Name for Led 5", LED5, 1 }, - { "Name for Led 6", LED6, 1 }, - { "Name for Led 7", LED7, 1 }, - { "Name for Led 8", LED8, 1 }, - } - } - } - } -}; diff --git a/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USBLayouts.h b/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USBLayouts.h deleted file mode 100644 index 78fcad9ac..000000000 --- a/Controllers/GigabyteRGBFusion2USBController/RGBController_GigabyteRGBFusion2USBLayouts.h +++ /dev/null @@ -1,36 +0,0 @@ -/*---------------------------------------------------------*\ -| RGBController_GigabyteRGBFusion2USBLayouts.h | -| | -| RGBController for Gigabyte Aorus RGB Fusion 2 USB | -| motherboard | -| | -| megadjc 31 Jul 2025 | -| | -| This file is part of the OpenRGB project | -| SPDX-License-Identifier: GPL-2.0-or-later | -\*---------------------------------------------------------*/ - -#pragma once - -#include -#include -#include - -/* LED port definition */ -struct LedPort -{ - std::string name; - int header; - int count; -}; - -/* Type aliases */ -using FwdLedHeaders = std::map; -using RvrseLedHeaders = std::map; -using ZoneLeds = std::map>; -using KnownLayout = std::map; - -extern const KnownLayout HardcodedCustom_Gen1; -extern const KnownLayout HardcodedCustom_Gen2; -extern const KnownLayout knownLayoutsLookup; -extern const FwdLedHeaders LedLookup; \ No newline at end of file