diff --git a/wiringPi/wiringPiSPI.c b/wiringPi/wiringPiSPI.c index 3cdbe3d..ff1ca66 100644 --- a/wiringPi/wiringPiSPI.c +++ b/wiringPi/wiringPiSPI.c @@ -100,7 +100,7 @@ void getDevice(char* spidev, int channel, int port) { sprintf(spidev, "/dev/spidev/%i.%i", channel, port); } -int wiringPiSPISetupMode (int channel, int speed, int mode, int port) +int wiringPiSPISetupMode (int channel, int port, int speed, int mode) { int fd ; @@ -140,5 +140,5 @@ int wiringPiSPISetupMode (int channel, int speed, int mode, int port) int wiringPiSPISetup (int channel, int speed) { - return wiringPiSPISetupMode (channel, speed, 0) ; + return wiringPiSPISetupMode (channel, 0, speed, 0) ; } diff --git a/wiringPi/wiringPiSPI.h b/wiringPi/wiringPiSPI.h index 962f025..62c7aed 100644 --- a/wiringPi/wiringPiSPI.h +++ b/wiringPi/wiringPiSPI.h @@ -28,7 +28,7 @@ extern "C" { int wiringPiSPIGetFd (int channel) ; int wiringPiSPIDataRW (int channel, unsigned char *data, int len) ; -int wiringPiSPISetupMode (int channel, int speed, int mode, int port=0) ; +int wiringPiSPISetupMode (int channel, int port, int speed, int mode) ; int wiringPiSPISetup (int channel, int speed) ; #ifdef __cplusplus