1
0
mirror of https://github.com/kidoman/embd synced 2024-12-22 04:40:04 +01:00

gpio: analogpin doesn't support write (that will come from pwm)

This commit is contained in:
Karan Misra 2014-03-23 14:29:56 +05:30
parent 2d627aad67
commit 5c8ea918ab
2 changed files with 0 additions and 17 deletions

4
bbb.go
View File

@ -194,10 +194,6 @@ func (p *bbbAnalogPin) Read() (int, error) {
return strconv.Atoi(str)
}
func (p *bbbAnalogPin) Write(_ int) error {
return ErrFeatureNotImplemented
}
func (p *bbbAnalogPin) Close() error {
if !p.initialized {
return nil

13
gpio.go
View File

@ -54,9 +54,6 @@ type AnalogPin interface {
// N returns the logical GPIO number.
N() int
// Write writes the provided value to the pin.
Write(val int) error
// Read reads the value from the pin.
Read() (int, error)
@ -172,16 +169,6 @@ func NewAnalogPin(key interface{}) (AnalogPin, error) {
return gpioDriverInstance.AnalogPin(key)
}
// AnalogWrite writes the provided value to the pin.
func AnalogWrite(key interface{}, val int) error {
pin, err := NewAnalogPin(key)
if err != nil {
return err
}
return pin.Write(val)
}
// AnalogWrite reads a value from the pin.
func AnalogRead(key interface{}) (int, error) {
pin, err := NewAnalogPin(key)