1
0
mirror of https://github.com/mik3y/usb-serial-for-android.git synced 2026-10-13 14:41:44 +00:00

CH34x: for baud rate 307200 use special divisor+factor with lower deviation

This commit is contained in:
kai-morich
2026-10-04 20:16:51 +02:00
parent 16d84116a0
commit 377be3a2bd
2 changed files with 11 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MarkdownSettings">
<option name="previewPanelProviderInfo">
<ProviderInfo name="Compose (experimental)" className="com.intellij.markdown.compose.preview.ComposePanelProvider" />
</option>
</component>
</project>
@@ -199,6 +199,9 @@ public class Ch34xSerialDriver implements UsbSerialDriver {
if (baudRate == 921600) {
divisor = 7;
factor = 0xf300;
} else if (baudRate == 307200) {
divisor = 7;
factor = 0xd900;
} else {
final long BAUDBASE_FACTOR = 1532620800;
final int BAUDBASE_DIVMAX = 3;