Add support for ZOTAC GAMING RTX 2070 SUPER Twin Fan
This commit is contained in:
parent
4cfe8c5d72
commit
9f1e53aa4e
7 changed files with 371 additions and 0 deletions
|
|
@ -0,0 +1,52 @@
|
|||
#include "Detector.h"
|
||||
#include "ZotacTuringGPUController.h"
|
||||
#include "RGBController.h"
|
||||
#include "RGBController_ZotacTuringGPU.h"
|
||||
#include "i2c_smbus.h"
|
||||
#include "pci_ids.h"
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* TestForZotacTuringGPUController *
|
||||
* *
|
||||
* Tests the given address to see if an RGB controller exists there. *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
bool TestForZotacTuringGPUController(i2c_smbus_interface* bus, u8 i2c_addr)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This command seems to enable the RGB controller (0xF1, |
|
||||
| 0x00 disables it). |
|
||||
| Not really sure it's mandatory, but we can still use it |
|
||||
| for testing the device: if the command succeeds, assume |
|
||||
| it's a valid device. |
|
||||
\*---------------------------------------------------------*/
|
||||
u8 data_pkt[] = { ZOTAC_TURING_GPU_REG_COLOR_AND_MODE, 0xF1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
return (bus->i2c_write_block(i2c_addr, sizeof(data_pkt), data_pkt) >= 0);
|
||||
}
|
||||
|
||||
/******************************************************************************************\
|
||||
* *
|
||||
* DetectZotacTuringGPUControllers *
|
||||
* *
|
||||
* Detect ZOTAC Turing RGB controllers on the enumerated I2C busses at address 0x49. *
|
||||
* *
|
||||
* bus - pointer to i2c_smbus_interface where RGB device is connected *
|
||||
* dev - I2C address of RGB device *
|
||||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectZotacTuringGPUControllers(i2c_smbus_interface* bus, u8 i2c_addr, const std::string& name)
|
||||
{
|
||||
if(TestForZotacTuringGPUController(bus, i2c_addr))
|
||||
{
|
||||
ZotacTuringGPUController* controller = new ZotacTuringGPUController(bus, i2c_addr);
|
||||
RGBController_ZotacTuringGPU* rgb_controller = new RGBController_ZotacTuringGPU(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
REGISTER_I2C_PCI_DETECTOR("ZOTAC GAMING GeForce RTX 2070 SUPER Twin Fan", DetectZotacTuringGPUControllers, NVIDIA_VEN, NVIDIA_RTX2070S_OC_DEV, ZOTAC_SUB_VEN, ZOTAC_RTX2070S_GAMING_SUB_DEV, 0x49);
|
||||
Loading…
Add table
Add a link
Reference in a new issue