mirror of
https://github.com/clockworkpi/WiringPi.git
synced 2025-12-13 00:08:51 +01:00
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.
This commit is contained in:
parent
1bb4989e11
commit
870ba4129f
@ -530,7 +530,7 @@ void pwmWriteGpio (int pin, int value)
|
|||||||
pin = pin & 63 ;
|
pin = pin & 63 ;
|
||||||
port = gpioToPwmPort [pin] ;
|
port = gpioToPwmPort [pin] ;
|
||||||
|
|
||||||
*(pwm + port) = value & 0x3FF ;
|
*(pwm + port) = value ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void pwmWriteWPi (int pin, int value)
|
void pwmWriteWPi (int pin, int value)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user