Re: new libraries to access serial ports
- Posted by jacques_desch Jul 09, 2009
- 3042 views
daduko said...
Is it possible to turn on/off DTR, DSR signals ?
Vlado
The flow contol is set by SetCommState() usiing control parameter
-- no flow control SetCommState(hComm, "baud:9600,parity:even,bits:8,stop:1,control:none") -- software flow control (xon/xoff) SetCommState(hComm, "baud:9600,parity:even,bits:8,stop:1,control:soft") -- hardware flow control DTR/RTS handshake, CTS and DSR are monitored. SetCommState(hComm, "baud:9600,parity:even,bits:8,stop:1,control:hard")
NOTE from: http://msdn.microsoft.com/en-us/library/aa363214(VS.85).aspx
Enables RTS handshaking. The driver raises the RTS line when the "type-ahead" (input) buffer is less than one-half full and lowers the RTS line when the buffer is more than three-quarters full. If handshaking is enabled, it is an error for the application to adjust the line by using the EscapeCommFunction function.
jacques