Use read byte data for ENE detect
This commit is contained in:
1 parent
8f2b33ce3e
commit
972c0f74e6
1 file changed
+6
-1
@@ -128,7 +128,12 @@ bool TestForENESMBusController(i2c_smbus_interface* bus, unsigned char address)
|
||||
|
||||
int res = bus->i2c_smbus_read_byte(address);
|
||||
|
||||
if (res >= 0)
|
||||
if(res < 0)
|
||||
{
|
||||
res = bus->i2c_smbus_read_byte_data(address, 0x00);
|
||||
}
|
||||
|
||||
if(res >= 0)
|
||||
{
|
||||
pass = true;
|
||||
|
||||
|
||||
Reference in new issue
Block a user