<commit_before>/*
 SwiftyGPIO

 Copyright (c) 2016 <NAME>
 Licensed under the MIT license, as follows:

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in all
 copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.)
 */

// MARK: - GPIOs Presets
extension SwiftyGPIO {
    // 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: RaspberryGPIO(name:"GPIO0", id:0, baseAddr:0x20000000),
        .P1: RaspberryGPIO(name:"GPIO1", id:1, baseAddr:0x20000000),
        .P4: RaspberryGPIO(name:"GPIO4", id:4, baseAddr:0x20000000),
        .P7: RaspberryGPIO(name:"GPIO7", id:7, baseAddr:0x20000000),
        .P8: RaspberryGPIO(name:"GPIO8", id:8, baseAddr:0x20000000),
        .P9: RaspberryGPIO(name:"GPIO9", id:9, baseAddr:0x20000000),
        .P10: RaspberryGPIO(name:"GPIO10", id:10, baseAddr:0x20000000),
        .P11: RaspberryGPIO(name:"GPIO11", id:11, baseAddr:0x20000000),
        .P14: RaspberryGPIO(name:"GPIO14", id:14, baseAddr:0x20000000),
        .P15: RaspberryGPIO(name:"GPIO15", id:15, baseAddr:0x20000000),
        .P17: RaspberryGPIO(name:"GPIO17", id:17, baseAddr:0x20000000),
        .P18: RaspberryGPIO(name:"GPIO18", id:18, baseAddr:0x20000000),
        .P21: RaspberryGPIO(name:"GPIO21", id:21, baseAddr:0x20000000),
        .P22: RaspberryGPIO(name:"GPIO22", id:22, baseAddr:0x20000000),
        .P23: RaspberryGPIO(name:"GPIO23", id:23, baseAddr:0x20000000),
        .P24: RaspberryGPIO(name:"GPIO24", id:24, baseAddr:0x20000000),
        .P25: RaspberryGPIO(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: RaspberryGPIO(name:"GPIO2", id:2, baseAddr:0x20000000),
        .P3: RaspberryGPIO(name:"GPIO3", id:3, baseAddr:0x20000000),
        .P4: RaspberryGPIO(name:"GPIO4", id:4, baseAddr:0x20000000),
        .P7: RaspberryGPIO(name:"GPIO7", id:7, baseAddr:0x20000000),
        .P8: RaspberryGPIO(name:"GPIO8", id:8, baseAddr:0x20000000),
        .P9: RaspberryGPIO(name:"GPIO9", id:9, baseAddr:0x20000000),
        .P10: RaspberryGPIO(name:"GPIO10", id:10, baseAddr:0x20000000),
        .P11: RaspberryGPIO(name:"GPIO11", id:11, baseAddr:0x20000000),
        .P14: RaspberryGPIO(name:"GPIO14", id:14, baseAddr:0x20000000),
        .P15: RaspberryGPIO(name:"GPIO15", id:15, baseAddr:0x20000000),
        .P17: RaspberryGPIO(name:"GPIO17", id:17, baseAddr:0x20000000),
        .P18: RaspberryGPIO(name:"GPIO18", id:18, baseAddr:0x20000000),
        .P22: RaspberryGPIO(name:"GPIO22", id:22, baseAddr:0x20000000),
        .P23: RaspberryGPIO(name:"GPIO23", id:23, baseAddr:0x20000000),
        .P24: RaspberryGPIO(name:"GPIO24", id:24, baseAddr:0x20000000),
        .P25: RaspberryGPIO(name:"GPIO25", id:25, baseAddr:0x20000000),
        .P27: RaspberryGPIO(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: RaspberryGPIO(name:"GPIO2", id:2, baseAddr:0x20000000),
        .P3: RaspberryGPIO(name:"GPIO3", id:3, baseAddr:0x20000000),
        .P4: RaspberryGPIO(name:"GPIO4", id:4, baseAddr:0x20000000),
        .P5: RaspberryGPIO(name:"GPIO5", id:5, baseAddr:0x20000000),
        .P6: RaspberryGPIO(name:"GPIO6", id:6, baseAddr:0x20000000),
        .P7: RaspberryGPIO(name:"GPIO7", id:7, baseAddr:0x20000000),
        .P8: RaspberryGPIO(name:"GPIO8", id:8, baseAddr:0x20000000),
        .P9: RaspberryGPIO(name:"GPIO9", id:9, baseAddr:0x20000000),
        .P10: RaspberryGPIO(name:"GPIO10", id:10, baseAddr:0x20000000),
        .P11: RaspberryGPIO(name:"GPIO11", id:11, baseAddr:0x20000000),
        .P12: RaspberryGPIO(name:"GPIO12", id:12, baseAddr:0x20000000),
        .P13: RaspberryGPIO(name:"GPIO13", id:13, baseAddr:0x20000000),
        .P14: RaspberryGPIO(name:"GPIO14", id:14, baseAddr:0x20000000),
        .P15: RaspberryGPIO(name:"GPIO15", id:15, baseAddr:0x20000000),
        .P16: RaspberryGPIO(name:"GPIO16", id:16, baseAddr:0x20000000),
        .P17: RaspberryGPIO(name:"GPIO17", id:17, baseAddr:0x20000000),
        .P18: RaspberryGPIO(name:"GPIO18", id:18, baseAddr:0x20000000),
        .P19: RaspberryGPIO(name:"GPIO19", id:19, baseAddr:0x20000000),
        .P20: RaspberryGPIO(name:"GPIO20", id:20, baseAddr:0x20000000),
        .P21: RaspberryGPIO(name:"GPIO21", id:21, baseAddr:0x20000000),
        .P22: RaspberryGPIO(name:"GPIO22", id:22, baseAddr:0x20000000),
        .P23: RaspberryGPIO(name:"GPIO23", id:23, baseAddr:0x20000000),
        .P24: RaspberryGPIO(name:"GPIO24", id:24, baseAddr:0x20000000),
        .P25: RaspberryGPIO(name:"GPIO25", id:25, baseAddr:0x20000000),
        .P26: RaspberryGPIO(name:"GPIO26", id:26, baseAddr:0x20000000),
        .P27: RaspberryGPIO(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: RaspberryGPIO(name:"GPIO2", id:2, baseAddr:0x3F000000),
        .P3: RaspberryGPIO(name:"GPIO3", id:3, baseAddr:0x3F000000),
        .P4: RaspberryGPIO(name:"GPIO4", id:4, baseAddr:0x3F000000),
        .P5: RaspberryGPIO(name:"GPIO5", id:5, baseAddr:0x3F000000),
        .P6: RaspberryGPIO(name:"GPIO6", id:6, baseAddr:0x3F000000),
        .P7: RaspberryGPIO(name:"GPIO7", id:7, baseAddr:0x3F000000),
        .P8: RaspberryGPIO(name:"GPIO8", id:8, baseAddr:0x3F000000),
        .P9: RaspberryGPIO(name:"GPIO9", id:9, baseAddr:0x3F000000),
        .P10: RaspberryGPIO(name:"GPIO10", id:10, baseAddr:0x3F000000),
        .P11: RaspberryGPIO(name:"GPIO11", id:11, baseAddr:0x3F000000),
        .P12: RaspberryGPIO(name:"GPIO12", id:12, baseAddr:0x3F000000),
        .P13: RaspberryGPIO(name:"GPIO13", id:13, baseAddr:0x3F000000),
        .P14: RaspberryGPIO(name:"GPIO14", id:14, baseAddr:0x3F000000),
        .P15: RaspberryGPIO(name:"GPIO15", id:15, baseAddr:0x3F000000),
        .P16: RaspberryGPIO(name:"GPIO16", id:16, baseAddr:0x3F000000),
        .P17: RaspberryGPIO(name:"GPIO17", id:17, baseAddr:0x3F000000),
        .P18: RaspberryGPIO(name:"GPIO18", id:18, baseAddr:0x3F000000),
        .P19: RaspberryGPIO(name:"GPIO19", id:19, baseAddr:0x3F000000),
        .P20: RaspberryGPIO(name:"GPIO20", id:20, baseAddr:0x3F000000),
        .P21: RaspberryGPIO(name:"GPIO21", id:21, baseAddr:0x3F000000),
        .P22: RaspberryGPIO(name:"GPIO22", id:22, baseAddr:0x3F000000),
        .P23: RaspberryGPIO(name:"GPIO23", id:23, baseAddr:0x3F000000),
        .P24: RaspberryGPIO(name:"GPIO24", id:24, baseAddr:0x3F000000),
        .P25: RaspberryGPIO(name:"GPIO25", id:25, baseAddr:0x3F000000),
        .P26: RaspberryGPIO(name:"GPIO26", id:26, baseAddr:0x3F000000),
        .P27: RaspberryGPIO(name:"GPIO27", id:27, baseAddr:0x3F000000)
    ]
 
     // RaspberryPi 4
    // 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 GPIORPI4: [GPIOName:GPIO] = [
        .P2: RaspberryGPIO(name:"GPIO2", id:2, baseAddr:0x7E000000),
        .P3: RaspberryGPIO(name:"GPIO3", id:3, baseAddr:0x7E000000),
        .P4: RaspberryGPIO(name:"GPIO4", id:4, baseAddr:0x7E000000),
        .P5: RaspberryGPIO(name:"GPIO5", id:5, baseAddr:0x7E000000),
        .P6: RaspberryGPIO(name:"GPIO6", id:6, baseAddr:0x7E000000),
        .P7: RaspberryGPIO(name:"GPIO7", id:7, baseAddr:0x7E000000),
        .P8: RaspberryGPIO(name:"GPIO8", id:8, baseAddr:0x7E000000),
        .P9: RaspberryGPIO(name:"GPIO9", id:9, baseAddr:0x7E000000),
        .P12: RaspberryGPIO(name:"GPIO12", id:12, baseAddr:0x7E000000),
        .P13: RaspberryGPIO(name:"GPIO13", id:13, baseAddr:0x7E000000),
        .P14: RaspberryGPIO(name:"GPIO14", id:14, baseAddr:0x7E000000),
        .P15: RaspberryGPIO(name:"GPIO15", id:15, baseAddr:0x7E000000),
        .P16: RaspberryGPIO(name:"GPIO16", id:16, baseAddr:0x7E000000),
        .P17: RaspberryGPIO(name:"GPIO17", id:17, baseAddr:0x7E000000),
        .P18: RaspberryGPIO(name:"GPIO18", id:18, baseAddr:0x7E000000),
        .P20: RaspberryGPIO(name:"GPIO20", id:20, baseAddr:0x7E000000),
        .P21: RaspberryGPIO(name:"GPIO21", id:21, baseAddr:0x7E000000),
        .P22: RaspberryGPIO(name:"GPIO22", id:22, baseAddr:0x7E000000),
        .P23: RaspberryGPIO(name:"GPIO23", id:23, baseAddr:0x7E000000),
        .P24: RaspberryGPIO(name:"GPIO24", id:24, baseAddr:0x7E000000),
        .P25: RaspberryGPIO(name:"GPIO25", id:25, baseAddr:0x7E000000),
        .P26: RaspberryGPIO(name:"GPIO26", id:26, baseAddr:0x7E000000),
        .P27: RaspberryGPIO(name:"GPIO27", id:27, baseAddr:0x7E000000)
    ]

    // C.H.I.P.
    // Pins XIO-P0 to P7 linearly map to:
    // kernel 4.3: gpio408 to gpio415
    // kernel 4.4.11: gpio1016 to gpio1023 
    // kernel 4.4.13-ntc-mlc: gpio1013 to gpio 1020 (latest, available since december 2016)
    //
    // See: https://docs.getchip.com/chip.html#kernel-4-3-vs-4-4-gpio-how-to-tell-the-difference
    static let GPIOCHIP: [GPIOName:GPIO] = [
        .P0: GPIO(name:"XIO-P0", id:1013),
        .P1: GPIO(name:"XIO-P1", id:1014),
        .P2: GPIO(name:"XIO-P2", id:1015),
        .P3: GPIO(name:"XIO-P3", id:1016),
        .P4: GPIO(name:"XIO-P4", id:1017),
        .P5: GPIO(name:"XIO-P5", id:1018),
        .P6: GPIO(name:"XIO-P6", id:1019),
        .P7: GPIO(name:"XIO-P7", id:1020),<commit_msg>Add back P10,P11,P19 for Pi4, confirmed working<commit_after>/*
 SwiftyGPIO

 Copyright (c) 2016 <NAME>
 Licensed under the MIT license, as follows:

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in all
 copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.)
 */

// MARK: - GPIOs Presets
extension SwiftyGPIO {
    // 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: RaspberryGPIO(name:"GPIO0", id:0, baseAddr:0x20000000),
        .P1: RaspberryGPIO(name:"GPIO1", id:1, baseAddr:0x20000000),
        .P4: RaspberryGPIO(name:"GPIO4", id:4, baseAddr:0x20000000),
        .P7: RaspberryGPIO(name:"GPIO7", id:7, baseAddr:0x20000000),
        .P8: RaspberryGPIO(name:"GPIO8", id:8, baseAddr:0x20000000),
        .P9: RaspberryGPIO(name:"GPIO9", id:9, baseAddr:0x20000000),
        .P10: RaspberryGPIO(name:"GPIO10", id:10, baseAddr:0x20000000),
        .P11: RaspberryGPIO(name:"GPIO11", id:11, baseAddr:0x20000000),
        .P14: RaspberryGPIO(name:"GPIO14", id:14, baseAddr:0x20000000),
        .P15: RaspberryGPIO(name:"GPIO15", id:15, baseAddr:0x20000000),
        .P17: RaspberryGPIO(name:"GPIO17", id:17, baseAddr:0x20000000),
        .P18: RaspberryGPIO(name:"GPIO18", id:18, baseAddr:0x20000000),
        .P21: RaspberryGPIO(name:"GPIO21", id:21, baseAddr:0x20000000),
        .P22: RaspberryGPIO(name:"GPIO22", id:22, baseAddr:0x20000000),
        .P23: RaspberryGPIO(name:"GPIO23", id:23, baseAddr:0x20000000),
        .P24: RaspberryGPIO(name:"GPIO24", id:24, baseAddr:0x20000000),
        .P25: RaspberryGPIO(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: RaspberryGPIO(name:"GPIO2", id:2, baseAddr:0x20000000),
        .P3: RaspberryGPIO(name:"GPIO3", id:3, baseAddr:0x20000000),
        .P4: RaspberryGPIO(name:"GPIO4", id:4, baseAddr:0x20000000),
        .P7: RaspberryGPIO(name:"GPIO7", id:7, baseAddr:0x20000000),
        .P8: RaspberryGPIO(name:"GPIO8", id:8, baseAddr:0x20000000),
        .P9: RaspberryGPIO(name:"GPIO9", id:9, baseAddr:0x20000000),
        .P10: RaspberryGPIO(name:"GPIO10", id:10, baseAddr:0x20000000),
        .P11: RaspberryGPIO(name:"GPIO11", id:11, baseAddr:0x20000000),
        .P14: RaspberryGPIO(name:"GPIO14", id:14, baseAddr:0x20000000),
        .P15: RaspberryGPIO(name:"GPIO15", id:15, baseAddr:0x20000000),
        .P17: RaspberryGPIO(name:"GPIO17", id:17, baseAddr:0x20000000),
        .P18: RaspberryGPIO(name:"GPIO18", id:18, baseAddr:0x20000000),
        .P22: RaspberryGPIO(name:"GPIO22", id:22, baseAddr:0x20000000),
        .P23: RaspberryGPIO(name:"GPIO23", id:23, baseAddr:0x20000000),
        .P24: RaspberryGPIO(name:"GPIO24", id:24, baseAddr:0x20000000),
        .P25: RaspberryGPIO(name:"GPIO25", id:25, baseAddr:0x20000000),
        .P27: RaspberryGPIO(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: RaspberryGPIO(name:"GPIO2", id:2, baseAddr:0x20000000),
        .P3: RaspberryGPIO(name:"GPIO3", id:3, baseAddr:0x20000000),
        .P4: RaspberryGPIO(name:"GPIO4", id:4, baseAddr:0x20000000),
        .P5: RaspberryGPIO(name:"GPIO5", id:5, baseAddr:0x20000000),
        .P6: RaspberryGPIO(name:"GPIO6", id:6, baseAddr:0x20000000),
        .P7: RaspberryGPIO(name:"GPIO7", id:7, baseAddr:0x20000000),
        .P8: RaspberryGPIO(name:"GPIO8", id:8, baseAddr:0x20000000),
        .P9: RaspberryGPIO(name:"GPIO9", id:9, baseAddr:0x20000000),
        .P10: RaspberryGPIO(name:"GPIO10", id:10, baseAddr:0x20000000),
        .P11: RaspberryGPIO(name:"GPIO11", id:11, baseAddr:0x20000000),
        .P12: RaspberryGPIO(name:"GPIO12", id:12, baseAddr:0x20000000),
        .P13: RaspberryGPIO(name:"GPIO13", id:13, baseAddr:0x20000000),
        .P14: RaspberryGPIO(name:"GPIO14", id:14, baseAddr:0x20000000),
        .P15: RaspberryGPIO(name:"GPIO15", id:15, baseAddr:0x20000000),
        .P16: RaspberryGPIO(name:"GPIO16", id:16, baseAddr:0x20000000),
        .P17: RaspberryGPIO(name:"GPIO17", id:17, baseAddr:0x20000000),
        .P18: RaspberryGPIO(name:"GPIO18", id:18, baseAddr:0x20000000),
        .P19: RaspberryGPIO(name:"GPIO19", id:19, baseAddr:0x20000000),
        .P20: RaspberryGPIO(name:"GPIO20", id:20, baseAddr:0x20000000),
        .P21: RaspberryGPIO(name:"GPIO21", id:21, baseAddr:0x20000000),
        .P22: RaspberryGPIO(name:"GPIO22", id:22, baseAddr:0x20000000),
        .P23: RaspberryGPIO(name:"GPIO23", id:23, baseAddr:0x20000000),
        .P24: RaspberryGPIO(name:"GPIO24", id:24, baseAddr:0x20000000),
        .P25: RaspberryGPIO(name:"GPIO25", id:25, baseAddr:0x20000000),
        .P26: RaspberryGPIO(name:"GPIO26", id:26, baseAddr:0x20000000),
        .P27: RaspberryGPIO(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: RaspberryGPIO(name:"GPIO2", id:2, baseAddr:0x3F000000),
        .P3: RaspberryGPIO(name:"GPIO3", id:3, baseAddr:0x3F000000),
        .P4: RaspberryGPIO(name:"GPIO4", id:4, baseAddr:0x3F000000),
        .P5: RaspberryGPIO(name:"GPIO5", id:5, baseAddr:0x3F000000),
        .P6: RaspberryGPIO(name:"GPIO6", id:6, baseAddr:0x3F000000),
        .P7: RaspberryGPIO(name:"GPIO7", id:7, baseAddr:0x3F000000),
        .P8: RaspberryGPIO(name:"GPIO8", id:8, baseAddr:0x3F000000),
        .P9: RaspberryGPIO(name:"GPIO9", id:9, baseAddr:0x3F000000),
        .P10: RaspberryGPIO(name:"GPIO10", id:10, baseAddr:0x3F000000),
        .P11: RaspberryGPIO(name:"GPIO11", id:11, baseAddr:0x3F000000),
        .P12: RaspberryGPIO(name:"GPIO12", id:12, baseAddr:0x3F000000),
        .P13: RaspberryGPIO(name:"GPIO13", id:13, baseAddr:0x3F000000),
        .P14: RaspberryGPIO(name:"GPIO14", id:14, baseAddr:0x3F000000),
        .P15: RaspberryGPIO(name:"GPIO15", id:15, baseAddr:0x3F000000),
        .P16: RaspberryGPIO(name:"GPIO16", id:16, baseAddr:0x3F000000),
        .P17: RaspberryGPIO(name:"GPIO17", id:17, baseAddr:0x3F000000),
        .P18: RaspberryGPIO(name:"GPIO18", id:18, baseAddr:0x3F000000),
        .P19: RaspberryGPIO(name:"GPIO19", id:19, baseAddr:0x3F000000),
        .P20: RaspberryGPIO(name:"GPIO20", id:20, baseAddr:0x3F000000),
        .P21: RaspberryGPIO(name:"GPIO21", id:21, baseAddr:0x3F000000),
        .P22: RaspberryGPIO(name:"GPIO22", id:22, baseAddr:0x3F000000),
        .P23: RaspberryGPIO(name:"GPIO23", id:23, baseAddr:0x3F000000),
        .P24: RaspberryGPIO(name:"GPIO24", id:24, baseAddr:0x3F000000),
        .P25: RaspberryGPIO(name:"GPIO25", id:25, baseAddr:0x3F000000),
        .P26: RaspberryGPIO(name:"GPIO26", id:26, baseAddr:0x3F000000),
        .P27: RaspberryGPIO(name:"GPIO27", id:27, baseAddr:0x3F000000)
    ]
 
     // RaspberryPi 4
    // 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 GPIORPI4: [GPIOName:GPIO] = [
        .P2: RaspberryGPIO(name:"GPIO2", id:2, baseAddr:0x7E000000),
        .P3: RaspberryGPIO(name:"GPIO3", id:3, baseAddr:0x7E000000),
        .P4: RaspberryGPIO(name:"GPIO4", id:4, baseAddr:0x7E000000),
        .P5: RaspberryGPIO(name:"GPIO5", id:5, baseAddr:0x7E000000),
        .P6: RaspberryGPIO(name:"GPIO6", id:6, baseAddr:0x7E000000),
        .P7: RaspberryGPIO(name:"GPIO7", id:7, baseAddr:0x7E000000),
        .P8: RaspberryGPIO(name:"GPIO8", id:8, baseAddr:0x7E000000),
        .P9: RaspberryGPIO(name:"GPIO9", id:9, baseAddr:0x7E000000),
        .P10: RaspberryGPIO(name:"GPIO10", id:10, baseAddr:0x7E000000),
        .P11: RaspberryGPIO(name:"GPIO11", id:11, baseAddr:0x7E000000),
        .P12: RaspberryGPIO(name:"GPIO12", id:12, baseAddr:0x7E000000),
        .P13: RaspberryGPIO(name:"GPIO13", id:13, baseAddr:0x7E000000),
        .P14: RaspberryGPIO(name:"GPIO14", id:14, baseAddr:0x7E000000),
        .P15: RaspberryGPIO(name:"GPIO15", id:15, baseAddr:0x7E000000),
        .P16: RaspberryGPIO(name:"GPIO16", id:16, baseAddr:0x7E000000),
        .P17: RaspberryGPIO(name:"GPIO17", id:17, baseAddr:0x7E000000),
        .P18: RaspberryGPIO(name:"GPIO18", id:18, baseAddr:0x7E000000),
        .P19: RaspberryGPIO(name:"GPIO19", id:19, baseAddr:0x7E000000),
        .P20: RaspberryGPIO(name:"GPIO20", id:20, baseAddr:0x7E000000),
        .P21: RaspberryGPIO(name:"GPIO21", id:21, baseAddr:0x7E000000),
        .P22: RaspberryGPIO(name:"GPIO22", id:22, baseAddr:0x7E000000),
        .P23: RaspberryGPIO(name:"GPIO23", id:23, baseAddr:0x7E000000),
        .P24: RaspberryGPIO(name:"GPIO24", id:24, baseAddr:0x7E000000),
        .P25: RaspberryGPIO(name:"GPIO25", id:25, baseAddr:0x7E000000),
        .P26: RaspberryGPIO(name:"GPIO26", id:26, baseAddr:0x7E000000),
        .P27: RaspberryGPIO(name:"GPIO27", id:27, baseAddr:0x7E000000)
    ]

    // C.H.I.P.
    // Pins XIO-P0 to P7 linearly map to:
    // kernel 4.3: gpio408 to gpio415
    // kernel 4.4.11: gpio1016 to gpio1023 
    // kernel 4.4.13-ntc-mlc: gpio1013 to gpio 1020 (latest, available since december 2016)
    //
    // See: https://docs.getchip.com/chip.html#kernel-4-3-vs-4-4-gpio-how-to-tell-the-difference
    static let GPIOCHIP: [GPIOName:GPIO] = [
        .P0: GPIO(name:"XIO-P0", id:1013),
        .P1: GPIO(name:"XIO-P1", id:1014),
        .P2: GPIO(name:"XIO-P2", id:1015),
        .P3: GPIO(name:"XIO-P3", id:1016),
        .P4: GPIO(name:"XIO-P4", id:1017),
        .P5: GPIO(name:"XIO-P5", id:1018),
        .P6: GPIO(name:"XIO-P6", id:1019),
        .P7: GPIO(name:"XIO-P7", id:1020),
{'fraction_non_alphanumeric': 0.15696446607290424, 'fraction_numerical': 0.16844183270590396, 'mean_word_length': 3.9127198917456023, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 120, 'word_list_counts': {'cursed_substrings.json': 48, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '619404', 'n_tokens_mistral': 10716, 'n_tokens_neox': 8201, 'n_words': 1751}