/*
 * 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.assistant;

import android.media.AudioDeviceInfo;
import android.os.Build;

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

    /**
     * Return the GPIO pin that the LED is connected on.
     * For example, on Intel Edison Arduino breakout, pin "IO13" is connected to an onboard LED
     * that turns on when the GPIO pin is HIGH, and off when low.
     */
    public static String getGPIOForLED() {
        switch (Build.DEVICE) {
            case DEVICE_RPI3:
                return "BCM25";
            case DEVICE_IMX6UL_PICO:
                return "GPIO4_IO22";
            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 "BCM23";
            case DEVICE_IMX6UL_PICO:
                return "GPIO2_IO03";
            case DEVICE_IMX7D_PICO:
                return "GPIO6_IO14";
            default:
                throw new IllegalStateException("Unknown Build.DEVICE " + Build.DEVICE);
        }
    }

    /**
     * Return the GPIO pin for the Voice Hat DAC trigger.
     */
    public static String getGPIOForDacTrigger() {
        switch (Build.DEVICE) {
            case DEVICE_RPI3:
                return "BCM16";
            default:
                throw new IllegalStateException("Unknown Build.DEVICE " + Build.DEVICE);
        }
    }
}

@@ -879,34 +879,24 @@
 ICE_
-IMX6UL_PICO = %22imx6ul_pico
+RPI3BP = %22rpi3bp
 %22;%0A 
@@ -1304,40 +1304,8 @@
 I3:%0A
-                return %22BCM25%22;%0A
     
@@ -1320,35 +1320,30 @@
 case DEVICE_
-IMX6UL_PICO
+RPI3BP
 :%0A          
@@ -1360,18 +1360,13 @@
 rn %22
-GPIO4_IO22
+BCM25
 %22;%0A 
@@ -1752,40 +1752,8 @@
 I3:%0A
-                return %22BCM23%22;%0A
     
@@ -1776,19 +1776,14 @@
 ICE_
-IMX6UL_PICO
+RPI3BP
 :%0A  
@@ -1804,25 +1804,20 @@
 return %22
-GPIO2_IO0
+BCM2
 3%22;%0A    
@@ -2190,32 +2190,64 @@
 se DEVICE_RPI3:%0A
+            case DEVICE_RPI3BP:%0A
                 

Add RPI3B+ support and remove IMX6UL