Skip to content

Commit

Permalink
Add soft PWM methods
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewn committed Oct 21, 2013
1 parent c3dc259 commit 6485dfc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/wiringpi/gpio.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ def pwm_set_clock(divisor)
return Wiringpi2.pwmSetClock(divisor)
end

def soft_pwm_create(pin, initial_value, pwm_range)
return Wiringpi2.softPwmCreate(pin, initial_value, pwm_range)
end

def soft_pwm_write(pin, value)
Wiringpi2.softPwmWrite(pin, value)
end

def gpio_clock_set(pin, freq)
return Wiringpi2.gpioClockSet(pin, freq)
end
Expand Down

0 comments on commit 6485dfc

Please sign in to comment.