Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit 0a82ed3

Browse files
author
Bruce j Beare
authored
Merge pull request #22 from intel-iot-devkit/bjbeare
Split Driver Library into drivers and support
2 parents 2363ce9 + a3b6560 commit 0a82ed3

File tree

31 files changed

+137
-32
lines changed

31 files changed

+137
-32
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Importing UPM Android studio projects
4141
````
4242
dependencies {
4343
compile 'io.mraa.at.upm:upm_jhd1313m1:1.1.0'
44-
compile project(':driverlibrary')
44+
compile project(':driversupport')
4545
provided 'com.google.android.things:androidthings:0.3-devpreview'
4646
}
4747
````

accel_on_lcd/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ android {
4444

4545
dependencies {
4646
compile 'io.mraa.at.upm:upm_jhd1313m1:1.1.0'
47+
compile project(':driversupport')
4748
compile project(':driverlibrary')
4849
provided 'com.google.android.things:androidthings:0.3-devpreview'
4950
}

accel_on_lcd/src/main/java/com/example/upm/androidthings/driversamples/DispAccelActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import android.hardware.SensorManager;
2727

2828
import com.example.upm.androidthings.driverlibrary.Mma7660AccelerometerDriver;
29-
import com.example.upm.androidthings.driverlibrary.BoardDefaults;
29+
import com.example.upm.androidthings.driversupport.BoardDefaults;
3030
import mraa.mraa;
3131

3232
import java.io.IOException;

bme280/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ android {
2929

3030
dependencies {
3131
compile fileTree(dir: 'libs', include: ['*.jar'])
32-
compile project(':driverlibrary')
32+
compile project(':driversupport')
3333
compile 'io.mraa.at.upm:upm_bmp280:1.2.0'
3434
}

bme280/src/main/java/com/example/upm/androidthings/driversamples/BMETempActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import android.os.Bundle;
66
import android.util.Log;
77

8-
import com.example.upm.androidthings.driverlibrary.BoardDefaults;
8+
import com.example.upm.androidthings.driversupport.BoardDefaults;
99
import mraa.mraa;
1010

1111
public class BMETempActivity extends Activity {

driverlibrary/README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,8 @@ The files in this library are gathered here for convenience... they can be copie
66
the examples or split into seperate libraries as desired.
77

88

9-
BoardDefaults.java
10-
------------------
11-
This code determines the SOM and carrier board that is being used based on the board information
12-
provided by the system and the characteristics of the board (Edison Arduino has a GPIO expander).
13-
14-
Support for additonal SOMs and carrier boards can easily be added to this file.
15-
16-
179
Mma7660AccelerometerDriver.java
1810
-------------------------------
1911
This code is a class that can be used to register with the Android Things sensor manager. It
2012
provides an interface between the sensor manager and UPM (and thus the desired sensor). Sensors of
21-
many types can be interfaced in this way with the sensor manager.
13+
many types can be interfaced in this way with the sensor manager.

driverlibrary/src/main/res/values/strings.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@
1717

1818
<resources>
1919
<string name="app_name">driverlibrary</string>
20-
21-
<string name="GPIO_Edison_Arduino">IO0</string>
2220
</resources>

driversupport/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

driversupport/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
BoardDefaults.java
2+
------------------
3+
This code determines the SOM and carrier board that is being used based on the board information
4+
provided by the system and the characteristics of the board (Edison Arduino has a GPIO expander).
5+
6+
Support for additonal SOMs and carrier boards can easily be added to this file.

driversupport/build.gradle

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Copyright (c) 2017 Intel Corporation.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
apply plugin: 'com.android.library'
18+
19+
android {
20+
compileSdkVersion 24
21+
buildToolsVersion "25.0.0"
22+
23+
defaultConfig {
24+
minSdkVersion 24
25+
targetSdkVersion 24
26+
versionCode 1
27+
versionName "1.0"
28+
29+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
30+
31+
}
32+
buildTypes {
33+
release {
34+
minifyEnabled false
35+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
36+
}
37+
}
38+
compileOptions{
39+
sourceCompatibility JavaVersion.VERSION_1_8
40+
targetCompatibility JavaVersion.VERSION_1_8
41+
}
42+
}
43+
44+
dependencies {
45+
compile fileTree(dir: 'libs', include: ['*.jar'])
46+
compile 'io.mraa.at:mraa:1.6.1'
47+
provided 'com.google.android.things:androidthings:0.3-devpreview'
48+
}

0 commit comments

Comments
 (0)