added printf for spin

pull/98/head
alanbjohnston 5 years ago committed by GitHub
parent 3131ca00f6
commit 8efc44ff31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -272,11 +272,12 @@ int main(int argc, char * argv[]) {
// Check for SPI and AX-5043 Digital Transceiver Board // Check for SPI and AX-5043 Digital Transceiver Board
FILE * file = popen("sudo raspi-config nonint get_spi", "r"); FILE * file = popen("sudo raspi-config nonint get_spi", "r");
pclose(file); pclose(file);
printf("getc: %c \n", fgetc(file));
if (fgetc(file) == 48) { if (fgetc(file) == 48) {
printf("SPI is enabled!\n"); printf("SPI is enabled!\n");
FILE * file2 = popen("ls /dev/spidev0.* 2>&1", "r"); FILE * file2 = popen("ls /dev/spidev0.* 2>&1", "r");
// printf("Result getc: %c \n", getc(file2)); printf("Result getc: %c \n", getc(file2));
if (fgetc(file2) != 'l') { if (fgetc(file2) != 'l') {
printf("SPI devices present!\n"); printf("SPI devices present!\n");

Loading…
Cancel
Save

Powered by TurnKey Linux.