 public enum SupportedBoard {
     case RaspberryPiRev1   // Pi A,B Revision 1
     case RaspberryPiRev2   // Pi A,B Revision 2 
-    case RaspberryPiPlus2Zero // Pi A+,B+,2,Zero with 40 pin header
+    case RaspberryPiPlusZero // Pi A+,B+,Zero with 40 pin header
+    case RaspberryPi2 // Pi 2 with 40 pin header
     case CHIP
     case BeagleBoneBlack
 }

                return GPIORPIRev1
            case .RaspberryPiRev2:
                return GPIORPIRev2
            case .RaspberryPiPlus2Zero:
                return GPIORPIPlus2ZERO
            case .CHIP:
                return GPIOCHIP
            case .BeagleBoneBlack:

    // RaspberryPi A and B Revision 1 (Before September 2012) - 26 pin header boards
    // 0, 1, 4, 7, 8, 9, 10, 11, 14, 15, 17, 18, 21, 22, 23, 24, 25
    static let GPIORPIRev1:[GPIOName:GPIO] = [
        .P0:RaspiGPIO(name:"GPIO0",id:0,baseAddr:0x20000000),
        .P1:RaspiGPIO(name:"GPIO1",id:1,baseAddr:0x20000000),
        .P4:RaspiGPIO(name:"GPIO4",id:4,baseAddr:0x20000000),
        .P7:RaspiGPIO(name:"GPIO7",id:7,baseAddr:0x20000000),
        .P8:RaspiGPIO(name:"GPIO8",id:8,baseAddr:0x20000000),
        .P9:RaspiGPIO(name:"GPIO9",id:9,baseAddr:0x20000000),
        .P10:RaspiGPIO(name:"GPIO10",id:10,baseAddr:0x20000000),
        .P11:RaspiGPIO(name:"GPIO11",id:11,baseAddr:0x20000000),
        .P14:RaspiGPIO(name:"GPIO14",id:14,baseAddr:0x20000000),
        .P15:RaspiGPIO(name:"GPIO15",id:15,baseAddr:0x20000000),
        .P17:RaspiGPIO(name:"GPIO17",id:17,baseAddr:0x20000000),
        .P18:RaspiGPIO(name:"GPIO18",id:18,baseAddr:0x20000000),
        .P21:RaspiGPIO(name:"GPIO21",id:21,baseAddr:0x20000000),
        .P22:RaspiGPIO(name:"GPIO22",id:22,baseAddr:0x20000000),
        .P23:RaspiGPIO(name:"GPIO23",id:23,baseAddr:0x20000000),
        .P24:RaspiGPIO(name:"GPIO24",id:24,baseAddr:0x20000000),
        .P25:RaspiGPIO(name:"GPIO25",id:25,baseAddr:0x20000000)
    ]

    // RaspberryPi A and B Revision 2 (After September 2012) - 26 pin header boards
    //TODO: Additional GPIO from 28-31 ignored for now
    // 2, 3, 4, 7, 8, 9, 10, 11, 14, 15, 17, 18, 22, 23, 24, 25, 27
    static let GPIORPIRev2:[GPIOName:GPIO] = [
        .P2:RaspiGPIO(name:"GPIO2",id:2,baseAddr:0x20000000),
        .P3:RaspiGPIO(name:"GPIO3",id:3,baseAddr:0x20000000),
        .P4:RaspiGPIO(name:"GPIO4",id:4,baseAddr:0x20000000),
        .P7:RaspiGPIO(name:"GPIO7",id:7,baseAddr:0x20000000),
        .P8:RaspiGPIO(name:"GPIO8",id:8,baseAddr:0x20000000),
        .P9:RaspiGPIO(name:"GPIO9",id:9,baseAddr:0x20000000),
        .P10:RaspiGPIO(name:"GPIO10",id:10,baseAddr:0x20000000),
        .P11:RaspiGPIO(name:"GPIO11",id:11,baseAddr:0x20000000),
        .P14:RaspiGPIO(name:"GPIO14",id:14,baseAddr:0x20000000),
        .P15:RaspiGPIO(name:"GPIO15",id:15,baseAddr:0x20000000),
        .P17:RaspiGPIO(name:"GPIO17",id:17,baseAddr:0x20000000),
        .P18:RaspiGPIO(name:"GPIO18",id:18,baseAddr:0x20000000),
        .P22:RaspiGPIO(name:"GPIO22",id:22,baseAddr:0x20000000),
        .P23:RaspiGPIO(name:"GPIO23",id:23,baseAddr:0x20000000),
        .P24:RaspiGPIO(name:"GPIO24",id:24,baseAddr:0x20000000),
        .P25:RaspiGPIO(name:"GPIO25",id:25,baseAddr:0x20000000),
        .P27:RaspiGPIO(name:"GPIO27",id:27,baseAddr:0x20000000)
    ]

    // RaspberryPi A+ and B+, Raspberry Zero - 40 pin header boards
    // 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
    static let GPIORPIPlusZERO:[GPIOName:GPIO] = [
        .P2:RaspiGPIO(name:"GPIO2",id:2,baseAddr:0x20000000),
        .P3:RaspiGPIO(name:"GPIO3",id:3,baseAddr:0x20000000),
        .P4:RaspiGPIO(name:"GPIO4",id:4,baseAddr:0x20000000),
        .P5:RaspiGPIO(name:"GPIO5",id:5,baseAddr:0x20000000),
        .P6:RaspiGPIO(name:"GPIO6",id:6,baseAddr:0x20000000),
        .P7:RaspiGPIO(name:"GPIO7",id:7,baseAddr:0x20000000),
        .P8:RaspiGPIO(name:"GPIO8",id:8,baseAddr:0x20000000),
        .P9:RaspiGPIO(name:"GPIO9",id:9,baseAddr:0x20000000),
        .P10:RaspiGPIO(name:"GPIO10",id:10,baseAddr:0x20000000),
        .P11:RaspiGPIO(name:"GPIO11",id:11,baseAddr:0x20000000),
        .P12:RaspiGPIO(name:"GPIO12",id:12,baseAddr:0x20000000),
        .P13:RaspiGPIO(name:"GPIO13",id:13,baseAddr:0x20000000),
        .P14:RaspiGPIO(name:"GPIO14",id:14,baseAddr:0x20000000),
        .P15:RaspiGPIO(name:"GPIO15",id:15,baseAddr:0x20000000),
        .P16:RaspiGPIO(name:"GPIO16",id:16,baseAddr:0x20000000),
        .P17:RaspiGPIO(name:"GPIO17",id:17,baseAddr:0x20000000),
        .P18:RaspiGPIO(name:"GPIO18",id:18,baseAddr:0x20000000),
        .P19:RaspiGPIO(name:"GPIO19",id:19,baseAddr:0x20000000),
        .P20:RaspiGPIO(name:"GPIO20",id:20,baseAddr:0x20000000),
        .P21:RaspiGPIO(name:"GPIO21",id:21,baseAddr:0x20000000),
        .P22:RaspiGPIO(name:"GPIO22",id:22,baseAddr:0x20000000),
        .P23:RaspiGPIO(name:"GPIO23",id:23,baseAddr:0x20000000),
        .P24:RaspiGPIO(name:"GPIO24",id:24,baseAddr:0x20000000),
        .P25:RaspiGPIO(name:"GPIO25",id:25,baseAddr:0x20000000),
        .P26:RaspiGPIO(name:"GPIO26",id:26,baseAddr:0x20000000),
        .P27:RaspiGPIO(name:"GPIO27",id:27,baseAddr:0x20000000)
    ]
 
    // RaspberryPi 2
    // 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
    static let GPIORPI2:[GPIOName:GPIO] = [
        .P2:RaspiGPIO(name:"GPIO2",id:2,baseAddr:0x3F000000),
        .P3:RaspiGPIO(name:"GPIO3",id:3,baseAddr:0x3F000000),
        .P4:RaspiGPIO(name:"GPIO4",id:4,baseAddr:0x3F000000),
        .P5:RaspiGPIO(name:"GPIO5",id:5,baseAddr:0x3F000000),
        .P6:RaspiGPIO(name:"GPIO6",id:6,baseAddr:0x3F000000),
        .P7:RaspiGPIO(name:"GPIO7",id:7,baseAddr:0x3F000000),
        .P8:RaspiGPIO(name:"GPIO8",id:8,baseAddr:0x3F000000),
        .P9:RaspiGPIO(name:"GPIO9",id:9,baseAddr:0x3F000000),
        .P10:RaspiGPIO(name:"GPIO10",id:10,baseAddr:0x3F000000),
        .P11:RaspiGPIO(name:"GPIO11",id:11,baseAddr:0x3F000000),
        .P12:RaspiGPIO(name:"GPIO12",id:12,baseAddr:0x3F000000),
        .P13:RaspiGPIO(name:"GPIO13",id:13,baseAddr:0x3F000000),
        .P14:RaspiGPIO(name:"GPIO14",id:14,baseAddr:0x3F000000),
        .P15:RaspiGPIO(name:"GPIO15",id:15,baseAddr:0x3F000000),
        .P16:RaspiGPIO(name:"GPIO16",id:16,baseAddr:0x3F000000),
        .P17:RaspiGPIO(name:"GPIO17",id:17,baseAddr:0x3F000000),
        .P18:RaspiGPIO(name:"GPIO18",id:18,baseAddr:0x3F000000),
        .P19:RaspiGPIO(name:"GPIO19",id:19,baseAddr:0x3F000000),
        .P20:RaspiGPIO(name:"GPIO20",id:20,baseAddr:0x3F000000),
        .P21:RaspiGPIO(name:"GPIO21",id:21,baseAddr:0x3F000000),
        .P22:RaspiGPIO(name:"GPIO22",id:22,baseAddr:0x3F000000),
        .P23:RaspiGPIO(name:"GPIO23",id:23,baseAddr:0x3F000000),
        .P24:RaspiGPIO(name:"GPIO24",id:24,baseAddr:0x3F000000),
        .P25:RaspiGPIO(name:"GPIO25",id:25,baseAddr:0x3F000000),
        .P26:RaspiGPIO(name:"GPIO26",id:26,baseAddr:0x3F000000),
        .P27:RaspiGPIO(name:"GPIO27",id:27,baseAddr:0x3F000000)
    ]
 
    // Raspberries w/raspbian
    static let SPIRPI:[Int:SPIOutput] = [
        0:HardwareSPI(spiId:"0.0",isOutput:true),
