/* * Copyright 2017-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. **********************************************************************************************************************/ /* clang-format off */ /* * TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* !!GlobalInfo product: Pins v7.0 processor: LPC54018 package_id: LPC54018JET180 mcu_data: ksdk2_0 processor_version: 7.0.1 * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** */ /* clang-format on */ #include "fsl_common.h" #include "fsl_iocon.h" #include "pin_mux.h" /* FUNCTION ************************************************************************************************************ * * Function Name : BOARD_InitBootPins * Description : Calls initialization functions. * * END ****************************************************************************************************************/ void BOARD_InitBootPins(void) { BOARD_InitPins(); } #define IOCON_PIO_DIGITAL_EN 0x0100u /*!< Enables digital function */ #define IOCON_PIO_FUNC0 0x00u /*!< Selects pin function 0 */ #define IOCON_PIO_FUNC1 0x01u /*!< Selects pin function 1 */ #define IOCON_PIO_FUNC7 0x07u /*!< Selects pin function 7 */ #define IOCON_PIO_INPFILT_OFF 0x0200u /*!< Input filter disabled */ #define IOCON_PIO_INV_DI 0x00u /*!< Input function is not inverted */ #define IOCON_PIO_MODE_INACT 0x00u /*!< No addition pin function */ #define IOCON_PIO_MODE_PULLUP 0x20u /*!< Selects pull-up function */ #define IOCON_PIO_OPENDRAIN_DI 0x00u /*!< Open drain is disabled */ #define IOCON_PIO_SLEW_FAST 0x0400u /*!< Fast mode, slew rate control is disabled */ #define IOCON_PIO_SLEW_STANDARD 0x00u /*!< Standard mode, output slew rate control is enabled */ #define PIN8_IDX 8u /*!< Pin number for pin 8 in a port 4 */ #define PIN10_IDX 10u /*!< Pin number for pin 10 in a port 4 */ #define PIN11_IDX 11u /*!< Pin number for pin 11 in a port 4 */ #define PIN12_IDX 12u /*!< Pin number for pin 12 in a port 4 */ #define PIN13_IDX 13u /*!< Pin number for pin 13 in a port 4 */ #define PIN14_IDX 14u /*!< Pin number for pin 14 in a port 4 */ #define PIN15_IDX 15u /*!< Pin number for pin 15 in a port 4 */ #define PIN16_IDX 16u /*!< Pin number for pin 16 in a port 4 */ #define PIN17_IDX 17u /*!< Pin number for pin 17 in a port 0 */ #define PIN26_IDX 26u /*!< Pin number for pin 26 in a port 2 */ #define PIN29_IDX 29u /*!< Pin number for pin 29 in a port 0 */ #define PIN30_IDX 30u /*!< Pin number for pin 30 in a port 0 */ #define PORT0_IDX 0u /*!< Port index */ #define PORT2_IDX 2u /*!< Port index */ #define PORT4_IDX 4u /*!< Port index */ /* clang-format off */ /* * TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* BOARD_InitPins: - options: {callFromInitBoot: 'true', coreID: core0, enableClock: 'true'} - pin_list: - {pin_num: B13, peripheral: FLEXCOMM0, signal: RXD_SDA_MOSI, pin_signal: PIO0_29/FC0_RXD_SDA_MOSI/CTIMER2_MAT3/SCT0_OUT8/TRACEDATA(2), mode: inactive, invert: disabled, glitch_filter: disabled, slew_rate: standard, open_drain: disabled} - {pin_num: A2, peripheral: FLEXCOMM0, signal: TXD_SCL_MISO, pin_signal: PIO0_30/FC0_TXD_SCL_MISO/CTIMER0_MAT0/SCT0_OUT9/TRACEDATA(1), mode: inactive, invert: disabled, glitch_filter: disabled, slew_rate: standard, open_drain: disabled} * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** */ /* clang-format on */ /* FUNCTION ************************************************************************************************************ * * Function Name : BOARD_InitPins * Description : Configures pin routing and optionally pin electrical features. * * END ****************************************************************************************************************/ /* Function assigned for the Cortex-M4F */ void BOARD_InitPins(void) { CLOCK_EnableClock(kCLOCK_Iocon); /* Enables the clock for the IOCON block. 0 = Disable; 1 = Enable.: 0x01u */ const uint32_t port0_pin17_config = ( IOCON_PIO_FUNC7 | /* Pin is configured as ENET_TXD1 */ IOCON_PIO_MODE_INACT | /* No addition pin function */ IOCON_PIO_INV_DI | /* Input function is not inverted */ IOCON_PIO_DIGITAL_EN | /* Enables digital function */ IOCON_PIO_INPFILT_OFF | /* Input filter disabled */ IOCON_PIO_SLEW_STANDARD | /* Standard mode, output slew rate control is enabled */ IOCON_PIO_OPENDRAIN_DI /* Open drain is disabled */ ); IOCON_PinMuxSet(IOCON, PORT0_IDX, PIN17_IDX, port0_pin17_config); /* PORT0 PIN17 (coords: E14) is configured as ENET_TXD1 */ const uint32_t port0_pin29_config = ( IOCON_PIO_FUNC1 | /* Pin is configured as FC0_RXD_SDA_MOSI */ IOCON_PIO_MODE_INACT | /* No addition pin function */ IOCON_PIO_INV_DI | /* Input function is not inverted */ IOCON_PIO_DIGITAL_EN | /* Enables digital function */ IOCON_PIO_INPFILT_OFF | /* Input filter disabled */ IOCON_PIO_SLEW_FAST | /* Fast mode, slew rate control is disabled */ IOCON_PIO_OPENDRAIN_DI /* Open drain is disabled */ ); IOCON_PinMuxSet(IOCON, PORT0_IDX, PIN29_IDX, port0_pin29_config); /* PORT0 PIN29 (coords: B13) is configured as FC0_RXD_SDA_MOSI */ const uint32_t port0_pin30_config = ( IOCON_PIO_FUNC1 | /* Pin is configured as FC0_TXD_SCL_MISO */ IOCON_PIO_MODE_INACT | /* No addition pin function */ IOCON_PIO_INV_DI | /* Input function is not inverted */ IOCON_PIO_DIGITAL_EN | /* Enables digital function */ IOCON_PIO_INPFILT_OFF | /* Input filter disabled */ IOCON_PIO_SLEW_FAST | /* Fast mode, slew rate control is disabled */ IOCON_PIO_OPENDRAIN_DI /* Open drain is disabled */ ); IOCON_PinMuxSet(IOCON, PORT0_IDX, PIN30_IDX, port0_pin30_config); /* PORT0 PIN30 (coords: A2) is configured as FC0_TXD_SCL_MISO */ const uint32_t port2_pin26_config = ( IOCON_PIO_FUNC0 | /* Pin is configured as PIO2_26 */ IOCON_PIO_MODE_PULLUP | /* Selects pull-up function */ IOCON_PIO_INV_DI | /* Input function is not inverted */ IOCON_PIO_DIGITAL_EN | /* Enables digital function */ IOCON_PIO_INPFILT_OFF | /* Input filter disabled */ IOCON_PIO_SLEW_STANDARD | /* Standard mode, output slew rate control is enabled */ IOCON_PIO_OPENDRAIN_DI /* Open drain is disabled */ ); IOCON_PinMuxSet(IOCON, PORT2_IDX, PIN26_IDX, port2_pin26_config); /* PORT2 PIN26 (coords: H11) is configured as PIO2_26 */ const uint32_t port4_pin10_config = ( IOCON_PIO_FUNC1 | /* Pin is configured as ENET_RX_DV */ IOCON_PIO_MODE_INACT | /* No addition pin function */ IOCON_PIO_INV_DI | /* Input function is not inverted */ IOCON_PIO_DIGITAL_EN | /* Enables digital function */ IOCON_PIO_INPFILT_OFF | /* Input filter disabled */ IOCON_PIO_SLEW_STANDARD | /* Standard mode, output slew rate control is enabled */ IOCON_PIO_OPENDRAIN_DI /* Open drain is disabled */ ); IOCON_PinMuxSet(IOCON, PORT4_IDX, PIN10_IDX, port4_pin10_config); /* PORT4 PIN10 (coords: B9) is configured as ENET_RX_DV */ const uint32_t port4_pin11_config = ( IOCON_PIO_FUNC1 | /* Pin is configured as ENET_RXD0 */ IOCON_PIO_MODE_INACT | /* No addition pin function */ IOCON_PIO_INV_DI | /* Input function is not inverted */ IOCON_PIO_DIGITAL_EN | /* Enables digital function */ IOCON_PIO_INPFILT_OFF | /* Input filter disabled */ IOCON_PIO_SLEW_STANDARD | /* Standard mode, output slew rate control is enabled */ IOCON_PIO_OPENDRAIN_DI /* Open drain is disabled */ ); IOCON_PinMuxSet(IOCON, PORT4_IDX, PIN11_IDX, port4_pin11_config); /* PORT4 PIN11 (coords: A9) is configured as ENET_RXD0 */ const uint32_t port4_pin12_config = ( IOCON_PIO_FUNC1 | /* Pin is configured as ENET_RXD1 */ IOCON_PIO_MODE_INACT | /* No addition pin function */ IOCON_PIO_INV_DI | /* Input function is not inverted */ IOCON_PIO_DIGITAL_EN | /* Enables digital function */ IOCON_PIO_INPFILT_OFF | /* Input filter disabled */ IOCON_PIO_SLEW_STANDARD | /* Standard mode, output slew rate control is enabled */ IOCON_PIO_OPENDRAIN_DI /* Open drain is disabled */ ); IOCON_PinMuxSet(IOCON, PORT4_IDX, PIN12_IDX, port4_pin12_config); /* PORT4 PIN12 (coords: A6) is configured as ENET_RXD1 */ const uint32_t port4_pin13_config = ( IOCON_PIO_FUNC1 | /* Pin is configured as ENET_TX_EN */ IOCON_PIO_MODE_INACT | /* No addition pin function */ IOCON_PIO_INV_DI | /* Input function is not inverted */ IOCON_PIO_DIGITAL_EN | /* Enables digital function */ IOCON_PIO_INPFILT_OFF | /* Input filter disabled */ IOCON_PIO_SLEW_STANDARD | /* Standard mode, output slew rate control is enabled */ IOCON_PIO_OPENDRAIN_DI /* Open drain is disabled */ ); IOCON_PinMuxSet(IOCON, PORT4_IDX, PIN13_IDX, port4_pin13_config); /* PORT4 PIN13 (coords: B6) is configured as ENET_TX_EN */ const uint32_t port4_pin14_config = ( IOCON_PIO_FUNC1 | /* Pin is configured as ENET_RX_CLK */ IOCON_PIO_MODE_INACT | /* No addition pin function */ IOCON_PIO_INV_DI | /* Input function is not inverted */ IOCON_PIO_DIGITAL_EN | /* Enables digital function */ IOCON_PIO_INPFILT_OFF | /* Input filter disabled */ IOCON_PIO_SLEW_STANDARD | /* Standard mode, output slew rate control is enabled */ IOCON_PIO_OPENDRAIN_DI /* Open drain is disabled */ ); IOCON_PinMuxSet(IOCON, PORT4_IDX, PIN14_IDX, port4_pin14_config); /* PORT4 PIN14 (coords: B5) is configured as ENET_RX_CLK */ const uint32_t port4_pin15_config = ( IOCON_PIO_FUNC1 | /* Pin is configured as ENET_MDC */ IOCON_PIO_MODE_INACT | /* No addition pin function */ IOCON_PIO_INV_DI | /* Input function is not inverted */ IOCON_PIO_DIGITAL_EN | /* Enables digital function */ IOCON_PIO_INPFILT_OFF | /* Input filter disabled */ IOCON_PIO_SLEW_STANDARD | /* Standard mode, output slew rate control is enabled */ IOCON_PIO_OPENDRAIN_DI /* Open drain is disabled */ ); IOCON_PinMuxSet(IOCON, PORT4_IDX, PIN15_IDX, port4_pin15_config); /* PORT4 PIN15 (coords: A4) is configured as ENET_MDC */ const uint32_t port4_pin16_config = ( IOCON_PIO_FUNC1 | /* Pin is configured as ENET_MDIO */ IOCON_PIO_MODE_INACT | /* No addition pin function */ IOCON_PIO_INV_DI | /* Input function is not inverted */ IOCON_PIO_DIGITAL_EN | /* Enables digital function */ IOCON_PIO_INPFILT_OFF | /* Input filter disabled */ IOCON_PIO_SLEW_STANDARD | /* Standard mode, output slew rate control is enabled */ IOCON_PIO_OPENDRAIN_DI /* Open drain is disabled */ ); IOCON_PinMuxSet(IOCON, PORT4_IDX, PIN16_IDX, port4_pin16_config); /* PORT4 PIN16 (coords: C4) is configured as ENET_MDIO */ const uint32_t port4_pin8_config = ( IOCON_PIO_FUNC1 | /* Pin is configured as ENET_TXD0 */ IOCON_PIO_MODE_INACT | /* No addition pin function */ IOCON_PIO_INV_DI | /* Input function is not inverted */ IOCON_PIO_DIGITAL_EN | /* Enables digital function */ IOCON_PIO_INPFILT_OFF | /* Input filter disabled */ IOCON_PIO_SLEW_STANDARD | /* Standard mode, output slew rate control is enabled */ IOCON_PIO_OPENDRAIN_DI /* Open drain is disabled */ ); IOCON_PinMuxSet(IOCON, PORT4_IDX, PIN8_IDX, port4_pin8_config); /* PORT4 PIN8 (coords: B14) is configured as ENET_TXD0 */ } /*********************************************************************************************************************** * EOF **********************************************************************************************************************/