From 04b4ab1e45a5edfcb8f4fd01daa571a2a41405d3 Mon Sep 17 00:00:00 2001 From: Tobias Kaupat Date: Fri, 28 Jul 2017 09:49:49 +0200 Subject: [PATCH] Remove GetDTR() and GetRTS() --- serial_windows.go | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/serial_windows.go b/serial_windows.go index bc54789..90712d5 100644 --- a/serial_windows.go +++ b/serial_windows.go @@ -341,34 +341,6 @@ func (port *windowsPort) SetRTS(rts bool) error { return nil } -// GetRTS reads the RTS status from the control flags -// TODO: This is not yet implemented for other OS and thus not in the Port interface -func (port *windowsPort) GetRTS() (bool, error) { - params := dcb{} - if err := getCommState(port.handle, ¶ms); err != nil { - return false, &PortError{causedBy: err} - } - - if params.Flags&dcbRTSControlEnable != 0 { - return true, nil - } - return false, nil -} - -// GetDTR reads the DTR status from the control flags -// TODO: This is not yet implemented for other OS and thus not in the Port interface -func (port *windowsPort) GetDTR() (bool, error) { - params := dcb{} - if err := getCommState(port.handle, ¶ms); err != nil { - return false, &PortError{causedBy: err} - } - - if params.Flags&dcbDTRControlEnable != 0 { - return true, nil - } - return false, nil -} - func (port *windowsPort) GetModemStatusBits() (*ModemStatusBits, error) { var bits uint32 if !getCommModemStatus(port.handle, &bits) {