My serial application intermittently hangs when I disconnect the CP210x from the USB bus. What is wrong?
can be replaced with function calls like:
DeviceIOCTL(m_hSlave, IOCTL_SERIAL_GET_HANDFLOW, NULL, 0, &shf, sizeof(SERIAL_HANDFLOW), &dwSize);
DeviceIOCTL(m_hSlave, IOCTL_SERIAL_SET_HANDFLOW, NULL, 0, &shf, sizeof(SERIAL_HANDFLOW), &dwSize);
In order to use the DeviceIOCTL function, the project has to include 'devioctl.h' and 'ntddser.h' added. More information on these functions and the available IOCTL controls can be found in the MSDN library (www.msdn.com).
AN197 can be found on the Silicon Labs Applications webpage: https://www.silabs.com/products/mcu/Pages/ApplicationNotes.aspx.