- revert the use of serial init for set line coding

- update ch34x_get_lcr and ch34x_get_factor_divisor
This commit is contained in:
hathach
2024-01-19 01:06:24 +07:00
parent 3968a0fff8
commit 30eb35f17f
2 changed files with 90 additions and 68 deletions

View File

@@ -59,6 +59,12 @@
#define CH34X_REG_MCR_MSR2 0x07
#define CH34X_NBREAK_BITS 0x01
#define CH341_REG_0x0F 0x0F // undocumented register
#define CH341_REG_0x2C 0x2C // undocumented register
#define CH341_REG_0x27 0x27 // hardware flow control (cts/rts)
#define CH34X_REG16_DIVISOR_PRESCALER TU_U16(CH34X_REG_DIVISOR, CH34X_REG_PRESCALER)
// modem control bits
#define CH34X_BIT_RTS ( 1 << 6 )
#define CH34X_BIT_DTR ( 1 << 5 )