From f5c1f66686f14ae256271401a29d5b84c434a942 Mon Sep 17 00:00:00 2001 From: "Andreas Fankhauser hiddenalpha.ch" <23085769+hiddenalpha@users.noreply.github.com> Date: Wed, 27 Nov 2024 14:50:06 +0100 Subject: [PATCH] Add java constant for non-standard baud rate 921600 Fixes: https://github.com/java-native/jssc/issues/176 --- src/main/java/jssc/SerialPort.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/jssc/SerialPort.java b/src/main/java/jssc/SerialPort.java index f43a30225..3c7633f60 100644 --- a/src/main/java/jssc/SerialPort.java +++ b/src/main/java/jssc/SerialPort.java @@ -75,6 +75,12 @@ public class SerialPort { public static final int BAUDRATE_128000 = 128000; /** Baud rate 256000 symbols/second **/ public static final int BAUDRATE_256000 = 256000; + /** Baud rate 921600 symbols/second. + * WARN: Only some hosts support non-standard baud rates! Use this + * baud rate only if you can ensure your host and device properly + * supports it. Have a look at return value of + * {@link SerialNativeInterface#setParams(long,int,int,int,int,boolean,boolean,int)}. */ + public static final int BAUDRATE_921600 = 921600; /** Five (5) data bits per byte **/ public static final int DATABITS_5 = 5;