chiark
/
gitweb
/
~ianmdlvl
/
wiringPi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1bb4989
)
Updated pwmWrite to not mask the value written in-case a call
author
Gordon Henderson
<gordon@drogon.net>
Sun, 19 Aug 2012 14:38:25 +0000
(15:38 +0100)
committer
Gordon Henderson
<gordon@drogon.net>
Sun, 19 Aug 2012 14:38:25 +0000
(15:38 +0100)
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
patch
|
blob
|
history
diff --git
a/wiringPi/wiringPi.c
b/wiringPi/wiringPi.c
index bd3c999deda0ddfa21134be2eea8b5e8936b0eaa..39c34da75b76519e9ebb88bc68995d1fbaae75e8 100644
(file)
--- 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)