Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/distributed/sers
/ functions
Functions
70 in github.com/distributed/sers
⨍
Functions
70
◇
Types & classes
17
↓ 10 callers
Function
getProcAddr
(lib syscall.Handle, name string)
sers_windows.go:215
↓ 5 callers
Function
Open
(fn string)
sers_termios.go:277
↓ 4 callers
Method
getattr
()
sers_termios.go:88
↓ 3 callers
Method
Close
()
sers_termios.go:80
↓ 3 callers
Method
SetMode
SetMode sets the frame format and handshaking configuration. baudrate may be freely chosen, the driver is allowed to reject unachievable baud rates. d
sers.go:42
↓ 3 callers
Method
setattr
(tio *C.struct_termios)
sers_termios.go:98
↓ 2 callers
Method
Error
()
sers_windows.go:53
↓ 2 callers
Function
ParseModestring
Parses a modestring like "115200,8n1,rtscts" into a struct Mode. The format is baudrate,framestring,handshake. Either the handshake part or both the f
modestring.go:28
↓ 2 callers
Method
Read
(b []byte)
sers_termios.go:70
↓ 2 callers
Method
SetBreak
SetBreak turns on the generation of a break condition if on == true, otherwise it clear the break condition.
sers.go:57
↓ 2 callers
Function
getOverlappedResult
(h syscall.Handle, overlapped *syscall.Overlapped)
sers_windows.go:372
↓ 2 callers
Function
newOverlapped
()
sers_windows.go:362
↓ 2 callers
Function
resetEvent
(h syscall.Handle)
sers_windows.go:354
↓ 2 callers
Function
setCommTimeouts
(h syscall.Handle, constTimeout float64)
sers_windows.go:296
↓ 1 callers
Method
Close
()
sers_windows.go:110
↓ 1 callers
Method
GetMode
GetMode retrieves the current mode settings. Known bug on OS X: GetMode only works after SetMode has been called before. If not, it returns an error.
sers.go:48
↓ 1 callers
Function
Main
()
verification/setgetmode/setgetmode.go:17
↓ 1 callers
Function
Main
()
verification/readclose/readclose.go:36
↓ 1 callers
Function
Main
()
verification/breakpulse/breakpulse.go:21
↓ 1 callers
Function
Main
()
verification/setbaudrate/setbaudrate.go:22
↓ 1 callers
Method
SetBaudRate
(br int)
sers_linux.go:21
↓ 1 callers
Function
SetModeStruct
(sp SerialPort, mode Mode)
sers.go:60
↓ 1 callers
Method
SetReadParams
SetReadParams sets the minimum number of bytes to read and a read timeout in seconds. These parameters roughly correspond to the UNIX termios concepts
sers.go:53
↓ 1 callers
Method
String
()
sers.go:93
↓ 1 callers
Method
Valid
()
sers.go:73
↓ 1 callers
Method
Write
(b []byte)
sers_termios.go:84
↓ 1 callers
Method
getBaudrate
()
sers_linux.go:31
↓ 1 callers
Function
lookupbaudrate
sers_linux.c:65
↓ 1 callers
Function
readFirstBytesFromPort
(fn string)
sers_test.go:27
↓ 1 callers
Function
readpart
(r io.ReadCloser)
verification/readclose/readclose.go:20
↓ 1 callers
Function
setCommMask
(h syscall.Handle)
sers_windows.go:345
↓ 1 callers
Function
setCommState
(h syscall.Handle, mode Mode)
sers_windows.go:223
↓ 1 callers
Function
setupComm
(h syscall.Handle, in, out int)
sers_windows.go:337
↓ 1 callers
Function
speedtobaudrate
sers_linux.c:101
↓ 1 callers
Function
takeOverFD
(fd int, fn string)
sers_termios.go:33
Method
Error
()
sers.go:135
Method
Error
()
sers.go:144
Method
Error
()
sers.go:153
Method
Error
()
sers_darwin.go:60
Method
Error
()
sers_termios.go:299
Method
Error
()
sers_windows.go:409
Function
Example
This program opens a serial port, configurable by changing portname below and configures it for 57600 baud, 8 data bits, no parity bit, 1 stop bit, no
sers_test.go:16
Method
GetMode
()
sers_termios.go:184
Method
GetMode
()
sers_windows.go:263
Function
Open
func openPort(name string) (rwc io.ReadWriteCloser, err error) { // TODO
sers_windows.go:58
Method
Read
(buf []byte)
sers_windows.go:132
Method
SetBaudRate
(br int)
sers_darwin.go:39
Method
SetBreak
(on bool)
sers_termios.go:260
Method
SetBreak
(on bool)
sers_windows.go:161
Method
SetMode
(baudrate, databits, parity, stopbits, handshake int)
sers_termios.go:107
Method
SetMode
(baudrate, databits, parity, stopbits, handshake int)
sers_windows.go:385
Method
SetReadParams
(minread int, timeout float64)
sers_termios.go:231
Method
SetReadParams
(minread int, timeout float64)
sers_windows.go:401
Function
TakeOver
TakeOver accepts an open *os.File and returns a SerialPort representing the open file. Attention: This calls the .Fd() method of the *os.File and thu
sers_termios.go:61
Function
TestModestringStringMethod
(t *testing.T)
modestring_test.go:65
Function
TestParseModestring
(t *testing.T)
modestring_test.go:5
Method
Timeout
()
sers_termios.go:303
Method
Timeout
()
sers_windows.go:413
Method
Write
(buf []byte)
sers_windows.go:114
Function
fcntl1
sers_darwin.c:8
Method
getBaudrate
()
sers_darwin.go:64
Function
getbaudrate
sers_linux.c:173
Function
init
()
sers_windows.go:196
Function
ioctl1
sers_darwin.c:4
Function
ioctl1
sers_linux.c:61
Function
main
()
verification/setgetmode/setgetmode.go:10
Function
main
()
verification/readclose/readclose.go:13
Function
main
()
verification/breakpulse/breakpulse.go:11
Function
main
()
verification/setbaudrate/setbaudrate.go:13
Function
setbaudrate
sers_linux.c:138