|
@@ -114,7 +114,7 @@ int wiringPiSPISetup (int channel, int speed) |
|
|
if (ioctl (fd, SPI_IOC_WR_BITS_PER_WORD, &spiBPW) < 0) |
|
|
if (ioctl (fd, SPI_IOC_WR_BITS_PER_WORD, &spiBPW) < 0) |
|
|
return wiringPiFailure (WPI_ALMOST, "SPI BPW Change failure: %s\n", strerror (errno)) ; |
|
|
return wiringPiFailure (WPI_ALMOST, "SPI BPW Change failure: %s\n", strerror (errno)) ; |
|
|
|
|
|
|
|
|
if (ioctl (fd, SPI_IOC_WR_MAX_SPEED_HZ, &speed) < 0) return -1 ; |
|
|
|
|
|
|
|
|
if (ioctl (fd, SPI_IOC_WR_MAX_SPEED_HZ, &speed) < 0) |
|
|
return wiringPiFailure (WPI_ALMOST, "SPI Speed Change failure: %s\n", strerror (errno)) ; |
|
|
return wiringPiFailure (WPI_ALMOST, "SPI Speed Change failure: %s\n", strerror (errno)) ; |
|
|
|
|
|
|
|
|
return fd ; |
|
|
return fd ; |
|
|