Bother. Small issue crept into the SPI code.

This commit is contained in:
Gordon Henderson 2013-05-13 20:10:41 +01:00
parent da38443cb2
commit 25895a8670
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ extern int wiringPiDebug ;
# define FALSE (1==2)
#endif
#define VERSION "2.02"
#define VERSION "2.03"
#define I2CDETECT "/usr/sbin/i2cdetect"
static int wpMode ;

View File

@ -114,7 +114,7 @@ int wiringPiSPISetup (int channel, int speed)
if (ioctl (fd, SPI_IOC_WR_BITS_PER_WORD, &spiBPW) < 0)
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 fd ;