/*
 * Copyright 2025 NXP
 * All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

/***********************************************************************************************************************
 * This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file
 * will be overwritten if the respective MCUXpresso Config Tools is used to update this file.
 **********************************************************************************************************************/

/* clang-format off */
/*
 * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
!!GlobalInfo
product: Pins v17.0
processor: MCXA153
package_id: MCXA153VLH
mcu_data: ksdk2_0
processor_version: 25.09.10
board: FRDM-MCXA153
external_user_signals: {}
 * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
 */
/* clang-format on */

#include "fsl_common.h"
#include "fsl_port.h"
#include "fsl_gpio.h"
#include "pin_mux.h"

/* FUNCTION ************************************************************************************************************
 *
 * Function Name : BOARD_InitBootPins
 * Description   : Calls initialization functions.
 *
 * END ****************************************************************************************************************/
void BOARD_InitBootPins(void)
{
    BOARD_InitDEBUG_UARTPins();
    BOARD_InitLEDsPins();
    BOARD_InitBUTTONsPins();
}

/* clang-format off */
/*
 * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitDEBUG_UARTPins:
- options: {callFromInitBoot: 'true', coreID: cm33_core0, enableClock: 'true'}
- pin_list:
  - {pin_num: '51', peripheral: LPUART0, signal: RX, pin_signal: P0_2/TDO/SWO/LPUART0_RXD/LPSPI0_SCK/CT0_MAT0/UTICK_CAP0/I3C0_PUR, slew_rate: fast, open_drain: disable,
    drive_strength: high, pull_select: down, pull_enable: disable, input_buffer: enable, invert_input: normal}
  - {pin_num: '52', peripheral: LPUART0, signal: TX, pin_signal: P0_3/TDI/LPUART0_TXD/LPSPI0_SDO/CT0_MAT1/UTICK_CAP1/CMP0_OUT/CMP1_IN1, slew_rate: fast, open_drain: disable,
    drive_strength: low, pull_select: up, pull_enable: enable, input_buffer: enable, invert_input: normal}
 * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
 */
/* clang-format on */

/* FUNCTION ************************************************************************************************************
 *
 * Function Name : BOARD_InitDEBUG_UARTPins
 * Description   : Configures pin routing and optionally pin electrical features.
 *
 * END ****************************************************************************************************************/
void BOARD_InitDEBUG_UARTPins(void)
{
    /* Write to PORT0: Peripheral clock is enabled */
    CLOCK_EnableClock(kCLOCK_GatePORT0);
    /* LPUART0 peripheral is released from reset */
    RESET_ReleasePeripheralReset(kLPUART0_RST_SHIFT_RSTn);
    /* PORT0 peripheral is released from reset */
    RESET_ReleasePeripheralReset(kPORT0_RST_SHIFT_RSTn);

    const port_pin_config_t DEBUG_UART_RX = {/* Internal pull-up/down resistor is disabled */
                                             .pullSelect = kPORT_PullDisable,
                                             /* Low internal pull resistor value is selected. */
                                             .pullValueSelect = kPORT_LowPullResistor,
                                             /* Fast slew rate is configured */
                                             .slewRate = kPORT_FastSlewRate,
                                             /* Passive input filter is disabled */
                                             .passiveFilterEnable = kPORT_PassiveFilterDisable,
                                             /* Open drain output is disabled */
                                             .openDrainEnable = kPORT_OpenDrainDisable,
                                             /* High drive strength is configured */
                                             .driveStrength = kPORT_HighDriveStrength,
                                             /* Normal drive strength is configured */
                                             .driveStrength1 = kPORT_NormalDriveStrength,
                                             /* Pin is configured as LPUART0_RXD */
                                             .mux = kPORT_MuxAlt2,
                                             /* Digital input enabled */
                                             .inputBuffer = kPORT_InputBufferEnable,
                                             /* Digital input is not inverted */
                                             .invertInput = kPORT_InputNormal,
                                             /* Pin Control Register fields [15:0] are not locked */
                                             .lockRegister = kPORT_UnlockRegister};
    /* PORT0_2 (pin 51) is configured as LPUART0_RXD */
    PORT_SetPinConfig(BOARD_INITDEBUG_UARTPINS_DEBUG_UART_RX_PORT, BOARD_INITDEBUG_UARTPINS_DEBUG_UART_RX_PIN, &DEBUG_UART_RX);

    const port_pin_config_t DEBUG_UART_TX = {/* Internal pull-up resistor is enabled */
                                             .pullSelect = kPORT_PullUp,
                                             /* Low internal pull resistor value is selected. */
                                             .pullValueSelect = kPORT_LowPullResistor,
                                             /* Fast slew rate is configured */
                                             .slewRate = kPORT_FastSlewRate,
                                             /* Passive input filter is disabled */
                                             .passiveFilterEnable = kPORT_PassiveFilterDisable,
                                             /* Open drain output is disabled */
                                             .openDrainEnable = kPORT_OpenDrainDisable,
                                             /* Low drive strength is configured */
                                             .driveStrength = kPORT_LowDriveStrength,
                                             /* Normal drive strength is configured */
                                             .driveStrength1 = kPORT_NormalDriveStrength,
                                             /* Pin is configured as LPUART0_TXD */
                                             .mux = kPORT_MuxAlt2,
                                             /* Digital input enabled */
                                             .inputBuffer = kPORT_InputBufferEnable,
                                             /* Digital input is not inverted */
                                             .invertInput = kPORT_InputNormal,
                                             /* Pin Control Register fields [15:0] are not locked */
                                             .lockRegister = kPORT_UnlockRegister};
    /* PORT0_3 (pin 52) is configured as LPUART0_TXD */
    PORT_SetPinConfig(BOARD_INITDEBUG_UARTPINS_DEBUG_UART_TX_PORT, BOARD_INITDEBUG_UARTPINS_DEBUG_UART_TX_PIN, &DEBUG_UART_TX);
}

/* clang-format off */
/*
 * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitSWD_DEBUGPins:
- options: {callFromInitBoot: 'false', coreID: cm33_core0, enableClock: 'true'}
- pin_list:
  - {pin_num: '50', peripheral: SWD, signal: SWCLK, pin_signal: P0_1/TCLK/SWCLK/LPUART0_CTS_B/LPSPI0_SDI/CT_INP1, slew_rate: fast, open_drain: disable, drive_strength: low,
    pull_select: down, pull_enable: enable, input_buffer: enable, invert_input: normal}
  - {pin_num: '49', peripheral: SWD, signal: SWDIO, pin_signal: P0_0/TMS/SWDIO/LPUART0_RTS_B/LPSPI0_PCS0/CT_INP0, slew_rate: fast, open_drain: disable, drive_strength: high,
    pull_select: up, pull_enable: enable, input_buffer: enable, invert_input: normal}
  - {pin_num: '51', peripheral: SWD, signal: SWO, pin_signal: P0_2/TDO/SWO/LPUART0_RXD/LPSPI0_SCK/CT0_MAT0/UTICK_CAP0/I3C0_PUR, slew_rate: fast, open_drain: disable,
    drive_strength: high, pull_select: down, pull_enable: disable, input_buffer: enable, invert_input: normal}
 * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
 */
/* clang-format on */

/* FUNCTION ************************************************************************************************************
 *
 * Function Name : BOARD_InitSWD_DEBUGPins
 * Description   : Configures pin routing and optionally pin electrical features.
 *
 * END ****************************************************************************************************************/
void BOARD_InitSWD_DEBUGPins(void)
{
    /* Write to PORT0: Peripheral clock is enabled */
    CLOCK_EnableClock(kCLOCK_GatePORT0);
    /* PORT0 peripheral is released from reset */
    RESET_ReleasePeripheralReset(kPORT0_RST_SHIFT_RSTn);
    /* LPUART0 peripheral is released from reset */
    RESET_ReleasePeripheralReset(kLPUART0_RST_SHIFT_RSTn);

    const port_pin_config_t DEBUG_SWD_SWDIO = {/* Internal pull-up resistor is enabled */
                                               .pullSelect = kPORT_PullUp,
                                               /* Low internal pull resistor value is selected. */
                                               .pullValueSelect = kPORT_LowPullResistor,
                                               /* Fast slew rate is configured */
                                               .slewRate = kPORT_FastSlewRate,
                                               /* Passive input filter is disabled */
                                               .passiveFilterEnable = kPORT_PassiveFilterDisable,
                                               /* Open drain output is disabled */
                                               .openDrainEnable = kPORT_OpenDrainDisable,
                                               /* High drive strength is configured */
                                               .driveStrength = kPORT_HighDriveStrength,
                                               /* Normal drive strength is configured */
                                               .driveStrength1 = kPORT_NormalDriveStrength,
                                               /* Pin is configured as SWDIO */
                                               .mux = kPORT_MuxAlt1,
                                               /* Digital input enabled */
                                               .inputBuffer = kPORT_InputBufferEnable,
                                               /* Digital input is not inverted */
                                               .invertInput = kPORT_InputNormal,
                                               /* Pin Control Register fields [15:0] are not locked */
                                               .lockRegister = kPORT_UnlockRegister};
    /* PORT0_0 (pin 49) is configured as SWDIO */
    PORT_SetPinConfig(BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_SWDIO_PORT, BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_SWDIO_PIN, &DEBUG_SWD_SWDIO);

    const port_pin_config_t DEBUG_SWD_SWDCLK = {/* Internal pull-down resistor is enabled */
                                                .pullSelect = kPORT_PullDown,
                                                /* Low internal pull resistor value is selected. */
                                                .pullValueSelect = kPORT_LowPullResistor,
                                                /* Fast slew rate is configured */
                                                .slewRate = kPORT_FastSlewRate,
                                                /* Passive input filter is disabled */
                                                .passiveFilterEnable = kPORT_PassiveFilterDisable,
                                                /* Open drain output is disabled */
                                                .openDrainEnable = kPORT_OpenDrainDisable,
                                                /* Low drive strength is configured */
                                                .driveStrength = kPORT_LowDriveStrength,
                                                /* Normal drive strength is configured */
                                                .driveStrength1 = kPORT_NormalDriveStrength,
                                                /* Pin is configured as SWCLK */
                                                .mux = kPORT_MuxAlt1,
                                                /* Digital input enabled */
                                                .inputBuffer = kPORT_InputBufferEnable,
                                                /* Digital input is not inverted */
                                                .invertInput = kPORT_InputNormal,
                                                /* Pin Control Register fields [15:0] are not locked */
                                                .lockRegister = kPORT_UnlockRegister};
    /* PORT0_1 (pin 50) is configured as SWCLK */
    PORT_SetPinConfig(BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_SWDCLK_PORT, BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_SWDCLK_PIN, &DEBUG_SWD_SWDCLK);

    const port_pin_config_t DEBUG_UART_RX = {/* Internal pull-up/down resistor is disabled */
                                             .pullSelect = kPORT_PullDisable,
                                             /* Low internal pull resistor value is selected. */
                                             .pullValueSelect = kPORT_LowPullResistor,
                                             /* Fast slew rate is configured */
                                             .slewRate = kPORT_FastSlewRate,
                                             /* Passive input filter is disabled */
                                             .passiveFilterEnable = kPORT_PassiveFilterDisable,
                                             /* Open drain output is disabled */
                                             .openDrainEnable = kPORT_OpenDrainDisable,
                                             /* High drive strength is configured */
                                             .driveStrength = kPORT_HighDriveStrength,
                                             /* Normal drive strength is configured */
                                             .driveStrength1 = kPORT_NormalDriveStrength,
                                             /* Pin is configured as SWO */
                                             .mux = kPORT_MuxAlt1,
                                             /* Digital input enabled */
                                             .inputBuffer = kPORT_InputBufferEnable,
                                             /* Digital input is not inverted */
                                             .invertInput = kPORT_InputNormal,
                                             /* Pin Control Register fields [15:0] are not locked */
                                             .lockRegister = kPORT_UnlockRegister};
    /* PORT0_2 (pin 51) is configured as SWO */
    PORT_SetPinConfig(BOARD_INITSWD_DEBUGPINS_DEBUG_UART_RX_PORT, BOARD_INITSWD_DEBUGPINS_DEBUG_UART_RX_PIN, &DEBUG_UART_RX);
}

/* clang-format off */
/*
 * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitLEDsPins:
- options: {callFromInitBoot: 'true', coreID: cm33_core0, enableClock: 'true'}
- pin_list:
  - {pin_num: '37', peripheral: GPIO3, signal: 'GPIO, 13', pin_signal: P3_13/LPUART2_CTS_B/CT1_MAT3/PWM0_X1, direction: OUTPUT, gpio_init_state: 'true', slew_rate: fast,
    open_drain: disable, drive_strength: low, pull_select: up, pull_enable: disable, input_buffer: enable, invert_input: normal}
  - {pin_num: '38', peripheral: GPIO3, signal: 'GPIO, 12', pin_signal: P3_12/LPUART2_RTS_B/CT1_MAT2/PWM0_X0, direction: OUTPUT, gpio_init_state: 'true', slew_rate: fast,
    open_drain: disable, drive_strength: low, pull_select: up, pull_enable: disable, input_buffer: enable, invert_input: normal}
  - {pin_num: '46', peripheral: GPIO3, signal: 'GPIO, 0', pin_signal: P3_0/WUU0_IN22/TRIG_IN0/CT_INP16/PWM0_A0, direction: OUTPUT, gpio_init_state: 'true', slew_rate: fast,
    open_drain: disable, drive_strength: low, pull_select: up, pull_enable: disable, passive_filter: disable, input_buffer: enable, invert_input: normal}
 * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
 */
/* clang-format on */

/* FUNCTION ************************************************************************************************************
 *
 * Function Name : BOARD_InitLEDsPins
 * Description   : Configures pin routing and optionally pin electrical features.
 *
 * END ****************************************************************************************************************/
void BOARD_InitLEDsPins(void)
{
    /* Write to GPIO3: Peripheral clock is enabled */
    CLOCK_EnableClock(kCLOCK_GateGPIO3);
    /* Write to PORT3: Peripheral clock is enabled */
    CLOCK_EnableClock(kCLOCK_GatePORT3);
    /* GPIO3 peripheral is released from reset */
    RESET_ReleasePeripheralReset(kGPIO3_RST_SHIFT_RSTn);
    /* PORT3 peripheral is released from reset */
    RESET_ReleasePeripheralReset(kPORT3_RST_SHIFT_RSTn);

    gpio_pin_config_t LED_BLUE_config = {
        .pinDirection = kGPIO_DigitalOutput,
        .outputLogic = 1U
    };
    /* Initialize GPIO functionality on pin PIO3_0 (pin 46)  */
    GPIO_PinInit(BOARD_INITLEDSPINS_LED_BLUE_GPIO, BOARD_INITLEDSPINS_LED_BLUE_PIN, &LED_BLUE_config);

    gpio_pin_config_t LED_RED_config = {
        .pinDirection = kGPIO_DigitalOutput,
        .outputLogic = 1U
    };
    /* Initialize GPIO functionality on pin PIO3_12 (pin 38)  */
    GPIO_PinInit(BOARD_INITLEDSPINS_LED_RED_GPIO, BOARD_INITLEDSPINS_LED_RED_PIN, &LED_RED_config);

    gpio_pin_config_t LED_GREEN_config = {
        .pinDirection = kGPIO_DigitalOutput,
        .outputLogic = 1U
    };
    /* Initialize GPIO functionality on pin PIO3_13 (pin 37)  */
    GPIO_PinInit(BOARD_INITLEDSPINS_LED_GREEN_GPIO, BOARD_INITLEDSPINS_LED_GREEN_PIN, &LED_GREEN_config);

    /* PORT3_0 (pin 46) is configured as P3_0 */
    PORT_SetPinMux(BOARD_INITLEDSPINS_LED_BLUE_PORT, BOARD_INITLEDSPINS_LED_BLUE_PIN, kPORT_MuxAlt0);

    PORT3->PCR[0] =
        ((PORT3->PCR[0] &
          /* Mask bits to zero which are setting */
          (~(PORT_PCR_PS_MASK | PORT_PCR_PE_MASK | PORT_PCR_SRE_MASK | PORT_PCR_PFE_MASK | PORT_PCR_ODE_MASK | PORT_PCR_DSE_MASK | PORT_PCR_IBE_MASK | PORT_PCR_INV_MASK)))

         /* Pull Select: Enables internal pullup resistor. */
         | PORT_PCR_PS(PCR_PS_ps1)

         /* Pull Enable: Disables. */
         | PORT_PCR_PE(PCR_PE_pe0)

         /* Slew Rate Enable: Fast. */
         | PORT_PCR_SRE(PCR_SRE_sre0)

         /* Passive Filter Enable: Disables. */
         | PORT_PCR_PFE(PCR_PFE_pfe0)

         /* Open Drain Enable: Disables. */
         | PORT_PCR_ODE(PCR_ODE_ode0)

         /* Drive Strength Enable: Low. */
         | PORT_PCR_DSE(PCR_DSE_dse0)

         /* Input Buffer Enable: Enables. */
         | PORT_PCR_IBE(PCR_IBE_ibe1)

         /* Invert Input: Does not invert. */
         | PORT_PCR_INV(PCR_INV_inv0));

    /* PORT3_12 (pin 38) is configured as P3_12 */
    PORT_SetPinMux(BOARD_INITLEDSPINS_LED_RED_PORT, BOARD_INITLEDSPINS_LED_RED_PIN, kPORT_MuxAlt0);

    PORT3->PCR[12] =
        ((PORT3->PCR[12] &
          /* Mask bits to zero which are setting */
          (~(PORT_PCR_PS_MASK | PORT_PCR_PE_MASK | PORT_PCR_SRE_MASK | PORT_PCR_ODE_MASK | PORT_PCR_DSE_MASK | PORT_PCR_IBE_MASK | PORT_PCR_INV_MASK)))

         /* Pull Select: Enables internal pullup resistor. */
         | PORT_PCR_PS(PCR_PS_ps1)

         /* Pull Enable: Disables. */
         | PORT_PCR_PE(PCR_PE_pe0)

         /* Slew Rate Enable: Fast. */
         | PORT_PCR_SRE(PCR_SRE_sre0)

         /* Open Drain Enable: Disables. */
         | PORT_PCR_ODE(PCR_ODE_ode0)

         /* Drive Strength Enable: Low. */
         | PORT_PCR_DSE(PCR_DSE_dse0)

         /* Input Buffer Enable: Enables. */
         | PORT_PCR_IBE(PCR_IBE_ibe1)

         /* Invert Input: Does not invert. */
         | PORT_PCR_INV(PCR_INV_inv0));

    /* PORT3_13 (pin 37) is configured as P3_13 */
    PORT_SetPinMux(BOARD_INITLEDSPINS_LED_GREEN_PORT, BOARD_INITLEDSPINS_LED_GREEN_PIN, kPORT_MuxAlt0);

    PORT3->PCR[13] =
        ((PORT3->PCR[13] &
          /* Mask bits to zero which are setting */
          (~(PORT_PCR_PS_MASK | PORT_PCR_PE_MASK | PORT_PCR_SRE_MASK | PORT_PCR_ODE_MASK | PORT_PCR_DSE_MASK | PORT_PCR_IBE_MASK | PORT_PCR_INV_MASK)))

         /* Pull Select: Enables internal pullup resistor. */
         | PORT_PCR_PS(PCR_PS_ps1)

         /* Pull Enable: Disables. */
         | PORT_PCR_PE(PCR_PE_pe0)

         /* Slew Rate Enable: Fast. */
         | PORT_PCR_SRE(PCR_SRE_sre0)

         /* Open Drain Enable: Disables. */
         | PORT_PCR_ODE(PCR_ODE_ode0)

         /* Drive Strength Enable: Low. */
         | PORT_PCR_DSE(PCR_DSE_dse0)

         /* Input Buffer Enable: Enables. */
         | PORT_PCR_IBE(PCR_IBE_ibe1)

         /* Invert Input: Does not invert. */
         | PORT_PCR_INV(PCR_INV_inv0));
}

/* clang-format off */
/*
 * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
BOARD_InitBUTTONsPins:
- options: {callFromInitBoot: 'true', coreID: cm33_core0, enableClock: 'true'}
- pin_list:
  - {pin_num: '1', peripheral: GPIO1, signal: 'GPIO, 7', pin_signal: P1_7/WUU0_IN9/TRIG_OUT2/LPUART2_CTS_B/CT_INP7/ADC0_A23, slew_rate: fast, open_drain: disable,
    drive_strength: low, pull_select: down, pull_enable: disable, input_buffer: enable, invert_input: normal}
  - {pin_num: '8', peripheral: GPIO1, signal: 'GPIO, 29', pin_signal: P1_29/RESET_B/SPC_LPREQ, slew_rate: fast, open_drain: enable, drive_strength: low, pull_select: up,
    pull_enable: enable, passive_filter: enable, pull_value: low, input_buffer: enable, invert_input: normal}
  - {pin_num: '32', peripheral: GPIO3, signal: 'GPIO, 29', pin_signal: P3_29/WUU0_IN27/ISPMODE_N/CT_INP3/ADC0_A14, slew_rate: fast, open_drain: disable, drive_strength: low,
    pull_select: up, pull_enable: enable, input_buffer: enable, invert_input: normal}
 * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
 */
/* clang-format on */

/* FUNCTION ************************************************************************************************************
 *
 * Function Name : BOARD_InitBUTTONsPins
 * Description   : Configures pin routing and optionally pin electrical features.
 *
 * END ****************************************************************************************************************/
void BOARD_InitBUTTONsPins(void)
{
    /* Write to PORT1: Peripheral clock is enabled */
    CLOCK_EnableClock(kCLOCK_GatePORT1);
    /* Write to PORT3: Peripheral clock is enabled */
    CLOCK_EnableClock(kCLOCK_GatePORT3);
    /* GPIO1 peripheral is released from reset */
    RESET_ReleasePeripheralReset(kGPIO1_RST_SHIFT_RSTn);
    /* PORT1 peripheral is released from reset */
    RESET_ReleasePeripheralReset(kPORT1_RST_SHIFT_RSTn);
    /* GPIO3 peripheral is released from reset */
    RESET_ReleasePeripheralReset(kGPIO3_RST_SHIFT_RSTn);
    /* PORT3 peripheral is released from reset */
    RESET_ReleasePeripheralReset(kPORT3_RST_SHIFT_RSTn);

    const port_pin_config_t SW1 = {/* Internal pull-up resistor is enabled */
                                   .pullSelect = kPORT_PullUp,
                                   /* Low internal pull resistor value is selected. */
                                   .pullValueSelect = kPORT_LowPullResistor,
                                   /* Fast slew rate is configured */
                                   .slewRate = kPORT_FastSlewRate,
                                   /* Passive input filter is enabled */
                                   .passiveFilterEnable = kPORT_PassiveFilterEnable,
                                   /* Open drain output is enabled */
                                   .openDrainEnable = kPORT_OpenDrainEnable,
                                   /* Low drive strength is configured */
                                   .driveStrength = kPORT_LowDriveStrength,
                                   /* Normal drive strength is configured */
                                   .driveStrength1 = kPORT_NormalDriveStrength,
                                   /* Pin is configured as P1_29 */
                                   .mux = kPORT_MuxAlt0,
                                   /* Digital input enabled */
                                   .inputBuffer = kPORT_InputBufferEnable,
                                   /* Digital input is not inverted */
                                   .invertInput = kPORT_InputNormal,
                                   /* Pin Control Register fields [15:0] are not locked */
                                   .lockRegister = kPORT_UnlockRegister};
    /* PORT1_29 (pin 8) is configured as P1_29 */
    PORT_SetPinConfig(BOARD_INITBUTTONSPINS_SW1_PORT, BOARD_INITBUTTONSPINS_SW1_PIN, &SW1);

    const port_pin_config_t SW3 = {/* Internal pull-up/down resistor is disabled */
                                   .pullSelect = kPORT_PullDisable,
                                   /* Low internal pull resistor value is selected. */
                                   .pullValueSelect = kPORT_LowPullResistor,
                                   /* Fast slew rate is configured */
                                   .slewRate = kPORT_FastSlewRate,
                                   /* Passive input filter is disabled */
                                   .passiveFilterEnable = kPORT_PassiveFilterDisable,
                                   /* Open drain output is disabled */
                                   .openDrainEnable = kPORT_OpenDrainDisable,
                                   /* Low drive strength is configured */
                                   .driveStrength = kPORT_LowDriveStrength,
                                   /* Normal drive strength is configured */
                                   .driveStrength1 = kPORT_NormalDriveStrength,
                                   /* Pin is configured as P1_7 */
                                   .mux = kPORT_MuxAlt0,
                                   /* Digital input enabled */
                                   .inputBuffer = kPORT_InputBufferEnable,
                                   /* Digital input is not inverted */
                                   .invertInput = kPORT_InputNormal,
                                   /* Pin Control Register fields [15:0] are not locked */
                                   .lockRegister = kPORT_UnlockRegister};
    /* PORT1_7 (pin 1) is configured as P1_7 */
    PORT_SetPinConfig(BOARD_INITBUTTONSPINS_SW3_PORT, BOARD_INITBUTTONSPINS_SW3_PIN, &SW3);

    const port_pin_config_t ISP = {/* Internal pull-up resistor is enabled */
                                   .pullSelect = kPORT_PullUp,
                                   /* Low internal pull resistor value is selected. */
                                   .pullValueSelect = kPORT_LowPullResistor,
                                   /* Fast slew rate is configured */
                                   .slewRate = kPORT_FastSlewRate,
                                   /* Passive input filter is disabled */
                                   .passiveFilterEnable = kPORT_PassiveFilterDisable,
                                   /* Open drain output is disabled */
                                   .openDrainEnable = kPORT_OpenDrainDisable,
                                   /* Low drive strength is configured */
                                   .driveStrength = kPORT_LowDriveStrength,
                                   /* Normal drive strength is configured */
                                   .driveStrength1 = kPORT_NormalDriveStrength,
                                   /* Pin is configured as P3_29 */
                                   .mux = kPORT_MuxAlt0,
                                   /* Digital input enabled */
                                   .inputBuffer = kPORT_InputBufferEnable,
                                   /* Digital input is not inverted */
                                   .invertInput = kPORT_InputNormal,
                                   /* Pin Control Register fields [15:0] are not locked */
                                   .lockRegister = kPORT_UnlockRegister};
    /* PORT3_29 (pin 32) is configured as P3_29 */
    PORT_SetPinConfig(BOARD_INITBUTTONSPINS_ISP_PORT, BOARD_INITBUTTONSPINS_ISP_PIN, &ISP);
}
/***********************************************************************************************************************
 * EOF
 **********************************************************************************************************************/
