|
|
|
@ -354,14 +354,19 @@ int main(int argc, char * argv[]) {
|
|
|
|
file1 = sopen(pythonConfigStr); // try new function
|
|
|
|
file1 = sopen(pythonConfigStr); // try new function
|
|
|
|
|
|
|
|
|
|
|
|
// test i2c buses
|
|
|
|
// test i2c buses
|
|
|
|
printf("Test bus 0\n");
|
|
|
|
fflush(stdout);
|
|
|
|
|
|
|
|
printf("Test bus 0\n");
|
|
|
|
|
|
|
|
fflush(stdout);
|
|
|
|
i2c_bus0 = (test_i2c_bus(0) != -1) ? ON : OFF;
|
|
|
|
i2c_bus0 = (test_i2c_bus(0) != -1) ? ON : OFF;
|
|
|
|
printf("Test bus 1\n");
|
|
|
|
printf("Test bus 1\n");
|
|
|
|
|
|
|
|
fflush(stdout);
|
|
|
|
i2c_bus1 = (test_i2c_bus(1) != -1) ? ON : OFF;
|
|
|
|
i2c_bus1 = (test_i2c_bus(1) != -1) ? ON : OFF;
|
|
|
|
printf("Test bus 3\n");
|
|
|
|
printf("Test bus 3\n");
|
|
|
|
|
|
|
|
fflush(stdout);
|
|
|
|
i2c_bus3 = (test_i2c_bus(3) != -1) ? ON : OFF;
|
|
|
|
i2c_bus3 = (test_i2c_bus(3) != -1) ? ON : OFF;
|
|
|
|
printf("Finished testing\n");
|
|
|
|
printf("Finished testing\n");
|
|
|
|
|
|
|
|
fflush(stdout);
|
|
|
|
|
|
|
|
|
|
|
|
// check for camera
|
|
|
|
// check for camera
|
|
|
|
// char cmdbuffer1[1000];
|
|
|
|
// char cmdbuffer1[1000];
|
|
|
|
FILE * file4 = popen("vcgencmd get_camera", "r");
|
|
|
|
FILE * file4 = popen("vcgencmd get_camera", "r");
|
|
|
|
|