Address: Room 1705,Block A1, Longyuan Plaza, Longkouxi Road, Guangzhou, China, 510640 Website: http://www.arm9.net
Sales: +86-20-85201025 Tech Support: +86-13719442657 Fax: +86-20-85261505
Email for Business and Cooperation: capbily@163.com Email for Tech Support: dev_friendlyarm@163.com
library.
In this section we will describe how to use the libfriendlyarm-hardware.so library.
6.2.1 How to Use “libfriendlyarm-hardware.so”
FriendlyARM has included the libfriendlyarm-hardware.so library in Android since
the March 2011 version. It is in the following directory:
device/Samsung/smdkv210/prebuilt/libfriendlyrm-hardware.so
On the 210 Android system it is in the “/system/lib/libfriendlyarm-hardware.so”
directory.
If you develop Android applications with Eclipse you can follow the steps below to
call libfriendlyarm-hardware.so APIs:
1) Go to your Android program’s directory, create a “libs” directory, enter it and
create an “armeabi” directory and copy “libfriendlyrm-hardware.so” to this
directory.
2) Go back to your program’s directory, enter the “src” directory and create a
“com\friendlyarm\AndroidSDK” directory and create a “HardwareControler.java”
file and type the following code:
package com.friendlyarm.AndroidSDK;
import android.util.Log;
public class HardwareControler
{
/* Serial Port */
static public native int openSerialPort( String devName, long baud, int dataBits,