I'm working on Arduino Uno project which requires serial port comminication. On my Arduino board DTR pin of USB-UART chip is used to reboot MCU (It's connected to reset pin through capacitor) and that's what I dont't want it to do. Serial port driver on Windows changes DTR line state when the port is opened (resetting the board) and there is 3 options of fDtrControl
in Win32 API:
From Microsoft Docs:
fDtrControl
The DTR (data-terminal-ready) flow control. This member can be one of
the following values.
Value |
Meaning |
DTR_CONTROL_DISABLE 0x00 |
Disables the DTR line when the device is opened and leaves it disabled. |
DTR_CONTROL_ENABLE 0x01 |
Enables the DTR line when the device is opened and leaves it on. |
DTR_CONTROL_HANDSHAKE 0x02 |
Enables DTR handshaking. If handshaking is enabled, it is an error for the application to adjust the line by using the EscapeCommFunction function. |