Closed Noddy76 closed 9 years ago
There is a typo in wiringPiSPI.cc where the first argument to wiringPiSPI.cc is selected for the channel and the speed. The following patch fixes it.
diff --git a/src/wiringPiSPI.cc b/src/wiringPiSPI.cc index a8210f6..37920fc 100644 --- a/src/wiringPiSPI.cc +++ b/src/wiringPiSPI.cc @@ -63,7 +63,7 @@ IMPLEMENT(wiringPiSPISetup) { CHECK_ARGUMENT_TYPE_INT32(1); int channel = GET_ARGUMENT_AS_INT32(0); - int speed = GET_ARGUMENT_AS_INT32(0); + int speed = GET_ARGUMENT_AS_INT32(1); CHECK_ARGUMENT_IN_INTS(0, channel, (0, 1));
Thanks for reporting this bug, it will be included in the next release (will be released in the next weeks)
There is a typo in wiringPiSPI.cc where the first argument to wiringPiSPI.cc is selected for the channel and the speed. The following patch fixes it.