Move HID detector calls to RunHIDDetector/RunHIDWrappedDetector functions and return controller list from detector functions

This commit is contained in:
Adam Honse committed 2026-07-07 01:35:34 -05:00
1 parent 464ef419e7
commit fe4ca34528
203 files changed
+4754 -4576

No files matched your search

@@ -20,20 +20,15 @@
#include "RGBController.h"
#include "RGBController_ENESMBus.h"
/******************************************************************************************\
* *
* DetectSpectrixS40GControllers *
* *
* Detects ENE SMBus controllers on XPG Spectrix S40G NVMe devices *
* *
\******************************************************************************************/
void DetectSpectrixS40GControllers()
DetectedControllers DetectSpectrixS40GControllers()
{
/*---------------------------------------------------------------------*\
| Search for /dev/nvmeX nodes with model matching "XPG SPECTRIX S40G" |
\*---------------------------------------------------------------------*/
unsigned int nvme_idx = 0;
DetectedControllers detected_controllers;
/*-----------------------------------------------------*\
| Search for /dev/nvmeX nodes with model matching |
| "XPG SPECTRIX S40G" |
\*-----------------------------------------------------*/
unsigned int nvme_idx = 0;
while(1)
{
@@ -82,12 +77,14 @@ void DetectSpectrixS40GControllers()
ENESMBusController* controller = new ENESMBusController(interface, 0x67, "XPG Spectrix S40G", DEVICE_TYPE_STORAGE);
RGBController_ENESMBus* rgb_controller = new RGBController_ENESMBus(controller);
DetectionManager::get()->RegisterRGBController(rgb_controller);
detected_controllers.push_back(rgb_controller);
}
}
nvme_idx++;
}
} /* DetectSpectrixS40GControllers() */
return(detected_controllers);
}
REGISTER_DETECTOR( "XPG Spectrix S40G", DetectSpectrixS40GControllers);