mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-08 06:34:14 -04:00
Initial driver for Sapphire GPU (tested on RX580 Nitro+ on Windows)
This commit is contained in:
41
Controllers/SapphireGPUController/SapphireGPUController.h
Normal file
41
Controllers/SapphireGPUController/SapphireGPUController.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*-----------------------------------------*\
|
||||
| SapphireGPUController.h |
|
||||
| |
|
||||
| Definitions and types for Sapphire Nitro |
|
||||
| Glow GPU RGB lighting controller |
|
||||
| |
|
||||
| Adam Honse (CalcProgrammer1) 7/15/2020 |
|
||||
\*-----------------------------------------*/
|
||||
|
||||
#include <string>
|
||||
#include "i2c_smbus.h"
|
||||
|
||||
#pragma once
|
||||
|
||||
typedef unsigned char sapphire_dev_id;
|
||||
|
||||
enum
|
||||
{
|
||||
SAPPHIRE_GPU_REG_MODE = 0x00,
|
||||
SAPPHIRE_GPU_REG_BRIGHTNESS = 0x01,
|
||||
SAPPHIRE_GPU_REG_RED = 0x03,
|
||||
SAPPHIRE_GPU_REG_GREEN = 0x04,
|
||||
SAPPHIRE_GPU_REG_BLUE = 0x05,
|
||||
};
|
||||
|
||||
class SapphireGPUController
|
||||
{
|
||||
public:
|
||||
SapphireGPUController(i2c_smbus_interface* bus, sapphire_dev_id dev);
|
||||
~SapphireGPUController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
|
||||
void SetColor(unsigned char red, unsigned char green, unsigned char blue);
|
||||
void SetMode(unsigned char mode, unsigned char speed);
|
||||
|
||||
private:
|
||||
i2c_smbus_interface* bus;
|
||||
sapphire_dev_id dev;
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user