Browse Source

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.
pull/22/head
Gordon Henderson 12 years ago
parent
commit
870ba4129f
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      wiringPi/wiringPi.c

+ 1
- 1
wiringPi/wiringPi.c View File

@@ -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)


Loading…
Cancel
Save