From b91202b6f27e987d7aae8c84a0ecb97076612e4f Mon Sep 17 00:00:00 2001 From: Renato Mangini Dias Date: Tue, 14 Aug 2018 14:27:44 -0700 Subject: [PATCH] Add RPI3B+ support and remove IMX6UL Update samples to add RPI3B+ and remove IMX6UL support. Bug: 112590677 Bug: 112603667 Change-Id: I3b94e4bd5728e1e5d62e0c55ca3ba10caa8b56e2 --- blink/src/main/cpp/blink.cpp | 5 ++--- button/src/main/cpp/button.cpp | 5 ++--- speaker/src/main/cpp/speaker.cpp | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/blink/src/main/cpp/blink.cpp b/blink/src/main/cpp/blink.cpp index e0fa7e9..d0360c4 100644 --- a/blink/src/main/cpp/blink.cpp +++ b/blink/src/main/cpp/blink.cpp @@ -37,10 +37,9 @@ const int BLINK_INTERVAL_MS = 1000; void android_main(android_app* app) { AndroidSystemProperties systemProperties(app->activity); const char* LED_GPIO; - if (systemProperties.getBuildDevice() == "rpi3") { + if (systemProperties.getBuildDevice() == "rpi3" || + systemProperties.getBuildDevice() == "rpi3bp") { LED_GPIO = "BCM6"; - } else if (systemProperties.getBuildDevice() == "imx6ul_pico") { - LED_GPIO = "GPIO4_IO22"; } else if (systemProperties.getBuildDevice() == "imx7d_pico") { LED_GPIO = "GPIO2_IO02"; } else { diff --git a/button/src/main/cpp/button.cpp b/button/src/main/cpp/button.cpp index 242d607..65ea42b 100644 --- a/button/src/main/cpp/button.cpp +++ b/button/src/main/cpp/button.cpp @@ -37,10 +37,9 @@ const char* TAG = "button"; void android_main(android_app* app) { AndroidSystemProperties systemProperties(app->activity); const char* BUTTON_GPIO; - if (systemProperties.getBuildDevice() == "rpi3") { + if (systemProperties.getBuildDevice() == "rpi3" || + systemProperties.getBuildDevice() == "rpi3bp") { BUTTON_GPIO = "BCM21"; - } else if (systemProperties.getBuildDevice() == "imx6ul_pico") { - BUTTON_GPIO = "GPIO2_IO03"; } else if (systemProperties.getBuildDevice() == "imx7d_pico") { BUTTON_GPIO = "GPIO6_IO14"; } else { diff --git a/speaker/src/main/cpp/speaker.cpp b/speaker/src/main/cpp/speaker.cpp index 001ac94..c6ff391 100644 --- a/speaker/src/main/cpp/speaker.cpp +++ b/speaker/src/main/cpp/speaker.cpp @@ -45,10 +45,9 @@ int64_t millis() { void android_main(android_app* app) { AndroidSystemProperties systemProperties(app->activity); const char* SPEAKER_PWM; - if (systemProperties.getBuildDevice() == "rpi3") { + if (systemProperties.getBuildDevice() == "rpi3" || + systemProperties.getBuildDevice() == "rpi3bp") { SPEAKER_PWM = "PWM1"; - } else if (systemProperties.getBuildDevice() == "imx6ul_pico") { - SPEAKER_PWM = "PWM8"; } else if (systemProperties.getBuildDevice() == "imx7d_pico") { SPEAKER_PWM = "PWM2"; } else {