// args= ['.\\make-pins.py', '-b', '.\\pins.csv', '--af', '.\\mimxrt105x_af.csv', '--pinmap', '.\\mimxrt105x_pinmap.csv', '--prefix', 'mimxrt105x_prefix.c', '--qstr', '.\\pins_qstr.h', '--af-const', '.\\pins_af_const.h', '--af-py', '.\\pins_af.py']
// This file was automatically generated by make-pins.py
//
// --af .\mimxrt105x_af.csv
// --pinmap .\mimxrt105x_pinmap.csv
// --board .\pins.csv
// --prefix mimxrt105x_prefix.c

// <MCU>_prefix.c becomes the initial portion of the generated pins file.

#include <stdio.h>

#include "py/obj.h"
#include "py/mphal.h"
#include <drivers/pin.h>
#include "pin_defs_mcu.h"

#define AF(af_idx, af_fn, af_unit, af_type, af_ptr, af_inSelReg, af_inSelVal) \
{ \
    { &pin_af_type }, \
    .name = MP_QSTR_AF ## af_idx ## _ ## af_fn ## af_unit, \
    .idx = (af_idx), \
    .fn = AF_FN_ ## af_fn, \
    .unit = (af_unit), \
    .reg = (af_ptr), \
    .inSelReg = (af_inSelReg), \
    .inSelVal = (af_inSelVal), \
}

#define PIN(p_name, p_board_name, p_port, p_pin, p_af, p_adc_num, p_adc_channel, p_afReg, p_cfgReg) \
{ \
    { &pyb_pin_type }, \
    .name = MP_QSTR_ ## p_name, \
    .board_name = MP_QSTR_ ## p_board_name, \
    .port = PORT_ ## p_port, \
    .pin = (p_pin), \
    .num_af = (sizeof(p_af) / sizeof(pin_af_obj_t)), \
    .pin_mask = (1UL << ((p_pin) & 0x1f)), \
    .gpio = GPIO ## p_port, \
    .af = p_af, \
    .adc_num = p_adc_num, \
    .adc_channel = p_adc_channel, \
    .afReg = p_afReg, \
    .cfgReg = p_cfgReg, \
}

const pin_af_obj_t pin_AD_B0_09_af[] = {
  //( 0, JTAG    ,  0, TDI             , JTAG       , 0          , 0   ), // JTAG_TDI
  AF( 1, PWM     ,  2, PWMA3           , PWM2       , 0x401F8474U, 0x3U), // FLEXPWM2_PWMA3
  //( 2, ENET    ,  0, RDATA2          , ENET       , 0          , 0   ), // ENET_RDATA2
#if (defined(MICROPY_HW_ENABLE_SAI2) && MICROPY_HW_ENABLE_SAI2)
  AF( 3, SAI     ,  2, TX_DATA         , SAI2       , 0          , 0   ), // SAI2_TX_DATA
#endif
  //( 4, CSI     ,  0, DATA4           , CSI        , 0x401F8408U, 0x1U), // CSI_DATA4
  AF( 5, GPIO    ,  1, PIN9            , GPIO1      , 0          , 0   ), // GPIO1_PIN9
  //( 6, XBAR    ,  1, XBAR_IN21       , XBAR1      , 0x401F8658U, 0x1U), // XBAR1_XBAR_IN21
  AF( 7, GPT     ,  2, CLK             , GPT2       , 0          , 0   ), // GPT2_CLK
  //(15, AD      ,  0, B0_09           , AD         ,            ,     ), // AD_B0_09
};

const pin_obj_t pin_AD_B0_09 = PIN(AD_B0_09, B9, 1, 9, pin_AD_B0_09_af, 0, 0, 0x401F80E0U, 0x401F82D0U);

const pin_af_obj_t pin_AD_B0_10_af[] = {
  //( 0, JTAG    ,  0, TDO             , JTAG       , 0          , 0   ), // JTAG_TDO
  AF( 1, PWM     ,  1, PWMA3           , PWM1       , 0x401F8454U, 0x3U), // FLEXPWM1_PWMA3
  //( 2, ENET    ,  0, CRS             , ENET       , 0          , 0   ), // ENET_CRS
#if (defined(MICROPY_HW_ENABLE_SAI2) && MICROPY_HW_ENABLE_SAI2)
  AF( 3, SAI     ,  2, MCLK            , SAI2       , 0x401F85B0U, 0x1U), // SAI2_MCLK
#endif
  //( 4, CSI     ,  0, DATA3           , CSI        , 0x401F8404U, 0x1U), // CSI_DATA3
  AF( 5, GPIO    ,  1, PIN10           , GPIO1      , 0          , 0   ), // GPIO1_PIN10
  //( 6, XBAR    ,  1, XBAR_IN22       , XBAR1      , 0x401F8638U, 0x1U), // XBAR1_XBAR_IN22
  //( 7, ENET    ,  0, 1588_EVENT0_OUT , ENET       , 0          , 0   ), // ENET_1588_EVENT0_OUT
  //(15, AD      ,  0, B0_10           , AD         ,            ,     ), // AD_B0_10
};

const pin_obj_t pin_AD_B0_10 = PIN(AD_B0_10, B10, 1, 10, pin_AD_B0_10_af, 0, 0, 0x401F80E4U, 0x401F82D4U);

const pin_af_obj_t pin_AD_B0_11_af[] = {
  //( 0, JTAG    ,  0, TRSTB           , JTAG       , 0          , 0   ), // JTAG_TRSTB
  AF( 1, PWM     ,  1, PWMB3           , PWM1       , 0x401F8464U, 0x3U), // FLEXPWM1_PWMB3
  //( 2, ENET    ,  0, COL             , ENET       , 0          , 0   ), // ENET_COL
  //( 3, WDOG    ,  1, WDOG_B          , WDOG1      , 0          , 0   ), // WDOG1_WDOG_B
  //( 4, CSI     ,  0, DATA2           , CSI        , 0x401F8400U, 0x1U), // CSI_DATA2
  AF( 5, GPIO    ,  1, PIN11           , GPIO1      , 0          , 0   ), // GPIO1_PIN11
  //( 6, XBAR    ,  1, XBAR_IN23       , XBAR1      , 0x401F863CU, 0x1U), // XBAR1_XBAR_IN23
  //( 7, ENET    ,  0, 1588_EVENT0_IN  , ENET       , 0x401F8444U, 0x1U), // ENET_1588_EVENT0_IN
  //(15, AD      ,  0, B0_11           , AD         ,            ,     ), // AD_B0_11
};

const pin_obj_t pin_AD_B0_11 = PIN(AD_B0_11, B11, 1, 11, pin_AD_B0_11_af, 0, 0, 0x401F80E8U, 0x401F82D8U);

const pin_af_obj_t pin_AD_B0_12_af[] = {
  AF( 0, LPI2C   ,  4, SCL             , LPI2C4     , 0x401F84E4U, 0x1U), // LPI2C4_SCL
  //( 1, CCM     ,  0, PMIC_RDY        , CCM        , 0x401F83FCU, 0x1U), // CCM_PMIC_RDY
  AF( 2, LPUART  ,  1, TX              , LPUART1    , 0          , 0   ), // LPUART1_TX
  //( 3, WDOG    ,  2, WDOG_B          , WDOG2      , 0          , 0   ), // WDOG2_WDOG_B
  AF( 4, PWM     ,  1, PWMX2           , PWM1       , 0          , 0   ), // FLEXPWM1_PWMX2
  AF( 5, GPIO    ,  1, PIN12           , GPIO1      , 0          , 0   ), // GPIO1_PIN12
  //( 6, ENET    ,  0, 1588_EVENT1_OUT , ENET       , 0          , 0   ), // ENET_1588_EVENT1_OUT
  //( 7, CM      ,  7, NMI             , CM7        , 0x401F8568U, 0   ), // CM7_NMI
  //(15, AD      ,  0, B0_12           , AD         ,            ,     ), // AD_B0_12
};

const pin_obj_t pin_AD_B0_12 = PIN(AD_B0_12, DBG_TXD, 1, 12, pin_AD_B0_12_af, PIN_ADC1, 1, 0x401F80ECU, 0x401F82DCU);

const pin_af_obj_t pin_AD_B0_13_af[] = {
  AF( 0, LPI2C   ,  4, SDA             , LPI2C4     , 0x401F84E8U, 0x1U), // LPI2C4_SDA
  AF( 1, GPT     ,  1, CLK             , GPT1       , 0          , 0   ), // GPT1_CLK
  AF( 2, LPUART  ,  1, RX              , LPUART1    , 0          , 0   ), // LPUART1_RX
  //( 3, EWM     ,  0, EWM_OUT_B       , EWM        , 0          , 0   ), // EWM_EWM_OUT_B
  AF( 4, PWM     ,  1, PWMX3           , PWM1       , 0          , 0   ), // FLEXPWM1_PWMX3
  AF( 5, GPIO    ,  1, PIN13           , GPIO1      , 0          , 0   ), // GPIO1_PIN13
  //( 6, ENET    ,  0, 1588_EVENT1_IN  , ENET       , 0          , 0   ), // ENET_1588_EVENT1_IN
  //( 7, ANATOP  ,  0, 24M_OUT         , ANATOP     , 0          , 0   ), // ANATOP_24M_OUT
  //(15, AD      ,  0, B0_13           , AD         ,            ,     ), // AD_B0_13
};

const pin_obj_t pin_AD_B0_13 = PIN(AD_B0_13, DBG_RXD, 1, 13, pin_AD_B0_13_af, PIN_ADC1, 2, 0x401F80F0U, 0x401F82E0U);

const pin_af_obj_t pin_AD_B0_14_af[] = {
  //( 0, USB     ,  0, OTG2_OC         , USB        , 0x401F85CCU, 0x0U), // USB_OTG2_OC
  //( 1, XBAR    ,  1, XBAR_IN24       , XBAR1      , 0x401F8640U, 0x1U), // XBAR1_XBAR_IN24
  AF( 2, LPUART  ,  1, CTS_B           , LPUART1    , 0          , 0   ), // LPUART1_CTS_B
  //( 3, ENET    ,  0, 1588_EVENT0_OUT , ENET       , 0          , 0   ), // ENET_1588_EVENT0_OUT
  //( 4, CSI     ,  0, VSYNC           , CSI        , 0x401F8428U, 0x0U), // CSI_VSYNC
  AF( 5, GPIO    ,  1, PIN14           , GPIO1      , 0          , 0   ), // GPIO1_PIN14
  //( 6, FLEXCAN ,  2, TX              , FLEXCAN2   , 0          , 0   ), // FLEXCAN2_TX
  //( 7, WDOG    ,  1, WDOG_ANY        , WDOG1      ,            ,     ), // WDOG1_WDOG_ANY
  //(15, AD      ,  0, B0_14           , AD         ,            ,     ), // AD_B0_14
};

const pin_obj_t pin_AD_B0_14 = PIN(AD_B0_14, B14, 1, 14, pin_AD_B0_14_af, PIN_ADC1, 3, 0x401F80F4U, 0x401F82E4U);

const pin_af_obj_t pin_AD_B0_15_af[] = {
  //( 0, USB     ,  0, OTG2_PWR        , USB        , 0          , 0   ), // USB_OTG2_PWR
  //( 1, XBAR    ,  1, XBAR_IN25       , XBAR1      , 0x401F8650U, 0x0U), // XBAR1_XBAR_IN25
  AF( 2, LPUART  ,  1, RTS_B           , LPUART1    , 0          , 0   ), // LPUART1_RTS_B
  //( 3, ENET    ,  0, 1588_EVENT0_IN  , ENET       , 0x401F8444U, 0x0U), // ENET_1588_EVENT0_IN
  //( 4, CSI     ,  0, HSYNC           , CSI        , 0x401F8420U, 0x0U), // CSI_HSYNC
  AF( 5, GPIO    ,  1, PIN15           , GPIO1      , 0          , 0   ), // GPIO1_PIN15
  //( 6, FLEXCAN ,  2, RX              , FLEXCAN2   , 0x401F8450U, 0x2U), // FLEXCAN2_RX
  //( 7, WDOG    ,  1, WDOG_RST_B_DEB  , WDOG1      , 0          , 0   ), // WDOG1_WDOG_RST_B_DEB
  //(15, AD      ,  0, B0_15           , AD         ,            ,     ), // AD_B0_15
};

const pin_obj_t pin_AD_B0_15 = PIN(AD_B0_15, B15, 1, 15, pin_AD_B0_15_af, PIN_ADC1, 4, 0x401F80F8U, 0x401F82E8U);

const pin_af_obj_t pin_AD_B1_00_af[] = {
  //( 0, ANATOP  ,  0, OTG2_ID         , ANATOP     , 0x401F83F8U, 0x1U), // ANATOP_OTG2_ID
  AF( 1, TMR     ,  3, TIMER0          , TMR3       , 0x401F857CU, 0x1U), // TMR3_TIMER0
  AF( 2, LPUART  ,  2, CTS_B           , LPUART2    , 0          , 0   ), // LPUART2_CTS_B
  AF( 3, LPI2C   ,  1, SCL             , LPI2C1     , 0x401F84CCU, 0x1U), // LPI2C1_SCL
  //( 4, WDOG    ,  1, WDOG_B          , WDOG1      , 0          , 0   ), // WDOG1_WDOG_B
  AF( 5, GPIO    ,  1, PIN16           , GPIO1      , 0          , 0   ), // GPIO1_PIN16
  //( 6, USDHC   ,  1, WP              , USDHC1     , 0x401F85D8U, 0x2U), // USDHC1_WP
  //( 7, KPP     ,  0, ROW7            , KPP        , 0          , 0   ), // KPP_ROW7
  //(15, AD      ,  0, B1_00           , AD         ,            ,     ), // AD_B1_00
};

const pin_obj_t pin_AD_B1_00 = PIN(AD_B1_00, B16, 1, 16, pin_AD_B1_00_af, PIN_ADC1, 5, 0x401F80FCU, 0x401F82ECU);

const pin_af_obj_t pin_AD_B1_01_af[] = {
  //( 0, USB     ,  0, OTG1_PWR        , USB        , 0          , 0   ), // USB_OTG1_PWR
  AF( 1, TMR     ,  3, TIMER1          , TMR3       , 0x401F8580U, 0x0U), // TMR3_TIMER1
  AF( 2, LPUART  ,  2, RTS_B           , LPUART2    , 0          , 0   ), // LPUART2_RTS_B
  AF( 3, LPI2C   ,  1, SDA             , LPI2C1     , 0x401F84D0U, 0x1U), // LPI2C1_SDA
  //( 4, CCM     ,  0, PMIC_RDY        , CCM        , 0x401F83FCU, 0x2U), // CCM_PMIC_RDY
  AF( 5, GPIO    ,  1, PIN17           , GPIO1      , 0          , 0   ), // GPIO1_PIN17
  //( 6, USDHC   ,  1, VSELECT         , USDHC1     , 0          , 0   ), // USDHC1_VSELECT
  //( 7, KPP     ,  0, COL7            , KPP        , 0          , 0   ), // KPP_COL7
  //(15, AD      ,  0, B1_01           , AD         ,            ,     ), // AD_B1_01
};

const pin_obj_t pin_AD_B1_01 = PIN(AD_B1_01, B17, 1, 17, pin_AD_B1_01_af, PIN_ADC1, 6, 0x401F8100U, 0x401F82F0U);

const pin_af_obj_t pin_AD_B1_02_af[] = {
  //( 0, ANATOP  ,  0, OTG1_ID         , ANATOP     , 0x401F83F4U, 0x1U), // ANATOP_OTG1_ID
  AF( 1, TMR     ,  3, TIMER2          , TMR3       , 0x401F8584U, 0x1U), // TMR3_TIMER2
  AF( 2, LPUART  ,  2, TX              , LPUART2    , 0x401F8530U, 0x1U), // LPUART2_TX
  //( 3, SPDIF   ,  0, OUT             , SPDIF      , 0          , 0   ), // SPDIF_OUT
  //( 4, ENET    ,  0, 1588_EVENT2_OUT , ENET       , 0          , 0   ), // ENET_1588_EVENT2_OUT
  AF( 5, GPIO    ,  1, PIN18           , GPIO1      , 0          , 0   ), // GPIO1_PIN18
  //( 6, USDHC   ,  1, CD_B            , USDHC1     , 0x401F85D4U, 0x1U), // USDHC1_CD_B
  //( 7, KPP     ,  0, ROW6            , KPP        , 0          , 0   ), // KPP_ROW6
  //(15, AD      ,  0, B1_02           , AD         ,            ,     ), // AD_B1_02
};

const pin_obj_t pin_AD_B1_02 = PIN(AD_B1_02, B18, 1, 18, pin_AD_B1_02_af, PIN_ADC1, 7, 0x401F8104U, 0x401F82F4U);

const pin_af_obj_t pin_AD_B1_03_af[] = {
  //( 0, USB     ,  0, OTG1_OC         , USB        , 0x401F85D0U, 0x1U), // USB_OTG1_OC
  AF( 1, TMR     ,  3, TIMER3          , TMR3       , 0x401F8588U, 0x1U), // TMR3_TIMER3
  AF( 2, LPUART  ,  2, RX              , LPUART2    , 0x401F852CU, 0x1U), // LPUART2_RX
  //( 3, SPDIF   ,  0, IN              , SPDIF      , 0x401F85C8U, 0x0U), // SPDIF_IN
  //( 4, ENET    ,  0, 1588_EVENT2_IN  , ENET       , 0          , 0   ), // ENET_1588_EVENT2_IN
  AF( 5, GPIO    ,  1, PIN19           , GPIO1      , 0          , 0   ), // GPIO1_PIN19
  //( 6, USDHC   ,  2, CD_B            , USDHC2     , 0x401F85E0U, 0x0U), // USDHC2_CD_B
  //( 7, KPP     ,  0, COL6            , KPP        , 0          , 0   ), // KPP_COL6
  //(15, AD      ,  0, B1_03           , AD         ,            ,     ), // AD_B1_03
};

const pin_obj_t pin_AD_B1_03 = PIN(AD_B1_03, B19, 1, 19, pin_AD_B1_03_af, PIN_ADC1, 8, 0x401F8108U, 0x401F82F8U);

const pin_af_obj_t pin_AD_B1_05_af[] = {
  //( 0, FLEXSPI ,  0, B_DATA2         , FLEXSPI    , 0x401F84C0U, 0x1U), // FLEXSPI_B_DATA2
  //( 1, ENET    ,  0, MDIO            , ENET       , 0x401F8430U, 0x0U), // ENET_MDIO
  AF( 2, LPUART  ,  3, RTS_B           , LPUART3    , 0          , 0   ), // LPUART3_RTS_B
  //( 3, SPDIF   ,  0, OUT             , SPDIF      , 0          , 0   ), // SPDIF_OUT
  //( 4, CSI     ,  0, MCLK            , CSI        , 0          , 0   ), // CSI_MCLK
  AF( 5, GPIO    ,  1, PIN21           , GPIO1      , 0          , 0   ), // GPIO1_PIN21
  //( 6, USDHC   ,  2, DATA1           , USDHC2     , 0x401F85ECU, 0x1U), // USDHC2_DATA1
  //( 7, KPP     ,  0, COL5            , KPP        , 0          , 0   ), // KPP_COL5
  //(15, AD      ,  0, B1_05           , AD         ,            ,     ), // AD_B1_05
};

const pin_obj_t pin_AD_B1_05 = PIN(AD_B1_05, B21, 1, 21, pin_AD_B1_05_af, PIN_ADC1, 10, 0x401F8110U, 0x401F8300U);

const pin_af_obj_t pin_AD_B1_07_af[] = {
  //( 0, FLEXSPI ,  0, B_DATA0         , FLEXSPI    , 0x401F84B8U, 0x1U), // FLEXSPI_B_DATA0
  AF( 1, LPI2C   ,  3, SCL             , LPI2C3     , 0x401F84DCU, 0x2U), // LPI2C3_SCL
  AF( 2, LPUART  ,  3, RX              , LPUART3    , 0x401F8538U, 0x0U), // LPUART3_RX
  //( 3, SPDIF   ,  0, EXT_CLK         , SPDIF      , 0          , 0   ), // SPDIF_EXT_CLK
  //( 4, CSI     ,  0, HSYNC           , CSI        , 0x401F8420U, 0x1U), // CSI_HSYNC
  AF( 5, GPIO    ,  1, PIN23           , GPIO1      , 0          , 0   ), // GPIO1_PIN23
  //( 6, USDHC   ,  2, DATA3           , USDHC2     , 0x401F85F4U, 0x1U), // USDHC2_DATA3
  //( 7, KPP     ,  0, COL4            , KPP        , 0          , 0   ), // KPP_COL4
  //(15, AD      ,  0, B1_07           , AD         ,            ,     ), // AD_B1_07
};

const pin_obj_t pin_AD_B1_07 = PIN(AD_B1_07, B23, 1, 23, pin_AD_B1_07_af, PIN_ADC1, 12, 0x401F8118U, 0x401F8308U);

const pin_af_obj_t pin_B0_02_af[] = {
  //( 0, LCDIF   ,  0, HSYNC           , LCDIF      , 0          , 0   ), // LCDIF_HSYNC
  AF( 1, TMR     ,  1, TIMER2          , TMR1       , 0          , 0   ), // TMR1_TIMER2
  //( 2, FLEXCAN ,  1, TX              , FLEXCAN1   , 0          , 0   ), // FLEXCAN1_TX
  AF( 3, LPSPI   ,  4, SDO             , LPSPI4     , 0x401F8528U, 0x0U), // LPSPI4_SDO
  //( 4, FLEXIO  ,  2, FLEXIO2         , FLEXIO2    , 0          , 0   ), // FLEXIO2_FLEXIO2
  AF( 5, GPIO    ,  2, PIN2            , GPIO2      , 0          , 0   ), // GPIO2_PIN2
  //( 6, SEMC    ,  0, CSX3            , SEMC       , 0          , 0   ), // SEMC_CSX3
  //( 7, TPSMP   ,  0, HDATA0          , TPSMP      ,            ,     ), // TPSMP_HDATA0
  //(15, B       ,  0, 02              , B0         ,            ,     ), // B0_02
};

const pin_obj_t pin_B0_02 = PIN(B0_02, C2, 2, 2, pin_B0_02_af, 0, 0, 0x401F8144U, 0x401F8334U);

const pin_af_obj_t pin_B0_03_af[] = {
  //( 0, LCDIF   ,  0, VSYNC           , LCDIF      , 0          , 0   ), // LCDIF_VSYNC
  AF( 1, TMR     ,  2, TIMER0          , TMR2       , 0x401F856CU, 0x1U), // TMR2_TIMER0
  //( 2, FLEXCAN ,  1, RX              , FLEXCAN1   , 0x401F844CU, 0x3U), // FLEXCAN1_RX
  AF( 3, LPSPI   ,  4, SCK             , LPSPI4     , 0x401F8520U, 0x0U), // LPSPI4_SCK
  //( 4, FLEXIO  ,  2, FLEXIO3         , FLEXIO2    , 0          , 0   ), // FLEXIO2_FLEXIO3
  AF( 5, GPIO    ,  2, PIN3            , GPIO2      , 0          , 0   ), // GPIO2_PIN3
  //( 6, WDOG    ,  2, WDOG_RST_B_DEB  , WDOG2      , 0          , 0   ), // WDOG2_WDOG_RST_B_DEB
  //( 7, TPSMP   ,  0, HDATA1          , TPSMP      ,            ,     ), // TPSMP_HDATA1
  //(15, B       ,  0, 03              , B0         ,            ,     ), // B0_03
};

const pin_obj_t pin_B0_03 = PIN(B0_03, C3, 2, 3, pin_B0_03_af, 0, 0, 0x401F8148U, 0x401F8338U);

const pin_af_obj_t pin_B0_06_af[] = {
  //( 0, LCDIF   ,  0, DATA2           , LCDIF      , 0          , 0   ), // LCDIF_DATA2
  AF( 1, TMR     ,  3, TIMER0          , TMR3       , 0x401F857CU, 0x2U), // TMR3_TIMER0
  AF( 2, PWM     ,  2, PWMA0           , PWM2       , 0x401F8478U, 0x1U), // FLEXPWM2_PWMA0
  //( 3, CM      ,  7, MX6RT_TRACE2    , CM7        ,            ,     ), // CM7_MX6RT_TRACE2
  //( 4, FLEXIO  ,  2, FLEXIO6         , FLEXIO2    , 0          , 0   ), // FLEXIO2_FLEXIO6
  AF( 5, GPIO    ,  2, PIN6            , GPIO2      , 0          , 0   ), // GPIO2_PIN6
  //( 6, SRC     ,  0, BT_CFG2         , SRC        , 0          , 0   ), // SRC_BT_CFG2
  //( 7, TPSMP   ,  0, HDATA4          , TPSMP      ,            ,     ), // TPSMP_HDATA4
  //(15, B       ,  0, 06              , B0         ,            ,     ), // B0_06
};

const pin_obj_t pin_B0_06 = PIN(B0_06, C6, 2, 6, pin_B0_06_af, 0, 0, 0x401F8154U, 0x401F8344U);

const pin_af_obj_t pin_B0_07_af[] = {
  //( 0, LCDIF   ,  0, DATA3           , LCDIF      , 0          , 0   ), // LCDIF_DATA3
  AF( 1, TMR     ,  3, TIMER1          , TMR3       , 0x401F8580U, 0x2U), // TMR3_TIMER1
  AF( 2, PWM     ,  2, PWMB0           , PWM2       , 0x401F8488U, 0x1U), // FLEXPWM2_PWMB0
  //( 3, CM      ,  7, MX6RT_TRACE3    , CM7        ,            ,     ), // CM7_MX6RT_TRACE3
  //( 4, FLEXIO  ,  2, FLEXIO7         , FLEXIO2    , 0          , 0   ), // FLEXIO2_FLEXIO7
  AF( 5, GPIO    ,  2, PIN7            , GPIO2      , 0          , 0   ), // GPIO2_PIN7
  //( 6, SRC     ,  0, BT_CFG3         , SRC        , 0          , 0   ), // SRC_BT_CFG3
  //( 7, TPSMP   ,  0, HDATA5          , TPSMP      ,            ,     ), // TPSMP_HDATA5
  //(15, B       ,  0, 07              , B0         ,            ,     ), // B0_07
};

const pin_obj_t pin_B0_07 = PIN(B0_07, C7, 2, 7, pin_B0_07_af, 0, 0, 0x401F8158U, 0x401F8348U);

const pin_af_obj_t pin_B0_08_af[] = {
  //( 0, LCDIF   ,  0, DATA4           , LCDIF      , 0          , 0   ), // LCDIF_DATA4
  AF( 1, TMR     ,  3, TIMER2          , TMR3       , 0x401F8584U, 0x2U), // TMR3_TIMER2
  AF( 2, PWM     ,  2, PWMA1           , PWM2       , 0x401F847CU, 0x1U), // FLEXPWM2_PWMA1
  AF( 3, LPUART  ,  3, TX              , LPUART3    , 0x401F853CU, 0x2U), // LPUART3_TX
  //( 4, FLEXIO  ,  2, FLEXIO8         , FLEXIO2    , 0          , 0   ), // FLEXIO2_FLEXIO8
  AF( 5, GPIO    ,  2, PIN8            , GPIO2      , 0          , 0   ), // GPIO2_PIN8
  //( 6, SRC     ,  0, BT_CFG4         , SRC        , 0          , 0   ), // SRC_BT_CFG4
  //( 7, TPSMP   ,  0, HDATA6          , TPSMP      ,            ,     ), // TPSMP_HDATA6
  //(15, B       ,  0, 08              , B0         ,            ,     ), // B0_08
};

const pin_obj_t pin_B0_08 = PIN(B0_08, C8, 2, 8, pin_B0_08_af, 0, 0, 0x401F815CU, 0x401F834CU);

const pin_af_obj_t pin_B0_09_af[] = {
  //( 0, LCDIF   ,  0, DATA5           , LCDIF      , 0          , 0   ), // LCDIF_DATA5
  AF( 1, TMR     ,  4, TIMER0          , TMR4       , 0          , 0   ), // TMR4_TIMER0
  AF( 2, PWM     ,  2, PWMB1           , PWM2       , 0x401F848CU, 0x1U), // FLEXPWM2_PWMB1
  AF( 3, LPUART  ,  3, RX              , LPUART3    , 0x401F8538U, 0x2U), // LPUART3_RX
  //( 4, FLEXIO  ,  2, FLEXIO9         , FLEXIO2    , 0          , 0   ), // FLEXIO2_FLEXIO9
  AF( 5, GPIO    ,  2, PIN9            , GPIO2      , 0          , 0   ), // GPIO2_PIN9
  //( 6, SRC     ,  0, BT_CFG5         , SRC        , 0          , 0   ), // SRC_BT_CFG5
  //( 7, TPSMP   ,  0, HDATA7          , TPSMP      ,            ,     ), // TPSMP_HDATA7
  //(15, B       ,  0, 09              , B0         ,            ,     ), // B0_09
};

const pin_obj_t pin_B0_09 = PIN(B0_09, C9, 2, 9, pin_B0_09_af, 0, 0, 0x401F8160U, 0x401F8350U);

const pin_af_obj_t pin_B1_04_af[] = {
  //( 0, LCDIF   ,  0, DATA16          , LCDIF      , 0          , 0   ), // LCDIF_DATA16
  AF( 1, LPSPI   ,  4, PCS0            , LPSPI4     , 0x401F851CU, 0x1U), // LPSPI4_PCS0
  //( 2, CSI     ,  0, DATA15          , CSI        , 0          , 0   ), // CSI_DATA15
  //( 3, ENET    ,  0, RDATA0          , ENET       , 0x401F8434U, 0x1U), // ENET_RDATA0
  //( 4, FLEXIO  ,  2, FLEXIO20        , FLEXIO2    , 0          , 0   ), // FLEXIO2_FLEXIO20
  AF( 5, GPIO    ,  2, PIN20           , GPIO2      , 0          , 0   ), // GPIO2_PIN20
  //( 6, CSU     ,  0, CSU_ALARM_AUT2  , CSU        , 0          , 0   ), // CSU_CSU_ALARM_AUT2
  //( 7, TPSMP   ,  0, HDATA17         , TPSMP      ,            ,     ), // TPSMP_HDATA17
  //(15, B       ,  1, 04              , B1         ,            ,     ), // B1_04
};

const pin_obj_t pin_B1_04 = PIN(B1_04, C20, 2, 20, pin_B1_04_af, 0, 0, 0x401F818CU, 0x401F837CU);

const pin_af_obj_t pin_B1_05_af[] = {
  //( 0, LCDIF   ,  0, DATA17          , LCDIF      , 0          , 0   ), // LCDIF_DATA17
  AF( 1, LPSPI   ,  4, SDI             , LPSPI4     , 0x401F8524U, 0x1U), // LPSPI4_SDI
  //( 2, CSI     ,  0, DATA14          , CSI        , 0          , 0   ), // CSI_DATA14
  //( 3, ENET    ,  0, RDATA1          , ENET       , 0x401F8438U, 0x1U), // ENET_RDATA1
  //( 4, FLEXIO  ,  2, FLEXIO21        , FLEXIO2    , 0          , 0   ), // FLEXIO2_FLEXIO21
  AF( 5, GPIO    ,  2, PIN21           , GPIO2      , 0          , 0   ), // GPIO2_PIN21
  //( 6, CSU     ,  0, CSU_ALARM_AUT1  , CSU        , 0          , 0   ), // CSU_CSU_ALARM_AUT1
  //( 7, TPSMP   ,  0, HDATA18         , TPSMP      ,            ,     ), // TPSMP_HDATA18
  //(15, B       ,  1, 05              , B1         ,            ,     ), // B1_05
};

const pin_obj_t pin_B1_05 = PIN(B1_05, C21, 2, 21, pin_B1_05_af, 0, 0, 0x401F8190U, 0x401F8380U);

const pin_af_obj_t pin_B1_06_af[] = {
  //( 0, LCDIF   ,  0, DATA18          , LCDIF      , 0          , 0   ), // LCDIF_DATA18
  AF( 1, LPSPI   ,  4, SDO             , LPSPI4     , 0x401F8528U, 0x1U), // LPSPI4_SDO
  //( 2, CSI     ,  0, DATA13          , CSI        , 0          , 0   ), // CSI_DATA13
  //( 3, ENET    ,  0, RX_EN           , ENET       , 0x401F843CU, 0x1U), // ENET_RX_EN
  //( 4, FLEXIO  ,  2, FLEXIO22        , FLEXIO2    , 0          , 0   ), // FLEXIO2_FLEXIO22
  AF( 5, GPIO    ,  2, PIN22           , GPIO2      , 0          , 0   ), // GPIO2_PIN22
  //( 6, CSU     ,  0, CSU_ALARM_AUT0  , CSU        , 0          , 0   ), // CSU_CSU_ALARM_AUT0
  //( 7, TPSMP   ,  0, HDATA20         , TPSMP      ,            ,     ), // TPSMP_HDATA20
  //(15, B       ,  1, 06              , B1         ,            ,     ), // B1_06
};

const pin_obj_t pin_B1_06 = PIN(B1_06, C22, 2, 22, pin_B1_06_af, 0, 0, 0x401F8194U, 0x401F8384U);

const pin_af_obj_t pin_B1_07_af[] = {
  //( 0, LCDIF   ,  0, DATA19          , LCDIF      , 0          , 0   ), // LCDIF_DATA19
  AF( 1, LPSPI   ,  4, SCK             , LPSPI4     , 0x401F8520U, 0x1U), // LPSPI4_SCK
  //( 2, CSI     ,  0, DATA12          , CSI        , 0          , 0   ), // CSI_DATA12
  //( 3, ENET    ,  0, TDATA0          , ENET       , 0          , 0   ), // ENET_TDATA0
  //( 4, FLEXIO  ,  2, FLEXIO23        , FLEXIO2    , 0          , 0   ), // FLEXIO2_FLEXIO23
  AF( 5, GPIO    ,  2, PIN23           , GPIO2      , 0          , 0   ), // GPIO2_PIN23
  //( 6, CSU     ,  0, CSU_INT_DEB     , CSU        , 0          , 0   ), // CSU_CSU_INT_DEB
  //( 7, TPSMP   ,  0, HDATA21         , TPSMP      ,            ,     ), // TPSMP_HDATA21
  //(15, B       ,  1, 07              , B1         ,            ,     ), // B1_07
};

const pin_obj_t pin_B1_07 = PIN(B1_07, C23, 2, 23, pin_B1_07_af, 0, 0, 0x401F8198U, 0x401F8388U);

const pin_af_obj_t pin_B1_08_af[] = {
  //( 0, LCDIF   ,  0, DATA20          , LCDIF      , 0          , 0   ), // LCDIF_DATA20
  AF( 1, TMR     ,  1, TIMER3          , TMR1       , 0          , 0   ), // TMR1_TIMER3
  //( 2, CSI     ,  0, DATA11          , CSI        , 0          , 0   ), // CSI_DATA11
  //( 3, ENET    ,  0, TDATA1          , ENET       , 0          , 0   ), // ENET_TDATA1
  //( 4, FLEXIO  ,  2, FLEXIO24        , FLEXIO2    , 0          , 0   ), // FLEXIO2_FLEXIO24
  AF( 5, GPIO    ,  2, PIN24           , GPIO2      , 0          , 0   ), // GPIO2_PIN24
  //( 6, FLEXCAN ,  2, TX              , FLEXCAN2   , 0          , 0   ), // FLEXCAN2_TX
  //( 7, TPSMP   ,  0, HDATA22         , TPSMP      ,            ,     ), // TPSMP_HDATA22
  //(15, B       ,  1, 08              , B1         ,            ,     ), // B1_08
};

const pin_obj_t pin_B1_08 = PIN(B1_08, C24, 2, 24, pin_B1_08_af, 0, 0, 0x401F819CU, 0x401F838CU);

const pin_af_obj_t pin_B1_09_af[] = {
  //( 0, LCDIF   ,  0, DATA21          , LCDIF      , 0          , 0   ), // LCDIF_DATA21
  AF( 1, TMR     ,  2, TIMER3          , TMR2       , 0x401F8578U, 0x1U), // TMR2_TIMER3
  //( 2, CSI     ,  0, DATA10          , CSI        , 0          , 0   ), // CSI_DATA10
  //( 3, ENET    ,  0, TX_EN           , ENET       , 0          , 0   ), // ENET_TX_EN
  //( 4, FLEXIO  ,  2, FLEXIO25        , FLEXIO2    , 0          , 0   ), // FLEXIO2_FLEXIO25
  AF( 5, GPIO    ,  2, PIN25           , GPIO2      , 0          , 0   ), // GPIO2_PIN25
  //( 6, FLEXCAN ,  2, RX              , FLEXCAN2   , 0x401F8450U, 0x3U), // FLEXCAN2_RX
  //( 7, TPSMP   ,  0, HDATA23         , TPSMP      ,            ,     ), // TPSMP_HDATA23
  //(15, B       ,  1, 09              , B1         ,            ,     ), // B1_09
};

const pin_obj_t pin_B1_09 = PIN(B1_09, C25, 2, 25, pin_B1_09_af, 0, 0, 0x401F81A0U, 0x401F8390U);

const pin_af_obj_t pin_B1_10_af[] = {
  //( 0, LCDIF   ,  0, DATA22          , LCDIF      , 0          , 0   ), // LCDIF_DATA22
  AF( 1, TMR     ,  3, TIMER3          , TMR3       , 0x401F8588U, 0x2U), // TMR3_TIMER3
  //( 2, CSI     ,  0, DATA0           , CSI        , 0          , 0   ), // CSI_DATA0
  //( 3, ENET    ,  0, TX_CLK          , ENET       , 0x401F8448U, 0x1U), // ENET_TX_CLK
  //( 4, FLEXIO  ,  2, FLEXIO26        , FLEXIO2    , 0          , 0   ), // FLEXIO2_FLEXIO26
  AF( 5, GPIO    ,  2, PIN26           , GPIO2      , 0          , 0   ), // GPIO2_PIN26
  //( 6, ENET    ,  0, REF_CLK1        , ENET       , 0x401F842CU, 0x1U), // ENET_REF_CLK1
  //( 7, TPSMP   ,  0, HDATA24         , TPSMP      ,            ,     ), // TPSMP_HDATA24
  //(15, B       ,  1, 10              , B1         ,            ,     ), // B1_10
};

const pin_obj_t pin_B1_10 = PIN(B1_10, C26, 2, 26, pin_B1_10_af, 0, 0, 0x401F81A4U, 0x401F8394U);

const pin_af_obj_t pin_B1_11_af[] = {
  //( 0, LCDIF   ,  0, DATA23          , LCDIF      , 0          , 0   ), // LCDIF_DATA23
  AF( 1, TMR     ,  4, TIMER3          , TMR4       , 0          , 0   ), // TMR4_TIMER3
  //( 2, CSI     ,  0, DATA1           , CSI        , 0          , 0   ), // CSI_DATA1
  //( 3, ENET    ,  0, RX_ER           , ENET       , 0x401F8440U, 0x1U), // ENET_RX_ER
  //( 4, FLEXIO  ,  2, FLEXIO27        , FLEXIO2    , 0          , 0   ), // FLEXIO2_FLEXIO27
  AF( 5, GPIO    ,  2, PIN27           , GPIO2      , 0          , 0   ), // GPIO2_PIN27
  //( 6, LPSPI   ,  4, PCS3            , LPSPI4     , 0          , 0   ), // LPSPI4_PCS3
  //( 7, TPSMP   ,  0, HDATA25         , TPSMP      ,            ,     ), // TPSMP_HDATA25
  //(15, B       ,  1, 11              , B1         ,            ,     ), // B1_11
};

const pin_obj_t pin_B1_11 = PIN(B1_11, C27, 2, 27, pin_B1_11_af, 0, 0, 0x401F81A8U, 0x401F8398U);

const pin_af_obj_t pin_B1_14_af[] = {
  //( 0, ENET    ,  0, MDC             , ENET       , 0          , 0   ), // ENET_MDC
  AF( 1, PWM     ,  4, PWMA2           , PWM4       , 0x401F849CU, 0x1U), // FLEXPWM4_PWMA2
  //( 2, CSI     ,  0, HSYNC           , CSI        , 0x401F8420U, 0x2U), // CSI_HSYNC
  //( 3, XBAR    ,  1, XBAR_IN2        , XBAR1      , 0x401F860CU, 0x1U), // XBAR1_XBAR_IN2
  //( 4, FLEXIO  ,  2, FLEXIO30        , FLEXIO2    , 0          , 0   ), // FLEXIO2_FLEXIO30
  AF( 5, GPIO    ,  2, PIN30           , GPIO2      , 0          , 0   ), // GPIO2_PIN30
  //( 6, USDHC   ,  1, VSELECT         , USDHC1     , 0          , 0   ), // USDHC1_VSELECT
  //( 7, TPSMP   ,  0, HDATA28         , TPSMP      ,            ,     ), // TPSMP_HDATA28
  //(15, B       ,  1, 14              , B1         ,            ,     ), // B1_14
};

const pin_obj_t pin_B1_14 = PIN(B1_14, C30, 2, 30, pin_B1_14_af, 0, 0, 0x401F81B4U, 0x401F83A4U);

const pin_af_obj_t pin_B1_15_af[] = {
  //( 0, ENET    ,  0, MDIO            , ENET       , 0x401F8430U, 0x2U), // ENET_MDIO
  AF( 1, PWM     ,  4, PWMA3           , PWM4       , 0x401F84A0U, 0x1U), // FLEXPWM4_PWMA3
  //( 2, CSI     ,  0, MCLK            , CSI        , 0          , 0   ), // CSI_MCLK
  //( 3, XBAR    ,  1, XBAR_IN3        , XBAR1      , 0x401F8610U, 0x1U), // XBAR1_XBAR_IN3
  //( 4, FLEXIO  ,  2, FLEXIO31        , FLEXIO2    , 0          , 0   ), // FLEXIO2_FLEXIO31
  AF( 5, GPIO    ,  2, PIN31           , GPIO2      , 0          , 0   ), // GPIO2_PIN31
  //( 6, USDHC   ,  1, RESET_B         , USDHC1     , 0          , 0   ), // USDHC1_RESET_B
  //( 7, TPSMP   ,  0, HDATA29         , TPSMP      ,            ,     ), // TPSMP_HDATA29
  //(15, B       ,  1, 15              , B1         ,            ,     ), // B1_15
};

const pin_obj_t pin_B1_15 = PIN(B1_15, C31, 2, 31, pin_B1_15_af, 0, 0, 0x401F81B8U, 0x401F83A8U);

const pin_af_obj_t pin_EMC_41_af[] = {
  //( 0, SEMC    ,  0, CSX0            , SEMC       , 0          , 0   ), // SEMC_CSX0
  AF( 1, GPT     ,  2, CAPTURE1        , GPT2       , 0          , 0   ), // GPT2_CAPTURE1
  //( 2, LPSPI   ,  1, PCS3            , LPSPI1     , 0          , 0   ), // LPSPI1_PCS3
  //( 3, USB     ,  0, OTG2_PWR        , USB        , 0          , 0   ), // USB_OTG2_PWR
  //( 4, ENET    ,  0, MDIO            , ENET       , 0x401F8430U, 0x1U), // ENET_MDIO
  AF( 5, GPIO    ,  3, PIN27           , GPIO3      , 0          , 0   ), // GPIO3_PIN27
  //( 6, USDHC   ,  1, VSELECT         , USDHC1     , 0          , 0   ), // USDHC1_VSELECT
  //(15, EMC     ,  0, 41              , EMC        ,            ,     ), // EMC_41
};

const pin_obj_t pin_EMC_41 = PIN(EMC_41, D27, 3, 27, pin_EMC_41_af, 0, 0, 0x401F80B8U, 0x401F82A8U);

const pin_af_obj_t pin_SD_B0_00_af[] = {
  //( 0, USDHC   ,  1, CMD             , USDHC1     , 0          , 0   ), // USDHC1_CMD
  AF( 1, PWM     ,  1, PWMA0           , PWM1       , 0x401F8458U, 0x1U), // FLEXPWM1_PWMA0
  AF( 2, LPI2C   ,  3, SCL             , LPI2C3     , 0x401F84DCU, 0x1U), // LPI2C3_SCL
  //( 3, XBAR    ,  1, XBAR_INOUT4     , XBAR1      , 0x401F8614U, 0x1U), // XBAR1_XBAR_INOUT4
  AF( 4, LPSPI   ,  1, SCK             , LPSPI1     , 0x401F84F0U, 0x1U), // LPSPI1_SCK
  AF( 5, GPIO    ,  3, PIN12           , GPIO3      , 0          , 0   ), // GPIO3_PIN12
  //( 6, FLEXSPI ,  0, A_SS1_B         , FLEXSPI    , 0          , 0   ), // FLEXSPI_A_SS1_B
  //( 7, TPSMP   ,  0, HDATA30         , TPSMP      ,            ,     ), // TPSMP_HDATA30
  //(15, SD      ,  0, B0_00           , SD         ,            ,     ), // SD_B0_00
};

const pin_obj_t pin_SD_B0_00 = PIN(SD_B0_00, D12, 3, 12, pin_SD_B0_00_af, 0, 0, 0x401F81BCU, 0x401F83ACU);

const pin_af_obj_t pin_SD_B0_01_af[] = {
  //( 0, USDHC   ,  1, CLK             , USDHC1     , 0          , 0   ), // USDHC1_CLK
  AF( 1, PWM     ,  1, PWMB0           , PWM1       , 0x401F8468U, 0x1U), // FLEXPWM1_PWMB0
  AF( 2, LPI2C   ,  3, SDA             , LPI2C3     , 0x401F84E0U, 0x1U), // LPI2C3_SDA
  //( 3, XBAR    ,  1, XBAR_INOUT5     , XBAR1      , 0x401F8618U, 0x1U), // XBAR1_XBAR_INOUT5
  AF( 4, LPSPI   ,  1, PCS0            , LPSPI1     , 0x401F84ECU, 0x0U), // LPSPI1_PCS0
  AF( 5, GPIO    ,  3, PIN13           , GPIO3      , 0          , 0   ), // GPIO3_PIN13
  //( 6, FLEXSPI ,  0, B_SS1_B         , FLEXSPI    , 0          , 0   ), // FLEXSPI_B_SS1_B
  //( 7, TPSMP   ,  0, HDATA31         , TPSMP      ,            ,     ), // TPSMP_HDATA31
  //(15, SD      ,  0, B0_01           , SD         ,            ,     ), // SD_B0_01
};

const pin_obj_t pin_SD_B0_01 = PIN(SD_B0_01, D13, 3, 13, pin_SD_B0_01_af, 0, 0, 0x401F81C0U, 0x401F83B0U);

const pin_af_obj_t pin_SD_B0_02_af[] = {
  //( 0, USDHC   ,  1, DATA0           , USDHC1     , 0          , 0   ), // USDHC1_DATA0
  AF( 1, PWM     ,  1, PWMA1           , PWM1       , 0x401F845CU, 0x1U), // FLEXPWM1_PWMA1
  AF( 2, LPUART  ,  8, CTS_B           , LPUART8    , 0          , 0   ), // LPUART8_CTS_B
  //( 3, XBAR    ,  1, XBAR_INOUT6     , XBAR1      , 0x401F861CU, 0x1U), // XBAR1_XBAR_INOUT6
  AF( 4, LPSPI   ,  1, SDO             , LPSPI1     , 0x401F84F8U, 0x1U), // LPSPI1_SDO
  AF( 5, GPIO    ,  3, PIN14           , GPIO3      , 0          , 0   ), // GPIO3_PIN14
  //( 6, CCM     ,  0, OUT0            , CCM        ,            ,     ), // CCM_OUT0
  //( 7, OBSERVE ,  0, MUX_OUT0        , OBSERVE    ,            ,     ), // OBSERVE_MUX_OUT0
  //(15, SD      ,  0, B0_02           , SD         ,            ,     ), // SD_B0_02
};

const pin_obj_t pin_SD_B0_02 = PIN(SD_B0_02, D14, 3, 14, pin_SD_B0_02_af, 0, 0, 0x401F81C4U, 0x401F83B4U);

const pin_af_obj_t pin_SD_B0_03_af[] = {
  //( 0, USDHC   ,  1, DATA1           , USDHC1     , 0          , 0   ), // USDHC1_DATA1
  AF( 1, PWM     ,  1, PWMB1           , PWM1       , 0x401F846CU, 0x1U), // FLEXPWM1_PWMB1
  AF( 2, LPUART  ,  8, RTS_B           , LPUART8    , 0          , 0   ), // LPUART8_RTS_B
  //( 3, XBAR    ,  1, XBAR_INOUT7     , XBAR1      , 0x401F8620U, 0x1U), // XBAR1_XBAR_INOUT7
  AF( 4, LPSPI   ,  1, SDI             , LPSPI1     , 0x401F84F4U, 0x1U), // LPSPI1_SDI
  AF( 5, GPIO    ,  3, PIN15           , GPIO3      , 0          , 0   ), // GPIO3_PIN15
  //( 6, CCM     ,  0, OUT1            , CCM        ,            ,     ), // CCM_OUT1
  //( 7, OBSERVE ,  0, MUX_OUT1        , OBSERVE    ,            ,     ), // OBSERVE_MUX_OUT1
  //(15, SD      ,  0, B0_03           , SD         ,            ,     ), // SD_B0_03
};

const pin_obj_t pin_SD_B0_03 = PIN(SD_B0_03, D15, 3, 15, pin_SD_B0_03_af, 0, 0, 0x401F81C8U, 0x401F83B8U);

const pin_af_obj_t pin_WAKEUP_af[] = {
  AF( 5, GPIO    ,  5, PIN0            , GPIO5      , 0          , 0   ), // GPIO5_PIN0
};

const pin_obj_t pin_WAKEUP = PIN(WAKEUP, KEY, 5, 0, pin_WAKEUP_af, 0, 0, 0x400A8000U, 0x400A8018U);

STATIC const mp_rom_map_elem_t pin_cpu_pins_locals_dict_table[] = {
  { MP_ROM_QSTR(MP_QSTR_AD_B0_09), MP_ROM_PTR(&pin_AD_B0_09) },
  { MP_ROM_QSTR(MP_QSTR_AD_B0_10), MP_ROM_PTR(&pin_AD_B0_10) },
  { MP_ROM_QSTR(MP_QSTR_AD_B0_11), MP_ROM_PTR(&pin_AD_B0_11) },
  { MP_ROM_QSTR(MP_QSTR_AD_B0_12), MP_ROM_PTR(&pin_AD_B0_12) },
  { MP_ROM_QSTR(MP_QSTR_AD_B0_13), MP_ROM_PTR(&pin_AD_B0_13) },
  { MP_ROM_QSTR(MP_QSTR_AD_B0_14), MP_ROM_PTR(&pin_AD_B0_14) },
  { MP_ROM_QSTR(MP_QSTR_AD_B0_15), MP_ROM_PTR(&pin_AD_B0_15) },
  { MP_ROM_QSTR(MP_QSTR_AD_B1_00), MP_ROM_PTR(&pin_AD_B1_00) },
  { MP_ROM_QSTR(MP_QSTR_AD_B1_01), MP_ROM_PTR(&pin_AD_B1_01) },
  { MP_ROM_QSTR(MP_QSTR_AD_B1_02), MP_ROM_PTR(&pin_AD_B1_02) },
  { MP_ROM_QSTR(MP_QSTR_AD_B1_03), MP_ROM_PTR(&pin_AD_B1_03) },
  { MP_ROM_QSTR(MP_QSTR_AD_B1_05), MP_ROM_PTR(&pin_AD_B1_05) },
  { MP_ROM_QSTR(MP_QSTR_AD_B1_07), MP_ROM_PTR(&pin_AD_B1_07) },
  { MP_ROM_QSTR(MP_QSTR_B0_02), MP_ROM_PTR(&pin_B0_02) },
  { MP_ROM_QSTR(MP_QSTR_B0_03), MP_ROM_PTR(&pin_B0_03) },
  { MP_ROM_QSTR(MP_QSTR_B0_06), MP_ROM_PTR(&pin_B0_06) },
  { MP_ROM_QSTR(MP_QSTR_B0_07), MP_ROM_PTR(&pin_B0_07) },
  { MP_ROM_QSTR(MP_QSTR_B0_08), MP_ROM_PTR(&pin_B0_08) },
  { MP_ROM_QSTR(MP_QSTR_B0_09), MP_ROM_PTR(&pin_B0_09) },
  { MP_ROM_QSTR(MP_QSTR_B1_04), MP_ROM_PTR(&pin_B1_04) },
  { MP_ROM_QSTR(MP_QSTR_B1_05), MP_ROM_PTR(&pin_B1_05) },
  { MP_ROM_QSTR(MP_QSTR_B1_06), MP_ROM_PTR(&pin_B1_06) },
  { MP_ROM_QSTR(MP_QSTR_B1_07), MP_ROM_PTR(&pin_B1_07) },
  { MP_ROM_QSTR(MP_QSTR_B1_08), MP_ROM_PTR(&pin_B1_08) },
  { MP_ROM_QSTR(MP_QSTR_B1_09), MP_ROM_PTR(&pin_B1_09) },
  { MP_ROM_QSTR(MP_QSTR_B1_10), MP_ROM_PTR(&pin_B1_10) },
  { MP_ROM_QSTR(MP_QSTR_B1_11), MP_ROM_PTR(&pin_B1_11) },
  { MP_ROM_QSTR(MP_QSTR_B1_14), MP_ROM_PTR(&pin_B1_14) },
  { MP_ROM_QSTR(MP_QSTR_B1_15), MP_ROM_PTR(&pin_B1_15) },
  { MP_ROM_QSTR(MP_QSTR_EMC_41), MP_ROM_PTR(&pin_EMC_41) },
  { MP_ROM_QSTR(MP_QSTR_SD_B0_00), MP_ROM_PTR(&pin_SD_B0_00) },
  { MP_ROM_QSTR(MP_QSTR_SD_B0_01), MP_ROM_PTR(&pin_SD_B0_01) },
  { MP_ROM_QSTR(MP_QSTR_SD_B0_02), MP_ROM_PTR(&pin_SD_B0_02) },
  { MP_ROM_QSTR(MP_QSTR_SD_B0_03), MP_ROM_PTR(&pin_SD_B0_03) },
  { MP_ROM_QSTR(MP_QSTR_WAKEUP), MP_ROM_PTR(&pin_WAKEUP) },
};
MP_DEFINE_CONST_DICT(pin_cpu_pins_locals_dict, pin_cpu_pins_locals_dict_table);

STATIC const mp_rom_map_elem_t pin_board_pins_locals_dict_table[] = {
  { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_AD_B0_09) },
  { MP_ROM_QSTR(MP_QSTR_B16), MP_ROM_PTR(&pin_AD_B1_00) },
  { MP_ROM_QSTR(MP_QSTR_B17), MP_ROM_PTR(&pin_AD_B1_01) },
  { MP_ROM_QSTR(MP_QSTR_C6), MP_ROM_PTR(&pin_B0_06) },
  { MP_ROM_QSTR(MP_QSTR_C7), MP_ROM_PTR(&pin_B0_07) },
  { MP_ROM_QSTR(MP_QSTR_C2), MP_ROM_PTR(&pin_B0_02) },
  { MP_ROM_QSTR(MP_QSTR_C24), MP_ROM_PTR(&pin_B1_08) },
  { MP_ROM_QSTR(MP_QSTR_C3), MP_ROM_PTR(&pin_B0_03) },
  { MP_ROM_QSTR(MP_QSTR_C25), MP_ROM_PTR(&pin_B1_09) },
  { MP_ROM_QSTR(MP_QSTR_B18), MP_ROM_PTR(&pin_AD_B1_02) },
  { MP_ROM_QSTR(MP_QSTR_B19), MP_ROM_PTR(&pin_AD_B1_03) },
  { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_SD_B0_00) },
  { MP_ROM_QSTR(MP_QSTR_C30), MP_ROM_PTR(&pin_B1_14) },
  { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_SD_B0_01) },
  { MP_ROM_QSTR(MP_QSTR_C31), MP_ROM_PTR(&pin_B1_15) },
  { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_SD_B0_02) },
  { MP_ROM_QSTR(MP_QSTR_C26), MP_ROM_PTR(&pin_B1_10) },
  { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_SD_B0_03) },
  { MP_ROM_QSTR(MP_QSTR_C27), MP_ROM_PTR(&pin_B1_11) },
  { MP_ROM_QSTR(MP_QSTR_C8), MP_ROM_PTR(&pin_B0_08) },
  { MP_ROM_QSTR(MP_QSTR_C9), MP_ROM_PTR(&pin_B0_09) },
  { MP_ROM_QSTR(MP_QSTR_B10), MP_ROM_PTR(&pin_AD_B0_10) },
  { MP_ROM_QSTR(MP_QSTR_B11), MP_ROM_PTR(&pin_AD_B0_11) },
  { MP_ROM_QSTR(MP_QSTR_C20), MP_ROM_PTR(&pin_B1_04) },
  { MP_ROM_QSTR(MP_QSTR_C21), MP_ROM_PTR(&pin_B1_05) },
  { MP_ROM_QSTR(MP_QSTR_C22), MP_ROM_PTR(&pin_B1_06) },
  { MP_ROM_QSTR(MP_QSTR_C23), MP_ROM_PTR(&pin_B1_07) },
  { MP_ROM_QSTR(MP_QSTR_B9), MP_ROM_PTR(&pin_AD_B0_09) },
  { MP_ROM_QSTR(MP_QSTR_B10), MP_ROM_PTR(&pin_AD_B0_10) },
  { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_EMC_41) },
  { MP_ROM_QSTR(MP_QSTR_B12), MP_ROM_PTR(&pin_AD_B0_12) },
  { MP_ROM_QSTR(MP_QSTR_B13), MP_ROM_PTR(&pin_AD_B0_13) },
  { MP_ROM_QSTR(MP_QSTR_B14), MP_ROM_PTR(&pin_AD_B0_14) },
  { MP_ROM_QSTR(MP_QSTR_B15), MP_ROM_PTR(&pin_AD_B0_15) },
  { MP_ROM_QSTR(MP_QSTR_B21), MP_ROM_PTR(&pin_AD_B1_05) },
  { MP_ROM_QSTR(MP_QSTR_B23), MP_ROM_PTR(&pin_AD_B1_07) },
  { MP_ROM_QSTR(MP_QSTR_KEY), MP_ROM_PTR(&pin_WAKEUP) },
  { MP_ROM_QSTR(MP_QSTR_DBG_RXD), MP_ROM_PTR(&pin_AD_B0_13) },
  { MP_ROM_QSTR(MP_QSTR_DBG_TXD), MP_ROM_PTR(&pin_AD_B0_12) },
};
MP_DEFINE_CONST_DICT(pin_board_pins_locals_dict, pin_board_pins_locals_dict_table);

const pin_obj_t * const pin_adc1[] = {
  NULL,    // 0
  &pin_AD_B0_12, // 1
  &pin_AD_B0_13, // 2
  &pin_AD_B0_14, // 3
  &pin_AD_B0_15, // 4
  &pin_AD_B1_00, // 5
  &pin_AD_B1_01, // 6
  &pin_AD_B1_02, // 7
  &pin_AD_B1_03, // 8
  NULL,    // 9
  &pin_AD_B1_05, // 10
  NULL,    // 11
  &pin_AD_B1_07, // 12
  NULL,    // 13
  NULL,    // 14
  NULL,    // 15
  NULL,    // 16
};

const pin_obj_t * const pin_adc2[] = {
  NULL,    // 0
  NULL,    // 1
  NULL,    // 2
  NULL,    // 3
  NULL,    // 4
  NULL,    // 5
  NULL,    // 6
  NULL,    // 7
  NULL,    // 8
  NULL,    // 9
  NULL,    // 10
  NULL,    // 11
  NULL,    // 12
  NULL,    // 13
  NULL,    // 14
  NULL,    // 15
  NULL,    // 16
};
