/* * Copyright 2020 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. **********************************************************************************************************************/ /* * TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* !!GlobalInfo product: Pins v7.0 processor: MIMXRT1021xxxxx package_id: MIMXRT1021DAG5A mcu_data: ksdk2_0 processor_version: 7.0.1 board: MIMXRT1020-EVK pin_labels: - {pin_num: '105', pin_signal: GPIO_AD_B0_06, label: 'UART1_TXD/J17[6]', identifier: UART1_TXD;TX} - {pin_num: '101', pin_signal: GPIO_AD_B0_07, label: 'UART1_RXD/J17[4]', identifier: UART1_RXD;RX_GPIO;RX} power_domains: {NVCC_GPIO: '3.3'} * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** */ #include "fsl_common.h" #include "fsl_iomuxc.h" #include "fsl_gpio.h" #include "pin_mux.h" /* FUNCTION ************************************************************************************************************ * * Function Name : BOARD_InitBootPins * Description : Calls initialization functions. * * END ****************************************************************************************************************/ void BOARD_InitBootPins(void) { } /* * TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* UART1_PollForActivity: - options: {callFromInitBoot: 'false', coreID: core0, enableClock: 'false'} - pin_list: - {pin_num: '101', peripheral: GPIO1, signal: 'gpio_io, 07', pin_signal: GPIO_AD_B0_07, identifier: RX_GPIO, direction: INPUT, pull_up_down_config: Pull_Up_100K_Ohm} * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** */ /* FUNCTION ************************************************************************************************************ * * Function Name : UART1_PollForActivity * Description : Configures pin routing and optionally pin electrical features. * * END ****************************************************************************************************************/ void UART1_PollForActivity(void) { /* GPIO configuration of RX_GPIO on GPIO_AD_B0_07 (pin 101) */ gpio_pin_config_t RX_GPIO_config = { .direction = kGPIO_DigitalInput, .outputLogic = 0U, .interruptMode = kGPIO_NoIntmode }; /* Initialize GPIO functionality on GPIO_AD_B0_07 (pin 101) */ GPIO_PinInit(GPIO1, 7U, &RX_GPIO_config); IOMUXC_SetPinMux( IOMUXC_GPIO_AD_B0_07_GPIO1_IO07, /* GPIO_AD_B0_07 is configured as GPIO1_IO07 */ 0U); /* Software Input On Field: Input Path is determined by functionality */ IOMUXC_SetPinConfig( IOMUXC_GPIO_AD_B0_07_GPIO1_IO07, /* GPIO_AD_B0_07 PAD functional properties : */ 0x90B0U); /* Slew Rate Field: Slow Slew Rate Drive Strength Field: R0/6 Speed Field: medium(100MHz) Open Drain Enable Field: Open Drain Disabled Pull / Keep Enable Field: Pull/Keeper Enabled Pull / Keep Select Field: Keeper Pull Up / Down Config. Field: 100K Ohm Pull Up Hyst. Enable Field: Hysteresis Disabled */ } /* * TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* UART1_InitPins: - options: {callFromInitBoot: 'false', prefix: UART1_, coreID: core0, enableClock: 'false'} - pin_list: - {pin_num: '101', peripheral: LPUART1, signal: RX, pin_signal: GPIO_AD_B0_07, identifier: RX, pull_keeper_select: Pull, pull_up_down_config: Pull_Up_47K_Ohm} - {pin_num: '105', peripheral: LPUART1, signal: TX, pin_signal: GPIO_AD_B0_06, identifier: TX, pull_keeper_select: Pull, pull_up_down_config: Pull_Up_47K_Ohm} * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** */ /* FUNCTION ************************************************************************************************************ * * Function Name : UART1_InitPins * Description : Configures pin routing and optionally pin electrical features. * * END ****************************************************************************************************************/ void UART1_InitPins(void) { IOMUXC_SetPinMux( IOMUXC_GPIO_AD_B0_06_LPUART1_TX, /* GPIO_AD_B0_06 is configured as LPUART1_TX */ 0U); /* Software Input On Field: Input Path is determined by functionality */ IOMUXC_SetPinMux( IOMUXC_GPIO_AD_B0_07_LPUART1_RX, /* GPIO_AD_B0_07 is configured as LPUART1_RX */ 0U); /* Software Input On Field: Input Path is determined by functionality */ IOMUXC_SetPinConfig( IOMUXC_GPIO_AD_B0_06_LPUART1_TX, /* GPIO_AD_B0_06 PAD functional properties : */ 0x70B0U); /* Slew Rate Field: Slow Slew Rate Drive Strength Field: R0/6 Speed Field: medium(100MHz) Open Drain Enable Field: Open Drain Disabled Pull / Keep Enable Field: Pull/Keeper Enabled Pull / Keep Select Field: Pull Pull Up / Down Config. Field: 47K Ohm Pull Up Hyst. Enable Field: Hysteresis Disabled */ IOMUXC_SetPinConfig( IOMUXC_GPIO_AD_B0_07_GPIO1_IO07, /* GPIO_AD_B0_07 PAD functional properties : */ 0x70B0U); /* Slew Rate Field: Slow Slew Rate Drive Strength Field: R0/6 Speed Field: medium(100MHz) Open Drain Enable Field: Open Drain Disabled Pull / Keep Enable Field: Pull/Keeper Enabled Pull / Keep Select Field: Pull Pull Up / Down Config. Field: 47K Ohm Pull Up Hyst. Enable Field: Hysteresis Disabled */ } /* * TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* UART1_RestoreDefault: - options: {callFromInitBoot: 'false', coreID: core0, enableClock: 'false'} - pin_list: - {pin_num: '101', peripheral: GPIO1, signal: 'gpio_io, 07', pin_signal: GPIO_AD_B0_07, pull_up_down_config: Pull_Down_100K_Ohm} - {pin_num: '105', peripheral: GPIO1, signal: 'gpio_io, 06', pin_signal: GPIO_AD_B0_06, pull_up_down_config: Pull_Down_100K_Ohm} * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** */ /* FUNCTION ************************************************************************************************************ * * Function Name : UART1_RestoreDefault * Description : Configures pin routing and optionally pin electrical features. * * END ****************************************************************************************************************/ void UART1_RestoreDefault(void) { IOMUXC_SetPinMux( IOMUXC_GPIO_AD_B0_06_GPIO1_IO06, /* GPIO_AD_B0_06 is configured as GPIO1_IO06 */ 0U); /* Software Input On Field: Input Path is determined by functionality */ IOMUXC_SetPinMux( IOMUXC_GPIO_AD_B0_07_GPIO1_IO07, /* GPIO_AD_B0_07 is configured as GPIO1_IO07 */ 0U); /* Software Input On Field: Input Path is determined by functionality */ IOMUXC_SetPinConfig( IOMUXC_GPIO_AD_B0_06_LPUART1_TX, /* GPIO_AD_B0_06 PAD functional properties : */ 0x10B0U); /* Slew Rate Field: Slow Slew Rate Drive Strength Field: R0/6 Speed Field: medium(100MHz) Open Drain Enable Field: Open Drain Disabled Pull / Keep Enable Field: Pull/Keeper Enabled Pull / Keep Select Field: Keeper Pull Up / Down Config. Field: 100K Ohm Pull Down Hyst. Enable Field: Hysteresis Disabled */ IOMUXC_SetPinConfig( IOMUXC_GPIO_AD_B0_07_GPIO1_IO07, /* GPIO_AD_B0_07 PAD functional properties : */ 0x10B0U); /* Slew Rate Field: Slow Slew Rate Drive Strength Field: R0/6 Speed Field: medium(100MHz) Open Drain Enable Field: Open Drain Disabled Pull / Keep Enable Field: Pull/Keeper Enabled Pull / Keep Select Field: Keeper Pull Up / Down Config. Field: 100K Ohm Pull Down Hyst. Enable Field: Hysteresis Disabled */ } /*********************************************************************************************************************** * EOF **********************************************************************************************************************/