mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-09-18 08:21:30 -04:00
Updates to DRAM controllers to avoid use of SMBus Quick Write and add fallback paths if SMBus Block Write is unavailable, in preparation for X299 SMBus support
This commit is contained in:
1 parent
82a486bfb6
commit
abe7a49092
10 files changed
+108
-59
No files matched your search
@@ -30,28 +30,9 @@ using namespace std::chrono_literals;
|
||||
|
||||
bool TestForHyperXDRAMController(i2c_smbus_interface* bus, unsigned char address)
|
||||
{
|
||||
bool pass = false;
|
||||
int res = bus->i2c_smbus_read_byte(address);
|
||||
|
||||
int res = bus->i2c_smbus_write_quick(address, I2C_SMBUS_WRITE);
|
||||
|
||||
LOG_DEBUG("[%s] Writing at address %02X, res=%02X", HYPERX_CONTROLLER_NAME, address, res);
|
||||
|
||||
if (res >= 0)
|
||||
{
|
||||
pass = true;
|
||||
|
||||
for (int i = 0xA0; i < 0xB0; i++)
|
||||
{
|
||||
res = bus->i2c_smbus_read_byte_data(address, i);
|
||||
|
||||
if (res != i)
|
||||
{
|
||||
pass = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return(pass);
|
||||
return(res >= 0);
|
||||
|
||||
} /* TestForHyperXDRAMController() */
|
||||
|
||||
|
||||
Reference in new issue
Block a user