winapi - Low-Level control of RS232 (Com-Port) RTS/CTS/DTR/DSR possible? -


I wonder if and how possible that controlling RS-232 handshaking lines from Win32 (old C-API) Go.

I want to interface with an external piece of hardware, and two simple data-lines will be sufficient for my needs

So - is there an API for Win32 Let me read and write the status of four status lines? Handshaking lines in normal serial communication are automatically powered by UAR (if hardware handshaking is enabled)

I remember that it was trivial under DOS. One had to program directly to the UAR. Has this functionality survived in some way in Win32?

You can control RTS and DTR by using SetCommState () Are there. You can also set things to handle hardware or drivers for hardware flow control (CTS and / or DSR), or you can set things using SetCommMask () , so that When you get the signal, then you get the events. / P>

A decent overview is given here:

Note that the Win32 Serial Comm API and / or driver can be duplicated, so running on the wire to do some debugging Be prepared


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -