Allow to set initial RTS and DTR state after connect
This commit is contained in:
committed by
Cristian Maglie
parent
7ca3f7d1cd
commit
980038c3ea
@@ -235,6 +235,9 @@ func nativeOpen(portName string, mode *Mode) (*unixPort, error) {
|
||||
// Explicitly disable RTS/CTS flow control
|
||||
setTermSettingsCtsRts(false, settings)
|
||||
|
||||
port.SetDTR(mode.InitialDTR)
|
||||
port.SetRTS(mode.InitialRTS)
|
||||
|
||||
if port.setTermSettings(settings) != nil {
|
||||
port.Close()
|
||||
return nil, &PortError{code: InvalidSerialPort}
|
||||
|
||||
Reference in New Issue
Block a user