Skip to content

Commit 567f1f2

Browse files
authored
Merge pull request #44 from ThierryDFR/main
Thank you for updating Ch34xSerialDriver.cs with more of the baud rates
2 parents bf52747 + c22f7e9 commit 567f1f2

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

UsbSerialForAndroid/driver/Ch34xSerialDriver.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,14 @@ private void Initialize()
302302

303303
private void SetBaudRate(int baudRate)
304304
{
305-
int[] baud = new int[]
306-
{
307-
2400, 0xd901, 0x0038, 4800, 0x6402,
308-
0x001f, 9600, 0xb202, 0x0013, 19200, 0xd902, 0x000d, 38400,
309-
0x6403, 0x000a, 115200, 0xcc03, 0x0008
310-
};
305+
int[] baud = new int[] { 50, 0x1680, 0x0024, 75, 0x6480, 0x0018, 100, 0x8B80, 0x0012,
306+
110, 0x9580, 0x00B4, 150, 0xB280, 0x000C, 300, 0xD980, 0x0006, 600, 0x6481, 0x0018,
307+
900, 0x9881, 0x0010, 1200, 0xB281, 0x000C, 1800, 0xCC81, 0x0008, 2400, 0xD981, 0x0006,
308+
3600, 0x3082, 0x0020, 4800, 0x6482, 0x0018, 9600, 0xB282, 0x000C, 14400, 0xCC82, 0x0008,
309+
19200, 0xD982, 0x0006, 33600, 0x4D83, 0x00D3, 38400, 0x6483, 0x0018, 56000, 0x9583, 0x0018,
310+
57600, 0x9883, 0x0010, 76800, 0xB283, 0x000C, 115200, 0xCC83, 0x0008, 128000, 0xD183, 0x003B,
311+
153600, 0xD983, 0x0006, 230400, 0xE683, 0x0004, 460800, 0xF383, 0x0002, 921600, 0xF387, 0x0000,
312+
1500000, 0xFC83, 0x0003, 2000000, 0xFD83, 0x0002 };
311313

312314
for (int i = 0; i < baud.Length / 3; i++)
313315
{
@@ -448,4 +450,4 @@ public static Dictionary<int, int[]> GetSupportedDevices()
448450
};
449451
}
450452
}
451-
}
453+
}

0 commit comments

Comments
 (0)