Browse Source

fix argument error

pull/11/head
Dolf Andringa 5 years ago
parent
commit
5e85a44f93
  1. 4
      wiringPi/wiringPiSPI.c
  2. 2
      wiringPi/wiringPiSPI.h

4
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) ;
}

2
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

Loading…
Cancel
Save