added bus test for vB3

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

@ -48,6 +48,10 @@ int main(int argc, char *argv[]) {
map[BAT] = BUS;
map[PLUS_Z] = BAT;
map[MINUS_Z] = PLUS_Z;
snprintf(busStr, 10, "%d %d", test_i2c_bus(1), test_i2c_bus(0));
printf("New Bus String: %s \n", busStr);
/*
if (access("/dev/i2c-0", W_OK | R_OK) >= 0) { // Test if I2C Bus 0 is present
printf("/dev/i2c-0 is present\n\n");
char result[128];
@ -74,7 +78,8 @@ int main(int argc, char *argv[]) {
printf("ERROR: %s bus has a problem \n Check software to see if enabled \n", "0");
strcpy(busStr,"1 -1");
}
}
*/
}
else
{
pinMode (3, INPUT);

Loading…
Cancel
Save

Powered by TurnKey Linux.