From 89531ab87e544d3e36a86a73b0976d0ebec8b97b Mon Sep 17 00:00:00 2001 From: Marc-Antoine Ruel Date: Mon, 26 Mar 2018 08:20:23 -0400 Subject: [PATCH] Reduce references to devices.Device This interface will be removed in v3. --- devices/devices.go | 9 +++++---- experimental/devices/cap1188/cap1188.go | 3 +-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/devices/devices.go b/devices/devices.go index ca81b18..7ef8ce6 100644 --- a/devices/devices.go +++ b/devices/devices.go @@ -9,12 +9,13 @@ import ( "image/color" "io" "time" + + "periph.io/x/periph/conn" ) // Device is a basic device. // -// This interface is deprecated and will be removed in v3. Use conn.Resource -// instead. +// Deprecated: This interface will be removed in v3. Use conn.Resource instead. type Device interface { 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 // of LED lights. type Display interface { - Device + conn.Resource // 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 @@ -57,7 +58,7 @@ type Environment struct { // Environmental represents an environmental sensor. type Environmental interface { - Device + conn.Resource // Sense returns the value read from the sensor. Unsupported metrics are not // modified. diff --git a/experimental/devices/cap1188/cap1188.go b/experimental/devices/cap1188/cap1188.go index 42e1e49..3df5d94 100644 --- a/experimental/devices/cap1188/cap1188.go +++ b/experimental/devices/cap1188/cap1188.go @@ -23,7 +23,6 @@ import ( "periph.io/x/periph/conn/gpio" "periph.io/x/periph/conn/i2c" "periph.io/x/periph/conn/mmr" - "periph.io/x/periph/devices" ) // 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...) } -var _ devices.Device = &Dev{} +var _ conn.Resource = &Dev{}