sysfs: define DigitalPinnerProvider and PWMPinnerProvider interfaces
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
06ba193e75
commit
ea371766fb
|
@ -38,6 +38,12 @@ type DigitalPinner interface {
|
||||||
Write(int) error
|
Write(int) error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DigitalPinnerProvider is the interface that an Adaptor should implement to allow
|
||||||
|
// clients to obtain access to any DigitalPin's available on that board.
|
||||||
|
type DigitalPinnerProvider interface {
|
||||||
|
DigitalPin(string, string) (DigitalPinner, error)
|
||||||
|
}
|
||||||
|
|
||||||
type DigitalPin struct {
|
type DigitalPin struct {
|
||||||
pin string
|
pin string
|
||||||
label string
|
label string
|
||||||
|
|
|
@ -28,6 +28,12 @@ type PWMPinner interface {
|
||||||
SetDutyCycle(duty uint32) (err error)
|
SetDutyCycle(duty uint32) (err error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PWMPinnerProvider is the interface that an Adaptor should implement to allow
|
||||||
|
// clients to obtain access to any PWMPin's available on that board.
|
||||||
|
type PWMPinnerProvider interface {
|
||||||
|
PWMPin(string) (PWMPinner, error)
|
||||||
|
}
|
||||||
|
|
||||||
type PWMPin struct {
|
type PWMPin struct {
|
||||||
pin string
|
pin string
|
||||||
Chip string
|
Chip string
|
||||||
|
|
Loading…
Reference in New Issue