Test for HF link loader as additional fp architecture test
This commit is contained in:
parent
e86d9122ac
commit
12d9f735fe
|
@ -2,7 +2,7 @@
|
|||
* SerialPort.java
|
||||
*
|
||||
* Created on: Feb 25, 2012
|
||||
* Last Updated on: Apr 03, 2018
|
||||
* Last Updated on: Jul 20, 2018
|
||||
* Author: Will Hedgecock
|
||||
*
|
||||
* Copyright (C) 2012-2018 Fazecast, Inc.
|
||||
|
@ -42,7 +42,7 @@ import java.util.Date;
|
|||
* This class provides native access to serial ports and devices without requiring external libraries or tools.
|
||||
*
|
||||
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
||||
* @version 2.0.2
|
||||
* @version 2.0.3
|
||||
* @see java.io.InputStream
|
||||
* @see java.io.OutputStream
|
||||
*/
|
||||
|
@ -152,12 +152,13 @@ public final class SerialPort
|
|||
{
|
||||
try
|
||||
{
|
||||
File linkerFile = new File("/lib/ld-linux-armhf.so.3");
|
||||
ProcessBuilder pb = new ProcessBuilder("/bin/sh", "-c", "ldd /usr/bin/ld | grep ld-");
|
||||
Process p = pb.start();
|
||||
p.waitFor();
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
|
||||
String linkLoader = br.readLine();
|
||||
if (linkLoader.contains("armhf"))
|
||||
if (linkerFile.exists() || linkLoader.contains("armhf"))
|
||||
libraryPath += "-hf";
|
||||
}
|
||||
catch (Exception e) { e.printStackTrace(); }
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.EventListener;
|
|||
* This interface must be implemented to enable simple event-based serial port I/O.
|
||||
*
|
||||
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
||||
* @version 2.0.2
|
||||
* @version 2.0.3
|
||||
* @see java.util.EventListener
|
||||
*/
|
||||
public interface SerialPortDataListener extends EventListener
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.EventObject;
|
|||
* This class describes an asynchronous serial port event.
|
||||
*
|
||||
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
||||
* @version 2.0.2
|
||||
* @version 2.0.3
|
||||
* @see java.util.EventObject
|
||||
*/
|
||||
public final class SerialPortEvent extends EventObject
|
||||
|
|
|
@ -31,7 +31,7 @@ package com.fazecast.jSerialComm;
|
|||
* <i>Note</i>: Using this interface will negate any serial port read timeout settings since they make no sense in an asynchronous context.
|
||||
*
|
||||
* @author Will Hedgecock <will.hedgecock@fazecast.com>
|
||||
* @version 2.0.2
|
||||
* @version 2.0.3
|
||||
* @see com.fazecast.jSerialComm.SerialPortDataListener
|
||||
* @see java.util.EventListener
|
||||
*/
|
||||
|
|
|
@ -32,7 +32,7 @@ import java.util.Scanner;
|
|||
* This class provides a test case for the jSerialComm library.
|
||||
*
|
||||
* @author Will Hedgecock <will.hedgecock@gmail.com>
|
||||
* @version 2.0.0
|
||||
* @version 2.0.3
|
||||
* @see java.io.InputStream
|
||||
* @see java.io.OutputStream
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue