-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
1345bc2
commit e77e924
Showing
3 changed files
with
17 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |