From 8f447ebc07eb5bec7d0654c8a44cc6f5ed05d48f Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Mon, 19 May 2025 15:31:36 +0200 Subject: [PATCH] Make win32 internal constants private. --- serial_windows.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/serial_windows.go b/serial_windows.go index 5c5a2a4..d2800f8 100644 --- a/serial_windows.go +++ b/serial_windows.go @@ -280,15 +280,14 @@ func (port *windowsPort) SetRTS(rts bool) error { return nil } -// GetCommModemStatus constants. See https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getcommmodemstatus. -const ( - MS_CTS_ON = 0x0010 - MS_DSR_ON = 0x0020 - MS_RING_ON = 0x0040 - MS_RLSD_ON = 0x0080 -) - func (port *windowsPort) GetModemStatusBits() (*ModemStatusBits, error) { + // GetCommModemStatus constants. See https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getcommmodemstatus. + const ( + MS_CTS_ON = 0x0010 + MS_DSR_ON = 0x0020 + MS_RING_ON = 0x0040 + MS_RLSD_ON = 0x0080 + ) var bits uint32 if err := windows.GetCommModemStatus(port.handle, &bits); err != nil { return nil, &PortError{}