From ba28685e910985b00e230a682e03161ba78e5458 Mon Sep 17 00:00:00 2001 From: "Andreas Fankhauser hiddenalpha.ch" <23085769+hiddenalpha@users.noreply.github.com> Date: Wed, 27 Nov 2024 14:56:29 +0100 Subject: [PATCH] Add java constant for non-standard baud rate 921600 As asked in java-native issue 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 5682c6f9f..34e65d381 100644 --- a/src/main/java/jssc/SerialPort.java +++ b/src/main/java/jssc/SerialPort.java @@ -80,6 +80,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;