bool IComDriver.Uninitialize(int ComHandle) { ComPort port = GetComPort(ComHandle); bool retVal = true; if (port is ISerialPortToStream) { retVal = ((ISerialPortToStream)port).Uninitialize(); } return(port.DeviceUninitialize() && retVal); }
bool IComDriver.Initialize(int ComHandle) { ComPort port = GetComPort(ComHandle); bool retVal = true; if (port is ISerialPortToStream) { retVal = ((ISerialPortToStream)port).Initialize(115200, 0, 8, 1, 0); } return(port.DeviceInitialize() && retVal); }
internal override void UnregisterInternal(EmulatorComponent ec) { VerifyAccess(); ComPort comPort = ec as ComPort; if (comPort != null) { if (_ports[comPort.ComPortHandle] == comPort) { _ports.Remove(comPort.ComPortHandle); _validPorts.Remove(comPort); base.UnregisterInternal(ec); } } }