Skip to content

Commit bc93d94

Browse files
committed
x/sys/windows: use uint32 for serial comm flags
1 parent 1a50d97 commit bc93d94

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

windows/syscall_windows.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -1864,14 +1864,14 @@ const (
18641864
CBR_128000 = 128000
18651865
CBR_256000 = 256000
18661866

1867-
DTR_CONTROL_DISABLE = 0x00
1868-
DTR_CONTROL_ENABLE = 0x01
1869-
DTR_CONTROL_HANDSHAKE = 0x02
1870-
1871-
RTS_CONTROL_DISABLE = 0x00
1872-
RTS_CONTROL_ENABLE = 0x01
1873-
RTS_CONTROL_HANDSHAKE = 0x02
1874-
RTS_CONTROL_TOGGLE = 0x03
1867+
DTR_CONTROL_DISABLE = 0x00000000
1868+
DTR_CONTROL_ENABLE = 0x00000010
1869+
DTR_CONTROL_HANDSHAKE = 0x00000020
1870+
1871+
RTS_CONTROL_DISABLE = 0x00000000
1872+
RTS_CONTROL_ENABLE = 0x00001000
1873+
RTS_CONTROL_HANDSHAKE = 0x00002000
1874+
RTS_CONTROL_TOGGLE = 0x00003000
18751875

18761876
NOPARITY = 0
18771877
ODDPARITY = 1

windows/types_windows.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -3382,15 +3382,15 @@ type BLOB struct {
33823382
}
33833383

33843384
type ComStat struct {
3385-
Flags [4]uint8
3385+
Flags uint32
33863386
CBInQue uint32
33873387
CBOutQue uint32
33883388
}
33893389

33903390
type DCB struct {
33913391
DCBlength uint32
33923392
BaudRate uint32
3393-
Flags [4]uint8
3393+
Flags uint32
33943394
wReserved uint16
33953395
XonLim uint16
33963396
XoffLim uint16

0 commit comments

Comments
 (0)