fixed #DEBUG LOGGING of x_fd, y_fd, and z_fd

pull/17/head
alanbjohnston 7 years ago committed by GitHub
parent 52a9087bf0
commit accfbe7747
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -167,11 +167,11 @@ int main(int argc, char *argv[]) {
} else
{
x_fd = wiringPiI2CSetupInterface("/dev/i2c-0", 0x40);
fprintf(stderr,"Opening of -X fd %d\n", x_fd);
y_fd = wiringPiI2CSetupInterface("/dev/i2c-0", 0x41);
printf("Opening of -Y fd %d\n", y_fd);
z_fd = wiringPiI2CSetupInterface("/dev/i2c-0", 0x44);
printf("Opening of -Z fd %d\n", z_fd);
z_fd = wiringPiI2CSetupInterface("/dev/i2c-0", 0x44);
#ifdef DEBUG_LOGGING
fprintf(stderr, "Opening of -X %d, -Y %d, -Z %d\n", x_fd, y_fd, z_fd);
#endif
int test;
if (((test = open("/dev/i2c-1", O_RDWR))) > 0) // Test if I2C Bus 1 is present

Loading…
Cancel
Save

Powered by TurnKey Linux.