From 077e22d33eb2a279630cce91494e1d8360ec429d Mon Sep 17 00:00:00 2001 From: Ishuah Kariuki Date: Fri, 29 Jan 2021 20:55:13 +0300 Subject: [PATCH] Clean up --- connect.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/connect.go b/connect.go index 5760960..8df3eae 100644 --- a/connect.go +++ b/connect.go @@ -6,20 +6,9 @@ import ( "io" "time" - //"github.com/tarm/serial" "github.com/pkg/term" ) -// Connect contains all the configuration necessary -// to open a serial port -// type Connect struct { -// config *serial.Config -// port *serial.Port -// portReader *bufio.Reader -// portChan chan []byte -// stateChan chan error -// } - type Connect struct { portPath string baudRate int @@ -30,9 +19,6 @@ type Connect struct { // NewConnection returns a pointer to a Connect instance func NewConnection(portPath string, baudRate int) (*Connect, error) { - //config := serial.Config{Name: portPath, Baud: baudRate, ReadTimeout: time.Nanosecond} - // port, err := serial.OpenPort(&config) - t := term.Speed(baudRate) port, err := term.Open(portPath, t) if err != nil {