all: use interfaces for UART objects

This makes it possible to replace UART objects with dummy
implementations, for example. Or allows changing the `machine.UART` type
to `*machine.UART` without breaking compatibility.
This commit is contained in:
Ayke van Laethem
2021-03-06 00:27:42 +01:00
committed by Ron Evans
parent 1345bc2161
commit e77e9249cd
3 changed files with 17 additions and 6 deletions
+12
View File
@@ -0,0 +1,12 @@
package drivers
import "io"
// UART represents a UART connection. It is implemented by the machine.UART
// type.
type UART interface {
io.Reader
io.Writer
Buffered() int
}