diff --git a/OpenAuraSDK.h b/OpenAuraSDK.h deleted file mode 100644 index 59ff0781..00000000 --- a/OpenAuraSDK.h +++ /dev/null @@ -1,12 +0,0 @@ -#include -#include "AuraController.h" -#include "i2c_smbus.h" - -#define MODE_AUTO 0 -#define MODE_QUICK 1 -#define MODE_READ 2 -#define MODE_FUNC 3 - -std::string DetectI2C(i2c_smbus_interface * bus, int mode); -void DumpAuraRegisters(AuraController * controller); -void DetectRGBControllers(); \ No newline at end of file diff --git a/OpenAuraSDK.cpp b/OpenRGB.cpp similarity index 91% rename from OpenAuraSDK.cpp rename to OpenRGB.cpp index f13dcef2..e8ae518b 100644 --- a/OpenAuraSDK.cpp +++ b/OpenRGB.cpp @@ -1,14 +1,12 @@ /******************************************************************************************\ * * -* OpenAuraSDK.cpp * +* OpenRGB.cpp * * * -* Functions for communicating with Asus Aura devices on Windows and Linux * +* Functions for communicating with RGBController API devices on Windows and Linux * * * \******************************************************************************************/ -#include "AuraController.h" #include "RGBController.h" -#include "RGBController_AorusGPU.h" #include "i2c_smbus.h" #include #include @@ -319,40 +317,6 @@ void DetectI2CBusses() #endif /* WIN32 */ -/******************************************************************************************\ -* * -* DumpAuraRegisters * -* * -* Dumps register values from an Aura device * -* * -\******************************************************************************************/ - -void DumpAuraRegisters(AuraController * controller) -{ - int i, j; - - int start = 0x0000; - - FILE* file = freopen("auradump.txt", "a", stdout); - - printf(" 0 1 2 3 4 5 6 7 8 9 a b c d e f\r\n"); - - for (i = 0; i < 0xFFFF; i += 16) - { - printf("%04x: ", i + start); - - for (j = 0; j < 16; j++) - { - printf("%02x ", controller->AuraRegisterRead(start + i + j)); - } - - printf("\r\n"); - } - - fclose(file); - -} /* DumpAuraRegisters() */ - void DetectAuraControllers(std::vector &busses, std::vector &rgb_controllers); void DetectCorsairControllers(std::vector &busses, std::vector &rgb_controllers); void DetectCorsairProControllers(std::vector &busses, std::vector &rgb_controllers); @@ -365,6 +329,7 @@ void DetectOpenRazerControllers(std::vector &rgb_controllers); void DetectRazerChromaSDKControllers(std::vector& rgb_controllers); void DetectE131Controllers(std::vector &rgb_controllers); void DetectAMDWraithPrismControllers(std::vector& rgb_controllers); +void DetectAorusGPUControllers(std::vector &rgb_controllers); /******************************************************************************************\ * * @@ -390,18 +355,19 @@ void DetectRGBControllers(void) DetectAMDWraithPrismControllers(rgb_controllers); + /*-------------------------------------*\ + | Windows-only devices | + \*-------------------------------------*/ #ifdef WIN32 DetectRazerChromaSDKControllers(rgb_controllers); + //DetectAorusGPUControllers(rgb_controllers); + + /*-------------------------------------*\ + | Linux-only devices | + \*-------------------------------------*/ #else DetectE131Controllers(rgb_controllers); DetectOpenRazerControllers(rgb_controllers); #endif - //This is for testing Aorus GPU -#if 0 - RGBController_AorusGPU * aorus_rgb = new RGBController_AorusGPU(); - - rgb_controllers.push_back(aorus_rgb); -#endif - -} +} /* DetectRGBControllers() */ diff --git a/OpenRGB.h b/OpenRGB.h new file mode 100644 index 00000000..33f2bf1e --- /dev/null +++ b/OpenRGB.h @@ -0,0 +1 @@ +void DetectRGBControllers(); \ No newline at end of file diff --git a/OpenRGB.pro b/OpenRGB.pro index 514106d6..75074a45 100644 --- a/OpenRGB.pro +++ b/OpenRGB.pro @@ -24,7 +24,7 @@ INCLUDEPATH += \ SOURCES += \ main.cpp \ - OpenAuraSDK.cpp \ + OpenRGB.cpp \ qt/OpenRGBDeviceInfoPage.cpp \ qt/OpenRGBDevicePage.cpp \ qt/OpenRGBDialog.cpp \ diff --git a/RGBController/AorusGPUDetect.cpp b/RGBController/AorusGPUDetect.cpp new file mode 100644 index 00000000..a2f4e093 --- /dev/null +++ b/RGBController/AorusGPUDetect.cpp @@ -0,0 +1,21 @@ +#include "RGBController.h" +#include "RGBController_AorusGPU.h" +#include +#include +#include + + +/******************************************************************************************\ +* * +* DetectAorusGPUControllers * +* * +* Detect devices supported by the Aorus GPU driver * +* * * +\******************************************************************************************/ + +void DetectAorusGPUControllers(std::vector &rgb_controllers) +{ + RGBController_AorusGPU * aorus_rgb = new RGBController_AorusGPU(); + + rgb_controllers.push_back(aorus_rgb); +} /* DetectLEDStripControllers() */ \ No newline at end of file diff --git a/main.cpp b/main.cpp index 26818777..9ee6447d 100644 --- a/main.cpp +++ b/main.cpp @@ -6,7 +6,7 @@ * * \******************************************************************************************/ -#include "OpenAuraSDK.h" +#include "OpenRGB.h" #include "RGBController.h" #include "i2c_smbus.h" #include diff --git a/qt/OpenRGBDialog.cpp b/qt/OpenRGBDialog.cpp index 57ef65ba..07ccfbbd 100644 --- a/qt/OpenRGBDialog.cpp +++ b/qt/OpenRGBDialog.cpp @@ -1,5 +1,4 @@ #include "OpenRGBDialog.h" -#include "OpenAuraSDK.h" using namespace Ui; diff --git a/qt/OpenRGBDialog2.cpp b/qt/OpenRGBDialog2.cpp index 16d8eb2f..5e5d2561 100644 --- a/qt/OpenRGBDialog2.cpp +++ b/qt/OpenRGBDialog2.cpp @@ -2,7 +2,6 @@ #include "OpenRGBDevicePage.h" #include "OpenRGBDeviceInfoPage.h" #include "OpenRGBSystemInfoPage.h" -#include "OpenAuraSDK.h" #include #include