Commit Graph

262 Commits

Author SHA1 Message Date
Cristian Maglie
4cc831e192 Some serial constants replaced by sys/unix package 2017-03-12 21:23:58 +01:00
Veniamin Albaev
8b7629bfe1 Added buffer flush methods
+ serial.Port.ResetInputBuffer()
+ serial.Port.ResetOutputBuffer()
2017-03-09 11:47:38 +03:00
Veniamin Albaev
4d886c1028 Unix: move from syscall to golang.org/x/sys/unix
Prepare to using `unix.TCFLSH`/`unix.TIOCFLUSH`
which is missing in `syscall` package
2017-03-09 11:04:37 +03:00
Veniamin Albaev
ccc846995c TravisCI: add go 1.8.x 2017-03-09 10:53:16 +03:00
Veniamin Albaev
4da3278c95 Use mksyscall_windows.go from $GOROOT 2017-03-09 10:46:44 +03:00
Cristian Maglie
48d7240ab8 Fixed typo 2017-03-04 22:54:59 +01:00
Cristian Maglie
970475ed06 Updated licenses 2017-03-04 16:29:55 +01:00
Veniamin Albaev
b55fdf163b All //sys instructions moved to separate syscall_* files
Generated `syscall_*` files ranamed to `zsyscall_*` ones
like it done in `golang.org/x/sys` package.
2017-02-23 21:40:47 +03:00
Martino Facchin
51237629e6 Fix build using Darwin and osxcross 2017-02-13 16:33:49 +01:00
Cristian Maglie
0d8c7bfd78 Merge branch 'usb' into v1 2017-02-04 00:56:12 +01:00
Cristian Maglie
11d1e54246 Updated docs for USB 2017-02-04 00:53:51 +01:00
Cristian Maglie
fbd0f9fb33 Exclude 'enumerator' module from Travis-CI build 2017-02-04 00:31:57 +01:00
Cristian Maglie
3ad7c6b7d2 Moved go:generate into non-GOOS specific file
See #19
2017-02-04 00:24:23 +01:00
Veniamin Albaev
0eb640a768 TravisCI usign go 1.7.x instead of 1.7.2 2017-02-01 08:07:04 +03:00
Cristian Maglie
c8b1c23a56 Moved USB enumerations subroutines in their own package 2017-01-30 10:54:16 +01:00
Veniamin Albaev
378aafb2f7 //go:generate moved out of OS specific go file
To avoid cross platform go generate issue
Look at https://github.com/golang/go/issues/16368
2017-01-24 11:29:30 +03:00
Cristian Maglie
ff9cf2b84b Windows: use OVERLAPPED operations 2017-01-21 12:47:54 +01:00
Cristian Maglie
69c094e3c7 Fix typo in doc.go 2016-12-26 13:01:56 +01:00
Cristian Maglie
9d2bfefb78 Updated documentation (USB detection)
Added a section for USB detection.
cgo and "C" package are now used (to access osx frameworks).
2016-12-25 18:49:48 +01:00
Cristian Maglie
b1f15cfb64 Improved error checking on osx USB detection 2016-12-25 18:49:48 +01:00
Cristian Maglie
ecd31dc766 Added USB VID/PID detection for osx 2016-12-25 18:49:48 +01:00
Cristian Maglie
5769f96804 Temporarily remove USB manufacturer/product info
I need to find a better way to obtain those infos.
2016-12-11 23:46:18 +01:00
Cristian Maglie
3d6dd00ccb USB detection for Windows (alternative implementation with OLE) 2016-11-30 01:48:05 +02:00
Cristian Maglie
ad7966a434 USB detection for Windows (based on setupapi) 2016-11-30 01:48:04 +02:00
Cristian Maglie
2d0a54e6c8 Added USB discovery for Linux 2016-11-30 01:46:45 +02:00
Cristian Maglie
5050c50185 Added USB API 2016-11-30 01:46:44 +02:00
Cristian Maglie
e9103998c3 Merge remote-tracking branch 'cmaglie/fix-read-close-deadlock' into v1 2016-11-27 21:30:58 +01:00
Cristian Maglie
018968a9e6 Fixed travis build 2016-11-14 00:51:48 +01:00
Cristian Maglie
d50de5cbaf unix: Fixed race condition while closing serial port. Added PortClosed error 2016-11-14 00:36:30 +01:00
Cristian Maglie
6eedab17b4 Added wrapper around goselect library.
This simplifies handling of select syscall.
2016-11-14 00:34:51 +01:00
Cristian Maglie
152558831e Moved Pipe{} into own sub-package
It may be moved into a separate project at some point, who knows...
2016-11-13 23:44:15 +01:00
Cristian Maglie
eee219b43f posix: added check for port closing 2016-11-08 12:31:18 +01:00
Cristian Maglie
12cc48dd24 unix: avoid Read blocking forever if called before Close 2016-11-06 18:30:49 +01:00
Cristian Maglie
f8c1f56fd3 Added unix-pipe wrapper 2016-11-06 18:30:40 +01:00
Cristian Maglie
43fc80d807 Fixed typo... oops 2016-10-31 18:11:46 +01:00
Cristian Maglie
f56a50621e Slighlty improved bits handling in windows 2016-10-31 18:02:38 +01:00
Cristian Maglie
aa77894c35 Modem signals implementaions (windows) 2016-10-31 18:02:38 +01:00
Cristian Maglie
a736b8f7b9 Modem signals implementation (posix) 2016-10-31 18:02:38 +01:00
Cristian Maglie
5be0087bd5 Added interface methods for RS232 signals 2016-10-31 18:02:38 +01:00
Cristian Maglie
bd780fd51f Merge branch 'bit-fixes' into v1 2016-10-29 23:37:08 +02:00
Cristian Maglie
04302f262c Update testing golang version to 1.7.2 2016-10-22 22:37:51 +02:00
Cristian Maglie
b93c8f2fea Use go:generate to create syscall_windows.go
This dramatically improves maintainability of generated files.

This will be eventually implemented on other generated files as well.
2016-10-22 22:37:33 +02:00
Cristian Maglie
cb166b5b85 Improved error reporting on setting stop bits 2016-10-22 18:32:51 +02:00
Cristian Maglie
f78e270591 Slightly improved error messages 2016-10-22 18:32:51 +02:00
Cristian Maglie
c534e6fb45 Improved error reporting for parity settings 2016-10-22 18:32:51 +02:00
Cristian Maglie
a3909960d3 Removed termiosMask(..) and use the correct bitmask type
This requires a bit of copying in darwin 386/amd64 but simplifies
the overall design.
2016-10-22 18:32:51 +02:00
Cristian Maglie
50993cc77b Factorize a function to enable/disable of RTS/CTS handshake for unix 2016-10-20 23:57:09 +02:00
Cristian Maglie
9398f35b69 Use unsigned values for termios setting
This allows the last (most significant) bit to be set without
overflow errors. The error becomes visible after adding the
CRTSCTS constant on linux/386:

   const tcCRTSCTS uint = 0x80000000
2016-10-20 23:55:06 +02:00
Cristian Maglie
7178181a28 Disable RTS/CTS handshake by default
Fix #3
2016-10-20 23:17:26 +02:00
Cristian Maglie
fe0dfe76d3 Improved PortError
Removed useless "err" field.
Added "causedBy" field to wrap nested error.
2016-10-12 16:53:49 +02:00