Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (e PortError) Code() PortErrorCode {
}

// Cause returns the cause for the error
// Deprecated: Use go1.13 error iterface Unwrap() instead.
// Deprecated: Use go1.13 error interface Unwrap() instead.
func (e PortError) Cause() error {
return e.Unwrap()
}
Expand Down
2 changes: 1 addition & 1 deletion serial_open_android.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"golang.org/x/sys/unix"
)

func accquireExclusiveAccess(_ int) error {
func acquireExclusiveAccess(_ int) error {
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion serial_open_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"golang.org/x/sys/unix"
)

func accquireExclusiveAccess(h int) error {
func acquireExclusiveAccess(h int) error {
return unix.IoctlSetInt(h, unix.TIOCEXCL, 0)
}

Expand Down
2 changes: 1 addition & 1 deletion serial_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func Open(name string, opts ...Option) (*Port, error) {
}

// does nothing in build for android
if err = accquireExclusiveAccess(h); err != nil {
if err = acquireExclusiveAccess(h); err != nil {
return nil, newPortOSError(multierr.Append(err, unix.Close(h)))
}

Expand Down
4 changes: 2 additions & 2 deletions serial_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ func (p *Port) SetDTR(dtr bool) error {
// observed behaviour was that DTR is set from false -> true
// when setting RTS from true -> false
// 1) Connect -> RTS = true (low) DTR = true (low) OKAY
// 2) SetDTR(false) -> RTS = true (low) DTR = false (heigh) OKAY
// 3) SetRTS(false) -> RTS = false (heigh) DTR = true (low) ERROR: DTR toggled
// 2) SetDTR(false) -> RTS = true (low) DTR = false (high) OKAY
// 3) SetRTS(false) -> RTS = false (high) DTR = true (low) ERROR: DTR toggled
//
// In addition this way the CommState Flags are not updated
/*
Expand Down