mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-24 14:35:01 -04:00
Attempt to fix write
This commit is contained in:
@@ -170,6 +170,7 @@ s32 i2c_smbus_amdadl::i2c_smbus_xfer(u8 addr, char read_write, u8 command, int s
|
||||
break;
|
||||
|
||||
case I2C_SMBUS_BLOCK_DATA:
|
||||
return -1;
|
||||
data_size = data->block[0];
|
||||
pI2C->pcData = (char*)&data->block[1];
|
||||
break;
|
||||
@@ -196,7 +197,12 @@ s32 i2c_smbus_amdadl::i2c_smbus_xfer(u8 addr, char read_write, u8 command, int s
|
||||
else
|
||||
{
|
||||
pI2C->iAction = ADL_DL_I2C_ACTIONWRITE;
|
||||
pI2C->iDataSize = data_size;
|
||||
pI2C->iDataSize = data_size + 1;
|
||||
pI2C->pcData = i2c_buf;
|
||||
|
||||
i2c_buf[0] = command;
|
||||
memcpy(&i2c_buf[1], data, data_size);
|
||||
|
||||
ret = ADL2_Display_WriteAndReadI2C(context, PrimaryDisplay, pI2C);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user