windows: use uint32 for serial comm flags for consistency

This is a follow-up to
and specifically the comment

All other structs and methods us uint32 in
for flag bitmasks, so make the serial communication structs use uint32
to be consistent with the rest of the package.

As a side effect the DTR_CONTROL_* and RTS_CONTROL_* constants are
updated to reflect the positions of the bits in the 32-bit flags.

Change-Id: Ie19774a8ef5411d7df1e5b0d36806aa1d401fa86
GitHub-Last-Rev: bc93d94a45ae36676c259ce534361ccff7b185de
GitHub-Pull-Request: golang/sys#189
LUCI-TryBot-Result: Go LUCI <>
Reviewed-by: Dmitri Shuralyov <>
Auto-Submit: Dmitri Shuralyov <>
Reviewed-by: Alex Brainman <>
Reviewed-by: Than McIntosh <>
2 files changed
tree: a8e6526c5d12b28804ad27a8600393703561cd2c
  1. cpu/
  2. execabs/
  3. plan9/
  4. unix/
  5. windows/
  6. .gitattributes
  7. .gitignore
  8. codereview.cfg
  10. go.mod


Go Reference

This repository holds supplemental Go packages for low-level interactions with the operating system.


The easiest way to install is to run go get -u You can also manually git clone the repository to $GOPATH/src/

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see

The main issue tracker for the sys repository is located at Prefix your issue with “x/sys:” in the subject line, so it is easy to find.