AndroidSerialport
Android 串口通讯,基于android_serialport_api google开源的,简化代码
项目中只使用到SerialPort类和3个so文件
public static SerialPort getSerialPort() throws SecurityException, IOException, InvalidParameterException {
if (mSerialPort == null) {
//串口文件和波特率
mSerialPort = new SerialPort(new File("/dev/ttyS2"), 19200, 0);
}
return mSerialPort;
2024-09-06 15:10:14
132KB
Java
1