Serial RTS, DTS control in Visual C++

C, C++, Visual C++, C++.Net Topics
Post Reply
User avatar
Saman
Lieutenant Colonel
Lieutenant Colonel
Posts: 828
Joined: Fri Jul 31, 2009 10:32 pm
Location: Mount Lavinia

Serial RTS, DTS control in Visual C++

Post by Saman » Fri Dec 02, 2011 12:48 am

As in my previous short article about flushing serial buffers, the most basic functions such as CreateFile, ReadFile and WriteFile are used for serial communication as well.

By using the function BOOL EscapeCommFunction(HANDLE, DWORD) we are able to control advance behaviours of the serial port as well. Values for DWORD will be as follows.
  • CLRDTR
  • SETDTR
  • SETRTS
  • CLRRTS
  • SETBREAK
  • CLRBREAK
Post Reply

Return to “C/C++ Programming”