/// <summary> /// Sets the serial port into break state. /// </summary> /// <remarks>SetBreakState() followed by ClearBrakeState() is equivalent to sending CTRL+BREAK.</remarks> /// <returns>True if the state was set correctly, false otherwise.</returns> public bool SetBreakState() { return(Win32Api.SetCommBreak(m_fileHandle)); }
/// <summary> /// Clears the break state set in the serial port. /// </summary> /// <returns>True if the state was set correctly, false otherwise.</returns> public bool ClearBreakState() { return(Win32Api.ClearCommBreak(m_fileHandle)); }
/// <summary> /// Opens the serial port for communication. /// </summary> /// <returns>True if the port is open successfully.</returns> public bool Open() { m_fileHandle = Win32Api.CreateFile(m_portName); return(IsOpen); }