diff --git a/pi3-smart-remote/.gitignore b/pi3-smart-remote/.gitignore deleted file mode 100644 index e08e8a0..0000000 --- a/pi3-smart-remote/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea/workspace.xml -/.idea/libraries -.DS_Store -/build -/captures -.externalNativeBuild -/wiringPi diff --git a/pi3-smart-remote/.idea/compiler.xml b/pi3-smart-remote/.idea/compiler.xml deleted file mode 100644 index 96cc43e..0000000 --- a/pi3-smart-remote/.idea/compiler.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pi3-smart-remote/.idea/copyright/profiles_settings.xml b/pi3-smart-remote/.idea/copyright/profiles_settings.xml deleted file mode 100644 index e7bedf3..0000000 --- a/pi3-smart-remote/.idea/copyright/profiles_settings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/pi3-smart-remote/.idea/gradle.xml b/pi3-smart-remote/.idea/gradle.xml deleted file mode 100644 index 7ac24c7..0000000 --- a/pi3-smart-remote/.idea/gradle.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/pi3-smart-remote/.idea/misc.xml b/pi3-smart-remote/.idea/misc.xml deleted file mode 100644 index f3d13dd..0000000 --- a/pi3-smart-remote/.idea/misc.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pi3-smart-remote/.idea/modules.xml b/pi3-smart-remote/.idea/modules.xml deleted file mode 100644 index 3d6b20b..0000000 --- a/pi3-smart-remote/.idea/modules.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/pi3-smart-remote/.idea/runConfigurations.xml b/pi3-smart-remote/.idea/runConfigurations.xml deleted file mode 100644 index 7f68460..0000000 --- a/pi3-smart-remote/.idea/runConfigurations.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/pi3-smart-remote/app/.gitignore b/pi3-smart-remote/app/.gitignore deleted file mode 100644 index 796b96d..0000000 --- a/pi3-smart-remote/app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/pi3-smart-remote/app/build.gradle b/pi3-smart-remote/app/build.gradle deleted file mode 100644 index f002f37..0000000 --- a/pi3-smart-remote/app/build.gradle +++ /dev/null @@ -1,27 +0,0 @@ -apply plugin: 'com.android.application' - -android { - compileSdkVersion 26 - buildToolsVersion '26.0.2' - defaultConfig { - applicationId "net.irext.pi3sr" - minSdkVersion 25 - targetSdkVersion 26 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - provided 'com.google.android.things:androidthings:0.5.1-devpreview' - compile 'com.android.support:appcompat-v7:26.+' - compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4' -} diff --git a/pi3-smart-remote/app/proguard-rules.pro b/pi3-smart-remote/app/proguard-rules.pro deleted file mode 100644 index d14c450..0000000 --- a/pi3-smart-remote/app/proguard-rules.pro +++ /dev/null @@ -1,25 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in D:\Android\android-sdk/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile diff --git a/pi3-smart-remote/app/src/main/AndroidManifest.xml b/pi3-smart-remote/app/src/main/AndroidManifest.xml deleted file mode 100644 index 1aaabc2..0000000 --- a/pi3-smart-remote/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pi3-smart-remote/app/src/main/java/net/irext/pi3sr/Pi3SRApplication.java b/pi3-smart-remote/app/src/main/java/net/irext/pi3sr/Pi3SRApplication.java deleted file mode 100644 index 82c5cca..0000000 --- a/pi3-smart-remote/app/src/main/java/net/irext/pi3sr/Pi3SRApplication.java +++ /dev/null @@ -1,13 +0,0 @@ -package net.irext.pi3sr; - -import android.app.Application; - -/** - * - * Pi3SRApplication - * - * created by strawmanbobi 2017-06-25 - */ -public class Pi3SRApplication extends Application { - -} diff --git a/pi3-smart-remote/app/src/main/java/net/irext/pi3sr/driver/HCSR501.java b/pi3-smart-remote/app/src/main/java/net/irext/pi3sr/driver/HCSR501.java deleted file mode 100644 index 74b958f..0000000 --- a/pi3-smart-remote/app/src/main/java/net/irext/pi3sr/driver/HCSR501.java +++ /dev/null @@ -1,63 +0,0 @@ -package net.irext.pi3sr.driver; - -import android.util.Log; - -import com.google.android.things.pio.Gpio; -import com.google.android.things.pio.GpioCallback; - -import java.io.IOException; - -/** - * - * HC-SR501 driver - * - * created by strawmanbobi 2017-06-25 - */ -public class HCSR501 implements MotionSensor { - - private static final String TAG = HCSR501.class.getSimpleName(); - - private final Gpio bus; - - private final MotionSensor.Listener listener; - - public HCSR501(Gpio bus, Listener listener) { - this.bus = bus; - this.listener = listener; - } - - @Override - public void startup() { - try { - bus.setDirection(Gpio.DIRECTION_IN); - bus.setActiveType(Gpio.ACTIVE_HIGH); - bus.setEdgeTriggerType(Gpio.EDGE_RISING); - } catch (IOException e) { - throw new IllegalStateException("Sensor can't start - App is foobar'd", e); - } - try { - bus.registerGpioCallback(callback); - } catch (IOException e) { - throw new IllegalStateException("Sensor can't register callback", e); - } - } - - private final GpioCallback callback = new GpioCallback() { - @Override - public boolean onGpioEdge(Gpio gpio) { - listener.onMovement(); - return true; - } - }; - - @Override - public void shutdown() { - bus.unregisterGpioCallback(callback); - try { - bus.close(); - } catch (IOException e) { - Log.e(TAG, "Failed to shut down. You might get errors next time you try to start.", e); - } - } - -} diff --git a/pi3-smart-remote/app/src/main/java/net/irext/pi3sr/driver/MotionSensor.java b/pi3-smart-remote/app/src/main/java/net/irext/pi3sr/driver/MotionSensor.java deleted file mode 100644 index c02676d..0000000 --- a/pi3-smart-remote/app/src/main/java/net/irext/pi3sr/driver/MotionSensor.java +++ /dev/null @@ -1,19 +0,0 @@ -package net.irext.pi3sr.driver; - -/** - * - * motion sensor interface - * - * created by strawmanbobi 2017-06-25 - */ -public interface MotionSensor { - - void startup(); - - void shutdown(); - - public interface Listener { - void onMovement(); - } - -} diff --git a/pi3-smart-remote/app/src/main/java/net/irext/pi3sr/ui/MainActivity.java b/pi3-smart-remote/app/src/main/java/net/irext/pi3sr/ui/MainActivity.java deleted file mode 100644 index dcaf926..0000000 --- a/pi3-smart-remote/app/src/main/java/net/irext/pi3sr/ui/MainActivity.java +++ /dev/null @@ -1,21 +0,0 @@ -package net.irext.pi3sr.ui; - -import android.support.v7.app.AppCompatActivity; -import android.os.Bundle; - -import net.irext.pi3sr.R; - -/** - * - * MainActivity - * - * created by strawmanbobi 2017-06-25 - */ -public class MainActivity extends AppCompatActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - } -} diff --git a/pi3-smart-remote/app/src/main/res/layout/activity_main.xml b/pi3-smart-remote/app/src/main/res/layout/activity_main.xml deleted file mode 100644 index 722a2e0..0000000 --- a/pi3-smart-remote/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/pi3-smart-remote/app/src/main/res/mipmap-hdpi/ic_launcher.png b/pi3-smart-remote/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index cde69bc..0000000 Binary files a/pi3-smart-remote/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/pi3-smart-remote/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/pi3-smart-remote/app/src/main/res/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index 9a078e3..0000000 Binary files a/pi3-smart-remote/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ diff --git a/pi3-smart-remote/app/src/main/res/mipmap-mdpi/ic_launcher.png b/pi3-smart-remote/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index c133a0c..0000000 Binary files a/pi3-smart-remote/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/pi3-smart-remote/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/pi3-smart-remote/app/src/main/res/mipmap-mdpi/ic_launcher_round.png deleted file mode 100644 index efc028a..0000000 Binary files a/pi3-smart-remote/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ diff --git a/pi3-smart-remote/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/pi3-smart-remote/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index bfa42f0..0000000 Binary files a/pi3-smart-remote/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/pi3-smart-remote/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/pi3-smart-remote/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png deleted file mode 100644 index 3af2608..0000000 Binary files a/pi3-smart-remote/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ diff --git a/pi3-smart-remote/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/pi3-smart-remote/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 324e72c..0000000 Binary files a/pi3-smart-remote/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/pi3-smart-remote/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/pi3-smart-remote/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png deleted file mode 100644 index 9bec2e6..0000000 Binary files a/pi3-smart-remote/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/pi3-smart-remote/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/pi3-smart-remote/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index aee44e1..0000000 Binary files a/pi3-smart-remote/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/pi3-smart-remote/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/pi3-smart-remote/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png deleted file mode 100644 index 34947cd..0000000 Binary files a/pi3-smart-remote/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/pi3-smart-remote/app/src/main/res/values/colors.xml b/pi3-smart-remote/app/src/main/res/values/colors.xml deleted file mode 100644 index 3ab3e9c..0000000 --- a/pi3-smart-remote/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - #3F51B5 - #303F9F - #FF4081 - diff --git a/pi3-smart-remote/app/src/main/res/values/strings.xml b/pi3-smart-remote/app/src/main/res/values/strings.xml deleted file mode 100644 index f9581a4..0000000 --- a/pi3-smart-remote/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - Pi3SR - diff --git a/pi3-smart-remote/app/src/main/res/values/styles.xml b/pi3-smart-remote/app/src/main/res/values/styles.xml deleted file mode 100644 index 5885930..0000000 --- a/pi3-smart-remote/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/pi3-smart-remote/build.gradle b/pi3-smart-remote/build.gradle deleted file mode 100644 index a47fa4b..0000000 --- a/pi3-smart-remote/build.gradle +++ /dev/null @@ -1,23 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - jcenter() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/pi3-smart-remote/gradle.properties b/pi3-smart-remote/gradle.properties deleted file mode 100644 index aac7c9b..0000000 --- a/pi3-smart-remote/gradle.properties +++ /dev/null @@ -1,17 +0,0 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html - -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx1536m - -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true diff --git a/pi3-smart-remote/gradle/wrapper/gradle-wrapper.jar b/pi3-smart-remote/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 13372ae..0000000 Binary files a/pi3-smart-remote/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/pi3-smart-remote/gradle/wrapper/gradle-wrapper.properties b/pi3-smart-remote/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 028c2ec..0000000 --- a/pi3-smart-remote/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Sun Nov 26 10:49:10 CST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip diff --git a/pi3-smart-remote/gradlew b/pi3-smart-remote/gradlew deleted file mode 100644 index 9d82f78..0000000 --- a/pi3-smart-remote/gradlew +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/pi3-smart-remote/gradlew.bat b/pi3-smart-remote/gradlew.bat deleted file mode 100644 index 8a0b282..0000000 --- a/pi3-smart-remote/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/BUILD_NUMBER b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/BUILD_NUMBER deleted file mode 100644 index 57c2313..0000000 --- a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/BUILD_NUMBER +++ /dev/null @@ -1 +0,0 @@ -OIR1.170720.017 diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/FindAndroidThings.cmake b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/FindAndroidThings.cmake deleted file mode 100644 index 018c15d..0000000 --- a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/FindAndroidThings.cmake +++ /dev/null @@ -1,105 +0,0 @@ -# -# Copyright (C) 2017 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Overview -# -------- -# This CMake script is for use in Android Studio, to populate variables for -# linking to the Android Things shared library. After running, the following -# variables will be available: -# ANDROIDTHINGS_FOUND - TRUE if libandroidthings was found -# ANDROIDTHINGS_INCLUDE_DIRS - The libandroidthings include directories -# ANDROIDTHINGS_LIBRARIES - The libraries needed to use libandroidthings -# ANDROIDTHINGS_DEFINITIONS - Compiler switches for libandroidthings -# -# Usage -# ----- -# 1. Add this file's directory to CMAKE_MODULE_PATH and call find_package(). -# 2. Add ANDROIDTHINGS_INCLUDE_DIRS to your include_directories(). -# 3. Add ANDROIDTHINGS_LIBRARIES to your target_link_libraries(). -# 4. Disable unavailable ABIs (see "ABI Specification" below) -# -# Example: -# set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ) -# find_package(AndroidThings REQUIRED) -# include_directories(${ANDROIDTHINGS_INCLUDE_DIRS}) -# target_link_libraries( ${ANDROIDTHINGS_LIBRARIES}) -# -# Finding the Source -# ------------------ -# Normally the libandroidthings headers and .so are expected to live in the -# same directory as this file, but if the ANDROIDTHINGS_DIR variable is -# provided in the app's build.gradle file, that path will be searched for the -# headers and .so first. For example: -# -# android { -# defaultConfig { -# externalNativeBuild { -# cmake { -# arguments "-DANDROIDTHINGS_DIR=" -# } -# } -# } -# -# ABI Specification -# ----------------- -# libandroidthings is only available for the ABIs supported by Android Things -# devices. By default, Android Studio attempts to build for all ABIs, which may -# lead to errors like: -# -# Could NOT find AndroidThings (missing: ANDROIDTHINGS_LIBRARY -# ANDROIDTHINGS_INCLUDE_DIR) -# -# To work around this, you will need to modify your app's build.gradle to -# only build the ABIs you need: -# -# android { -# defaultConfig { -# externalNativeBuild { -# cmake { -# abiFilters "", "", ... -# } -# } -# } - - -# Find the libandroidthings header files. -find_path(ANDROIDTHINGS_INCLUDE_DIR - NAMES pio/peripheral_manager_client.h - HINTS "${ANDROIDTHINGS_DIR}" "${CMAKE_CURRENT_LIST_DIR}" - PATH_SUFFIXES "${ANDROID_ABI}/include" - NO_CMAKE_FIND_ROOT_PATH) - -# Find the libandroidthings.so library. -find_library(ANDROIDTHINGS_LIBRARY - NAMES libandroidthings.so - HINTS "${ANDROIDTHINGS_DIR}" "${CMAKE_CURRENT_LIST_DIR}" - PATH_SUFFIXES "${ANDROID_ABI}/lib" - NO_CMAKE_FIND_ROOT_PATH) - -# Register the package and set ANDROIDTHINGS_FOUND. -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(AndroidThings DEFAULT_MSG - ANDROIDTHINGS_LIBRARY - ANDROIDTHINGS_INCLUDE_DIR) - -# Hide these variables by default. -mark_as_advanced(ANDROIDTHINGS_INCLUDE_DIR ANDROIDTHINGS_LIBRARY) - -# Set the remaining variables we want to export. -set(ANDROIDTHINGS_LIBRARIES ${ANDROIDTHINGS_LIBRARY}) -set(ANDROIDTHINGS_INCLUDE_DIRS ${ANDROIDTHINGS_INCLUDE_DIR}) -set(ANDROIDTHINGS_DEFINITIONS "") - diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/LICENSE b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/LICENSE deleted file mode 100644 index 1af981f..0000000 --- a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/README.md b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/README.md deleted file mode 100644 index 29d34cb..0000000 --- a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/README.md +++ /dev/null @@ -1,47 +0,0 @@ -Android Things Native Library -============================= - -This repository contains the symbols and the headers for the Android Things -[Native PIO API](https://developer.android.com/things/sdk/pio/native.html) for the following architecture: -- `armeabi-v7a` -- `x86` - -Usage -===== - -- Unzip the latest [release](https://github.com/androidthings/native-libandroidthings/releases) in the native project directory (or in a shared location if you have many native projects). -- Add the following lines to the native project `CMakeLists.txt`: -``` -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ) -find_package(AndroidThings REQUIRED) -include_directories(${ANDROIDTHINGS_INCLUDE_DIRS}) -target_link_libraries( ${ANDROIDTHINGS_LIBRARIES}) -``` -- Add the following arch to the native module `build.gradle`: -``` -defaultConfig { - ndk { - abiFilters 'armeabi-v7a', 'x86' - } -} -``` - -License -======= - -Copyright 2016 The Android Open Source Project, Inc. - -Licensed to the Apache Software Foundation (ASF) under one or more contributor -license agreements. See the NOTICE file distributed with this work for -additional information regarding copyright ownership. The ASF licenses this -file to you under the Apache License, Version 2.0 (the "License"); you may not -use this file except in compliance with the License. You may obtain a copy of -the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -License for the specific language governing permissions and limitations under -the License. diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/gpio.h b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/gpio.h deleted file mode 100644 index 653a4fe..0000000 --- a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/gpio.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SYSTEM_PERIPHERALMANAGER_GPIO_H_ -#define SYSTEM_PERIPHERALMANAGER_GPIO_H_ - -#include -#include - -__BEGIN_DECLS - -/// @defgroup Gpio Gpio Interface -/// @brief Functions to control GPIO pins. -/// -/// These functions can be used to control GPIO. -/// @{ - -/// Edge trigger types. -typedef enum AGpioEdge { - AGPIO_EDGE_NONE = 0, /**< None */ - AGPIO_EDGE_RISING = 1, /**< Rising edge */ - AGPIO_EDGE_FALLING = 2, /**< Falling edge */ - AGPIO_EDGE_BOTH = 3 /**< Both edges */ -} AGpioEdge; - -/// GPIO direction types. -typedef enum AGpioDirection { - AGPIO_DIRECTION_IN = 0, /**< Input mode */ - AGPIO_DIRECTION_OUT_INITIALLY_HIGH = 1, /**< Output mode, initially high */ - AGPIO_DIRECTION_OUT_INITIALLY_LOW = 2 /**< Output mode, initially low */ -} AGpioDirection; - -/// Possible active types. -typedef enum AGpioActiveType { - AGPIO_ACTIVE_LOW = 0, /**< Active Low */ - AGPIO_ACTIVE_HIGH = 1 /**< Active High */ -} AGpioActiveType; - -typedef struct AGpio AGpio; - -/// Sets the GPIO direction to output. -/// @param gpio Pointer to the AGpio struct -/// @param direction One of DIRECTION_IN, -/// DIRECTION_OUT_INITIALLY_HIGH, DIRECTION_OUT_INITIALLY_LOW. -/// @return 0 on success, errno on error. -int AGpio_setDirection(const AGpio* gpio, AGpioDirection direction); - -/// Sets the interrupt edge trigger type. -/// @param gpio Pointer to the AGpio struct -/// @param type One of NONE_EDGE, RISING_EDGE, FALLING_EDGE or BOTH_EDGE. -/// @return 0 on success, errno on error. -int AGpio_setEdgeTriggerType(const AGpio* gpio, AGpioEdge type); - -/// Sets the GPIO’s active low/high status. -/// @param gpio Pointer to the AGpio struct. -/// @param type One of ACTIVE_HIGH, ACTIVE_LOW. -/// @return 0 on success, errno on error. -int AGpio_setActiveType(const AGpio* gpio, AGpioActiveType type); - -/// Sets the GPIO value (for output GPIO only). -/// @param gpio Pointer to the AGpio struct. -/// @param value Value to set. -/// @return 0 on success, errno on error. -int AGpio_setValue(const AGpio* gpio, int value); - -/// Gets the GPIO value (for input GPIO only). -/// @param gpio Pointer to the AGpio struct. -/// @param value Output pointer to the value of the GPIO. -/// @return 0 on success, errno on error. -int AGpio_getValue(const AGpio* gpio, int* value); - -/// Returns a file descriptor that can be used to poll on new data. -/// Can be passed to select/epoll to wait for data to become available. -/// @param gpio Pointer to the AGpio struct. -/// @param fd Output pointer to the file descriptor number. -/// @return 0 on success, errno on error. -int AGpio_getPollingFd(const AGpio* gpio, int* fd); - -/// Acknowledges the interrupt and resets the file descriptor. -/// This must be called after each event triggers in order to be able to -/// poll/select for another event. -/// @param fd Polling file descriptor to reset. -/// @return 0 on success, errno on error. -int AGpio_ackInterruptEvent(int fd); - -/// Destroys a AGpio struct. -/// @param gpio Pointer to the AGpio struct. -void AGpio_delete(AGpio* gpio); - -/// @} - -__END_DECLS - -#endif // SYSTEM_PERIPHERALMANAGER_GPIO_H_ diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/i2c_device.h b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/i2c_device.h deleted file mode 100644 index 8a5d890..0000000 --- a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/i2c_device.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SYSTEM_PERIPHERALMANAGER_I2C_DEVICE_H_ -#define SYSTEM_PERIPHERALMANAGER_I2C_DEVICE_H_ - -#include -#include - -__BEGIN_DECLS - -/// @defgroup I2c I2c device interface -/// @brief Functions to control an I2C device. -/// -/// These functions can be used to control an I2C device. -/// @{ - -typedef struct AI2cDevice AI2cDevice; - -/// Reads from the device. -/// @param device Pointer to the AI2cDevice struct. -/// @param data Output buffer to write the data to. -/// @param len Number of bytes to read. -/// @return 0 on success, errno on error -int AI2cDevice_read(const AI2cDevice* device, void* data, uint32_t len); - -/// Reads a byte from an I2C register. -/// @param device Pointer to the AI2cDevice struct. -/// @param reg Register to read from. -/// @param val Output pointer to value to read. -/// @return 0 on success, errno on error -int AI2cDevice_readRegByte(const AI2cDevice* device, uint8_t reg, uint8_t* val); - -/// Reads a word from an I2C register. -/// @param device Pointer to the AI2cDevice struct. -/// @param reg Register to read from. -/// @param val Output pointer to value to read. -/// @return 0 on success, errno on error -int AI2cDevice_readRegWord(const AI2cDevice* device, - uint8_t reg, - uint16_t* val); - -/// Reads from an I2C register. -/// @param device Pointer to the AI2cDevice struct. -/// @param reg Register to read from. -/// @param data Output buffer to write the data to. -/// @param len Number of bytes to read. -/// @return 0 on success, errno on error -int AI2cDevice_readRegBuffer(const AI2cDevice* device, - uint8_t reg, - void* data, - uint32_t len); - -/// Writes to the device. -/// @param device Pointer to the AI2cDevice struct. -/// @param data Buffer to write. -/// @param len Number of bytes to write. -/// @return 0 on success, errno on error -int AI2cDevice_write(const AI2cDevice* device, const void* data, uint32_t len); - -/// Writes a byte to an I2C register. -/// @param device Pointer to the AI2cDevice struct. -/// @param reg Register to write to. -/// @param val Value to write. -/// @return 0 on success, errno on error -int AI2cDevice_writeRegByte(const AI2cDevice* device, uint8_t reg, uint8_t val); - -/// Writes a word to an I2C register. -/// @param device Pointer to the AI2cDevice struct. -/// @param reg Register to write to. -/// @param val Value to write. -/// @return 0 on success, errno on error -int AI2cDevice_writeRegWord(const AI2cDevice* device, - uint8_t reg, - uint16_t val); - -/// Writes to an I2C register. -/// @param device Pointer to the AI2cDevice struct. -/// @param reg Register to write to. -/// @param data Data to write. -/// @param len Number of bytes to write. -/// @return 0 on success, errno on error -int AI2cDevice_writeRegBuffer(const AI2cDevice* device, - uint8_t reg, - const void* data, - uint32_t len); - -/// Destroys a AI2cDevice struct. -/// @param device Pointer to the AI2cDevice struct. -void AI2cDevice_delete(AI2cDevice* device); - -/// @} - -__END_DECLS - -#endif // SYSTEM_PERIPHERALMANAGER_I2C_DEVICE_H_ diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/i2s_device.h b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/i2s_device.h deleted file mode 100644 index 40f27ca..0000000 --- a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/i2s_device.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SYSTEM_PERIPHERALMANAGER_I2S_H_ -#define SYSTEM_PERIPHERALMANAGER_I2S_H_ - -#include -#include - -__BEGIN_DECLS - -/// @defgroup I2s I2s Interface -/// @brief Functions to control I2S pins. -/// -/// These functions can be used to control I2S. -/// @{ - -/// Possible encodings -typedef enum AI2sEncoding { - AI2S_ENCODING_PCM_8_BIT, - AI2S_ENCODING_PCM_16_BIT, - AI2S_ENCODING_PCM_24_BIT, - AI2S_ENCODING_PCM_32_BIT -} AI2sEncoding; - -/// Flags to specify I2s bus direction. -typedef enum AI2sFlags { - AI2S_FLAG_DIRECTION_IN = 1 << 0, - AI2S_FLAG_DIRECTION_OUT = 1 << 1 -} AI2sFlags; - -typedef struct AI2sDevice AI2sDevice; - -/// Writes raw data to the I2S device. Multi-channel audio data is interleaved. -/// @param i2s Pointer to the AI2s struct. -/// @param data Data to write. -/// @param offset Offset to first byte in data. -/// @param size Number of bytes to write. -/// @param bytes_written Number of bytes written. -/// @return 0 on success, errno on error. -int AI2sDevice_write(const AI2sDevice* i2s, - const void* data, - int offset, - int size, - int* bytes_written); - -/// Reads raw data from the I2S device. Multi-channel audio data is interleaved. -/// @param i2s Pointer to the AI2s struct. -/// @param data Buffer to fill with data read. -/// @param offset Offset to first byte in data. -/// @param size Number of bytes to read. -/// @param bytes_read Number of bytes read. -/// @return 0 on success, errno on error. -int AI2sDevice_read( - const AI2sDevice* i2s, void* data, int offset, int size, int* bytes_read); - -/// Gets the timestamp when a specific sample entered the kernel. -/// @param i2s Pointer to the AI2s struct. -/// @param frame_position Output indicating number of frames read. -/// @param nano_time Output indicating time (ns) when the frame was read. -/// @param success Output indicating success (1) or failure (0). -/// @return 0 on success, errno on error. This will only be nonzero on a fatal -/// error such as the I2S device couldn't be found; in the normal case -/// that a timestamp isn't available the success param will be used. -int AI2sDevice_getInputTimestamp(const AI2sDevice* i2s, - int64_t* frame_position, - int64_t* nano_time, - int* success); - -/// Gets the timestamp when a specific sample exited the kernel. -/// @param i2s Pointer to the AI2s struct. -/// @param frame_position Output indicating number of frames written. -/// @param nano_time Output indicating time (ns) when the frame was written. -/// @param success Output indicating success (1) or failure (0). -/// @return 0 on success, errno on error. This will only be nonzero on a fatal -/// error such as the I2S device couldn't be found; in the normal case -/// that a timestamp isn't available the success param will be used. -int AI2sDevice_getOutputTimestamp(const AI2sDevice* i2s, - int64_t* frame_position, - int64_t* nano_time, - int* success); - -/// Destroys an AI2s struct. -/// @param i2s Pointer to the AI2s struct. -void AI2sDevice_delete(AI2sDevice* i2s); - -/// @} - -__END_DECLS - -#endif // SYSTEM_PERIPHERALMANAGER_I2S_H_ diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/peripheral_manager_client.h b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/peripheral_manager_client.h deleted file mode 100644 index 97202b0..0000000 --- a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/peripheral_manager_client.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (C) 2015 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SYSTEM_PERIPHERALMANAGER_PERIPHERAL_MANAGER_CLIENT_H_ -#define SYSTEM_PERIPHERALMANAGER_PERIPHERAL_MANAGER_CLIENT_H_ - -#include - -#include "gpio.h" -#include "i2c_device.h" -#include "i2s_device.h" -#include "pwm.h" -#include "spi_device.h" -#include "uart_device.h" - -__BEGIN_DECLS - -/// @defgroup PeripheralManagerClient Peripheral client functions -/// @brief Functions to access embedded peripherals -/// @{ - -typedef struct APeripheralManagerClient APeripheralManagerClient; - -/// Returns the list of GPIOs. -/// This does not take ownership into account. -/// The list must be freed by the caller. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param num_gpio Output pointer to the number of elements in the list. -/// @return The list of gpios. -char** APeripheralManagerClient_listGpio(const APeripheralManagerClient* client, - int* num_gpio); - -/// Opens a GPIO and takes ownership of it. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param name Name of the GPIO. -/// @param gpio Output pointer to the AGpio struct. Empty on error. -/// @return 0 on success, errno on error. -int APeripheralManagerClient_openGpio(const APeripheralManagerClient* client, - const char* name, - AGpio** gpio); - -/// Returns the list of PWMs. -/// This does not take ownership into account. -/// The list must be freed by the caller. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param num_gpio Output pointer to the number of elements in the list. -/// @return The list of pwms. -char** APeripheralManagerClient_listPwm(const APeripheralManagerClient* client, - int* num_pwm); - -/// Opens a PWM and takes ownership of it. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param name Name of the PWM. -/// @param gpio Output pointer to the AGpio struct. Empty on error. -/// @return 0 on success, errno on error. -int APeripheralManagerClient_openPwm(const APeripheralManagerClient* client, - const char* name, - APwm** pwm); - -/// Returns the list of SPI buses. -/// This does not take ownership into account. -/// The list must be freed by the caller. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param num_spi_buses Output pointer to the number of elements in the list. -/// @return The list of spi buses. -char** APeripheralManagerClient_listSpiBuses( - const APeripheralManagerClient* client, int* num_spi_buses); - -/// Opens a SPI device and takes ownership of it. -/// @oaram client Pointer to the APeripheralManagerClient struct. -/// @param name Name of the SPI device. -/// @param dev Output pointer to the ASpiDevice struct. Empty on error. -/// @return 0 on success, errno on error. -int APeripheralManagerClient_openSpiDevice( - const APeripheralManagerClient* client, const char* name, ASpiDevice** dev); - -/// Returns the list of I2C buses. -/// This does not take ownership into account. -/// The list must be freed by the caller. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param num_i2c_buses Output pointer to the number of elements in the list. -/// @return The list of i2c buses. -char** APeripheralManagerClient_listI2cBuses( - const APeripheralManagerClient* client, int* num_i2c_buses); - -/// Opens an I2C device and takes ownership of it. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param name Name of the I2C bus. -/// @param address Address of the I2C device. -/// @param dev Output pointer to the AI2cDevice struct. Empty on error. -/// @return 0 on success, errno on error -int APeripheralManagerClient_openI2cDevice( - const APeripheralManagerClient* client, - const char* name, - uint32_t address, - AI2cDevice** dev); - -/// Returns the list of UART buses. -/// This does not take ownership into account. -/// The list must be freed by the caller. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param num_uart_buses Output pointer to the number of elements in the list. -/// @return The list of uart buses. -char** APeripheralManagerClient_listUartDevices( - const APeripheralManagerClient* client, int* num_uart_buses); - -/// Opens an UART device and takes ownership of it. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param name Name of the UART device. -/// @param dev Output pointer to the AUartDevice struct. Empty on error. -/// @return 0 on success, errno on error -int APeripheralManagerClient_openUartDevice( - const APeripheralManagerClient* client, - const char* name, - AUartDevice** dev); - -/// Returns the list of I2S buses. -/// This does not take ownership into account. -/// The list must be freed by the caller. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param num_i2s_buses Output pointer to the number of elements in the list. -/// @return The list of I2S buses. -char** APeripheralManagerClient_listI2sDevices( - const APeripheralManagerClient* client, int* num_i2s_buses); - -/// Opens an I2S device and takes ownership of it. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param name Name of the I2S device. -/// @param encoding Device pcm encoding. -/// @param channels Number of channels. -/// @param rate Device rate in Hz. -/// @param flags Specify device supporting input, output or both. -/// @param dev Output pointer to the AI2sDevice struct. Empty on error. -/// @return 0 on success, errno on error -int APeripheralManagerClient_openI2sDevice( - const APeripheralManagerClient* client, - const char* name, - AI2sEncoding encoding, - int channels, - int rate, - int flags, - AI2sDevice** dev); - -/// Creates a new client. -/// @return A pointer to the created client. nullptr on errors. -APeripheralManagerClient* APeripheralManagerClient_new(); - -/// Destroys the peripheral manager client. -/// @param client Pointer to the APeripheralManagerClient struct. -void APeripheralManagerClient_delete(APeripheralManagerClient* client); - -/// @} - -__END_DECLS - -#endif // SYSTEM_PERIPHERALMANAGER_PERIPHERAL_MANAGER_CLIENT_H_ diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/pwm.h b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/pwm.h deleted file mode 100644 index 5dd3a51..0000000 --- a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/pwm.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SYSTEM_PERIPHERALMANAGER_PWM_H_ -#define SYSTEM_PERIPHERALMANAGER_PWM_H_ - -#include -#include - -__BEGIN_DECLS - -/// @defgroup Pwm Pwm Interface -/// @brief Functions to control PWM pins. -/// -/// These functions can be used to control PWM. -/// @{ - -typedef struct APwm APwm; - -/// Sets the PWM duty cycle. -/// @param gpio Pointer to the APwm struct. -/// @param duty_cycle Double between 0 and 100 inclusive. -/// @return 0 on success, errno on error. -int APwm_setDutyCycle(const APwm* pwm, double duty_cycle); - -/// Sets the PWM frequency. -/// @param gpio Pointer to the APwm struct. -/// @param freq Double denoting the frequency in Hz. -/// @return 0 on success, errno on error. -int APwm_setFrequencyHz(const APwm* pwm, double frequency); - -/// Enables the PWM. -/// @param gpio Pointer to the APwm struct. -/// @param enabled Non-zero to enable. -/// @return 0 on success, errno on error. -int APwm_setEnabled(const APwm* pwm, int enabled); - -/// Destroys a APwm struct. -/// @param pwm Pointer to the APwm struct. -void APwm_delete(APwm* pwm); - -/// @} - -__END_DECLS - -#endif // SYSTEM_PERIPHERALMANAGER_PWM_H_ diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/spi_device.h b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/spi_device.h deleted file mode 100644 index 51595d7..0000000 --- a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/spi_device.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SYSTEM_PERIPHERALMANAGER_SPI_DEVICE_H_ -#define SYSTEM_PERIPHERALMANAGER_SPI_DEVICE_H_ - -#include -#include - -__BEGIN_DECLS - -/// @defgroup Spi Spi device interface -/// @brief Functions to control an SPI device. -/// -/// These functions can be used to control an SPI device. -/// @{ - -/// Endianness. -typedef enum ASpiBitJustification { - ASPI_LSB_FIRST = 0, /**< Least significant bits first */ - ASPI_MSB_FIRST = 1 /**< Most significant bits first */ -} ASpiBitJustification; - -/// SPI modes (similar to the Linux kernel's modes). -typedef enum ASpiMode { - ASPI_MODE0 = 0, /**< CPHA=0, CPOL=0 */ - ASPI_MODE1 = 1, /**< CPHA=1, CPOL=0 */ - ASPI_MODE2 = 2, /**< CPHA=0, CPOL=1 */ - ASPI_MODE3 = 3 /**< CPHA=1, CPOL=1 */ -} ASpiMode; - -typedef struct ASpiDevice ASpiDevice; - -/// Writes a buffer to the device. -/// @param device Pointer to the ASpiDevice struct. -/// @param data Buffer to write. -/// @param len Length of the buffer. -/// @return 0 on success, errno on error. -int ASpiDevice_writeBuffer(const ASpiDevice* device, - const void* data, - size_t len); - -/// Reads a buffer from the device. -/// @param device Pointer to the ASpiDevice struct. -/// @param data Buffer to read into. -/// @param len Length of the buffer. -/// @return 0 on success, errno on error. -int ASpiDevice_readBuffer(const ASpiDevice* device, void* data, size_t len); - -/// Transfer data to the device. -/// @param device Pointer to the ASpiDevice struct. -/// @param tx_data Buffer to write. -/// @param rx_data Buffer to read data in. If NULL, no data will be read. -/// @param len Length of the buffers. -/// @return 0 on success, errno on error. -int ASpiDevice_transfer(const ASpiDevice* device, - const void* tx_data, - void* rx_data, - size_t len); - -/// Sets the frequency in Hertz. -/// @param device Pointer to the ASpiDevice struct. -/// @param freq_hz Frequency to set. -/// @return 0 on success, errno on error. -int ASpiDevice_setFrequency(const ASpiDevice* device, uint32_t freq_hz); - -/// Sets the SPI mode. -/// @param device Pointer to the ASpiDevice struct. -/// @param mode Mode to use. One of SPI_MODE0, SPI_MODE1, SPI_MODE2, SPI_MODE3. -/// @return 0 on success, errno on error. -int ASpiDevice_setMode(const ASpiDevice* device, ASpiMode mode); - -/// Sets the bit justification. -/// @param device Pointer to the ASpiDevice struct. -/// @param bit_justification One of SPI_LSB_FIRST OR SPI_MSB_FIRST. -/// @return 0 on success, errno on error. -int ASpiDevice_setBitJustification(const ASpiDevice* device, - ASpiBitJustification bit_justification); - -/// Sets the number of bits per words. -/// @param device Pointer to the ASpiDevice struct. -/// @param bits_per_word Number of bits per word. -/// @return 0 on success, errno on error. -int ASpiDevice_setBitsPerWord(const ASpiDevice* device, uint8_t bits_per_word); - -/// Sets the delay to wait after each transfer. -/// @param device Pointer to the ASpiDevice struct. -/// @param delay_usecs Delay in microseconds. -/// @return 0 on success, errno on error. -int ASpiDevice_setDelay(const ASpiDevice* device, uint16_t delay_usecs); - -/// Sets the chip select behavior after each transfer. -/// @param device Pointer to the ASpiDevice struct. -/// @param change If set, cs will be active between transfers. -/// @return 0 on success, errno on error. -int ASpiDevice_setCsChange(const ASpiDevice* device, int change); - -/// Destroys a ASpiDevice struct. -/// @param device Pointer to the ASpiDevice struct. -void ASpiDevice_delete(ASpiDevice* device); - -/// @} - -__END_DECLS - -#endif // SYSTEM_PERIPHERALMANAGER_SPI_DEVICE_H_ diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/uart_device.h b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/uart_device.h deleted file mode 100644 index 03ab6d7..0000000 --- a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/include/pio/uart_device.h +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SYSTEM_PERIPHERALMANAGER_UART_DEVICE_H_ -#define SYSTEM_PERIPHERALMANAGER_UART_DEVICE_H_ - -#include -#include - -__BEGIN_DECLS - -/// @defgroup Uart Uart device interface -/// @brief Functions to control an UART device. -/// -/// These functions can be used to control an UART device. -/// @{ - -/// UART Parity -typedef enum AUartParity { - AUART_PARITY_NONE = 0, /**< No parity */ - AUART_PARITY_EVEN = 1, /**< Even parity */ - AUART_PARITY_ODD = 2, /**< Odd parity */ - AUART_PARITY_MARK = 3, /**< Mark parity, always 1 */ - AUART_PARITY_SPACE = 4 /**< Space parity, always 0 */ -} AUartParity; - -/// Modem control lines. -typedef enum AUartModemControlLine { - AUART_MODEM_CONTROL_LE = 1 << 0, /**< Data set ready/Line enable */ - AUART_MODEM_CONTROL_DTR = 1 << 1, /**< Data terminal ready */ - AUART_MODEM_CONTROL_RTS = 1 << 2, /**< Request to send */ - AUART_MODEM_CONTROL_ST = 1 << 3, /**< Secondary TXD */ - AUART_MODEM_CONTROL_SR = 1 << 4, /**< Secondary RXD */ - AUART_MODEM_CONTROL_CTS = 1 << 5, /**< Clear to send */ - AUART_MODEM_CONTROL_CD = 1 << 6, /**< Data carrier detect */ - AUART_MODEM_CONTROL_RI = 1 << 7, /**< Ring */ - AUART_MODEM_CONTROL_DSR = 1 << 8 /**< Data set ready */ -} AUartModemControlLine; - -// Hardware Flow Control -typedef enum AUartHardwareFlowControl { - AUART_HARDWARE_FLOW_CONTROL_NONE = 0, /**< No hardware flow control */ - AUART_HARDWARE_FLOW_CONTROL_AUTO_RTSCTS = 1 /**< Auto RTS/CTS */ -} AUartHardwareFlowControl; - -/// Flush queue selection -typedef enum AUartFlushDirection { - AUART_FLUSH_IN = 0, /**< Flushes data received but not read */ - AUART_FLUSH_OUT = 1, /**< Flushes data written but not transmitted */ - AUART_FLUSH_IN_OUT = 2 /**< Flushes both in and out */ -} AUartFlushDirection; - -typedef struct AUartDevice AUartDevice; - -/// Writes to a UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param data Data to write. -/// @param len Size of the data to write. -/// @param bytes_written Output pointer to the number of bytes written. -/// @return 0 on success, errno on error. -int AUartDevice_write(const AUartDevice* device, - const void* data, - uint32_t len, - uint32_t* bytes_written); - -/// Reads from a UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param data Buffer to read the data into. -/// @param len Number of bytes to read. -/// @param bytes_read Output pointer to the number of bytes read. -/// @return 0 on success, errno on error. -int AUartDevice_read(const AUartDevice* device, - void* data, - uint32_t len, - uint32_t* bytes_read); - -/// Sets the input and output speed of a UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param baudrate Speed in baud. -/// @return 0 on success, errno on error. -int AUartDevice_setBaudrate(const AUartDevice* device, uint32_t baudrate); - -/// Sets number of stop bits for the UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param stop_bits Number of stop bits. Typically 1 or 2. -/// @return 0 on success, errno on error. -int AUartDevice_setStopBits(const AUartDevice* device, uint32_t stop_bits); - -/// Sets the data size of a character for the UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param data_size Number of bits per character. Typically between 5 and 8. -/// @return 0 on success, errno on error. -int AUartDevice_setDataSize(const AUartDevice* device, uint32_t data_size); - -/// Sets the parity mode for the UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param mode Parity mode. -/// @return 0 on success, errno on error. -int AUartDevice_setParity(const AUartDevice* device, AUartParity mode); - -/// Sets the hardware flow control mode for the UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param mode Flow control mode. -/// @return 0 on success, errno on error. -int AUartDevice_setHardwareFlowControl(const AUartDevice* device, - AUartHardwareFlowControl mode); - -/// Sets the modem control bits for the UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param lines Lines to set. AUartModemControlLine values OR'ed together. -/// @return 0 on success, errno on error. -int AUartDevice_setModemControl(const AUartDevice* device, uint32_t lines); - -/// Clears the modem control bits for the UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param lines Lines to clear. AUartModemControlLine values OR'ed together. -/// @return 0 on success, errno on error. -int AUartDevice_clearModemControl(const AUartDevice* device, uint32_t lines); - -/// Sends a break to the UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param duration Duration of break transmission in milliseconds. If 0, -/// transmits zero-valued bits for at least 0.25 seconds, and not more -/// than 0.5 seconds. -/// @return 0 on success, errno on error. -int AUartDevice_sendBreak(const AUartDevice* device, uint32_t duration_msecs); - -/// Flushes specified queue for the UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param direction Direction to flush. -/// @return 0 on success, errno on error. -int AUartDevice_flush(const AUartDevice* device, AUartFlushDirection direction); - -/// Gets a file descriptor to be notified when data can be read. -/// -/// You can use this file descriptor to poll on incoming data instead of -/// actively reading for new data. -/// -/// @param device Pointer to the AUartDevice struct. -/// @param fd Output pointer to the file descriptor. -/// @return 0 on success, errno on error. -int AUartDevice_getPollingFd(const AUartDevice* device, int* fd); - -/// Acknowledges an input event. -/// -/// This must be called after receiving an event notification on the polling -/// file descriptor. -/// If you don't acknowledge an event, peripheral manager will assume you are -/// still processing it and you will not receive any more events. -/// If you acknowledge an event before reading the data from the device, you -/// will receive an event immediately as there will still be data available. -/// -/// @param fd File descriptor to acknowledge the event on. -/// @return 0 on success, errno on error. -int AUartDevice_ackInputEvent(int fd); - -/// Destroys a AUartDevice struct. -/// @param device Pointer to the AUartDevice struct. -void AUartDevice_delete(AUartDevice* device); - -/// @} - -__END_DECLS - -#endif // SYSTEM_PERIPHERALMANAGER_UART_DEVICE_H_ diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/lib/libandroidthings.so b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/lib/libandroidthings.so deleted file mode 100644 index fd485cb..0000000 Binary files a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/armeabi-v7a/lib/libandroidthings.so and /dev/null differ diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/gpio.h b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/gpio.h deleted file mode 100644 index 653a4fe..0000000 --- a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/gpio.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SYSTEM_PERIPHERALMANAGER_GPIO_H_ -#define SYSTEM_PERIPHERALMANAGER_GPIO_H_ - -#include -#include - -__BEGIN_DECLS - -/// @defgroup Gpio Gpio Interface -/// @brief Functions to control GPIO pins. -/// -/// These functions can be used to control GPIO. -/// @{ - -/// Edge trigger types. -typedef enum AGpioEdge { - AGPIO_EDGE_NONE = 0, /**< None */ - AGPIO_EDGE_RISING = 1, /**< Rising edge */ - AGPIO_EDGE_FALLING = 2, /**< Falling edge */ - AGPIO_EDGE_BOTH = 3 /**< Both edges */ -} AGpioEdge; - -/// GPIO direction types. -typedef enum AGpioDirection { - AGPIO_DIRECTION_IN = 0, /**< Input mode */ - AGPIO_DIRECTION_OUT_INITIALLY_HIGH = 1, /**< Output mode, initially high */ - AGPIO_DIRECTION_OUT_INITIALLY_LOW = 2 /**< Output mode, initially low */ -} AGpioDirection; - -/// Possible active types. -typedef enum AGpioActiveType { - AGPIO_ACTIVE_LOW = 0, /**< Active Low */ - AGPIO_ACTIVE_HIGH = 1 /**< Active High */ -} AGpioActiveType; - -typedef struct AGpio AGpio; - -/// Sets the GPIO direction to output. -/// @param gpio Pointer to the AGpio struct -/// @param direction One of DIRECTION_IN, -/// DIRECTION_OUT_INITIALLY_HIGH, DIRECTION_OUT_INITIALLY_LOW. -/// @return 0 on success, errno on error. -int AGpio_setDirection(const AGpio* gpio, AGpioDirection direction); - -/// Sets the interrupt edge trigger type. -/// @param gpio Pointer to the AGpio struct -/// @param type One of NONE_EDGE, RISING_EDGE, FALLING_EDGE or BOTH_EDGE. -/// @return 0 on success, errno on error. -int AGpio_setEdgeTriggerType(const AGpio* gpio, AGpioEdge type); - -/// Sets the GPIO’s active low/high status. -/// @param gpio Pointer to the AGpio struct. -/// @param type One of ACTIVE_HIGH, ACTIVE_LOW. -/// @return 0 on success, errno on error. -int AGpio_setActiveType(const AGpio* gpio, AGpioActiveType type); - -/// Sets the GPIO value (for output GPIO only). -/// @param gpio Pointer to the AGpio struct. -/// @param value Value to set. -/// @return 0 on success, errno on error. -int AGpio_setValue(const AGpio* gpio, int value); - -/// Gets the GPIO value (for input GPIO only). -/// @param gpio Pointer to the AGpio struct. -/// @param value Output pointer to the value of the GPIO. -/// @return 0 on success, errno on error. -int AGpio_getValue(const AGpio* gpio, int* value); - -/// Returns a file descriptor that can be used to poll on new data. -/// Can be passed to select/epoll to wait for data to become available. -/// @param gpio Pointer to the AGpio struct. -/// @param fd Output pointer to the file descriptor number. -/// @return 0 on success, errno on error. -int AGpio_getPollingFd(const AGpio* gpio, int* fd); - -/// Acknowledges the interrupt and resets the file descriptor. -/// This must be called after each event triggers in order to be able to -/// poll/select for another event. -/// @param fd Polling file descriptor to reset. -/// @return 0 on success, errno on error. -int AGpio_ackInterruptEvent(int fd); - -/// Destroys a AGpio struct. -/// @param gpio Pointer to the AGpio struct. -void AGpio_delete(AGpio* gpio); - -/// @} - -__END_DECLS - -#endif // SYSTEM_PERIPHERALMANAGER_GPIO_H_ diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/i2c_device.h b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/i2c_device.h deleted file mode 100644 index 8a5d890..0000000 --- a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/i2c_device.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SYSTEM_PERIPHERALMANAGER_I2C_DEVICE_H_ -#define SYSTEM_PERIPHERALMANAGER_I2C_DEVICE_H_ - -#include -#include - -__BEGIN_DECLS - -/// @defgroup I2c I2c device interface -/// @brief Functions to control an I2C device. -/// -/// These functions can be used to control an I2C device. -/// @{ - -typedef struct AI2cDevice AI2cDevice; - -/// Reads from the device. -/// @param device Pointer to the AI2cDevice struct. -/// @param data Output buffer to write the data to. -/// @param len Number of bytes to read. -/// @return 0 on success, errno on error -int AI2cDevice_read(const AI2cDevice* device, void* data, uint32_t len); - -/// Reads a byte from an I2C register. -/// @param device Pointer to the AI2cDevice struct. -/// @param reg Register to read from. -/// @param val Output pointer to value to read. -/// @return 0 on success, errno on error -int AI2cDevice_readRegByte(const AI2cDevice* device, uint8_t reg, uint8_t* val); - -/// Reads a word from an I2C register. -/// @param device Pointer to the AI2cDevice struct. -/// @param reg Register to read from. -/// @param val Output pointer to value to read. -/// @return 0 on success, errno on error -int AI2cDevice_readRegWord(const AI2cDevice* device, - uint8_t reg, - uint16_t* val); - -/// Reads from an I2C register. -/// @param device Pointer to the AI2cDevice struct. -/// @param reg Register to read from. -/// @param data Output buffer to write the data to. -/// @param len Number of bytes to read. -/// @return 0 on success, errno on error -int AI2cDevice_readRegBuffer(const AI2cDevice* device, - uint8_t reg, - void* data, - uint32_t len); - -/// Writes to the device. -/// @param device Pointer to the AI2cDevice struct. -/// @param data Buffer to write. -/// @param len Number of bytes to write. -/// @return 0 on success, errno on error -int AI2cDevice_write(const AI2cDevice* device, const void* data, uint32_t len); - -/// Writes a byte to an I2C register. -/// @param device Pointer to the AI2cDevice struct. -/// @param reg Register to write to. -/// @param val Value to write. -/// @return 0 on success, errno on error -int AI2cDevice_writeRegByte(const AI2cDevice* device, uint8_t reg, uint8_t val); - -/// Writes a word to an I2C register. -/// @param device Pointer to the AI2cDevice struct. -/// @param reg Register to write to. -/// @param val Value to write. -/// @return 0 on success, errno on error -int AI2cDevice_writeRegWord(const AI2cDevice* device, - uint8_t reg, - uint16_t val); - -/// Writes to an I2C register. -/// @param device Pointer to the AI2cDevice struct. -/// @param reg Register to write to. -/// @param data Data to write. -/// @param len Number of bytes to write. -/// @return 0 on success, errno on error -int AI2cDevice_writeRegBuffer(const AI2cDevice* device, - uint8_t reg, - const void* data, - uint32_t len); - -/// Destroys a AI2cDevice struct. -/// @param device Pointer to the AI2cDevice struct. -void AI2cDevice_delete(AI2cDevice* device); - -/// @} - -__END_DECLS - -#endif // SYSTEM_PERIPHERALMANAGER_I2C_DEVICE_H_ diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/i2s_device.h b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/i2s_device.h deleted file mode 100644 index 40f27ca..0000000 --- a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/i2s_device.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SYSTEM_PERIPHERALMANAGER_I2S_H_ -#define SYSTEM_PERIPHERALMANAGER_I2S_H_ - -#include -#include - -__BEGIN_DECLS - -/// @defgroup I2s I2s Interface -/// @brief Functions to control I2S pins. -/// -/// These functions can be used to control I2S. -/// @{ - -/// Possible encodings -typedef enum AI2sEncoding { - AI2S_ENCODING_PCM_8_BIT, - AI2S_ENCODING_PCM_16_BIT, - AI2S_ENCODING_PCM_24_BIT, - AI2S_ENCODING_PCM_32_BIT -} AI2sEncoding; - -/// Flags to specify I2s bus direction. -typedef enum AI2sFlags { - AI2S_FLAG_DIRECTION_IN = 1 << 0, - AI2S_FLAG_DIRECTION_OUT = 1 << 1 -} AI2sFlags; - -typedef struct AI2sDevice AI2sDevice; - -/// Writes raw data to the I2S device. Multi-channel audio data is interleaved. -/// @param i2s Pointer to the AI2s struct. -/// @param data Data to write. -/// @param offset Offset to first byte in data. -/// @param size Number of bytes to write. -/// @param bytes_written Number of bytes written. -/// @return 0 on success, errno on error. -int AI2sDevice_write(const AI2sDevice* i2s, - const void* data, - int offset, - int size, - int* bytes_written); - -/// Reads raw data from the I2S device. Multi-channel audio data is interleaved. -/// @param i2s Pointer to the AI2s struct. -/// @param data Buffer to fill with data read. -/// @param offset Offset to first byte in data. -/// @param size Number of bytes to read. -/// @param bytes_read Number of bytes read. -/// @return 0 on success, errno on error. -int AI2sDevice_read( - const AI2sDevice* i2s, void* data, int offset, int size, int* bytes_read); - -/// Gets the timestamp when a specific sample entered the kernel. -/// @param i2s Pointer to the AI2s struct. -/// @param frame_position Output indicating number of frames read. -/// @param nano_time Output indicating time (ns) when the frame was read. -/// @param success Output indicating success (1) or failure (0). -/// @return 0 on success, errno on error. This will only be nonzero on a fatal -/// error such as the I2S device couldn't be found; in the normal case -/// that a timestamp isn't available the success param will be used. -int AI2sDevice_getInputTimestamp(const AI2sDevice* i2s, - int64_t* frame_position, - int64_t* nano_time, - int* success); - -/// Gets the timestamp when a specific sample exited the kernel. -/// @param i2s Pointer to the AI2s struct. -/// @param frame_position Output indicating number of frames written. -/// @param nano_time Output indicating time (ns) when the frame was written. -/// @param success Output indicating success (1) or failure (0). -/// @return 0 on success, errno on error. This will only be nonzero on a fatal -/// error such as the I2S device couldn't be found; in the normal case -/// that a timestamp isn't available the success param will be used. -int AI2sDevice_getOutputTimestamp(const AI2sDevice* i2s, - int64_t* frame_position, - int64_t* nano_time, - int* success); - -/// Destroys an AI2s struct. -/// @param i2s Pointer to the AI2s struct. -void AI2sDevice_delete(AI2sDevice* i2s); - -/// @} - -__END_DECLS - -#endif // SYSTEM_PERIPHERALMANAGER_I2S_H_ diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/peripheral_manager_client.h b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/peripheral_manager_client.h deleted file mode 100644 index 97202b0..0000000 --- a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/peripheral_manager_client.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (C) 2015 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SYSTEM_PERIPHERALMANAGER_PERIPHERAL_MANAGER_CLIENT_H_ -#define SYSTEM_PERIPHERALMANAGER_PERIPHERAL_MANAGER_CLIENT_H_ - -#include - -#include "gpio.h" -#include "i2c_device.h" -#include "i2s_device.h" -#include "pwm.h" -#include "spi_device.h" -#include "uart_device.h" - -__BEGIN_DECLS - -/// @defgroup PeripheralManagerClient Peripheral client functions -/// @brief Functions to access embedded peripherals -/// @{ - -typedef struct APeripheralManagerClient APeripheralManagerClient; - -/// Returns the list of GPIOs. -/// This does not take ownership into account. -/// The list must be freed by the caller. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param num_gpio Output pointer to the number of elements in the list. -/// @return The list of gpios. -char** APeripheralManagerClient_listGpio(const APeripheralManagerClient* client, - int* num_gpio); - -/// Opens a GPIO and takes ownership of it. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param name Name of the GPIO. -/// @param gpio Output pointer to the AGpio struct. Empty on error. -/// @return 0 on success, errno on error. -int APeripheralManagerClient_openGpio(const APeripheralManagerClient* client, - const char* name, - AGpio** gpio); - -/// Returns the list of PWMs. -/// This does not take ownership into account. -/// The list must be freed by the caller. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param num_gpio Output pointer to the number of elements in the list. -/// @return The list of pwms. -char** APeripheralManagerClient_listPwm(const APeripheralManagerClient* client, - int* num_pwm); - -/// Opens a PWM and takes ownership of it. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param name Name of the PWM. -/// @param gpio Output pointer to the AGpio struct. Empty on error. -/// @return 0 on success, errno on error. -int APeripheralManagerClient_openPwm(const APeripheralManagerClient* client, - const char* name, - APwm** pwm); - -/// Returns the list of SPI buses. -/// This does not take ownership into account. -/// The list must be freed by the caller. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param num_spi_buses Output pointer to the number of elements in the list. -/// @return The list of spi buses. -char** APeripheralManagerClient_listSpiBuses( - const APeripheralManagerClient* client, int* num_spi_buses); - -/// Opens a SPI device and takes ownership of it. -/// @oaram client Pointer to the APeripheralManagerClient struct. -/// @param name Name of the SPI device. -/// @param dev Output pointer to the ASpiDevice struct. Empty on error. -/// @return 0 on success, errno on error. -int APeripheralManagerClient_openSpiDevice( - const APeripheralManagerClient* client, const char* name, ASpiDevice** dev); - -/// Returns the list of I2C buses. -/// This does not take ownership into account. -/// The list must be freed by the caller. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param num_i2c_buses Output pointer to the number of elements in the list. -/// @return The list of i2c buses. -char** APeripheralManagerClient_listI2cBuses( - const APeripheralManagerClient* client, int* num_i2c_buses); - -/// Opens an I2C device and takes ownership of it. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param name Name of the I2C bus. -/// @param address Address of the I2C device. -/// @param dev Output pointer to the AI2cDevice struct. Empty on error. -/// @return 0 on success, errno on error -int APeripheralManagerClient_openI2cDevice( - const APeripheralManagerClient* client, - const char* name, - uint32_t address, - AI2cDevice** dev); - -/// Returns the list of UART buses. -/// This does not take ownership into account. -/// The list must be freed by the caller. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param num_uart_buses Output pointer to the number of elements in the list. -/// @return The list of uart buses. -char** APeripheralManagerClient_listUartDevices( - const APeripheralManagerClient* client, int* num_uart_buses); - -/// Opens an UART device and takes ownership of it. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param name Name of the UART device. -/// @param dev Output pointer to the AUartDevice struct. Empty on error. -/// @return 0 on success, errno on error -int APeripheralManagerClient_openUartDevice( - const APeripheralManagerClient* client, - const char* name, - AUartDevice** dev); - -/// Returns the list of I2S buses. -/// This does not take ownership into account. -/// The list must be freed by the caller. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param num_i2s_buses Output pointer to the number of elements in the list. -/// @return The list of I2S buses. -char** APeripheralManagerClient_listI2sDevices( - const APeripheralManagerClient* client, int* num_i2s_buses); - -/// Opens an I2S device and takes ownership of it. -/// @param client Pointer to the APeripheralManagerClient struct. -/// @param name Name of the I2S device. -/// @param encoding Device pcm encoding. -/// @param channels Number of channels. -/// @param rate Device rate in Hz. -/// @param flags Specify device supporting input, output or both. -/// @param dev Output pointer to the AI2sDevice struct. Empty on error. -/// @return 0 on success, errno on error -int APeripheralManagerClient_openI2sDevice( - const APeripheralManagerClient* client, - const char* name, - AI2sEncoding encoding, - int channels, - int rate, - int flags, - AI2sDevice** dev); - -/// Creates a new client. -/// @return A pointer to the created client. nullptr on errors. -APeripheralManagerClient* APeripheralManagerClient_new(); - -/// Destroys the peripheral manager client. -/// @param client Pointer to the APeripheralManagerClient struct. -void APeripheralManagerClient_delete(APeripheralManagerClient* client); - -/// @} - -__END_DECLS - -#endif // SYSTEM_PERIPHERALMANAGER_PERIPHERAL_MANAGER_CLIENT_H_ diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/pwm.h b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/pwm.h deleted file mode 100644 index 5dd3a51..0000000 --- a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/pwm.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SYSTEM_PERIPHERALMANAGER_PWM_H_ -#define SYSTEM_PERIPHERALMANAGER_PWM_H_ - -#include -#include - -__BEGIN_DECLS - -/// @defgroup Pwm Pwm Interface -/// @brief Functions to control PWM pins. -/// -/// These functions can be used to control PWM. -/// @{ - -typedef struct APwm APwm; - -/// Sets the PWM duty cycle. -/// @param gpio Pointer to the APwm struct. -/// @param duty_cycle Double between 0 and 100 inclusive. -/// @return 0 on success, errno on error. -int APwm_setDutyCycle(const APwm* pwm, double duty_cycle); - -/// Sets the PWM frequency. -/// @param gpio Pointer to the APwm struct. -/// @param freq Double denoting the frequency in Hz. -/// @return 0 on success, errno on error. -int APwm_setFrequencyHz(const APwm* pwm, double frequency); - -/// Enables the PWM. -/// @param gpio Pointer to the APwm struct. -/// @param enabled Non-zero to enable. -/// @return 0 on success, errno on error. -int APwm_setEnabled(const APwm* pwm, int enabled); - -/// Destroys a APwm struct. -/// @param pwm Pointer to the APwm struct. -void APwm_delete(APwm* pwm); - -/// @} - -__END_DECLS - -#endif // SYSTEM_PERIPHERALMANAGER_PWM_H_ diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/spi_device.h b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/spi_device.h deleted file mode 100644 index 51595d7..0000000 --- a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/spi_device.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SYSTEM_PERIPHERALMANAGER_SPI_DEVICE_H_ -#define SYSTEM_PERIPHERALMANAGER_SPI_DEVICE_H_ - -#include -#include - -__BEGIN_DECLS - -/// @defgroup Spi Spi device interface -/// @brief Functions to control an SPI device. -/// -/// These functions can be used to control an SPI device. -/// @{ - -/// Endianness. -typedef enum ASpiBitJustification { - ASPI_LSB_FIRST = 0, /**< Least significant bits first */ - ASPI_MSB_FIRST = 1 /**< Most significant bits first */ -} ASpiBitJustification; - -/// SPI modes (similar to the Linux kernel's modes). -typedef enum ASpiMode { - ASPI_MODE0 = 0, /**< CPHA=0, CPOL=0 */ - ASPI_MODE1 = 1, /**< CPHA=1, CPOL=0 */ - ASPI_MODE2 = 2, /**< CPHA=0, CPOL=1 */ - ASPI_MODE3 = 3 /**< CPHA=1, CPOL=1 */ -} ASpiMode; - -typedef struct ASpiDevice ASpiDevice; - -/// Writes a buffer to the device. -/// @param device Pointer to the ASpiDevice struct. -/// @param data Buffer to write. -/// @param len Length of the buffer. -/// @return 0 on success, errno on error. -int ASpiDevice_writeBuffer(const ASpiDevice* device, - const void* data, - size_t len); - -/// Reads a buffer from the device. -/// @param device Pointer to the ASpiDevice struct. -/// @param data Buffer to read into. -/// @param len Length of the buffer. -/// @return 0 on success, errno on error. -int ASpiDevice_readBuffer(const ASpiDevice* device, void* data, size_t len); - -/// Transfer data to the device. -/// @param device Pointer to the ASpiDevice struct. -/// @param tx_data Buffer to write. -/// @param rx_data Buffer to read data in. If NULL, no data will be read. -/// @param len Length of the buffers. -/// @return 0 on success, errno on error. -int ASpiDevice_transfer(const ASpiDevice* device, - const void* tx_data, - void* rx_data, - size_t len); - -/// Sets the frequency in Hertz. -/// @param device Pointer to the ASpiDevice struct. -/// @param freq_hz Frequency to set. -/// @return 0 on success, errno on error. -int ASpiDevice_setFrequency(const ASpiDevice* device, uint32_t freq_hz); - -/// Sets the SPI mode. -/// @param device Pointer to the ASpiDevice struct. -/// @param mode Mode to use. One of SPI_MODE0, SPI_MODE1, SPI_MODE2, SPI_MODE3. -/// @return 0 on success, errno on error. -int ASpiDevice_setMode(const ASpiDevice* device, ASpiMode mode); - -/// Sets the bit justification. -/// @param device Pointer to the ASpiDevice struct. -/// @param bit_justification One of SPI_LSB_FIRST OR SPI_MSB_FIRST. -/// @return 0 on success, errno on error. -int ASpiDevice_setBitJustification(const ASpiDevice* device, - ASpiBitJustification bit_justification); - -/// Sets the number of bits per words. -/// @param device Pointer to the ASpiDevice struct. -/// @param bits_per_word Number of bits per word. -/// @return 0 on success, errno on error. -int ASpiDevice_setBitsPerWord(const ASpiDevice* device, uint8_t bits_per_word); - -/// Sets the delay to wait after each transfer. -/// @param device Pointer to the ASpiDevice struct. -/// @param delay_usecs Delay in microseconds. -/// @return 0 on success, errno on error. -int ASpiDevice_setDelay(const ASpiDevice* device, uint16_t delay_usecs); - -/// Sets the chip select behavior after each transfer. -/// @param device Pointer to the ASpiDevice struct. -/// @param change If set, cs will be active between transfers. -/// @return 0 on success, errno on error. -int ASpiDevice_setCsChange(const ASpiDevice* device, int change); - -/// Destroys a ASpiDevice struct. -/// @param device Pointer to the ASpiDevice struct. -void ASpiDevice_delete(ASpiDevice* device); - -/// @} - -__END_DECLS - -#endif // SYSTEM_PERIPHERALMANAGER_SPI_DEVICE_H_ diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/uart_device.h b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/uart_device.h deleted file mode 100644 index 03ab6d7..0000000 --- a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/include/pio/uart_device.h +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef SYSTEM_PERIPHERALMANAGER_UART_DEVICE_H_ -#define SYSTEM_PERIPHERALMANAGER_UART_DEVICE_H_ - -#include -#include - -__BEGIN_DECLS - -/// @defgroup Uart Uart device interface -/// @brief Functions to control an UART device. -/// -/// These functions can be used to control an UART device. -/// @{ - -/// UART Parity -typedef enum AUartParity { - AUART_PARITY_NONE = 0, /**< No parity */ - AUART_PARITY_EVEN = 1, /**< Even parity */ - AUART_PARITY_ODD = 2, /**< Odd parity */ - AUART_PARITY_MARK = 3, /**< Mark parity, always 1 */ - AUART_PARITY_SPACE = 4 /**< Space parity, always 0 */ -} AUartParity; - -/// Modem control lines. -typedef enum AUartModemControlLine { - AUART_MODEM_CONTROL_LE = 1 << 0, /**< Data set ready/Line enable */ - AUART_MODEM_CONTROL_DTR = 1 << 1, /**< Data terminal ready */ - AUART_MODEM_CONTROL_RTS = 1 << 2, /**< Request to send */ - AUART_MODEM_CONTROL_ST = 1 << 3, /**< Secondary TXD */ - AUART_MODEM_CONTROL_SR = 1 << 4, /**< Secondary RXD */ - AUART_MODEM_CONTROL_CTS = 1 << 5, /**< Clear to send */ - AUART_MODEM_CONTROL_CD = 1 << 6, /**< Data carrier detect */ - AUART_MODEM_CONTROL_RI = 1 << 7, /**< Ring */ - AUART_MODEM_CONTROL_DSR = 1 << 8 /**< Data set ready */ -} AUartModemControlLine; - -// Hardware Flow Control -typedef enum AUartHardwareFlowControl { - AUART_HARDWARE_FLOW_CONTROL_NONE = 0, /**< No hardware flow control */ - AUART_HARDWARE_FLOW_CONTROL_AUTO_RTSCTS = 1 /**< Auto RTS/CTS */ -} AUartHardwareFlowControl; - -/// Flush queue selection -typedef enum AUartFlushDirection { - AUART_FLUSH_IN = 0, /**< Flushes data received but not read */ - AUART_FLUSH_OUT = 1, /**< Flushes data written but not transmitted */ - AUART_FLUSH_IN_OUT = 2 /**< Flushes both in and out */ -} AUartFlushDirection; - -typedef struct AUartDevice AUartDevice; - -/// Writes to a UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param data Data to write. -/// @param len Size of the data to write. -/// @param bytes_written Output pointer to the number of bytes written. -/// @return 0 on success, errno on error. -int AUartDevice_write(const AUartDevice* device, - const void* data, - uint32_t len, - uint32_t* bytes_written); - -/// Reads from a UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param data Buffer to read the data into. -/// @param len Number of bytes to read. -/// @param bytes_read Output pointer to the number of bytes read. -/// @return 0 on success, errno on error. -int AUartDevice_read(const AUartDevice* device, - void* data, - uint32_t len, - uint32_t* bytes_read); - -/// Sets the input and output speed of a UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param baudrate Speed in baud. -/// @return 0 on success, errno on error. -int AUartDevice_setBaudrate(const AUartDevice* device, uint32_t baudrate); - -/// Sets number of stop bits for the UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param stop_bits Number of stop bits. Typically 1 or 2. -/// @return 0 on success, errno on error. -int AUartDevice_setStopBits(const AUartDevice* device, uint32_t stop_bits); - -/// Sets the data size of a character for the UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param data_size Number of bits per character. Typically between 5 and 8. -/// @return 0 on success, errno on error. -int AUartDevice_setDataSize(const AUartDevice* device, uint32_t data_size); - -/// Sets the parity mode for the UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param mode Parity mode. -/// @return 0 on success, errno on error. -int AUartDevice_setParity(const AUartDevice* device, AUartParity mode); - -/// Sets the hardware flow control mode for the UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param mode Flow control mode. -/// @return 0 on success, errno on error. -int AUartDevice_setHardwareFlowControl(const AUartDevice* device, - AUartHardwareFlowControl mode); - -/// Sets the modem control bits for the UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param lines Lines to set. AUartModemControlLine values OR'ed together. -/// @return 0 on success, errno on error. -int AUartDevice_setModemControl(const AUartDevice* device, uint32_t lines); - -/// Clears the modem control bits for the UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param lines Lines to clear. AUartModemControlLine values OR'ed together. -/// @return 0 on success, errno on error. -int AUartDevice_clearModemControl(const AUartDevice* device, uint32_t lines); - -/// Sends a break to the UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param duration Duration of break transmission in milliseconds. If 0, -/// transmits zero-valued bits for at least 0.25 seconds, and not more -/// than 0.5 seconds. -/// @return 0 on success, errno on error. -int AUartDevice_sendBreak(const AUartDevice* device, uint32_t duration_msecs); - -/// Flushes specified queue for the UART device. -/// @param device Pointer to the AUartDevice struct. -/// @param direction Direction to flush. -/// @return 0 on success, errno on error. -int AUartDevice_flush(const AUartDevice* device, AUartFlushDirection direction); - -/// Gets a file descriptor to be notified when data can be read. -/// -/// You can use this file descriptor to poll on incoming data instead of -/// actively reading for new data. -/// -/// @param device Pointer to the AUartDevice struct. -/// @param fd Output pointer to the file descriptor. -/// @return 0 on success, errno on error. -int AUartDevice_getPollingFd(const AUartDevice* device, int* fd); - -/// Acknowledges an input event. -/// -/// This must be called after receiving an event notification on the polling -/// file descriptor. -/// If you don't acknowledge an event, peripheral manager will assume you are -/// still processing it and you will not receive any more events. -/// If you acknowledge an event before reading the data from the device, you -/// will receive an event immediately as there will still be data available. -/// -/// @param fd File descriptor to acknowledge the event on. -/// @return 0 on success, errno on error. -int AUartDevice_ackInputEvent(int fd); - -/// Destroys a AUartDevice struct. -/// @param device Pointer to the AUartDevice struct. -void AUartDevice_delete(AUartDevice* device); - -/// @} - -__END_DECLS - -#endif // SYSTEM_PERIPHERALMANAGER_UART_DEVICE_H_ diff --git a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/lib/libandroidthings.so b/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/lib/libandroidthings.so deleted file mode 100644 index 1ff0285..0000000 Binary files a/pi3-smart-remote/native-libandroidthings-0.5.1-devpreview/x86/lib/libandroidthings.so and /dev/null differ diff --git a/pi3-smart-remote/settings.gradle b/pi3-smart-remote/settings.gradle deleted file mode 100644 index e7b4def..0000000 --- a/pi3-smart-remote/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/stm8-driver/.gitignore b/stm8-driver/.gitignore deleted file mode 100644 index d5af2a2..0000000 --- a/stm8-driver/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -si_project/ -Debug/ -stm8-doc/ \ No newline at end of file diff --git a/stm8-driver/BuildLog.log b/stm8-driver/BuildLog.log deleted file mode 100644 index 5f28270..0000000 --- a/stm8-driver/BuildLog.log +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/stm8-driver/STM8_Driver.ewd b/stm8-driver/STM8_Driver.ewd deleted file mode 100644 index 18f2053..0000000 --- a/stm8-driver/STM8_Driver.ewd +++ /dev/null @@ -1,454 +0,0 @@ - - - 3 - - Debug - - STM8 - - 1 - - C-SPY - 1 - - 1 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - SIMULATOR_STM8 - 1 - - 0 - 1 - 1 - - - - - STICE_STM8 - 3 - - 2 - 1 - 1 - - - - - - - - - - - - - STLINK_STM8 - 3 - - 2 - 1 - 1 - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - - Release - - STM8 - - 0 - - C-SPY - 1 - - 1 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - SIMULATOR_STM8 - 1 - - 0 - 1 - 0 - - - - - STICE_STM8 - 3 - - 2 - 1 - 0 - - - - - - - - - - - - - STLINK_STM8 - 3 - - 2 - 1 - 0 - - - - - - - - - - - - - $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin - 0 - - - $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin - 1 - - - $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin - 0 - - - $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin - 0 - - - - diff --git a/stm8-driver/STM8_Driver.ewp b/stm8-driver/STM8_Driver.ewp deleted file mode 100644 index 5e36d29..0000000 --- a/stm8-driver/STM8_Driver.ewp +++ /dev/null @@ -1,1609 +0,0 @@ - - - 3 - - Debug - - STM8 - - 1 - - General - 4 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCSTM8 - 3 - - 9 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ASTM8 - 3 - - 2 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 0 - 1 - 1 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - - - - - - ILINK - 4 - - 3 - 1 - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 3 - - 0 - 1 - 1 - - - - - - - BILINK - 0 - - - - - Release - - STM8 - - 0 - - General - 4 - - 2 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - ICCSTM8 - 3 - - 9 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ASTM8 - 3 - - 2 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OBJCOPY - 0 - - 0 - 1 - 0 - - - - - - - - - CUSTOM - 3 - - - - 0 - - - - BICOMP - 0 - - - - BUILDACTION - 1 - - - - - - - ILINK - 4 - - 3 - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IARCHIVE - 3 - - 0 - 1 - 0 - - - - - - - BILINK - 0 - - - - - $PROJ_DIR$\src\main.c - - diff --git a/stm8-driver/STM8_Driver.ewt b/stm8-driver/STM8_Driver.ewt deleted file mode 100644 index 7082106..0000000 --- a/stm8-driver/STM8_Driver.ewt +++ /dev/null @@ -1,2103 +0,0 @@ - - - 3 - - Debug - - STM8 - - 1 - - C-STAT - 260 - - 260 - - 0 - - 1 - 600 - 0 - 2 - 0 - 1 - 100 - - - 1.4.5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Release - - STM8 - - 0 - - C-STAT - 260 - - 260 - - 0 - - 1 - 600 - 0 - 2 - 0 - 1 - 100 - - - 1.4.5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $PROJ_DIR$\src\main.c - - diff --git a/stm8-driver/STM8_Driver.eww b/stm8-driver/STM8_Driver.eww deleted file mode 100644 index 31b5a81..0000000 --- a/stm8-driver/STM8_Driver.eww +++ /dev/null @@ -1,10 +0,0 @@ - - - - - $WS_DIR$\STM8_Driver.ewp - - - - - diff --git a/stm8-driver/settings/STM8_Driver.Debug.cspy.bat b/stm8-driver/settings/STM8_Driver.Debug.cspy.bat deleted file mode 100644 index 14dfeae..0000000 --- a/stm8-driver/settings/STM8_Driver.Debug.cspy.bat +++ /dev/null @@ -1,40 +0,0 @@ -@REM This batch file has been generated by the IAR Embedded Workbench -@REM C-SPY Debugger, as an aid to preparing a command line for running -@REM the cspybat command line utility using the appropriate settings. -@REM -@REM Note that this file is generated every time a new debug session -@REM is initialized, so you may want to move or rename the file before -@REM making changes. -@REM -@REM You can launch cspybat by typing the name of this batch file followed -@REM by the name of the debug file (usually an ELF/DWARF or UBROF file). -@REM -@REM Read about available command line parameters in the C-SPY Debugging -@REM Guide. Hints about additional command line parameters that may be -@REM useful in specific cases: -@REM --download_only Downloads a code image without starting a debug -@REM session afterwards. -@REM --silent Omits the sign-on message. -@REM --timeout Limits the maximum allowed execution time. -@REM - - -@echo off - -if not "%~1" == "" goto debugFile - -@echo on - -"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\common\bin\cspybat" -f "D:\Project\Iot_Work\irext\examples\stm8-driver\settings\STM8_Driver.Debug.general.xcl" --backend -f "D:\Project\Iot_Work\irext\examples\stm8-driver\settings\STM8_Driver.Debug.driver.xcl" - -@echo off -goto end - -:debugFile - -@echo on - -"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\common\bin\cspybat" -f "D:\Project\Iot_Work\irext\examples\stm8-driver\settings\STM8_Driver.Debug.general.xcl" "--debug_file=%~1" --backend -f "D:\Project\Iot_Work\irext\examples\stm8-driver\settings\STM8_Driver.Debug.driver.xcl" - -@echo off -:end \ No newline at end of file diff --git a/stm8-driver/settings/STM8_Driver.Debug.cspy.ps1 b/stm8-driver/settings/STM8_Driver.Debug.cspy.ps1 deleted file mode 100644 index c3f3f71..0000000 --- a/stm8-driver/settings/STM8_Driver.Debug.cspy.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -param([String]$debugfile = ""); - -# This powershell file has been generated by the IAR Embedded Workbench -# C - SPY Debugger, as an aid to preparing a command line for running -# the cspybat command line utility using the appropriate settings. -# -# Note that this file is generated every time a new debug session -# is initialized, so you may want to move or rename the file before -# making changes. -# -# You can launch cspybat by typing Powershell.exe -File followed by the name of this batch file, followed -# by the name of the debug file (usually an ELF / DWARF or UBROF file). -# -# Read about available command line parameters in the C - SPY Debugging -# Guide. Hints about additional command line parameters that may be -# useful in specific cases : -# --download_only Downloads a code image without starting a debug -# session afterwards. -# --silent Omits the sign - on message. -# --timeout Limits the maximum allowed execution time. -# - - -if ($debugfile -eq "") -{ -& "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\common\bin\cspybat" -f "D:\Project\Iot_Work\irext\examples\stm8-driver\settings\STM8_Driver.Debug.general.xcl" --backend -f "D:\Project\Iot_Work\irext\examples\stm8-driver\settings\STM8_Driver.Debug.driver.xcl" -} -else -{ -& "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\common\bin\cspybat" -f "D:\Project\Iot_Work\irext\examples\stm8-driver\settings\STM8_Driver.Debug.general.xcl" --debug_file=$debugfile --backend -f "D:\Project\Iot_Work\irext\examples\stm8-driver\settings\STM8_Driver.Debug.driver.xcl" -} diff --git a/stm8-driver/settings/STM8_Driver.Debug.driver.xcl b/stm8-driver/settings/STM8_Driver.Debug.driver.xcl deleted file mode 100644 index f9cd43d..0000000 --- a/stm8-driver/settings/STM8_Driver.Debug.driver.xcl +++ /dev/null @@ -1,11 +0,0 @@ -"-p" - -"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\stm8\config\ddf\iostm8s207k8.ddf" - -"--mcuname" - -"STM8S207K8" - - - - diff --git a/stm8-driver/settings/STM8_Driver.Debug.general.xcl b/stm8-driver/settings/STM8_Driver.Debug.general.xcl deleted file mode 100644 index f2ddf6b..0000000 --- a/stm8-driver/settings/STM8_Driver.Debug.general.xcl +++ /dev/null @@ -1,11 +0,0 @@ -"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\stm8\bin\stm8proc.dll" - -"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\stm8\bin\stm8stlink.dll" - -"D:\Project\Iot_Work\irext\examples\stm8-driver\Debug\Exe\templproj.out" - ---plugin "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\stm8\bin\stm8bat.dll" - - - - diff --git a/stm8-driver/settings/STM8_Driver.Release.driverxcl b/stm8-driver/settings/STM8_Driver.Release.driverxcl deleted file mode 100644 index f2ddf6b..0000000 --- a/stm8-driver/settings/STM8_Driver.Release.driverxcl +++ /dev/null @@ -1,11 +0,0 @@ -"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\stm8\bin\stm8proc.dll" - -"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\stm8\bin\stm8stlink.dll" - -"D:\Project\Iot_Work\irext\examples\stm8-driver\Debug\Exe\templproj.out" - ---plugin "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\stm8\bin\stm8bat.dll" - - - - diff --git a/stm8-driver/settings/STM8_Driver.bat b/stm8-driver/settings/STM8_Driver.bat deleted file mode 100644 index 14dfeae..0000000 --- a/stm8-driver/settings/STM8_Driver.bat +++ /dev/null @@ -1,40 +0,0 @@ -@REM This batch file has been generated by the IAR Embedded Workbench -@REM C-SPY Debugger, as an aid to preparing a command line for running -@REM the cspybat command line utility using the appropriate settings. -@REM -@REM Note that this file is generated every time a new debug session -@REM is initialized, so you may want to move or rename the file before -@REM making changes. -@REM -@REM You can launch cspybat by typing the name of this batch file followed -@REM by the name of the debug file (usually an ELF/DWARF or UBROF file). -@REM -@REM Read about available command line parameters in the C-SPY Debugging -@REM Guide. Hints about additional command line parameters that may be -@REM useful in specific cases: -@REM --download_only Downloads a code image without starting a debug -@REM session afterwards. -@REM --silent Omits the sign-on message. -@REM --timeout Limits the maximum allowed execution time. -@REM - - -@echo off - -if not "%~1" == "" goto debugFile - -@echo on - -"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\common\bin\cspybat" -f "D:\Project\Iot_Work\irext\examples\stm8-driver\settings\STM8_Driver.Debug.general.xcl" --backend -f "D:\Project\Iot_Work\irext\examples\stm8-driver\settings\STM8_Driver.Debug.driver.xcl" - -@echo off -goto end - -:debugFile - -@echo on - -"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\common\bin\cspybat" -f "D:\Project\Iot_Work\irext\examples\stm8-driver\settings\STM8_Driver.Debug.general.xcl" "--debug_file=%~1" --backend -f "D:\Project\Iot_Work\irext\examples\stm8-driver\settings\STM8_Driver.Debug.driver.xcl" - -@echo off -:end \ No newline at end of file diff --git a/stm8-driver/settings/STM8_Driver.dbgdt b/stm8-driver/settings/STM8_Driver.dbgdt deleted file mode 100644 index b9848fa..0000000 --- a/stm8-driver/settings/STM8_Driver.dbgdt +++ /dev/null @@ -1,1056 +0,0 @@ - - - - - - 20 - 1541 - - - 20 - 1155 - 308 - 77 - - - - 124 - 27 - 27 - 27 - - - - - Disassembly - _I0 - - - 500 - 20 - - - 1 - 1 - - - - - - - TabID-4934-5138 - Debug Log - Debug-Log - - - - TabID-4411-5147 - Build - Build - - - - 0 - - - - - TabID-15682-5141 - Workspace - Workspace - - - STM8_Driver - - - - - 0 - - - - - TabID-26431-5144 - Disassembly - Disassembly - - - - 0 - - - - - - TextEditor - $WS_DIR$\main.c - 0 - 0 - 0 - 0 - 0 - 32 - 2129 - 2129 - - 0 - - TextEditor - $WS_DIR$\..\..\..\..\..\..\..\Program Files\IAR Systems\Embedded Workbench 7.0\stm8\inc\iostm8s207k8.h - 0 - 0 - 0 - 0 - 0 - 4627 - 158786 - 158786 - - - 0 - - - 1000000 - 1000000 - - - 1 - - - - - - - iaridepm.enu1 - - - - - - - debuggergui.enu1 - - - - - - - - - - - - - -2 - -2 - 558 - 198 - -2 - -2 - 200 - 200 - 125000 - 242718 - 125000 - 679612 - - - - - - - - - - - -2 - -2 - 558 - 198 - -2 - -2 - 200 - 200 - 125000 - 242718 - 125000 - 679612 - - - - - - - - - - - -2 - -2 - 198 - 1602 - -2 - -2 - 1604 - 200 - 1002500 - 242718 - 125000 - 242718 - - - - - - - - - - - - - 34048 - 34049 - 34050 - 34051 - 34052 - 34053 - 34054 - 34055 - 34056 - 34057 - 34058 - 34059 - 34060 - 34061 - 34062 - 34063 - 34064 - 34065 - 34066 - 34067 - 34068 - 34069 - 34070 - 34071 - 34072 - 34073 - 34074 - 34075 - 34076 - 34077 - 34078 - 34079 - 34080 - 34081 - 34082 - 34083 - 34084 - 34085 - 34086 - 34087 - 34088 - 34089 - 34090 - 34091 - 34092 - 34093 - 34094 - 34095 - - - - - 34390 - 34323 - 34398 - 34400 - 34397 - 34320 - 34321 - 34324 - 0 - - - - - 57600 - 57601 - 57603 - 33024 - 0 - 57607 - 0 - 57635 - 57634 - 57637 - 0 - 57643 - 57644 - 0 - 33090 - 33057 - 57636 - 57640 - 57641 - 33026 - 33065 - 33063 - 33064 - 33053 - 33054 - 0 - 33035 - 33036 - 34399 - 0 - 33055 - 33056 - 33094 - 0 - - - - 14 - 12 - - - 1 - 1 - 0 - 0 - 1 - 1 - 1 - 080300001D001386000004000000108600006001000029E1000006000000239200000100000020810000120000000F810000010000000C810000020000000D80000001000000EA8000000100000001DE0000010000001781000001000000568600000700000014810000010000002BE100000100000000810000030000005E8600000B0000000E810000010000001F8100006F00000003E1000001000000E98000000100000003DE00000200000041E1000001000000118600003A000000468100004E000000608600007B00000005E10000010000005D860000060000000A84000001000000E880000001000000 - - - 20000D8400000F84000008840000FFFFFFFF54840000328100001C810000098400001C8F00001E8F00001F8F0000208F0000218F00002AE10000118F000074860000A4860000A386000054860000598600007784000007840000808C000044D500008386000058860000009200000192000002920000069200000392000004920000 - 2B00138600002500000004840000720000005786000017000000768600002F00000010860000230000008486000030000000318400007900000023920000000000000F8100004900000020810000510000000C81000046000000008D00001A0000000684000074000000568600002900000003840000710000009A86000015000000008400006E00000030840000780000000E840000760000005E8600002B0000000E810000480000001F810000500000001A8600002800000022E10000620000000B810000450000008E8600003100000014860000260000000584000073000000698600002E0000001186000024000000028400007000000055860000060000004681000058000000328400007A00000010840000770000000E86000016000000608600002D0000005D8600002A0000000D810000470000000A84000075000000A186000032000000C386000003000000C08600000A000000 - - - 0 - 0A0000000A0000006E0000006E000000 - 00000000CA03000044050000DD030000 - 4096 - 0 - 0 - 32767 - 0 - - - 1 - - - 34050 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - 4294967295 - E201000063000000E80200000E030000 - 000000003200000006010000DD020000 - 4096 - 0 - 0 - 32767 - 0 - - - 1 - - - 34051 - 000000001700000022010000C8000000 - 04000000F902000040050000B0030000 - 32768 - 0 - 0 - 32767 - 0 - - - 1 - - - 34052 - 000000001700000022010000C8000000 - 04000000F902000040050000B0030000 - 4096 - 0 - 0 - 32767 - 0 - - - 0 - - - 34061 - 000000001700000022010000C8000000 - 04000000F902000040050000B0030000 - 4096 - 0 - 0 - 32767 - 0 - - - 1 - - - 34063 - 000000001700000022010000C8000000 - 04000000F902000040050000B0030000 - 4096 - 0 - 0 - 32767 - 0 - - - 0 - - - 34064 - 000000001700000022010000C8000000 - 04000000F902000040050000B0030000 - 4096 - 0 - 0 - 32767 - 0 - - - 0 - - - 34065 - 000000001700000022010000C8000000 - 04000000F902000040050000B0030000 - 4096 - 0 - 0 - 32767 - 0 - - - 0 - - - 34080 - 000000001700000022010000C8000000 - 04000000F902000040050000B0030000 - 4096 - 0 - 0 - 32767 - 0 - - - 0 - - - 34089 - 000000001700000022010000C8000000 - 04000000F902000040050000B0030000 - 4096 - 0 - 0 - 32767 - 0 - - - 0 - - - 34053 - 000000001700000080020000A8000000 - 00000000000000008002000091000000 - 32768 - 0 - 0 - 32767 - 0 - - - 0 - - - 34054 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 4096 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34055 - 000000001700000022010000C8000000 - 000000000000000022010000B1000000 - 8192 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34056 - 000000001700000022010000C8000000 - 000000000000000022010000B1000000 - 32768 - 0 - 0 - 32767 - 0 - - - 0 - - - 34057 - 000000001700000022010000C8000000 - 000000000000000022010000B1000000 - 32768 - 0 - 0 - 32767 - 0 - - - 0 - - - 34058 - 000000001700000022010000C8000000 - 000000000000000022010000B1000000 - 32768 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34059 - 000000001700000022010000C8000000 - 000000000000000022010000B1000000 - 32768 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34060 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34062 - 00000000170000000601000078010000 - F00300003200000044050000DD020000 - 16384 - 0 - 0 - 32767 - 0 - - - 1 - - - - Disassembly - _I0 - - - 500 - 20 - - - 1 - 1 - - - 34066 - 000000001700000022010000C8000000 - 000000000000000022010000B1000000 - 8192 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34067 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34068 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34069 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34070 - 000000001700000022010000D8000000 - 040000005901000052050000E8010000 - 32768 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34071 - 000000001700000022010000D8000000 - 040000005901000052050000E8010000 - 4096 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34072 - 000000001700000022010000D8000000 - 040000005901000052050000E8010000 - 4096 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34073 - 000000001700000022010000D8000000 - 040000005901000052050000E8010000 - 4096 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34074 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34075 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34076 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34077 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34078 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34079 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34081 - 00000000170000000601000078010000 - 040000004A00000002010000C3020000 - 4096 - 0 - 0 - 32767 - 0 - - - 0 - - - 34095 - 00000000170000000601000078010000 - 000000004600000006010000DD020000 - 4096 - 0 - 0 - 32767 - 0 - - - 1 - - - 34082 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 4096 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34083 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 4096 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34084 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34085 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34086 - 000000001700000022010000C8000000 - 000000000000000022010000B1000000 - 8192 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34087 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34088 - 0000000017000000AE010000D8000000 - 0000000000000000AE010000C1000000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34090 - 0000000017000000AE010000D8000000 - 0000000000000000AE010000C1000000 - 32768 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34091 - 00000000170000000601000078010000 - 3404000032000000BD05000003030000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - source_code - - - - Expression - Location - Type - Value - - - 125 - 150 - 100 - 205 - - - - 34092 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34093 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - 34094 - 00000000170000000601000078010000 - 00000000000000000601000061010000 - 16384 - 0 - 0 - 32767 - 0 - - - 0 - - - - 0000000046000000000000000040000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000002000000040000000100000000000000000000002E85000000000000000000000000000000000000010000002E850000010000002E850000000000000040000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000002000000040000000100000000000000000000002D85000000000000000000000000000000000000010000002D850000010000002D850000000000000040000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000002000000040000000100000000000000000000002C85000000000000000000000000000000000000010000002C850000010000002C850000000000000040000000000000FFFFFFFFFFFFFFFF30040000320000003404000003030000000000000200000004000000010000005CFCFFFFB50000002B85000000000000000000000000000000000000010000002B850000010000002B850000000000000080000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000001000000040000000100000000000000000000002A85000000000000000000000000000000000000010000002A850000010000002A850000000000000040000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000200000004000000010000000000000000000000288500000000000000000000000000000000000001000000288500000100000028850000000000000040000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000200000004000000010000000000000000000000278500000000000000000000000000000000000001000000278500000100000027850000000000000020000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000268500000000000000000000000000000000000001000000268500000100000026850000000000000040000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000200000004000000010000000000000000000000258500000000000000000000000000000000000001000000258500000100000025850000000000000040000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000200000004000000010000000000000000000000248500000000000000000000000000000000000001000000248500000100000024850000000000000010000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000200000004000000010000000000000000000000238500000000000000000000000000000000000001000000238500000100000023850000000000000010000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000200000004000000010000000000000000000000228500000000000000000000000000000000000001000000228500000100000022850000000000000010000001000000FFFFFFFFFFFFFFFF06010000320000000A010000DD020000010000000200001004000000010000000000000000000000FFFFFFFF02000000218500002F850000FFFF02000B004354616262656450616E650010000001000000E201000063000000E80200000E030000000000003200000006010000DD020000000000004010005602000000FFFEFF0E53006F0075007200630065002000420072006F007700730065007200000000002185000001000000FFFFFFFFFFFFFFFFFFFEFF0957006F0072006B0073007000610063006500010000002F85000001000000FFFFFFFFFFFFFFFF01000000000000000000000000000000000000000000000001000000FFFFFFFF2185000001000000FFFFFFFF21850000000000000040000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000002000000040000000100000000000000000000001F85000000000000000000000000000000000000010000001F850000010000001F850000000000000040000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000002000000040000000100000000000000000000001E85000000000000000000000000000000000000010000001E850000010000001E850000000000000040000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000002000000040000000100000000000000000000001D85000000000000000000000000000000000000010000001D850000010000001D850000000000000040000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000002000000040000000100000000000000000000001C85000000000000000000000000000000000000010000001C850000010000001C850000000000000040000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000002000000040000000100000000000000000000001B85000000000000000000000000000000000000010000001B850000010000001B850000000000000040000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000002000000040000000100000000000000000000001A85000000000000000000000000000000000000010000001A850000010000001A850000000000000080000000000000FFFFFFFFFFFFFFFF000000003D0100005605000041010000000000000100000004000000010000000000000000000000FFFFFFFF040000001685000017850000188500001985000001800080000000000000E201000072010000380700003302000000000000410100005605000002020000000000004080004604000000FFFEFF084D0065006D006F007200790020003100000000001685000001000000FFFFFFFFFFFFFFFFFFFEFF084D0065006D006F007200790020003200000000001785000001000000FFFFFFFFFFFFFFFFFFFEFF084D0065006D006F007200790020003300000000001885000001000000FFFFFFFFFFFFFFFFFFFEFF084D0065006D006F007200790020003400000000001985000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFF1685000001000000FFFFFFFF16850000000000000040000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000200000004000000010000000000000000000000158500000000000000000000000000000000000001000000158500000100000015850000000000000040000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000200000004000000010000000000000000000000148500000000000000000000000000000000000001000000148500000100000014850000000000000040000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000200000004000000010000000000000000000000138500000000000000000000000000000000000001000000138500000100000013850000000000000020000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000128500000000000000000000000000000000000001000000128500000100000012850000000000000040000001000000FFFFFFFFFFFFFFFFEC03000032000000F0030000DD0200000100000002000010040000000100000052FBFFFF6E0100000E85000000000000000000000000000000000000010000000E850000010000000E850000000000000040000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000002000000040000000100000000000000000000000C85000000000000000000000000000000000000010000000C850000010000000C850000000000000080000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000001000000040000000100000000000000000000000B85000000000000000000000000000000000000010000000B850000010000000B850000000000000080000000000000FFFFFFFFFFFFFFFF000000000000000004000000040000000000000001000000040000000100000000000000000000000A85000000000000000000000000000000000000010000000A850000010000000A850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000098500000000000000000000000000000000000001000000098500000100000009850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000088500000000000000000000000000000000000001000000088500000100000008850000000000000020000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000078500000000000000000000000000000000000001000000078500000100000007850000000000000010000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000200000004000000010000000000000000000000068500000000000000000000000000000000000001000000068500000100000006850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000058500000000000000000000000000000000000001000000058500000100000005850000000000000080000001000000FFFFFFFFFFFFFFFF00000000DD02000044050000E102000001000000010000100400000001000000F0FCFFFF63000000FFFFFFFF0800000003850000048500000D8500000F8500001085000011850000208500002985000001800080000001000000E20100001203000026070000FB03000000000000E102000044050000CA030000000000004080005608000000FFFEFF0B42007200650061006B0070006F0069006E0074007300010000000385000001000000FFFFFFFFFFFFFFFFFFFEFF054200750069006C006400000000000485000001000000FFFFFFFFFFFFFFFFFFFEFF094400650062007500670020004C006F006700010000000D85000001000000FFFFFFFFFFFFFFFFFFFEFF0C4400650063006C00610072006100740069006F006E007300000000000F85000001000000FFFFFFFFFFFFFFFFFFFEFF0A5200650066006500720065006E00630065007300000000001085000001000000FFFFFFFFFFFFFFFFFFFEFF0D460069006E006400200069006E002000460069006C0065007300000000001185000001000000FFFFFFFFFFFFFFFFFFFEFF1541006D0062006900670075006F0075007300200044006500660069006E006900740069006F006E007300000000002085000001000000FFFFFFFFFFFFFFFFFFFEFF0B54006F006F006C0020004F0075007400700075007400000000002985000001000000FFFFFFFFFFFFFFFF02000000000000000000000000000000000000000000000001000000FFFFFFFF0385000001000000FFFFFFFF03850000000000000040000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000200000004000000010000000000000000000000028500000000000000000000000000000000000001000000028500000100000002850000000000000000000000000000 - - - Debug - 00200000010000000800FFFF01001100434D4643546F6F6C426172427574746F6E568600000000040029000000FFFEFF0000000000000000000000000001000000010000000180138600000000040025000000FFFEFF00000000000000000000000000010000000100000001805E860000000004002B000000FFFEFF000000000000000000000000000100000001000000018060860000000004002D000000FFFEFF00000000000000000000000000010000000100000001805D860000000004002A000000FFFEFF0000000000000000000000000001000000010000000180108600000000040023000000FFFEFF0000000000000000000000000001000000010000000180118600000000000024000000FFFEFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E148600000000040026000000FFFEFF205200650073006500740020007400680065002000640065006200750067006700650064002000700072006F006700720061006D000A00520065007300650074000000000000000000000000000100000001000000000000000000000001000000020009800000000000000400FFFFFFFFFFFEFF000000000000000000000000000100000001000000000000000000000001000000000009801986000000000000FFFFFFFFFFFEFF000100000000000000000000000100000001000000000000000000000001000000000000000000FFFEFF0544006500620075006700C6000000 - - - 34048 - 0A0000000A0000006E0000006E000000 - 1503000018000000F103000032000000 - 8192 - 1 - 0 - 198 - 0 - - - 1 - - - Main - 00200000010000002100FFFF01001100434D4643546F6F6C426172427574746F6E00E10000000000005B000000FFFEFF000000000000000000000000000100000001000000018001E10000000000005C000000FFFEFF000000000000000000000000000100000001000000018003E10000000000005E000000FFFEFF000000000000000000000000000100000001000000018000810000000000003F000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000018007E100000000000061000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000018023E100000000040063000000FFFEFF000000000000000000000000000100000001000000018022E100000000040062000000FFFEFF000000000000000000000000000100000001000000018025E100000000040065000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001802BE100000000040068000000FFFEFF00000000000000000000000000010000000100000001802CE100000000040069000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6E4281000000000000FFFFFFFFFFFEFF0001000000000000000100000000000000010000007800000002002050FFFFFFFFFFFEFF0096000000000000000300FFFEFF036E006F007000FFFEFF14490052006500780074005F00700072006F00630065007300730055006100720074004D0073006700FFFEFF0750007200650070006100720065000000000000000000000000000180218100000000040052000000FFFEFF000000000000000000000000000100000001000000018024E100000000000064000000FFFEFF000000000000000000000000000100000001000000018028E100000000040066000000FFFEFF000000000000000000000000000100000001000000018029E100000000000067000000FFFEFF0000000000000000000000000001000000010000000180028100000000000041000000FFFEFF0000000000000000000000000001000000010000000180298100000000000056000000FFFEFF0000000000000000000000000001000000010000000180278100000000000054000000FFFEFF0000000000000000000000000001000000010000000180288100000000000055000000FFFEFF00000000000000000000000000010000000100000001801D810000000000004E000000FFFEFF00000000000000000000000000010000000100000001801E810000000004004F000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001800B8100000000000045000000FFFEFF00000000000000000000000000010000000100000001800C8100000000000046000000FFFEFF00000000000000000000000000010000000100000001805F860000000000005A000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001801F8100000000000050000000FFFEFF0000000000000000000000000001000000010000000180208100000000000051000000FFFEFF0000000000000000000000000001000000010000000180468100000000020058000000FFFEFF00000000000000000000000000010000000100000000000000FFFEFF044D00610069006E00FF020000 - - - 34049 - 0A0000000A0000006E0000006E000000 - 00000000180000001503000032000000 - 8192 - 1 - 0 - 767 - 0 - - - 1 - - - - diff --git a/stm8-driver/settings/STM8_Driver.dni b/stm8-driver/settings/STM8_Driver.dni deleted file mode 100644 index e4fd8fd..0000000 --- a/stm8-driver/settings/STM8_Driver.dni +++ /dev/null @@ -1,64 +0,0 @@ -[Stack] -FillEnabled=0 -OverflowWarningsEnabled=1 -WarningThreshold=90 -SpWarningsEnabled=1 -WarnLogOnly=1 -UseTrigger=1 -TriggerName=main -LimitSize=0 -ByteLimit=50 -[InterruptLog] -LogEnabled=0 -SumEnabled=0 -GraphEnabled=0 -ShowTimeLog=1 -ShowTimeSum=1 -SumSortOrder=0 -[DataLog] -LogEnabled=0 -SumEnabled=0 -GraphEnabled=0 -ShowTimeLog=1 -ShowTimeSum=1 -[Breakpoints2] -Count=0 -[Interrupts] -Enabled=1 -[MemoryMap] -Enabled=0 -Base=0 -UseAuto=0 -TypeViolation=1 -UnspecRange=1 -ActionState=1 -[Trace1] -Enabled=0 -ShowSource=1 -[Simulator] -Freq=16000000 -[DebugChecksum] -Checksum=-551179649 -[CallStack] -ShowArgs=0 -[Disassembly] -MixedMode=1 -[DataSample] -LogEnabled=0 -GraphEnabled=0 -ShowTimeLog=1 -ShowTimeSum=1 -[Log file] -LoggingEnabled=_ 0 -LogFile=_ "" -Category=_ 0 -[TermIOLog] -LoggingEnabled=_ 0 -LogFile=_ "" -[Breakpoints] -Count=0 -[Aliases] -Count=0 -SuppressDialog=0 -[DebuggerSettings] -DisableInterruptsWhenStepping=0 diff --git a/stm8-driver/settings/STM8_Driver.dnx b/stm8-driver/settings/STM8_Driver.dnx deleted file mode 100644 index 333d0e3..0000000 --- a/stm8-driver/settings/STM8_Driver.dnx +++ /dev/null @@ -1,89 +0,0 @@ - - - - 0 - 1 - 90 - 1 - 1 - 1 - main - 0 - 50 - - - 0 - 0 - 0 - 1 - 1 - 0 - - - 0 - 0 - 0 - 1 - 1 - - - 0 - - - 1 - - - 0 - 0 - 0 - 1 - 1 - 1 - - - 0 - 1 - - - 16000000 - - - 3110544503 - - - 0 - - - 1 - - - _ 0 - _ "" - _ 0 - - - 0 - 0 - 1 - - - _ 0 - _ "" - _ 0 - - - _ 0 - _ "" - - - 0 - - - 0 - 0 - - - 0 - 0 - - diff --git a/stm8-driver/settings/STM8_Driver.ps1 b/stm8-driver/settings/STM8_Driver.ps1 deleted file mode 100644 index c3f3f71..0000000 --- a/stm8-driver/settings/STM8_Driver.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -param([String]$debugfile = ""); - -# This powershell file has been generated by the IAR Embedded Workbench -# C - SPY Debugger, as an aid to preparing a command line for running -# the cspybat command line utility using the appropriate settings. -# -# Note that this file is generated every time a new debug session -# is initialized, so you may want to move or rename the file before -# making changes. -# -# You can launch cspybat by typing Powershell.exe -File followed by the name of this batch file, followed -# by the name of the debug file (usually an ELF / DWARF or UBROF file). -# -# Read about available command line parameters in the C - SPY Debugging -# Guide. Hints about additional command line parameters that may be -# useful in specific cases : -# --download_only Downloads a code image without starting a debug -# session afterwards. -# --silent Omits the sign - on message. -# --timeout Limits the maximum allowed execution time. -# - - -if ($debugfile -eq "") -{ -& "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\common\bin\cspybat" -f "D:\Project\Iot_Work\irext\examples\stm8-driver\settings\STM8_Driver.Debug.general.xcl" --backend -f "D:\Project\Iot_Work\irext\examples\stm8-driver\settings\STM8_Driver.Debug.driver.xcl" -} -else -{ -& "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\common\bin\cspybat" -f "D:\Project\Iot_Work\irext\examples\stm8-driver\settings\STM8_Driver.Debug.general.xcl" --debug_file=$debugfile --backend -f "D:\Project\Iot_Work\irext\examples\stm8-driver\settings\STM8_Driver.Debug.driver.xcl" -} diff --git a/stm8-driver/settings/STM8_Driver.wspos b/stm8-driver/settings/STM8_Driver.wspos deleted file mode 100644 index a7c2a73..0000000 --- a/stm8-driver/settings/STM8_Driver.wspos +++ /dev/null @@ -1,2 +0,0 @@ -[MainWindow] -WindowPlacement=_ 226 183 1035 600 3 diff --git a/stm8-driver/src/main.c b/stm8-driver/src/main.c deleted file mode 100644 index cc98ecd..0000000 --- a/stm8-driver/src/main.c +++ /dev/null @@ -1,439 +0,0 @@ -/************************************************************************************** -Filename: main.c -Revised: Date: 2018-01-23 -Revision: Revision: 1.0 - -Description: This file provides driver for IR decode - -Revision log: -* 2018-01-23: created by strawmanbobi -**************************************************************************************/ - -#include -#define UARTPORT(flag) UART3_##flag - -#include -#include - -// -// Define where we will be working in the EEPROM. -// -#define EEPROM_BASE_ADDRESS 0x4000 -#define EEPROM_INITIAL_OFFSET 0x0040 -#define EEPROM_PULSE_DATA ((unsigned char *) (EEPROM_BASE_ADDRESS + EEPROM_INITIAL_OFFSET)) -#define EEPROM_CARRIER_FREQUENCY - -// -// Data ready for the pulse timer ISR's to use. -// -int _numberOfPulses = 0; -int _currentPulse = 0; -char *_pulseDataAddress = NULL; - -// -// Prescalar for the timer. -// -int _prescalar = 1; - -// -// Some control variables to indicate if we are running or not. -// -#define STATE_WAITING_FOR_USER 0 -#define STATE_RUNNING 1 -int _currentState = STATE_WAITING_FOR_USER; - -// -// Working variables for the UART. -// -unsigned char *_currentTxByte; -unsigned short _currentTxCount; -unsigned short _txBufferLength; -#define UART_TX_BUFFER_SIZE 258 -unsigned char _txBuffer[UART_TX_BUFFER_SIZE]; -// -unsigned char *_currentRxByte; -unsigned short _currentRxCount; -unsigned short _rxBufferLength; -#define UART_RX_BUFFER_SIZE 20 -unsigned char _rxBuffer[UART_RX_BUFFER_SIZE]; -// -unsigned char *_textMessage = "OpenIR\r\n"; -// -#define UART_MODE_WAITING_FOR_DATA 0 -#define UART_MODE_RECEIVING_DATA 1 -unsigned char _uartMode = UART_MODE_WAITING_FOR_DATA; - -// -// Commands which this remote control can understand. -// -#define COMMAND_GET_ID 1 -#define COMMAND_SET_ID 2 -#define COMMAND_GET_CARRIER_FREQUENCY 3 -#define COMMAND_SET_CARRIER_FREQUENCY 4 -#define COMMAND_GET_PULSE_DATA 5 -#define COMMAND_SET_PULSE_DATA 6 -#define COMMAND_TRANSMIT_PULSE_DATA 7 -#define COMMAND_TRANSMIT_THIS_DATA 8 -#define COMMAND_TIME_LAPSE 9 -#define COMMAND_RESET 10 -#define COMMAND_POWER_LED_ENABLED 11 - -// -// Error codes whch can be sent back to the calling application. -// -#define EC_OK 0 -#define EC_UNKNOWN_COMMAND 1 -#define EC_RX_BUFFER_OVERFLOW 2 - -// -// Generic method for sending a response. -// -void SendResponse(unsigned char *buffer, unsigned char length) -{ - _txBufferLength = length; - _currentTxByte = buffer; - _currentTxCount = 0; - UARTPORT(DR = _txBufferLength + 1); - UARTPORT(CR2_TIEN = 1); -} - -// -// Send a negative acknowledgement to the requester along with an error code. -// -void SendNAK(unsigned char errorCode) -{ - _txBuffer[0] = errorCode; - SendResponse(_txBuffer, 1); -} - -// -// Send an acknowledgement to the requester. -// -void SendACK() -{ - _txBuffer[0] = EC_OK; - SendResponse(_txBuffer, 1); -} - -//-------------------------------------------------------------------------------- -// -// Write the a block of data into EEPROM. -// -void WriteDataToEEPROM(unsigned char *data, int length, unsigned char *destination) -{ - // - // Check if the EEPROM is write-protected. If it is then unlock the EEPROM. - // - if (FLASH_IAPSR_DUL == 0) - { - FLASH_DUKR = 0xae; - FLASH_DUKR = 0x56; - } - // - // Write the data to the EEPROM. - // - for (int index = 0; index < length; index++) - { - *destination++ = *data++; - } - // - // Now write protect the EEPROM. - // - FLASH_IAPSR_DUL = 0; -} - - -// -// Setup the Rx buffers/counters ready to receive data. -// -void SetupRxBuffer() -{ - _currentRxByte = _rxBuffer; - _currentRxCount = 0; - _rxBufferLength = UART_RX_BUFFER_SIZE; - _uartMode = UART_MODE_WAITING_FOR_DATA; -} - -// -// Transmit the IR pulse data. -// -void TransmitPulseData() -{ - _currentState = STATE_RUNNING; - _currentPulse = 0; - _pulseDataAddress = (char *) (EEPROM_PULSE_DATA + 1); - TIM2_ARRH = *_pulseDataAddress++; - TIM2_ARRL = *_pulseDataAddress++; - PD_ODR_ODR3 = *_pulseDataAddress++; - // - // Now we have everything ready we need to force the Timer 2 counters to - // reload and enable Timers 1 & 2. - // - TIM2_CR1_URS = 1; - TIM2_EGR_UG = 1; - TIM1_CR1_CEN = 1; - TIM2_CR1_CEN = 1; -} - -// -// Process the data in the Rx buffer. -// -void ProcessUARTData() -{ - switch (_rxBuffer[1]) - { - case COMMAND_GET_ID: - break; - case COMMAND_SET_ID: - break; - case COMMAND_GET_CARRIER_FREQUENCY: - break; - case COMMAND_SET_CARRIER_FREQUENCY: - break; - case COMMAND_GET_PULSE_DATA: - SendResponse(EEPROM_PULSE_DATA, ((*EEPROM_PULSE_DATA) * 3) + 1); - break; - case COMMAND_SET_PULSE_DATA: - break; - case COMMAND_TRANSMIT_PULSE_DATA: - TransmitPulseData(); - SendACK(); - break; - default: - SendNAK(EC_UNKNOWN_COMMAND); - break; - } - _uartMode = UART_MODE_WAITING_FOR_DATA; -} - -//-------------------------------------------------------------------------------- -// -// Process the interrupt generated by the pressing of the button. -// -// This ISR makes the assumption that we only have on incoming interrupt on Port D. -// -#pragma vector = 8 -__interrupt void EXTI_PORTD_IRQHandler(void) -{ - if (_currentState != STATE_RUNNING) - { - TransmitPulseData(); - } -} - -//-------------------------------------------------------------------------------- -// -// Timer 2 Overflow handler. -// -#pragma vector = TIM2_OVR_UIF_vector -__interrupt void TIM2_UPD_OVF_IRQHandler(void) -{ - _currentPulse++; - if (_currentPulse == _numberOfPulses) - { - // - // We have processed the pulse data so stop now. - // - PD_ODR_ODR3 = 0; - TIM2_CR1_CEN = 0; - TIM1_CR1_CEN = 0; // Stop Timer 1. - _currentState = STATE_WAITING_FOR_USER; - } - else - { - TIM2_ARRH = *_pulseDataAddress++; - TIM2_ARRL = *_pulseDataAddress++; - PD_ODR_ODR3 = *_pulseDataAddress++; - TIM2_CR1_URS = 1; - TIM2_EGR_UG = 1; - } - // - // Reset the interrupt otherwise it will fire again straight away. - // - TIM2_SR1_UIF = 0; -} - -//-------------------------------------------------------------------------------- -// -// UART Transmit Buffer Empty handler. -// -#pragma vector = UARTPORT(T_TXE_vector) -__interrupt void UART_T_TXE_IRQHandler(void) -{ - if (_currentTxCount < _txBufferLength) - { - UARTPORT(DR = *_currentTxByte++); - _currentTxCount++; - } - else - { - UARTPORT(CR2_TIEN = 0); - } -} - -//-------------------------------------------------------------------------------- -// -// UART Receive Buffer Not Empty handler. -// -#pragma vector = UARTPORT(R_RXNE_vector) -__interrupt void UART_R_RXNE_IRQHandler(void) -{ - unsigned char dataByte = UARTPORT(DR); - if ((_uartMode == UART_MODE_WAITING_FOR_DATA) && (dataByte == 0xaa)) - { - SetupRxBuffer(); - _uartMode = UART_MODE_RECEIVING_DATA; - } - else - { - if (_uartMode == UART_MODE_RECEIVING_DATA) - { - if (_currentRxCount < (UART_RX_BUFFER_SIZE - 1)) - { - *_currentRxByte++ = dataByte; - _currentRxCount++; - if (_currentRxCount > 1) - { - if ((_rxBuffer[0] - 1) == _currentRxCount) - { - ProcessUARTData(); - } - } - } - else - { - // - // If we get here we have filled the UART Rx buffer. - // Not a lot we can do really so reset the system to - // wait for a new command. - // - SendNAK(EC_RX_BUFFER_OVERFLOW); - _uartMode = UART_MODE_WAITING_FOR_DATA; - } - } - } -} - -//-------------------------------------------------------------------------------- -// -// Setup Timer 2 ready to process the pulse data. -// -void SetupTimer2() -{ - TIM2_PSCR = _prescalar; - TIM2_IER_UIE = 1; // Enable the update interrupts. -} - -//-------------------------------------------------------------------------------- -// -// Now set up the ports. -// -// PD3 - IR Pulse signal. -// PD4 - Input pin indicating that the user wishes to trigger the camera. -// -void SetupPorts() -{ - PD_ODR = 0; // All pins are turned off. - // - // PD3 is the output for the IR control. - // - PD_DDR_DDR3 = 1; - PD_CR1_C13 = 1; - PD_CR2_C23 = 1; - // - // Now configure the input pin. - // - PD_DDR_DDR4 = 0; // PD4 is input. - PD_CR1_C14 = 1; // PD4 is floating input. - PD_CR2_C24 = 1; - // - // Set up the interrupt. - // - EXTI_CR1_PDIS = 1; // Interrupt on rising edge. - EXTI_CR2_TLIS = 1; // Rising edge only. -} - -//-------------------------------------------------------------------------------- -// -// Set up Timer 1, channel 4 to output a PWM signal (the carrier signal). -// -void SetupTimer1() -{ - TIM1_ARRH = 0x00; // Reload counter = 51 - TIM1_ARRL = 0x33; - TIM1_PSCRH = 0; // Prescalar = 0 (i.e. 1) - TIM1_PSCRL = 0; - // - // Now configure Timer 1, channel 4. - // - TIM1_CCMR4_OC4M = 7; // Set up to use PWM mode 2. - TIM1_CCER2_CC4E = 1; // Output is enabled. - TIM1_CCER2_CC4P = 0; // Active is defined as high. - TIM1_CCR4H = 0x00; // 26 = 50% duty cycle (based on TIM1_ARR). - TIM1_CCR4L = 0x1a; - TIM1_BKR_MOE = 1; // Enable the main output. -} - -//-------------------------------------------------------------------------------- -// -// Setup the UART to run at 57600 baud, no parity, one stop bit, 8 data bits. -// -// Important: This relies upon the system clock being set to run at 2 MHz. -// -void SetupUART() -{ - unsigned char tmp = UARTPORT(SR); - tmp = UARTPORT(DR); - // - // Reset the UART registers to the reset values. - // - UARTPORT(CR1 = 0); - UARTPORT(CR2 = 0); - UARTPORT(CR4 = 0); - UARTPORT(CR3 = 0); -#if defined USE_UART1 - UARTPORT(GTR = 0); - UARTPORT(PSCR = 0); -#endif - // - // Now setup the port to 57600,n,8,1. - // - UARTPORT(CR1_M = 0); // 8 Data bits. - UARTPORT(CR1_PCEN = 0); // Disable parity. - UARTPORT(CR3_STOP = 0); // 1 stop bit. - UARTPORT(BRR2 = 0x03); // Set the baud rate registers to 57600 baud - UARTPORT(BRR1 = 0x02); // based upon a 2 MHz system clock. - // - // Disable the transmitter and receiver. - // - UARTPORT(CR2_TEN = 0); // Disable transmit. - UARTPORT(CR2_REN = 0); // Disable receive. - SetupRxBuffer(); - // - // Turn on the UART transmit, receive and the UART clock. - // - UARTPORT(CR2_TEN = 1); - UARTPORT(CR2_RIEN = 1); - UARTPORT(CR2_REN = 1); -} - -//-------------------------------------------------------------------------------- -// -// Main program loop. -// -void main() -{ - __disable_interrupt(); - _pulseDataAddress = (char *) EEPROM_PULSE_DATA; - _numberOfPulses = *_pulseDataAddress++; - SetupPorts(); - SetupUART(); - SetupTimer2(); - SetupTimer1(); - __enable_interrupt(); - while (1) - { - __wait_for_interrupt(); - } -} - diff --git a/stm8-example/STM8_Demo.dep b/stm8-example/STM8_Demo.dep index e0871c0..8ca57d8 100644 --- a/stm8-example/STM8_Demo.dep +++ b/stm8-example/STM8_Demo.dep @@ -5,230 +5,145 @@ Debug - $PROJ_DIR$\src\irext\src\ir_tv_control.c - $PROJ_DIR$\src\irext\src\ir_utils.c - $PROJ_DIR$\src\main.c - $PROJ_DIR$\src\lib\src\stm8s_clk.c - $PROJ_DIR$\src\lib\src\stm8s_gpio.c $PROJ_DIR$\src\stm8s_it.c - $PROJ_DIR$\src\irext\src\ir_ac_parse_parameter.c - $PROJ_DIR$\src\irext\src\ir_decode.c - $PROJ_DIR$\src\irext\src\ir_ac_build_frame.c - $PROJ_DIR$\src\irext\src\ir_ac_binary_parse.c - $PROJ_DIR$\src\irext\src\ir_ac_control.c - $PROJ_DIR$\src\irext\src\ir_ac_parse_forbidden_info.c - $PROJ_DIR$\src\irext\src\ir_ac_parse_frame_info.c - $PROJ_DIR$\src\irext\src\ir_ac_apply.c + $PROJ_DIR$\src\lib\src\stm8s_gpio.c + $PROJ_DIR$\src\lib\src\stm8s_tim4.c + $PROJ_DIR$\src\lib\src\stm8s_uart3.c + $PROJ_DIR$\src\lib\src\stm8s_clk.c + $PROJ_DIR$\Debug\Obj\ir_ac_control.__cstat.et + $PROJ_DIR$\src\main.h + $TOOLKIT_DIR$\config\lnkstm8s207k8.icf + $PROJ_DIR$\Debug\Obj\stm8s_clk.pbi + $PROJ_DIR$\src\lib\inc\stm8s_uart1.h + $PROJ_DIR$\Debug\Obj\ir_ac_parse_frame_info.o + $PROJ_DIR$\Debug\Obj\ir_ac_build_frame.o + $PROJ_DIR$\Debug\Obj\ir_ac_binary_parse.o + $PROJ_DIR$\Debug\Obj\stm8s_it.__cstat.et + $PROJ_DIR$\src\lib\inc\stm8s_spi.h + $PROJ_DIR$\Debug\Obj\stm8s_uart3.o + $PROJ_DIR$\src\irext\include\ir_ac_control.h + $PROJ_DIR$\src\irext\include\ir_utils.h + $TOOLKIT_DIR$\inc\c\DLib_Product.h + $PROJ_DIR$\src\irext\include\ir_ac_parse_parameter.h + $PROJ_DIR$\src\irext\include\ir_ac_build_frame.h + $PROJ_DIR$\src\lib\inc\stm8s_adc2.h + $PROJ_DIR$\Debug\Obj\main.o + $PROJ_DIR$\Debug\Obj\ir_ac_parse_forbidden_info.__cstat.et + $TOOLKIT_DIR$\lib\dlstm8sln.a + $PROJ_DIR$\Debug\Obj\stm8s_clk.__cstat.et + $PROJ_DIR$\src\irext\include\ir_decode.h + $PROJ_DIR$\Debug\Obj\ir_ac_apply.__cstat.et + $PROJ_DIR$\Debug\Obj\ir_decode.__cstat.et + $PROJ_DIR$\Debug\Obj\ir_ac_parse_parameter.o + $PROJ_DIR$\Debug\Obj\stm8s_gpio.__cstat.et + $PROJ_DIR$\Debug\Obj\ir_ac_build_frame.__cstat.et + $PROJ_DIR$\Debug\Obj\ir_ac_parse_forbidden_info.o + $PROJ_DIR$\Debug\Obj\ir_tv_control.__cstat.et + $TOOLKIT_DIR$\lib\dlstm8sln.h + $TOOLKIT_DIR$\inc\c\ysizet.h + $PROJ_DIR$\src\lib\inc\stm8s_flash.h + $PROJ_DIR$\src\lib\inc\stm8s_uart3.h + $TOOLKIT_DIR$\inc\c\intrinsics.h + $PROJ_DIR$\src\lib\inc\stm8s_beep.h + $PROJ_DIR$\src\lib\inc\stm8s_awu.h + $PROJ_DIR$\Debug\Obj\stm8s_tim4.pbi + $PROJ_DIR$\Debug\Obj\stm8s_uart3.__cstat.et + $PROJ_DIR$\Debug\Obj\main.__cstat.et + $PROJ_DIR$\Debug\Obj\ir_ac_control.o + $PROJ_DIR$\Debug\Obj\ir_ac_control.pbi + $TOOLKIT_DIR$\inc\c\yvals.h + $PROJ_DIR$\src\lib\inc\stm8s_tim1.h + $TOOLKIT_DIR$\inc\c\ystdio.h + $PROJ_DIR$\Debug\Obj\main.pbi + $PROJ_DIR$\src\lib\inc\stm8s_gpio.h + $PROJ_DIR$\src\lib\inc\stm8s_tim3.h + $PROJ_DIR$\Debug\Obj\ir_ac_parse_frame_info.__cstat.et + $TOOLKIT_DIR$\lib\dbgstm8sln.a + $PROJ_DIR$\src\irext\include\ir_ac_parse_forbidden_info.h + $PROJ_DIR$\Debug\Exe\templproj.out + $PROJ_DIR$\Debug\Obj\ir_ac_binary_parse.__cstat.et + $PROJ_DIR$\Debug\Obj\stm8s_tim4.__cstat.et + $PROJ_DIR$\Debug\Obj\stm8s_clk.o + $TOOLKIT_DIR$\inc\c\DLib_Defaults.h + $TOOLKIT_DIR$\config\math_small.xcl + $PROJ_DIR$\Debug\Obj\ir_ac_parse_parameter.__cstat.et + $PROJ_DIR$\src\lib\inc\stm8s.h + $PROJ_DIR$\Debug\Obj\ir_utils.__cstat.et $PROJ_DIR$\src\lib\inc\stm8s_rst.h $PROJ_DIR$\Debug\Obj\stm8s_it.o $PROJ_DIR$\Debug\Obj\stm8s_tim4.o - $PROJ_DIR$\Debug\Obj\ir_ac_control.o - $PROJ_DIR$\src\irext\include\ir_ac_parse_forbidden_info.h - $PROJ_DIR$\Debug\Exe\templproj.out $PROJ_DIR$\Debug\Obj\stm8s_gpio.pbi - $TOOLKIT_DIR$\inc\c\intrinsics.h - $PROJ_DIR$\src\lib\inc\stm8s.h - $PROJ_DIR$\Debug\Obj\ir_ac_binary_parse.__cstat.et - $PROJ_DIR$\Debug\Obj\ir_ac_parse_parameter.__cstat.et - $PROJ_DIR$\Debug\Obj\main.__cstat.et - $PROJ_DIR$\Debug\Obj\stm8s_tim4.__cstat.et - $PROJ_DIR$\Debug\Obj\stm8s_clk.o - $PROJ_DIR$\Debug\Obj\main.pbi - $TOOLKIT_DIR$\inc\c\DLib_Defaults.h - $PROJ_DIR$\src\lib\inc\stm8s_uart3.h - $TOOLKIT_DIR$\lib\dbgstm8sln.a - $TOOLKIT_DIR$\config\math_small.xcl - $PROJ_DIR$\Debug\Obj\ir_utils.__cstat.et - $TOOLKIT_DIR$\inc\c\ystdio.h - $PROJ_DIR$\src\lib\inc\stm8s_awu.h - $TOOLKIT_DIR$\inc\c\yvals.h - $PROJ_DIR$\src\lib\inc\stm8s_beep.h - $PROJ_DIR$\Debug\Obj\stm8s_tim4.pbi - $PROJ_DIR$\src\lib\inc\stm8s_gpio.h - $PROJ_DIR$\Debug\Obj\ir_ac_parse_frame_info.__cstat.et - $PROJ_DIR$\Debug\Obj\stm8s_uart3.__cstat.et - $PROJ_DIR$\Debug\Obj\ir_ac_control.pbi - $PROJ_DIR$\src\lib\inc\stm8s_tim1.h - $PROJ_DIR$\src\lib\inc\stm8s_tim3.h - $PROJ_DIR$\src\irext\include\ir_ac_build_frame.h - $PROJ_DIR$\Debug\Obj\ir_ac_parse_forbidden_info.__cstat.et - $PROJ_DIR$\Debug\Obj\ir_ac_apply.__cstat.et - $PROJ_DIR$\Debug\Obj\ir_decode.__cstat.et - $PROJ_DIR$\Debug\Obj\stm8s_it.__cstat.et - $PROJ_DIR$\Debug\Obj\ir_ac_build_frame.__cstat.et - $PROJ_DIR$\Debug\Obj\ir_ac_control.__cstat.et - $PROJ_DIR$\Debug\Obj\stm8s_clk.__cstat.et - $PROJ_DIR$\Debug\Obj\ir_tv_control.__cstat.et - $PROJ_DIR$\Debug\Obj\stm8s_gpio.__cstat.et - $PROJ_DIR$\src\lib\inc\stm8s_flash.h - $PROJ_DIR$\src\main.h - $PROJ_DIR$\src\irext\include\ir_decode.h - $PROJ_DIR$\Debug\Obj\ir_ac_binary_parse.o - $TOOLKIT_DIR$\lib\dlstm8sln.h - $PROJ_DIR$\src\lib\inc\stm8s_spi.h - $PROJ_DIR$\Debug\Obj\stm8s_uart3.o - $PROJ_DIR$\Debug\Obj\ir_ac_parse_forbidden_info.o - $PROJ_DIR$\Debug\Obj\ir_ac_parse_parameter.o - $TOOLKIT_DIR$\inc\c\ysizet.h - $TOOLKIT_DIR$\config\lnkstm8s207k8.icf - $PROJ_DIR$\Debug\Obj\stm8s_clk.pbi - $PROJ_DIR$\src\lib\inc\stm8s_adc2.h - $PROJ_DIR$\src\lib\inc\stm8s_uart1.h - $PROJ_DIR$\src\irext\include\ir_ac_control.h - $PROJ_DIR$\Debug\Obj\ir_ac_parse_frame_info.o - $PROJ_DIR$\Debug\Obj\ir_ac_build_frame.o - $PROJ_DIR$\src\irext\include\ir_utils.h - $PROJ_DIR$\Debug\Obj\main.o - $TOOLKIT_DIR$\inc\c\DLib_Product.h - $PROJ_DIR$\src\irext\include\ir_ac_parse_parameter.h - $TOOLKIT_DIR$\lib\dlstm8sln.a - $PROJ_DIR$\Debug\Obj\ir_ac_parse_parameter.pbi - $PROJ_DIR$\src\lib\inc\stm8s_itc.h - $PROJ_DIR$\src\irext\include\ir_ac_parse_frame_info.h - $PROJ_DIR$\Debug\Obj\ir_utils.pbi - $TOOLKIT_DIR$\inc\c\stdio.h - $PROJ_DIR$\src\stm8s_conf.h - $TOOLKIT_DIR$\inc\c\ycheck.h - $PROJ_DIR$\Debug\Exe\STM8_Demo.hex - $TOOLKIT_DIR$\inc\c\string.h + $PROJ_DIR$\src\irext\src\ir_utils.c + $PROJ_DIR$\src\irext\src\ir_decode.c + $PROJ_DIR$\src\main.c + $PROJ_DIR$\src\irext\src\ir_ac_parse_parameter.c + $PROJ_DIR$\src\irext\src\ir_tv_control.c + $PROJ_DIR$\src\irext\src\ir_ac_apply.c + $PROJ_DIR$\src\irext\src\ir_ac_binary_parse.c + $PROJ_DIR$\src\irext\src\ir_ac_build_frame.c + $PROJ_DIR$\src\irext\src\ir_ac_parse_forbidden_info.c + $PROJ_DIR$\src\irext\src\ir_ac_parse_frame_info.c + $PROJ_DIR$\src\irext\src\ir_ac_control.c + $PROJ_DIR$\Debug\Obj\ir_ac_parse_frame_info.pbi + $PROJ_DIR$\Debug\Obj\ir_utils.o + $PROJ_DIR$\src\lib\inc\stm8s_clk.h + $TOOLKIT_DIR$\inc\c\DLib_Threads.h + $PROJ_DIR$\Debug\Obj\ir_ac_build_frame.pbi + $PROJ_DIR$\src\lib\inc\stm8s_tim4.h + $PROJ_DIR$\Debug\Obj\ir_decode.pbi + $PROJ_DIR$\src\lib\inc\stm8s_i2c.h $PROJ_DIR$\src\irext\include\ir_ac_apply.h + $PROJ_DIR$\Debug\Obj\ir_decode.o + $PROJ_DIR$\Debug\Obj\ir_ac_apply.pbi + $PROJ_DIR$\Debug\Obj\ir_ac_parse_parameter.pbi + $TOOLKIT_DIR$\inc\c\string.h + $PROJ_DIR$\src\irext\include\ir_tv_control.h + $PROJ_DIR$\Debug\Obj\ir_utils.pbi + $PROJ_DIR$\Debug\Obj\STM8_Demo.pbd + $PROJ_DIR$\Debug\Obj\ir_ac_binary_parse.pbi + $PROJ_DIR$\src\irext\include\ir_ac_parse_frame_info.h + $PROJ_DIR$\Debug\Obj\stm8s_uart3.pbi $PROJ_DIR$\Debug\Obj\ir_tv_control.o $PROJ_DIR$\src\irext\include\ir_defs.h - $PROJ_DIR$\src\lib\inc\stm8s_iwdg.h - $PROJ_DIR$\Debug\Obj\ir_ac_binary_parse.pbi - $PROJ_DIR$\Debug\Obj\ir_decode.o - $PROJ_DIR$\Debug\Obj\ir_tv_control.pbi - $TOOLKIT_DIR$\inc\c\xencoding_limits.h - $PROJ_DIR$\Debug\Obj\STM8_Demo.pbd - $PROJ_DIR$\Debug\Obj\stm8s_gpio.o - $PROJ_DIR$\src\lib\inc\stm8s_tim2.h $PROJ_DIR$\Debug\Obj\ir_ac_apply.o - $PROJ_DIR$\src\lib\inc\stm8s_exti.h - $PROJ_DIR$\Debug\Obj\stm8s_uart3.pbi - $PROJ_DIR$\Debug\Obj\stm8s_it.pbi - $PROJ_DIR$\src\lib\src\stm8s_tim4.c + $PROJ_DIR$\src\lib\inc\stm8s_itc.h + $PROJ_DIR$\src\stm8s_conf.h $TOOLKIT_DIR$\inc\c\stdlib.h $PROJ_DIR$\src\stm8s_it.h $PROJ_DIR$\src\irext\include\ir_ac_binary_parse.h + $PROJ_DIR$\src\lib\inc\stm8s_tim2.h $PROJ_DIR$\Debug\Obj\ir_ac_parse_forbidden_info.pbi - $PROJ_DIR$\src\irext\include\ir_tv_control.h - $PROJ_DIR$\Debug\Obj\ir_ac_apply.pbi + $PROJ_DIR$\Debug\Exe\STM8_Demo.hex + $PROJ_DIR$\Debug\Obj\ir_tv_control.pbi + $PROJ_DIR$\src\lib\inc\stm8s_exti.h $PROJ_DIR$\src\lib\inc\stm8s_wwdg.h - $PROJ_DIR$\src\lib\inc\stm8s_clk.h - $PROJ_DIR$\src\lib\inc\stm8s_tim4.h - $PROJ_DIR$\Debug\Obj\ir_utils.o - $PROJ_DIR$\src\lib\src\stm8s_uart3.c - $PROJ_DIR$\Debug\Obj\ir_ac_parse_frame_info.pbi - $PROJ_DIR$\src\lib\inc\stm8s_i2c.h - $PROJ_DIR$\Debug\Obj\ir_ac_build_frame.pbi - $PROJ_DIR$\Debug\Obj\ir_decode.pbi - $TOOLKIT_DIR$\inc\c\DLib_Threads.h + $TOOLKIT_DIR$\inc\c\stdio.h + $TOOLKIT_DIR$\inc\c\xencoding_limits.h + $TOOLKIT_DIR$\inc\c\ycheck.h + $PROJ_DIR$\Debug\Obj\stm8s_gpio.o + $PROJ_DIR$\src\lib\inc\stm8s_iwdg.h + $PROJ_DIR$\Debug\Obj\stm8s_it.pbi - $PROJ_DIR$\src\irext\src\ir_tv_control.c + $PROJ_DIR$\src\stm8s_it.c ICCSTM8 - 87 + 65 __cstat - 53 + 13 BICOMP - 92 + 117 ICCSTM8 - 85 83 36 29 59 74 93 117 64 88 57 81 34 69 106 - - - BICOMP - 69 57 83 59 88 106 64 93 74 81 85 36 29 117 34 - - - - - $PROJ_DIR$\src\irext\src\ir_utils.c - - - ICCSTM8 - 111 - - - __cstat - 33 - - - BICOMP - 80 - - - - - ICCSTM8 - 72 88 57 81 83 36 29 59 74 93 117 64 34 69 106 - - - BICOMP - 83 69 34 93 74 88 57 81 36 59 106 64 29 117 72 - - - - - $PROJ_DIR$\src\main.c - - - ICCSTM8 - 73 - - - __cstat - 25 - - - BICOMP - 28 - - - - - ICCSTM8 - 85 83 36 29 59 74 93 117 64 22 82 67 35 37 109 98 55 39 114 78 89 14 60 43 96 44 110 68 30 108 21 102 81 34 56 57 88 69 106 - - - BICOMP - 59 22 83 36 44 56 114 102 64 93 74 109 60 81 29 117 82 35 55 89 96 108 69 88 85 21 67 37 98 39 78 14 43 110 68 30 34 57 106 - - - - - $PROJ_DIR$\src\lib\src\stm8s_clk.c - - - ICCSTM8 - 27 - - - __cstat - 52 - - - BICOMP - 66 - - - - - ICCSTM8 - 109 22 82 67 35 37 98 55 39 114 78 89 14 60 43 96 44 110 68 30 108 21 - - - BICOMP - 89 22 35 82 55 96 108 109 114 60 44 21 67 37 98 39 78 14 43 110 68 30 + 104 62 102 21 40 39 81 110 36 50 86 101 116 64 14 47 106 51 84 9 37 111 38 6 26 112 114 46 59 34 18 113 82 35 48 99 16 92 @@ -237,30 +152,49 @@ ICCSTM8 - 95 + 115 __cstat - 54 + 30 BICOMP - 20 + 67 ICCSTM8 - 39 22 82 67 35 37 109 98 55 114 78 89 14 60 43 96 44 110 68 30 108 21 - - - BICOMP - 39 21 22 37 14 68 67 98 78 43 110 30 82 35 109 55 114 89 60 96 44 108 + 50 62 102 21 40 39 81 110 36 86 101 116 64 14 47 106 51 84 9 37 111 38 - $PROJ_DIR$\src\stm8s_it.c + $PROJ_DIR$\src\lib\src\stm8s_tim4.c + + + ICCSTM8 + 66 + + + __cstat + 57 + + + BICOMP + 41 + + + + + ICCSTM8 + 84 62 102 21 40 39 81 110 36 50 86 101 116 64 14 47 106 51 9 37 111 38 + + + + + $PROJ_DIR$\src\lib\src\stm8s_uart3.c ICCSTM8 @@ -268,57 +202,82 @@ __cstat - 49 + 42 BICOMP - 100 + 97 ICCSTM8 - 103 22 82 67 35 37 109 98 55 39 114 78 89 14 60 43 96 44 110 68 30 108 21 56 57 81 83 36 29 59 74 93 117 64 34 88 69 106 - - - BICOMP - 22 88 89 35 36 82 55 96 108 83 29 56 109 114 60 44 106 64 117 103 21 67 37 98 39 78 14 43 110 68 30 57 81 69 34 93 59 74 + 37 62 102 21 40 39 81 110 36 50 86 101 116 64 14 47 106 51 84 9 111 38 - [ROOT_NODE] - - - ILINK - 19 - - - - - $PROJ_DIR$\src\irext\src\ir_ac_parse_parameter.c + $PROJ_DIR$\src\lib\src\stm8s_clk.c ICCSTM8 - 63 + 58 __cstat - 24 + 25 BICOMP - 77 + 8 ICCSTM8 - 102 83 36 29 59 74 93 117 64 81 34 85 72 88 57 69 106 75 + 81 62 102 21 40 39 110 36 50 86 101 116 64 14 47 106 51 84 9 37 111 38 + + + + + $PROJ_DIR$\Debug\Exe\templproj.out + + + OBJCOPY + 108 + + + + + ILINK + 60 7 100 12 11 44 32 10 29 88 98 80 22 58 115 65 66 15 24 53 + + + + + $PROJ_DIR$\src\irext\src\ir_utils.c + + + ICCSTM8 + 80 + + + __cstat + 63 BICOMP - 81 64 83 59 75 85 93 74 36 57 69 88 72 29 117 34 106 102 + 93 + + + + + ICCSTM8 + 17 99 26 112 114 46 59 34 18 113 82 35 48 16 92 + + + BICOMP + 114 16 48 113 18 99 26 112 46 34 92 35 59 82 17 @@ -327,65 +286,61 @@ ICCSTM8 - 91 + 88 __cstat - 48 + 28 BICOMP - 116 + 85 ICCSTM8 - 81 83 36 29 59 74 93 117 64 34 102 85 57 88 69 106 72 45 86 + 112 114 46 59 34 18 113 82 35 48 103 91 26 99 16 92 17 20 87 BICOMP - 64 83 72 57 85 86 117 36 81 102 45 34 29 69 88 93 59 74 106 + 35 114 17 26 91 87 82 46 112 103 20 48 59 16 99 113 34 18 92 - $PROJ_DIR$\src\irext\src\ir_ac_build_frame.c + $PROJ_DIR$\src\main.c ICCSTM8 - 71 + 22 __cstat - 50 + 43 BICOMP - 115 + 49 ICCSTM8 - 45 88 57 81 83 36 29 59 74 93 117 64 34 69 106 - - - BICOMP - 69 83 29 36 81 64 57 88 106 34 93 117 45 59 74 + 91 114 46 59 34 18 113 82 35 62 102 21 40 39 81 110 36 50 86 101 116 64 14 47 106 51 84 9 37 111 38 103 112 48 6 26 99 16 92 - $PROJ_DIR$\src\irext\src\ir_ac_binary_parse.c + $PROJ_DIR$\src\irext\src\ir_ac_parse_parameter.c ICCSTM8 - 58 + 29 __cstat - 23 + 61 BICOMP @@ -395,92 +350,38 @@ ICCSTM8 - 104 88 57 81 83 36 29 59 74 93 117 64 34 69 106 + 103 114 46 59 34 18 113 82 35 112 48 91 17 99 26 16 92 19 BICOMP - 88 69 36 59 81 34 83 93 74 57 106 64 29 117 104 + 112 35 114 34 19 91 113 18 46 26 16 99 17 59 82 48 92 103 - $PROJ_DIR$\src\irext\src\ir_ac_control.c + $PROJ_DIR$\src\irext\src\ir_tv_control.c ICCSTM8 - 17 + 98 __cstat - 51 + 33 BICOMP - 42 + 109 ICCSTM8 - 102 83 36 29 59 74 93 117 64 81 34 85 69 88 104 57 106 75 18 79 72 + 91 114 46 59 34 18 113 82 35 99 26 112 48 16 92 BICOMP - 64 79 81 104 59 83 85 75 93 74 36 69 57 18 72 29 117 34 88 102 106 - - - - - $PROJ_DIR$\src\irext\src\ir_ac_parse_forbidden_info.c - - - ICCSTM8 - 62 - - - __cstat - 46 - - - BICOMP - 105 - - - - - ICCSTM8 - 81 83 36 29 59 74 93 117 64 34 102 85 57 88 69 106 18 - - - BICOMP - 34 18 64 83 85 36 117 81 102 57 29 69 88 93 59 74 106 - - - - - $PROJ_DIR$\src\irext\src\ir_ac_parse_frame_info.c - - - ICCSTM8 - 70 - - - __cstat - 40 - - - BICOMP - 113 - - - - - ICCSTM8 - 102 83 36 29 59 74 93 117 64 81 34 85 72 88 57 69 106 79 - - - BICOMP - 93 79 88 85 117 36 34 83 106 81 72 29 64 102 59 74 57 69 + 16 26 114 34 99 92 35 113 18 112 91 46 59 82 48 @@ -489,11 +390,92 @@ ICCSTM8 - 97 + 100 __cstat - 47 + 27 + + + BICOMP + 89 + + + + + ICCSTM8 + 17 99 26 112 114 46 59 34 18 113 82 35 48 16 92 87 + + + BICOMP + 34 46 99 92 112 48 114 113 18 87 26 16 35 59 82 17 + + + + + $PROJ_DIR$\src\irext\src\ir_ac_binary_parse.c + + + ICCSTM8 + 12 + + + __cstat + 56 + + + BICOMP + 95 + + + + + ICCSTM8 + 105 99 26 112 114 46 59 34 18 113 82 35 48 16 92 + + + BICOMP + 99 16 46 34 112 48 114 113 18 26 92 35 59 82 105 + + + + + $PROJ_DIR$\src\irext\src\ir_ac_build_frame.c + + + ICCSTM8 + 11 + + + __cstat + 31 + + + BICOMP + 83 + + + + + ICCSTM8 + 20 99 26 112 114 46 59 34 18 113 82 35 48 16 92 + + + BICOMP + 16 114 59 46 112 35 26 99 92 48 113 82 20 34 18 + + + + + $PROJ_DIR$\src\irext\src\ir_ac_parse_forbidden_info.c + + + ICCSTM8 + 32 + + + __cstat + 23 BICOMP @@ -503,82 +485,76 @@ ICCSTM8 - 72 88 57 81 83 36 29 59 74 93 117 64 34 69 106 86 + 112 114 46 59 34 18 113 82 35 48 103 91 26 99 16 92 54 BICOMP - 59 36 88 106 81 34 83 93 74 86 57 69 64 29 117 72 + 48 54 35 114 91 46 82 112 103 26 59 16 99 113 34 18 92 - $PROJ_DIR$\Debug\Exe\templproj.out + $PROJ_DIR$\src\irext\src\ir_ac_parse_frame_info.c - OBJCOPY - 84 + ICCSTM8 + 10 + + + __cstat + 52 + + + BICOMP + 79 + + ICCSTM8 + 103 114 46 59 34 18 113 82 35 112 48 91 17 99 26 16 92 96 + + + BICOMP + 113 96 99 91 82 46 48 114 92 112 17 59 35 103 34 18 26 16 + + + + + $PROJ_DIR$\src\irext\src\ir_ac_control.c + + + ICCSTM8 + 44 + + + __cstat + 5 + + + BICOMP + 45 + + + + + ICCSTM8 + 103 114 46 59 34 18 113 82 35 112 48 91 16 99 105 26 92 19 54 96 17 + + + BICOMP + 35 96 112 105 34 114 91 19 113 18 46 16 26 54 17 59 82 48 99 103 92 + + + + + [ROOT_NODE] + ILINK - 32 65 97 58 71 17 62 70 63 91 87 111 73 27 95 15 16 61 76 31 - - - - - $PROJ_DIR$\src\lib\src\stm8s_tim4.c - - - ICCSTM8 - 16 - - - __cstat - 26 - - - BICOMP - 38 + 55 - - - ICCSTM8 - 110 22 82 67 35 37 109 98 55 39 114 78 89 14 60 43 96 44 68 30 108 21 - - - BICOMP - 35 22 89 82 55 96 108 109 114 60 44 21 67 37 98 39 78 14 43 110 68 30 - - - - - $PROJ_DIR$\src\lib\src\stm8s_uart3.c - - - ICCSTM8 - 61 - - - __cstat - 41 - - - BICOMP - 99 - - - - - ICCSTM8 - 30 22 82 67 35 37 109 98 55 39 114 78 89 14 60 43 96 44 110 68 108 21 - - - BICOMP - 22 39 21 37 14 68 67 98 78 43 110 30 82 35 109 55 114 89 60 96 44 108 - - diff --git a/stm8-example/settings/STM8_Demo.wsdt b/stm8-example/settings/STM8_Demo.wsdt index 5594d7f..506453e 100644 --- a/stm8-example/settings/STM8_Demo.wsdt +++ b/stm8-example/settings/STM8_Demo.wsdt @@ -181,7 +181,7 @@ 21 - 1849 + 1866 2 0 @@ -200,7 +200,7 @@ 14 - 12 + 15 1 @@ -210,11 +210,11 @@ 1 1 1 - AF00000025001386000001000000108600000100000024D5000001000000239200000100000029E10000060000000F810000050000002081000001000000EA800000010000000D800000010000000C8100000300000001DE0000020000005686000006000000178100000A000000808C0000010000002BE100000100000014810000010000000E8400000100000023D5000002000000008100000300000003E10000040000001F810000010000000E8100007F0000005E8600000B0000005D84000001000000E98000000200000003DE000002000000058400000100000041E100000E00000005810000010000001186000002000000468100000100000005E100000100000060860000030000000A840000010000005D860000030000000784000001000000E880000001000000 + B000000027001386000001000000108600000100000029E1000006000000239200000100000024D500000100000020810000010000000F810000050000000C810000030000000D80000001000000EA8000000100000001DE000002000000178100000B000000568600000600000014810000010000002BE1000001000000808C000001000000008100000300000023D50000020000000E840000010000005E8600000B0000000E8100007F0000001F8100000100000003E100000400000003DE000002000000E9800000020000005D8400000100000041E100000E0000000584000001000000118600000200000005810000010000004681000001000000608600000300000005E10000010000005D860000030000000A84000001000000EB8000000100000002E1000001000000E8800000010000000784000001000000 - 5D00FFFFFFFF0D8400000F8400000884000054840000328100001C810000098400005384000020F1000010F0000000F0000020F0000030F0000060F000001C8F00001D8F00001F8F0000208F0000218F00002AE10000118F00003C8400003D840000408400004C8400003E8400004B8400004D8400003F8400003A8400003B8400005A8400005B840000818400007D840000828400008384000084840000488100001E8F0000E88000000C84000033840000788400001184000003DE000002DE000001DE00002B9200002A9200002692000000DE0000048400000684000032840000778400000784000002840000038400001084000005840000318400000A840000808C000044D500007C8400007E84000023D5000024D50000008800000188000002880000038800000488000005880000558400005684000059840000498100004A810000008200001C820000018200002F8200001682000018820000198200006786000039810000178200000E84000030840000 - 2A001B8F0000030000002CE10000370000000184000008000000188F0000060000000481000010000000158100001D0000004581000007000000239200000000000007E10000330000005F86000028000000208100001F0000000F8100001700000004E100003100000023E10000310000000C8100001400000001E100002E0000000D8000000F0000001A8F000009000000178100001F0000002BE1000036000000008400000A000000148100001C0000004481000004000000008100001100000025E10000330000001F8100001E0000000E8100001600000003E10000300000005D8400000000000022E100003000000000E100002D0000000B8100001300000041E100003D000000198F0000010000000581000011000000168100001E000000518400004E000000438100000500000005E100003200000002E100002F0000000D810000150000005C84000002000000 + 5900FFFFFFFF0D8400000F8400000884000054840000328100001C810000098400005384000020F1000010F0000000F0000020F0000030F0000060F000001C8F00001D8F00001F8F0000208F0000218F00002AE10000118F00003C8400003D840000408400004C8400003E8400004B8400004D8400003F8400003A8400003B8400005A8400005B840000818400007D840000828400008384000084840000488100001E8F0000E88000000C84000033840000788400001184000003DE000002DE000001DE00002B9200002A9200002692000000DE000032840000778400000784000002840000038400001084000005840000318400000A840000808C000044D500007C8400007E84000023D5000024D50000008800000188000002880000038800000488000005880000558400005684000059840000498100004A810000008200001C820000018200002F820000168200001882000019820000678600003981000017820000 + 2E0004840000440000001B8F000003000000158100001D0000000481000010000000188F00000600000001840000080000002CE100003700000007E10000330000002392000000000000458100000700000004E10000310000000F81000017000000208100001F0000005F860000280000000D8000000F00000001E100002E0000000C8100001400000023E10000310000000684000046000000178100001F0000001A8F000009000000148100001C000000008400000A0000002BE1000036000000308400004A0000000E840000480000000081000011000000448100000400000003E10000300000000E810000160000001F8100001E00000025E10000330000000B8100001700000000E100002D00000022E10000300000005D8400000000000041E100003D000000168100001E0000000581000011000000198F00000100000005E10000320000004381000005000000518400004E0000000D8100001900000002E100002F0000005C84000002000000 0 @@ -467,11 +467,11 @@ 1 - 000000000A000000000000000010000001000000FFFFFFFFFFFFFFFF06010000320000000A01000005030000010000000200001004000000010000000000000000000000FFFFFFFF020000000B8500000D850000FFFF02000B004354616262656450616E6500100000010000000000000049000000060100001C03000000000000320000000601000005030000000000004010005602000000FFFEFF0E53006F0075007200630065002000420072006F007700730065007200000000000B85000001000000FFFFFFFFFFFFFFFFFFFEFF0957006F0072006B0073007000610063006500010000000D85000001000000FFFFFFFFFFFFFFFF01000000000000000000000000000000000000000000000001000000FFFFFFFF0B85000001000000FFFFFFFF0B850000000000000080000000000000FFFFFFFFFFFFFFFF00000000820200008007000086020000000000000100000004000000010000000000000000000000058500000000000000000000000000000000000001000000058500000100000005850000000000000080000000000000FFFFFFFFFFFFFFFF00000000F001000080070000F401000000000000010000000400000001000000B5FDFFFF6F000000048500000000000000000000000000000000000001000000048500000100000004850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000038500000000000000000000000000000000000001000000038500000100000003850000000000000080000001000000FFFFFFFFFFFFFFFF000000000503000080070000090300000100000001000010040000000100000032FDFFFFA5000000FFFFFFFF080000000185000002850000068500000785000008850000098500000A8500000C8500000180008000000100000000000000200300008007000007040000000000000903000080070000F0030000000000004080005608000000FFFEFF0B42007200650061006B0070006F0069006E0074007300000000000185000001000000FFFFFFFFFFFFFFFFFFFEFF054200750069006C006400010000000285000001000000FFFFFFFFFFFFFFFFFFFEFF094400650062007500670020004C006F006700010000000685000001000000FFFFFFFFFFFFFFFFFFFEFF0C4400650063006C00610072006100740069006F006E007300000000000785000001000000FFFFFFFFFFFFFFFFFFFEFF0A5200650066006500720065006E00630065007300000000000885000001000000FFFFFFFFFFFFFFFFFFFEFF0D460069006E006400200069006E002000460069006C0065007300000000000985000001000000FFFFFFFFFFFFFFFFFFFEFF1541006D0062006900670075006F0075007300200044006500660069006E006900740069006F006E007300000000000A85000001000000FFFFFFFFFFFFFFFFFFFEFF0B54006F006F006C0020004F0075007400700075007400000000000C85000001000000FFFFFFFFFFFFFFFF02000000000000000000000000000000000000000000000001000000FFFFFFFF0185000001000000FFFFFFFF01850000000000000000000000000000 + 000000000A000000000000000010000001000000FFFFFFFFFFFFFFFF06010000320000000A01000005030000010000000200001004000000010000000000000000000000FFFFFFFF020000000B8500000D850000FFFF02000B004354616262656450616E6500100000010000000000000049000000060100001C03000000000000320000000601000005030000000000004010005602000000FFFEFF0E53006F0075007200630065002000420072006F007700730065007200000000000B85000001000000FFFFFFFFFFFFFFFFFFFEFF0957006F0072006B0073007000610063006500010000000D85000001000000FFFFFFFFFFFFFFFF01000000000000000000000000000000000000000000000001000000FFFFFFFF0B85000001000000FFFFFFFF0B850000000000000080000000000000FFFFFFFFFFFFFFFF00000000820200008007000086020000000000000100000004000000010000000000000000000000058500000000000000000000000000000000000001000000058500000100000005850000000000000080000000000000FFFFFFFFFFFFFFFF00000000F001000080070000F401000000000000010000000400000001000000B5FDFFFF6F000000048500000000000000000000000000000000000001000000048500000100000004850000000000000080000000000000FFFFFFFFFFFFFFFF00000000000000000400000004000000000000000100000004000000010000000000000000000000038500000000000000000000000000000000000001000000038500000100000003850000000000000080000001000000FFFFFFFFFFFFFFFF000000000503000080070000090300000100000001000010040000000100000032FDFFFFA5000000FFFFFFFF080000000185000002850000068500000785000008850000098500000A8500000C8500000180008000000100000000000000200300008007000007040000000000000903000080070000F0030000000000004080005608000000FFFEFF0B42007200650061006B0070006F0069006E0074007300000000000185000001000000FFFFFFFFFFFFFFFFFFFEFF054200750069006C006400010000000285000001000000FFFFFFFFFFFFFFFFFFFEFF094400650062007500670020004C006F006700010000000685000001000000FFFFFFFFFFFFFFFFFFFEFF0C4400650063006C00610072006100740069006F006E007300000000000785000001000000FFFFFFFFFFFFFFFFFFFEFF0A5200650066006500720065006E00630065007300000000000885000001000000FFFFFFFFFFFFFFFFFFFEFF0D460069006E006400200069006E002000460069006C0065007300000000000985000001000000FFFFFFFFFFFFFFFFFFFEFF1541006D0062006900670075006F0075007300200044006500660069006E006900740069006F006E007300000000000A85000001000000FFFFFFFFFFFFFFFFFFFEFF0B54006F006F006C0020004F0075007400700075007400000000000C85000001000000FFFFFFFFFFFFFFFF01000000000000000000000000000000000000000000000001000000FFFFFFFF0185000001000000FFFFFFFF01850000000000000000000000000000 Main - 00200000010000002000FFFF01001100434D4643546F6F6C426172427574746F6E00E10000000000002D000000FFFEFF000000000000000000000000000100000001000000018001E10000000000002E000000FFFEFF000000000000000000000000000100000001000000018003E100000000040030000000FFFEFF0000000000000000000000000001000000010000000180008100000000000011000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000018007E100000000040033000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000018023E100000000040035000000FFFEFF000000000000000000000000000100000001000000018022E100000000040034000000FFFEFF000000000000000000000000000100000001000000018025E100000000040037000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001802BE10000000004003A000000FFFEFF00000000000000000000000000010000000100000001802CE10000000004003B000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6E4281000000000400FFFFFFFFFFFEFF0000000000000000000100000000000000010000007800000002002050FFFFFFFFFFFEFF0096000000000000000300FFFEFF14490052006500780074005F00700072006F00630065007300730055006100720074004D0073006700FFFEFF0C50006100720073006500530075006D006D00610072007900FFFEFF0A5F0048004500410050005F00530049005A0045000000000000000000000000000180218100000000040024000000FFFEFF000000000000000000000000000100000001000000018024E100000000040036000000FFFEFF000000000000000000000000000100000001000000018028E100000000040038000000FFFEFF000000000000000000000000000100000001000000018029E100000000040039000000FFFEFF0000000000000000000000000001000000010000000180028100000000040013000000FFFEFF0000000000000000000000000001000000010000000180298100000000040028000000FFFEFF0000000000000000000000000001000000010000000180278100000000040026000000FFFEFF0000000000000000000000000001000000010000000180288100000000040027000000FFFEFF00000000000000000000000000010000000100000001801D8100000000040020000000FFFEFF00000000000000000000000000010000000100000001801E8100000000040021000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001800B8100000000040017000000FFFEFF00000000000000000000000000010000000100000001800C8100000000000018000000FFFEFF00000000000000000000000000010000000100000001805F860000000000002C000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001800E810000000000001A000000FFFEFF00000000000000000000000000010000000100000001800F810000000000001B000000FFFEFF00000000000000000000000000010000000100000000000000FFFEFF044D00610069006E00E8020000 + 00200000010000002000FFFF01001100434D4643546F6F6C426172427574746F6E00E10000000000002D000000FFFEFF000000000000000000000000000100000001000000018001E10000000000002E000000FFFEFF000000000000000000000000000100000001000000018003E100000000040030000000FFFEFF0000000000000000000000000001000000010000000180008100000000000011000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000018007E100000000040033000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000018023E100000000040035000000FFFEFF000000000000000000000000000100000001000000018022E100000000040034000000FFFEFF000000000000000000000000000100000001000000018025E100000000040037000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001802BE10000000004003A000000FFFEFF00000000000000000000000000010000000100000001802CE10000000004003B000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6E4281000000000400FFFFFFFFFFFEFF0001000000000000000100000000000000010000007800000002002050FFFFFFFFFFFEFF0096000000000000000300FFFEFF14490052006500780074005F00700072006F00630065007300730055006100720074004D0073006700FFFEFF0C50006100720073006500530075006D006D00610072007900FFFEFF0A5F0048004500410050005F00530049005A0045000000000000000000000000000180218100000000040024000000FFFEFF000000000000000000000000000100000001000000018024E100000000040036000000FFFEFF000000000000000000000000000100000001000000018028E100000000040038000000FFFEFF000000000000000000000000000100000001000000018029E100000000040039000000FFFEFF0000000000000000000000000001000000010000000180028100000000040013000000FFFEFF0000000000000000000000000001000000010000000180298100000000040028000000FFFEFF0000000000000000000000000001000000010000000180278100000000040026000000FFFEFF0000000000000000000000000001000000010000000180288100000000040027000000FFFEFF00000000000000000000000000010000000100000001801D8100000000040020000000FFFEFF00000000000000000000000000010000000100000001801E8100000000040021000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001800B8100000000000017000000FFFEFF00000000000000000000000000010000000100000001800C8100000000000018000000FFFEFF00000000000000000000000000010000000100000001805F860000000000002C000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001800E810000000000001A000000FFFEFF00000000000000000000000000010000000100000001800F810000000000001B000000FFFEFF00000000000000000000000000010000000100000000000000FFFEFF044D00610069006E00E8020000 34048 diff --git a/things-example/.gitignore b/things-example/.gitignore deleted file mode 100644 index 727916d..0000000 --- a/things-example/.gitignore +++ /dev/null @@ -1,63 +0,0 @@ -# Built application files -*.apk -*.ap_ - -# Files for the ART/Dalvik VM -*.dex - -# Java class files -*.class - -# Generated files -bin/ -gen/ -out/ - -# Gradle files -.gradle/ -build/ - -# Local configuration file (sdk path, etc) -local.properties - -# Proguard folder generated by Eclipse -proguard/ - -# Log Files -*.log - -# Android Studio Navigation editor temp files -.navigation/ - -# Android Studio captures folder -captures/ - -# IntelliJ -*.iml -.idea/workspace.xml -.idea/tasks.xml -.idea/gradle.xml -.idea/dictionaries -.idea/libraries - -# Keystore files -# Uncomment the following line if you do not want to check your keystore files in. -#*.jks - -# External native build folder generated in Android Studio 2.2 and later -.externalNativeBuild - -# Google Services (e.g. APIs or Firebase) -google-services.json - -# Freeline -freeline.py -freeline/ -freeline_project_description.json - -# fastlane -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots -fastlane/test_output -fastlane/readme.md \ No newline at end of file diff --git a/things-example/.idea/misc.xml b/things-example/.idea/misc.xml deleted file mode 100644 index ba7052b..0000000 --- a/things-example/.idea/misc.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/things-example/.idea/modules.xml b/things-example/.idea/modules.xml deleted file mode 100644 index e9e0c55..0000000 --- a/things-example/.idea/modules.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/things-example/.idea/runConfigurations.xml b/things-example/.idea/runConfigurations.xml deleted file mode 100644 index 7f68460..0000000 --- a/things-example/.idea/runConfigurations.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/things-example/.idea/vcs.xml b/things-example/.idea/vcs.xml deleted file mode 100644 index 6c0b863..0000000 --- a/things-example/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/things-example/app/.gitignore b/things-example/app/.gitignore deleted file mode 100644 index 796b96d..0000000 --- a/things-example/app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/things-example/app/build.gradle b/things-example/app/build.gradle deleted file mode 100644 index da8f59a..0000000 --- a/things-example/app/build.gradle +++ /dev/null @@ -1,28 +0,0 @@ -apply plugin: 'com.android.application' - -android { - compileSdkVersion 26 - defaultConfig { - applicationId "net.irext.irext_things" - minSdkVersion 27 - targetSdkVersion 26 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support.constraint:constraint-layout:1.0.2' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.1' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' - compileOnly 'com.google.android.things:androidthings:+' -} diff --git a/things-example/app/proguard-rules.pro b/things-example/app/proguard-rules.pro deleted file mode 100644 index f1b4245..0000000 --- a/things-example/app/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile diff --git a/things-example/app/src/androidTest/java/net/irext/irext_things/ExampleInstrumentedTest.java b/things-example/app/src/androidTest/java/net/irext/irext_things/ExampleInstrumentedTest.java deleted file mode 100644 index 3c90705..0000000 --- a/things-example/app/src/androidTest/java/net/irext/irext_things/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package net.irext.irext_things; - -import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.*; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - @Test - public void useAppContext() throws Exception { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getTargetContext(); - - assertEquals("net.irext.irext_things", appContext.getPackageName()); - } -} diff --git a/things-example/app/src/main/AndroidManifest.xml b/things-example/app/src/main/AndroidManifest.xml deleted file mode 100644 index bc0cb68..0000000 --- a/things-example/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/things-example/app/src/main/java/net/irext/irext_things/MainActivity.java b/things-example/app/src/main/java/net/irext/irext_things/MainActivity.java deleted file mode 100644 index 8c1f0b1..0000000 --- a/things-example/app/src/main/java/net/irext/irext_things/MainActivity.java +++ /dev/null @@ -1,32 +0,0 @@ -package net.irext.irext_things; - -import android.app.Activity; -import android.os.Bundle; - -/** - * Skeleton of an Android Things activity. - *

- * Android Things peripheral APIs are accessible through the class - * PeripheralManagerService. For example, the snippet below will open a GPIO pin and - * set it to HIGH: - *

- *

{@code
- * PeripheralManagerService service = new PeripheralManagerService();
- * mLedGpio = service.openGpio("BCM6");
- * mLedGpio.setDirection(Gpio.DIRECTION_OUT_INITIALLY_LOW);
- * mLedGpio.setValue(true);
- * }
- *

- * For more complex peripherals, look for an existing user-space driver, or implement one if none - * is available. - * - * @see https://github.com/androidthings/contrib-drivers#readme - */ -public class MainActivity extends Activity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - } -} diff --git a/things-example/app/src/main/res/layout/activity_main.xml b/things-example/app/src/main/res/layout/activity_main.xml deleted file mode 100644 index d9d1ebc..0000000 --- a/things-example/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/things-example/app/src/main/res/values/colors.xml b/things-example/app/src/main/res/values/colors.xml deleted file mode 100644 index 3ab3e9c..0000000 --- a/things-example/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - #3F51B5 - #303F9F - #FF4081 - diff --git a/things-example/app/src/main/res/values/strings.xml b/things-example/app/src/main/res/values/strings.xml deleted file mode 100644 index 7f47bdc..0000000 --- a/things-example/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - IREXT-Things - diff --git a/things-example/app/src/main/res/values/styles.xml b/things-example/app/src/main/res/values/styles.xml deleted file mode 100644 index b6b9204..0000000 --- a/things-example/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - -