mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-24 06:25:01 -04:00
Fix block writes on Nuvoton NCT6793D SMBus driver
This commit is contained in:
@@ -107,7 +107,7 @@ s32 i2c_smbus_nuvoton_nct6793d::nct6793d_access(u16 addr, char read_write, u8 co
|
||||
//Load more bytes into FIFO
|
||||
if (len >= 4)
|
||||
{
|
||||
for (i = cnt; i <= 4; i++)
|
||||
for (i = cnt; i <= (cnt + 4); i++)
|
||||
{
|
||||
Out32(SMBHSTDAT, data->block[i]);
|
||||
}
|
||||
@@ -117,7 +117,7 @@ s32 i2c_smbus_nuvoton_nct6793d::nct6793d_access(u16 addr, char read_write, u8 co
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = cnt; i <= len; i++)
|
||||
for (i = cnt; i <= (cnt + len); i++)
|
||||
{
|
||||
Out32(SMBHSTDAT, data->block[i]);
|
||||
}
|
||||
|
||||
@@ -34,11 +34,12 @@
|
||||
#define NCT6793D_SOFT_RESET 64
|
||||
|
||||
/* Error register */
|
||||
#define NCT6793D_NO_ACK 32
|
||||
#define NCT6793D_NO_ACK 32
|
||||
|
||||
/* Status register */
|
||||
#define NCT6793D_FIFO_EMPTY 1
|
||||
#define NCT6793D_FIFO_FULL 2
|
||||
#define NCT6793D_MANUAL_ACTIVE 4
|
||||
#define NCT6793D_FIFO_EMPTY 1
|
||||
|
||||
class i2c_smbus_nuvoton_nct6793d : public i2c_smbus_interface
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user