Fixed PWM init bug for C.H.I.P
Signed-off-by: Erik Agsjö <erik.agsjo@gmail.com>
This commit is contained in:
parent
3070419f83
commit
b5dccfbc01
|
@ -179,15 +179,15 @@ func (c *Adaptor) PWMPin(pin string) (sysfsPin sysfs.PWMPinner, err error) {
|
|||
if err = newPin.Export(); err != nil {
|
||||
return
|
||||
}
|
||||
if err = newPin.InvertPolarity(false); err != nil {
|
||||
return
|
||||
}
|
||||
if err = newPin.Enable(true); err != nil {
|
||||
return
|
||||
}
|
||||
if err = newPin.SetPeriod(10000000); err != nil {
|
||||
return
|
||||
}
|
||||
if err = newPin.InvertPolarity(false); err != nil {
|
||||
return
|
||||
}
|
||||
c.pwmPins[sysPin.pwmPin] = newPin
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue