diff options
author | xengineering <me@xengineering.eu> | 2024-05-30 16:00:32 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-05-30 16:00:32 +0200 |
commit | b8ef4d11fe0d00ce0884ccf982675845b20c3ce9 (patch) | |
tree | 3beb57ff849ed74569ce325225bc819791c25a6a /software/vendor/go.bug.st/serial/syscall_windows.go | |
parent | eab833271eeaa8d54991c11eccec9445f662a191 (diff) | |
download | iot-core-b8ef4d11fe0d00ce0884ccf982675845b20c3ce9.tar iot-core-b8ef4d11fe0d00ce0884ccf982675845b20c3ce9.tar.zst iot-core-b8ef4d11fe0d00ce0884ccf982675845b20c3ce9.zip |
software: Implement serial port detection
Diffstat (limited to 'software/vendor/go.bug.st/serial/syscall_windows.go')
-rw-r--r-- | software/vendor/go.bug.st/serial/syscall_windows.go | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/software/vendor/go.bug.st/serial/syscall_windows.go b/software/vendor/go.bug.st/serial/syscall_windows.go new file mode 100644 index 0000000..c814528 --- /dev/null +++ b/software/vendor/go.bug.st/serial/syscall_windows.go @@ -0,0 +1,31 @@ +// +// Copyright 2014-2023 Cristian Maglie. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. +// + +package serial + +//sys regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, value *uint16, valueLen *uint32) (regerrno error) = advapi32.RegEnumValueW + +//sys getCommState(handle syscall.Handle, dcb *dcb) (err error) = GetCommState + +//sys setCommState(handle syscall.Handle, dcb *dcb) (err error) = SetCommState + +//sys setCommTimeouts(handle syscall.Handle, timeouts *commTimeouts) (err error) = SetCommTimeouts + +//sys escapeCommFunction(handle syscall.Handle, function uint32) (res bool) = EscapeCommFunction + +//sys getCommModemStatus(handle syscall.Handle, bits *uint32) (res bool) = GetCommModemStatus + +//sys createEvent(eventAttributes *uint32, manualReset bool, initialState bool, name *uint16) (handle syscall.Handle, err error) = CreateEventW + +//sys resetEvent(handle syscall.Handle) (err error) = ResetEvent + +//sys getOverlappedResult(handle syscall.Handle, overlapEvent *syscall.Overlapped, n *uint32, wait bool) (err error) = GetOverlappedResult + +//sys purgeComm(handle syscall.Handle, flags uint32) (err error) = PurgeComm + +//sys setCommBreak(handle syscall.Handle) (err error) = SetCommBreak + +//sys clearCommBreak(handle syscall.Handle) (err error) = ClearCommBreak |