public static bool ClosePort() { Logger.Info("+"); if (_runConfig.IsMockupMode) { return(true); } if (_serialPort.IsOpen) { _serialPort.DiscardInBuffer(); _serialPort.DiscardOutBuffer(); _serialPort.Close(); } return(!_serialPort.IsOpen); }
private void DiscardBuffers() { Logger.Debug(""); _sp.DiscardInBuffer(); _sp.DiscardOutBuffer(); }