/*
 * Copyright 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.
 */

package com.example.androidthings.imageclassifier;

import android.os.Build;

@SuppressWarnings("WeakerAccess")
public class BoardDefaults {
    private static final String DEVICE_RPI3 = "rpi3";
    private static final String DEVICE_IMX6UL_PICO = "imx6ul_pico";
    private static final String DEVICE_IMX7D_PICO = "imx7d_pico";

    /**
     * Return the GPIO pin that the LED is connected on.
     */
    public static String getGPIOForLED() {
        switch (Build.DEVICE) {
            case DEVICE_RPI3:
                return "BCM6";
            case DEVICE_IMX6UL_PICO:
                return "GPIO4_IO20";
            case DEVICE_IMX7D_PICO:
                return "GPIO2_IO02";
            default:
                throw new IllegalStateException("Unknown Build.DEVICE " + Build.DEVICE);
        }
    }

    /**
     * Return the GPIO pin that the Button is connected on.
     */
    public static String getGPIOForButton() {
        switch (Build.DEVICE) {
            case DEVICE_RPI3:
                return "BCM21";
            case DEVICE_IMX6UL_PICO:
                return "GPIO4_IO20";
            case DEVICE_IMX7D_PICO:
                return "GPIO6_IO14";
            default:
                throw new IllegalStateException("Unknown Build.DEVICE " + Build.DEVICE);
        }
    }
}

@@ -849,34 +849,24 @@
 ICE_
-IMX6UL_PICO = %22imx6ul_pico
+RPI3BP = %22rpi3bp
 %22;%0A 
@@ -1113,39 +1113,8 @@
 I3:%0A
-                return %22BCM6%22;%0A
     
@@ -1129,35 +1129,30 @@
 case DEVICE_
-IMX6UL_PICO
+RPI3BP
 :%0A          
@@ -1161,34 +1161,28 @@
     return %22
-GPIO4_IO20
+BCM6
 %22;%0A         
@@ -1560,40 +1560,8 @@
 I3:%0A
-                return %22BCM21%22;%0A
     
@@ -1584,19 +1584,14 @@
 ICE_
-IMX6UL_PICO
+RPI3BP
 :%0A  
@@ -1616,18 +1616,13 @@
 rn %22
-GPIO4_IO20
+BCM21
 %22;%0A 

Add RPI3B+ support and remove IMX6UL