chiark / gitweb /
wiringPi Version 2 - First commit (of v2)
[wiringPi.git] / wiringPi / softPwm.c
index b568dfb45ca509131f1c013403b35fb79d38a1fc..a4f0fc43f6b0fc3e0dc434c1cef9087e0833a982 100644 (file)
@@ -28,7 +28,7 @@
 #include "wiringPi.h"
 #include "softPwm.h"
 
-#define        MAX_PINS        64
+#define        MAX_PINS        1024
 
 // The PWM Frequency is derived from the "pulse time" below. Essentially,
 //     the frequency is a function of the range and this pulse time.
@@ -93,7 +93,7 @@ static PI_THREAD (softPwmThread)
 
 void softPwmWrite (int pin, int value)
 {
-  pin &= 63 ;
+  pin &= (MAX_PINS - 1) ;
 
   /**/ if (value < 0)
     value = 0 ;