pull/57/head
alanbjohnston 5 years ago committed by GitHub
parent a2f01d7c61
commit 6259ff62f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -249,7 +249,7 @@ int test_i2c_bus(char *bus)
int result = 1;
char *busString = "/dev/i2c-3";
if (access(busString, W_OK | R_OK) >= 0) { // Test if I2C Bus 0 is present
if (access(busString, W_OK | R_OK) >= 0) { // Test if I2C Bus 0 is present
// printf("bus is present\n\n");
char result[128];
char command[50] = "timeout 10 i2cdetect -y ";
@ -268,11 +268,10 @@ int test_i2c_bus(char *bus)
printf("ERROR: %d bus has a problem \n Check I2C wiring and pullup resistors \n", bus);
result = -1;
}
} else
{
} else
{
printf("ERROR: %d bus has a problem \n Check software to see if enabled \n", bus);
result = -1;
}
}
return(result);
}
return(result);
}

Loading…
Cancel
Save

Powered by TurnKey Linux.