From bc93d94a45ae36676c259ce534361ccff7b185de Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Tue, 2 Apr 2024 10:47:19 +0200 Subject: [PATCH] x/sys/windows: use uint32 for serial comm flags --- windows/syscall_windows.go | 16 ++++++++-------- windows/types_windows.go | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/windows/syscall_windows.go b/windows/syscall_windows.go index ce78c58959..6525c62f3c 100644 --- a/windows/syscall_windows.go +++ b/windows/syscall_windows.go @@ -1864,14 +1864,14 @@ const ( CBR_128000 = 128000 CBR_256000 = 256000 - DTR_CONTROL_DISABLE = 0x00 - DTR_CONTROL_ENABLE = 0x01 - DTR_CONTROL_HANDSHAKE = 0x02 - - RTS_CONTROL_DISABLE = 0x00 - RTS_CONTROL_ENABLE = 0x01 - RTS_CONTROL_HANDSHAKE = 0x02 - RTS_CONTROL_TOGGLE = 0x03 + DTR_CONTROL_DISABLE = 0x00000000 + DTR_CONTROL_ENABLE = 0x00000010 + DTR_CONTROL_HANDSHAKE = 0x00000020 + + RTS_CONTROL_DISABLE = 0x00000000 + RTS_CONTROL_ENABLE = 0x00001000 + RTS_CONTROL_HANDSHAKE = 0x00002000 + RTS_CONTROL_TOGGLE = 0x00003000 NOPARITY = 0 ODDPARITY = 1 diff --git a/windows/types_windows.go b/windows/types_windows.go index a3a7ab83e0..d8cb71db0a 100644 --- a/windows/types_windows.go +++ b/windows/types_windows.go @@ -3382,7 +3382,7 @@ type BLOB struct { } type ComStat struct { - Flags [4]uint8 + Flags uint32 CBInQue uint32 CBOutQue uint32 } @@ -3390,7 +3390,7 @@ type ComStat struct { type DCB struct { DCBlength uint32 BaudRate uint32 - Flags [4]uint8 + Flags uint32 wReserved uint16 XonLim uint16 XoffLim uint16