mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-06-01 18:44:49 -04:00
XPG SSD working on Linux - DO NOT USE IF YOU DON'T HAVE XPG S40G AS /dev/nvme0!
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
/*-------------------------------------------------------------------*\
|
||||
| XPGSpectrixS40GControllerDetect.cpp |
|
||||
| |
|
||||
| Driver for XPG's Spectrix S40G NVMe |
|
||||
| |
|
||||
| NicolasNewman 25th Mar 2021 |
|
||||
| |
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
#include "Detector.h"
|
||||
#include "XPGSpectrixS40GController.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_XPGSpectrixS40G.h"
|
||||
#include <vector>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <string.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
void DetectSpectrixS40GControllers(std::vector<RGBController*>& rgb_controllers)
|
||||
{
|
||||
XPGSpectrixS40GController* new_xpg_s40g;
|
||||
RGBController_XPGSpectrixS40G* new_controller;
|
||||
|
||||
int nvme_fd = open("/dev/nvme0", O_RDWR);
|
||||
|
||||
new_xpg_s40g = new XPGSpectrixS40GController(nvme_fd, 0x67);
|
||||
|
||||
new_controller = new RGBController_XPGSpectrixS40G(new_xpg_s40g);
|
||||
rgb_controllers.push_back(new_controller);
|
||||
|
||||
} /* DetectSpectrixS40GControllers() */
|
||||
|
||||
REGISTER_DETECTOR("XPG Spectrix S40G NVMe", DetectSpectrixS40GControllers);
|
||||
Reference in New Issue
Block a user