From 91489f1134568813fd5fac1e651d21cfd91e4ccd Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sun, 25 Sep 2016 14:30:18 +0200 Subject: wip --- dev.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'dev.go') 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 -- cgit v1.2.3