Example #1
0
        public unsafe void DcbDtrControl(DtrControl dtrControl)
        {
            DCB dcb = new DCB()
            {
                fDtrControl = dtrControl
            };

            dcb.fDtrControl.Should().Be(dtrControl);
        }
        public unsafe void DcbDtrControl(DtrControl dtrControl)
        {
            DeviceControlBlock dcb = new DeviceControlBlock()
            {
                DtrControl = dtrControl
            };

            dcb.DtrControl.Should().Be(dtrControl);
        }
 public SerialPortAndroid(String portName, int baudRate, Parity parity, byte dataBits, StopBits stopBits) : this()
 {
     // parameters
     this._baudRate = baudRate;
     this._parity = parity;
     this._dataBits = dataBits;
     this._stopBits = stopBits;
     this._dtrControl = DtrControl.Enable; // Default
 }
Example #4
0
        public SerialPortPOSIX(String portName, int baudRate, Parity parity, byte dataBits, StopBits stopBits)
        {
            this.IsOpen   = false;
            this.PortName = portName;

            // parameters
            this._baudRate   = baudRate;
            this._parity     = parity;
            this._dataBits   = dataBits;
            this._stopBits   = stopBits;
            this._dtrControl = DtrControl.Enable;             // Default
        }
        /// <summary>
        /// Creates a new Serial Port
        /// </summary>
        /// <param name="portName">Name of the port (COM1, ...)</param>
        /// <param name="baudRate">Baud rate (9600, 115200, ...) </param>
        /// <param name="parity">Parity</param>
        /// <param name="dataBits">Number of data bits (7, 8, ...)</param>
        /// <param name="stopBits">Stop bits</param>
        public SerialPortWin32(String portName, int baudRate, Parity parity, byte dataBits, StopBits stopBits)
        {
            this.IsOpen = false;
            this.PortName = portName;

            // parameters
            this._baudRate = baudRate;
            this._parity = parity;
            this._dataBits = dataBits;
            this._stopBits = stopBits;
            this._dtrControl = DtrControl.Enable; // Default
        }