Add new built-in MacOS baud rates
This commit is contained in:
parent
1ccc3b7d8a
commit
92c00b9eb0
|
@ -794,6 +794,48 @@ baud_rate getBaudRateCode(baud_rate baudRate)
|
|||
return B19200;
|
||||
case 38400:
|
||||
return B38400;
|
||||
case 7200:
|
||||
#ifdef B7200
|
||||
return B7200;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
case 14400:
|
||||
#ifdef B14400
|
||||
return B14400;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
case 28800:
|
||||
#ifdef B28800
|
||||
return B28800;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
case 57600:
|
||||
#ifdef B57600
|
||||
return B57600;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
case 76800:
|
||||
#ifdef B76800
|
||||
return B76800;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
case 115200:
|
||||
#ifdef B115200
|
||||
return B115200;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
case 230400:
|
||||
#ifdef B230400
|
||||
return B230400;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* SerialPort_Windows.c
|
||||
*
|
||||
* Created on: Feb 25, 2012
|
||||
* Last Updated on: Oct 22, 2021
|
||||
* Last Updated on: Nov 01, 2021
|
||||
* Author: Will Hedgecock
|
||||
*
|
||||
* Copyright (C) 2012-2021 Fazecast, Inc.
|
||||
|
@ -352,7 +352,7 @@ JNIEXPORT void JNICALL Java_com_fazecast_jSerialComm_SerialPort_initializeLibrar
|
|||
serialCommClass = (jclass)env->NewGlobalRef(serialComm);
|
||||
serialCommConstructor = env->GetMethodID(serialCommClass, "<init>", "()V");
|
||||
|
||||
// Cache
|
||||
// Cache Java fields as global references
|
||||
serialPortHandleField = env->GetFieldID(serialCommClass, "portHandle", "J");
|
||||
comPortField = env->GetFieldID(serialCommClass, "comPort", "Ljava/lang/String;");
|
||||
friendlyNameField = env->GetFieldID(serialCommClass, "friendlyName", "Ljava/lang/String;");
|
||||
|
@ -465,7 +465,6 @@ JNIEXPORT jboolean JNICALL Java_com_fazecast_jSerialComm_SerialPort_configPort(J
|
|||
dcbSerialParams.fTXContinueOnXoff = TRUE;
|
||||
dcbSerialParams.fErrorChar = FALSE;
|
||||
dcbSerialParams.fNull = FALSE;
|
||||
dcbSerialParams.fAbortOnError = FALSE;
|
||||
dcbSerialParams.XonLim = 2048;
|
||||
dcbSerialParams.XoffLim = 512;
|
||||
dcbSerialParams.XonChar = (char)17;
|
||||
|
|
Loading…
Reference in New Issue