Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ishuah committed Jan 29, 2021
1 parent 4ed22e4 commit 077e22d
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down

0 comments on commit 077e22d

Please sign in to comment.