private void openPort() throws IOException, NoSuchPortException, PortInUseException, UnsupportedCommOperationException{
CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(port);
CommPort commPort = portIdentifier.open("LightController",2000);
if ( commPort instanceof SerialPort )
{
serialPort = (SerialPort) commPort;
serialPort.setSerialPortParams(baud,SerialPort.DATABITS_8,SerialPort.STOPBITS_1,SerialPort.PARITY_NONE);
this.out = serialPort.getOutputStream();
}
}
SerialWriter.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:kkMulticopterFlashTool
作者:
评论列表
文章目录