Remove GetDTR() and GetRTS()

This commit is contained in:
Tobias Kaupat
2017-07-28 09:49:49 +02:00
parent fd75bf3895
commit 04b4ab1e45

View File

@@ -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, &params); 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, &params); 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) {