mirror of
https://github.com/mik3y/usb-serial-for-android.git
synced 2026-10-13 22:51:42 +00:00
CH34x: for baud rate 307200 use special divisor+factor with lower deviation
This commit is contained in:
Generated
+8
@@ -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>
|
||||||
+3
@@ -199,6 +199,9 @@ public class Ch34xSerialDriver implements UsbSerialDriver {
|
|||||||
if (baudRate == 921600) {
|
if (baudRate == 921600) {
|
||||||
divisor = 7;
|
divisor = 7;
|
||||||
factor = 0xf300;
|
factor = 0xf300;
|
||||||
|
} else if (baudRate == 307200) {
|
||||||
|
divisor = 7;
|
||||||
|
factor = 0xd900;
|
||||||
} else {
|
} else {
|
||||||
final long BAUDBASE_FACTOR = 1532620800;
|
final long BAUDBASE_FACTOR = 1532620800;
|
||||||
final int BAUDBASE_DIVMAX = 3;
|
final int BAUDBASE_DIVMAX = 3;
|
||||||
|
|||||||
Reference in New Issue
Block a user