minor cleanup

This commit is contained in:
Karan Misra 2014-03-23 06:41:51 +05:30
parent ebb9dc47fc
commit 3f88b67361
5 changed files with 6 additions and 6 deletions

3
bbb.go
View File

@ -1,7 +1,6 @@
package embd package embd
import ( import (
"errors"
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"os" "os"
@ -189,7 +188,7 @@ func (p *bbbAnalogPin) Read() (int, error) {
} }
func (p *bbbAnalogPin) Write(_ int) error { func (p *bbbAnalogPin) Write(_ int) error {
return errors.New("gpio: not implemented") return ErrFeatureNotImplemented
} }
func (p *bbbAnalogPin) Close() error { func (p *bbbAnalogPin) Close() error {

View File

@ -29,4 +29,5 @@ func DescribeHost() (*Descriptor, error) {
return describer(rev), nil return describer(rev), nil
} }
var ErrFeatureNotSupport = errors.New("embd: feature is not supported") var ErrFeatureNotSupported = errors.New("embd: requested feature is not supported")
var ErrFeatureNotImplemented = errors.New("embd: requested feature is not implemented")

View File

@ -52,7 +52,7 @@ func InitGPIO() error {
} }
if desc.GPIODriver == nil { if desc.GPIODriver == nil {
return ErrFeatureNotSupport return ErrFeatureNotSupported
} }
gpioDriverInstance = desc.GPIODriver() gpioDriverInstance = desc.GPIODriver()

2
i2c.go
View File

@ -38,7 +38,7 @@ func InitI2C() error {
} }
if desc.I2CDriver == nil { if desc.I2CDriver == nil {
return ErrFeatureNotSupport return ErrFeatureNotSupported
} }
i2cDriverInstance = desc.I2CDriver() i2cDriverInstance = desc.I2CDriver()

2
led.go
View File

@ -24,7 +24,7 @@ func InitLED() error {
} }
if desc.LEDDriver == nil { if desc.LEDDriver == nil {
return ErrFeatureNotSupport return ErrFeatureNotSupported
} }
ledDriverInstance = desc.LEDDriver() ledDriverInstance = desc.LEDDriver()