2014-04-28 10:34:16 +08:00
|
|
|
package gpio
|
|
|
|
|
|
|
|
type PwmDigitalWriter interface {
|
|
|
|
DigitalWriter
|
|
|
|
Pwm
|
|
|
|
}
|
|
|
|
type DirectPin interface {
|
|
|
|
DigitalWriter
|
|
|
|
DigitalReader
|
|
|
|
Pwm
|
|
|
|
Servo
|
|
|
|
AnalogWriter
|
|
|
|
AnalogReader
|
|
|
|
}
|
|
|
|
type Pwm interface {
|
2014-11-17 05:45:18 +08:00
|
|
|
PwmWrite(string, byte) (err error)
|
2014-04-28 10:34:16 +08:00
|
|
|
}
|
|
|
|
type Servo interface {
|
2014-11-17 05:45:18 +08:00
|
|
|
InitServo() (err error)
|
|
|
|
ServoWrite(string, byte) (err error)
|
2014-04-28 10:34:16 +08:00
|
|
|
}
|
|
|
|
type AnalogWriter interface {
|
2014-11-17 05:45:18 +08:00
|
|
|
AnalogWrite(string, byte) (err error)
|
2014-04-28 10:34:16 +08:00
|
|
|
}
|
|
|
|
type AnalogReader interface {
|
2014-11-17 05:45:18 +08:00
|
|
|
AnalogRead(string) (val int, err error)
|
2014-04-28 10:34:16 +08:00
|
|
|
}
|
|
|
|
type DigitalWriter interface {
|
2014-11-17 05:45:18 +08:00
|
|
|
DigitalWrite(string, byte) (err error)
|
2014-04-28 10:34:16 +08:00
|
|
|
}
|
|
|
|
type DigitalReader interface {
|
2014-11-17 05:45:18 +08:00
|
|
|
DigitalRead(string) (val int, err error)
|
2014-04-28 10:34:16 +08:00
|
|
|
}
|