Skip to content

Commit 0b78485

Browse files
deiningcmaglie
andauthored
Fix typos (#183)
Co-authored-by: Cristian Maglie <[email protected]>
1 parent c18d387 commit 0b78485

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

enumerator/usb_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const (
9898
spdrpUpperFilters = 0x00000011 // UpperFilters = R/W
9999
spdrpLowerFilters = 0x00000012 // LowerFilters = R/W
100100
spdrpBusTypeGUID = 0x00000013 // BusTypeGUID = R
101-
spdrpLegactBusType = 0x00000014 // LegacyBusType = R
101+
spdrpLegacyBusType = 0x00000014 // LegacyBusType = R
102102
spdrpBusNumber = 0x00000015 // BusNumber = R
103103
spdrpEnumeratorName = 0x00000016 // Enumerator Name = R
104104
spdrpSecurity = 0x00000017 // Security = R/W, binary form

serial.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ const (
147147
PortNotFound
148148
// InvalidSerialPort the requested port is not a serial port
149149
InvalidSerialPort
150-
// PermissionDenied the user doesn't have enough priviledges
150+
// PermissionDenied the user doesn't have enough privileges
151151
PermissionDenied
152152
// InvalidSpeed the requested speed is not valid or not supported
153153
InvalidSpeed

serial_windows.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ const (
152152
dcbInX = 0x00000200
153153
dcbErrorChar = 0x00000400
154154
dcbNull = 0x00000800
155-
dcbRTSControlDisbaleMask = ^uint32(0x00003000)
155+
dcbRTSControlDisableMask = ^uint32(0x00003000)
156156
dcbRTSControlEnable = 0x00001000
157157
dcbRTSControlHandshake = 0x00002000
158158
dcbRTSControlToggle = 0x00003000
@@ -282,8 +282,8 @@ func (port *windowsPort) SetDTR(dtr bool) error {
282282
// observed behaviour was that DTR is set from false -> true
283283
// when setting RTS from true -> false
284284
// 1) Connect -> RTS = true (low) DTR = true (low) OKAY
285-
// 2) SetDTR(false) -> RTS = true (low) DTR = false (heigh) OKAY
286-
// 3) SetRTS(false) -> RTS = false (heigh) DTR = true (low) ERROR: DTR toggled
285+
// 2) SetDTR(false) -> RTS = true (low) DTR = false (high) OKAY
286+
// 3) SetRTS(false) -> RTS = false (high) DTR = true (low) ERROR: DTR toggled
287287
//
288288
// In addition this way the CommState Flags are not updated
289289
/*
@@ -343,7 +343,7 @@ func (port *windowsPort) SetRTS(rts bool) error {
343343
if err := getCommState(port.handle, params); err != nil {
344344
return &PortError{causedBy: err}
345345
}
346-
params.Flags &= dcbRTSControlDisbaleMask
346+
params.Flags &= dcbRTSControlDisableMask
347347
if rts {
348348
params.Flags |= dcbRTSControlEnable
349349
}
@@ -443,7 +443,7 @@ func nativeOpen(portName string, mode *Mode) (*windowsPort, error) {
443443
}
444444
port.setModeParams(mode, params)
445445
params.Flags &= dcbDTRControlDisableMask
446-
params.Flags &= dcbRTSControlDisbaleMask
446+
params.Flags &= dcbRTSControlDisableMask
447447
if mode.InitialStatusBits == nil {
448448
params.Flags |= dcbDTRControlEnable
449449
params.Flags |= dcbRTSControlEnable

unixutils/pipe.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ func (p *Pipe) ReadFD() int {
4040
return p.rd
4141
}
4242

43-
// WriteFD returns the flie handle for the write side of the pipe.
43+
// WriteFD returns the file handle for the write side of the pipe.
4444
func (p *Pipe) WriteFD() int {
4545
if !p.opened {
4646
return -1
4747
}
4848
return p.wr
4949
}
5050

51-
// Write to the pipe the content of data. Returns the numbre of bytes written.
51+
// Write to the pipe the content of data. Returns the number of bytes written.
5252
func (p *Pipe) Write(data []byte) (int, error) {
5353
if !p.opened {
5454
return 0, fmt.Errorf("Pipe not opened")

0 commit comments

Comments
 (0)