Add functions to i2c_smbus for pure i2c block transactions

Commit amended to rework API and change for code style by Adam Honse <calcprogrammer1@gmail.com>
This commit is contained in:
1000001101000 2021-11-17 23:24:09 -06:00 committed by Adam Honse
parent aaa60d7d6f
commit e36b52136c
14 changed files with 152 additions and 12 deletions

View file

@ -16,9 +16,11 @@ class i2c_smbus_nvapi : public i2c_smbus_interface
{
public:
i2c_smbus_nvapi(NV_PHYSICAL_GPU_HANDLE handle);
s32 i2c_read_block_data(u8 addr, u8 length, u8 *values);
s32 i2c_write_block_data(u8 addr, u8 length, u8 *values);
private:
s32 i2c_smbus_xfer(u8 addr, char read_write, u8 command, int mode, i2c_smbus_data* data);
s32 i2c_xfer(u8 addr, char read_write, int* size, u8* data);
NV_PHYSICAL_GPU_HANDLE handle;
};