From: Gordon Henderson Date: Mon, 13 May 2013 19:10:41 +0000 (+0100) Subject: Bother. Small issue crept into the SPI code. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=wiringPi.git;a=commitdiff_plain;h=25895a86704dfa00eb439fd82844a57dd8c0baa7 Bother. Small issue crept into the SPI code. --- diff --git a/gpio/gpio.c b/gpio/gpio.c index 8e17ae0..e7099c8 100644 --- a/gpio/gpio.c +++ b/gpio/gpio.c @@ -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 ; diff --git a/wiringPi/wiringPiSPI.c b/wiringPi/wiringPiSPI.c index ded07ba..215a027 100644 --- a/wiringPi/wiringPiSPI.c +++ b/wiringPi/wiringPiSPI.c @@ -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 ;