This change primaily adds support for a UBS<->RS232 adapter based on CH340 (or an analogue) that I own.
The device seems to have a newer internal version (0x30) and the existing code incorrectly configures line control for it
resulting in garbled transmission.
The changes are based on what I learned in Linux drivers for the same hardware.
Additional changes:
- add bit definitions seen in the Linux code
- fix bit definitions that did not match those in Linux, all of them previously unused
- remove a duplicate definition for UCHCOM_REG_LCR1 as UCHCOM_REG_BREAK2
- distinguish CH340 and CH341 based on documented product IDs rather than on device IDs (this is purely cosmetic as it does not affect control flow)
- add more debugging prints
- add a special tweak of UCHCOM_REG_BPS_PRE seen in Linux to prevent data buffering
- explicitly reject two stop bits and parity as the driver currently does not support them
- use UCHCOM_REG_LCR1 / UCHCOM_REG_LCR2 of explicit 0x18 and 0x25
- use NULL instead of 0 where a pointer is expected