Yes, it does. But I can't use it unless I know exactly when the buffer is
empty. If I set it too soon, not all bytes will be sent. If I set it too
late, I will miss incoming communication. If I could somehow set the
RTS_CONTROL_TOGGLE for the port, I wouldn't have to worry.
The other option would be to wait for a "tx buffer empty" event to be
signalled after a call to Write. Something like this:
port.RtsEnable = true;
port.Write(buffer, 0, byteCount);
WaitForTxBufferToBeEmpty(port);
this.port.RtsEnable = false;
....but then how do I implement WaitForTxBufferToBeEmpty?
"Stefan Hoffmann" wrote:
hi Kristoffer,
Kristoffer Persson wrote:
Does anyone know if it's possible to get the Win32 handle to the serial port
used under the hood in System.IO.SerialPort?
The reason I want it is so I'd be able to make changes the DCB struct. I
want to set the fRtsControl to RTS_CONTROL_TOGGLE so the RTS signal will be
reset automatically when the TX buffer is empty.
Using VS2005, System.IO.Ports.SerialPort has a property RtsEnable.
mfG
--stefan <--