mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2025-12-24 07:47:49 -05:00
51 lines
2.2 KiB
C++
51 lines
2.2 KiB
C++
/*---------------------------------------------------------*\
|
|
| SeagateControllerDetect.cpp |
|
|
| |
|
|
| Detector for Seagate |
|
|
| |
|
|
| Adam Honse (CalcProgrammer1) 15 Jun 2023 |
|
|
| |
|
|
| This file is part of the OpenRGB project |
|
|
| SPDX-License-Identifier: GPL-2.0-or-later |
|
|
\*---------------------------------------------------------*/
|
|
|
|
#include "Detector.h"
|
|
#include "SeagateController.h"
|
|
#include "RGBController_Seagate.h"
|
|
#include "scsiapi.h"
|
|
|
|
/******************************************************************************************\
|
|
* *
|
|
* DetectSeagateControllers *
|
|
* *
|
|
* Detects Seagate FireCuda HDD devices *
|
|
* *
|
|
\******************************************************************************************/
|
|
|
|
void DetectSeagateControllers()
|
|
{
|
|
scsi_device_info * info = scsi_enumerate(NULL, NULL);
|
|
|
|
while(info)
|
|
{
|
|
if(strncmp(info->vendor, "Seagate", 7) == 0 && strncmp(info->product, "FireCuda HDD", 12) == 0)
|
|
{
|
|
scsi_device * dev = scsi_open_path(info->path);
|
|
|
|
if(dev)
|
|
{
|
|
SeagateController* controller = new SeagateController(dev, info->path);
|
|
RGBController_Seagate* rgb_controller = new RGBController_Seagate(controller);
|
|
|
|
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
|
}
|
|
}
|
|
info = info->next;
|
|
}
|
|
|
|
scsi_free_enumeration(info);
|
|
|
|
} /* DetectSeagateControllers() */
|
|
|
|
REGISTER_DETECTOR("Seagate Firecuda HDD", DetectSeagateControllers);
|