Hi, Mike. >> + val = 0x501f; >> + idx = 0xd90a; > > What are these magic numbers?
These numbers come from Linux driver (ch341.c). I don't know what they mean. Maybe these numbers represent default character length and baudrate divisor. http://lxr.cpsc.ucalgary.ca/lxr/#linux+v2.6.31/drivers/usb/serial/ch341.c#L217 With my CH340T, uchcom(4) generates val=0x401f/idx=0xb2d2. uchcom(4) reads CH340 registers to make val/idx value but I think this method is improper for initialize. Because none can take the initial state when the chip's default value has changed. It seems that the content/function of UCHCOM_REG_LCR1 has been changed, and generated results are doubtful. So I use Linux's magic numbers. Regards, -- SASANO Takayoshi <u...@mx5.nisiq.net>