From 870ba4129ffb48bb66de155de61bdae5b144c858 Mon Sep 17 00:00:00 2001 From: Gordon Henderson Date: Sun, 19 Aug 2012 15:38:25 +0100 Subject: [PATCH] Updated pwmWrite to not mask the value written in-case a call to pumSetRange() happens. ANDing with 0x3FF was wrong anyway as the PWM counter does from zero to the top value, not top-1 as I originally thought. --- wiringPi/wiringPi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiringPi/wiringPi.c b/wiringPi/wiringPi.c index bd3c999..39c34da 100644 --- a/wiringPi/wiringPi.c +++ b/wiringPi/wiringPi.c @@ -530,7 +530,7 @@ void pwmWriteGpio (int pin, int value) pin = pin & 63 ; port = gpioToPwmPort [pin] ; - *(pwm + port) = value & 0x3FF ; + *(pwm + port) = value ; } void pwmWriteWPi (int pin, int value) -- 2.30.2