Reduce references to devices.Device

This interface will be removed in v3.
pull/1/head
Marc-Antoine Ruel 8 years ago
parent 7306448a6d
commit 89531ab87e

@ -9,12 +9,13 @@ import (
"image/color" "image/color"
"io" "io"
"time" "time"
"periph.io/x/periph/conn"
) )
// Device is a basic device. // Device is a basic device.
// //
// This interface is deprecated and will be removed in v3. Use conn.Resource // Deprecated: This interface will be removed in v3. Use conn.Resource instead.
// instead.
type Device interface { type Device interface {
Halt() error Halt() error
} }
@ -24,7 +25,7 @@ type Device interface {
// What Display represents can be as varied as a 1 bit OLED display or a strip // What Display represents can be as varied as a 1 bit OLED display or a strip
// of LED lights. // of LED lights.
type Display interface { type Display interface {
Device conn.Resource
// Writer can be used when the native display pixel format is known. Each // Writer can be used when the native display pixel format is known. Each
// write must cover exactly the whole screen as a single packed stream of // write must cover exactly the whole screen as a single packed stream of
@ -57,7 +58,7 @@ type Environment struct {
// Environmental represents an environmental sensor. // Environmental represents an environmental sensor.
type Environmental interface { type Environmental interface {
Device conn.Resource
// Sense returns the value read from the sensor. Unsupported metrics are not // Sense returns the value read from the sensor. Unsupported metrics are not
// modified. // modified.

@ -23,7 +23,6 @@ import (
"periph.io/x/periph/conn/gpio" "periph.io/x/periph/conn/gpio"
"periph.io/x/periph/conn/i2c" "periph.io/x/periph/conn/i2c"
"periph.io/x/periph/conn/mmr" "periph.io/x/periph/conn/mmr"
"periph.io/x/periph/devices"
) )
// TouchStatus is the status of an input sensor. // TouchStatus is the status of an input sensor.
@ -515,4 +514,4 @@ func wrapf(format string, a ...interface{}) error {
return fmt.Errorf("cap1188: "+format, a...) return fmt.Errorf("cap1188: "+format, a...)
} }
var _ devices.Device = &Dev{} var _ conn.Resource = &Dev{}

Loading…
Cancel
Save