mirror of
https://github.com/kidoman/embd
synced 2025-07-03 03:47:33 +02:00
unified servo and analog output support for pwms
This commit is contained in:
parent
9ab49745bc
commit
fc887282bf
9 changed files with 181 additions and 40 deletions
6
gpio.go
6
gpio.go
|
@ -86,6 +86,12 @@ type PWMPin interface {
|
|||
// SetPolarity sets the polarity of a pwm pin.
|
||||
SetPolarity(pol Polarity) error
|
||||
|
||||
// SetMicroseconds sends a command to the PWM driver to generate a us wide pulse.
|
||||
SetMicroseconds(us int) error
|
||||
|
||||
// SetAnalog allows easy manipulation of the PWM based on a (0-255) range value.
|
||||
SetAnalog(value byte) error
|
||||
|
||||
// Close releases the resources associated with the pin.
|
||||
Close() error
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue