aboutsummaryrefslogtreecommitdiff
path: root/dev.go
diff options
context:
space:
mode:
Diffstat (limited to 'dev.go')
-rw-r--r--dev.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/dev.go b/dev.go
index eca5919..d640e5f 100644
--- a/dev.go
+++ b/dev.go
@@ -7,8 +7,18 @@ import (
"syscall"
)
-type Device struct {
+const (
+ NUL = byte(0x00) // Null
+ ETX = byte(0x03) // End of Text
+ ESC = byte(0x1B) // Escape
+ FS = byte(0x1C) // File Separator
+)
+
+type Device interface {
io.ReadWriteCloser
+ ReadString() (string, error)
+ WriteString(string) error
+ Command([]byte) error
}
// Open is implemented in according GOOS files