void initcomms() {
DeviceIoControl(comport, IOCTL_SERIAL_SET_BREAK_ON, NULL, 0, NULL, 0, &len, NULL);
DeviceIoControl(comport, IOCTL_SERIAL_SET_RTS, NULL, 0, NULL, 0, &len, NULL);
Sleep(200);
DeviceIoControl(comport, IOCTL_SERIAL_CLR_DTR, NULL, 0, NULL, 0, &len, NULL);
DeviceIoControl(comport, IOCTL_SERIAL_SET_BREAK_OFF, NULL, 0, NULL, 0, &len, NULL);
DeviceIoControl(comport, IOCTL_SERIAL_CLR_RTS, NULL, 0, NULL, 0, &len, NULL);
Sleep(200);
DeviceIoControl(comport, IOCTL_SERIAL_SET_BREAK_ON, NULL, 0, NULL, 0, &len, NULL);
DeviceIoControl(comport, IOCTL_SERIAL_SET_RTS, NULL, 0, NULL, 0, &len, NULL);
Sleep(200);
DeviceIoControl(comport, IOCTL_SERIAL_SET_BREAK_ON, NULL, 0, NULL, 0, &len, NULL);
DeviceIoControl(comport, IOCTL_SERIAL_SET_RTS, NULL, 0, NULL, 0, &len, NULL);
Sleep(200);
DeviceIoControl(comport, IOCTL_SERIAL_SET_BREAK_ON, NULL, 0, NULL, 0, &len, NULL);
DeviceIoControl(comport, IOCTL_SERIAL_SET_RTS, NULL, 0, NULL, 0, &len, NULL);
Sleep(200);
DeviceIoControl(comport, IOCTL_SERIAL_SET_BREAK_ON, NULL, 0, NULL, 0, &len, NULL);
DeviceIoControl(comport, IOCTL_SERIAL_SET_RTS, NULL, 0, NULL, 0, &len, NULL);
Sleep(200);
DeviceIoControl(comport, IOCTL_SERIAL_SET_BREAK_ON, NULL, 0, NULL, 0, &len, NULL);
DeviceIoControl(comport, IOCTL_SERIAL_SET_RTS, NULL, 0, NULL, 0, &len, NULL);
Sleep(200);
DeviceIoControl(comport, IOCTL_SERIAL_SET_BREAK_ON, NULL, 0, NULL, 0, &len, NULL);
DeviceIoControl(comport, IOCTL_SERIAL_SET_RTS, NULL, 0, NULL, 0, &len, NULL);
Sleep(200);
DeviceIoControl(comport, IOCTL_SERIAL_SET_BREAK_ON, NULL, 0, NULL, 0, &len, NULL);
DeviceIoControl(comport, IOCTL_SERIAL_SET_RTS, NULL, 0, NULL, 0, &len, NULL);
Sleep(200);
DeviceIoControl(comport, IOCTL_SERIAL_SET_BREAK_OFF, NULL, 0, NULL, 0, &len, NULL);
DeviceIoControl(comport, IOCTL_SERIAL_CLR_RTS, NULL, 0, NULL, 0, &len, NULL);
DeviceIoControl(comport, IOCTL_SERIAL_SET_DTR, NULL, 0, NULL, 0, &len, NULL);
}
I imagine you can do fast init the same way via bit banging.