MCUXpresso_MKS22FN256xxx12/boards/mapsks22/project_template/pin_mux.h
2022-06-18 14:53:46 +08:00

331 lines
12 KiB
C

/*
* The Clear BSD License
* Copyright 2017-2018 NXP
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted (subject to the limitations in the disclaimer below) provided
* that the following conditions are met:
*
* o Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
*
* o Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* o Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/***********************************************************************************************************************
* 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.
**********************************************************************************************************************/
#ifndef _PIN_MUX_H_
#define _PIN_MUX_H_
/*!
* @addtogroup pin_mux
* @{
*/
/***********************************************************************************************************************
* API
**********************************************************************************************************************/
#if defined(__cplusplus)
extern "C" {
#endif
/*!
* @brief Calls initialization functions.
*
*/
void BOARD_InitBootPins(void);
/*!
* @brief Configures pin routing and optionally pin electrical features.
*
*/
void BOARD_InitPins(void);
#define SOPT5_UART1TXSRC_UART_TX 0x00u /*!<@brief UART 1 transmit data source select: UART1_TX pin */
/*! @name PORTE0 (number 1), CN9[1]/M1[5]/CN2[24]/UART1_TX/DBG_TXD
@{ */
#define BOARD_DEBUG_UART_TX_PORT PORTE /*!<@brief PORT device name: PORTE */
#define BOARD_DEBUG_UART_TX_PIN 0U /*!<@brief PORTE pin index: 0 */
/* @} */
/*! @name PORTE1 (number 2), CN9[2]/CN2[31]/M1[6]/UART1_RX/DBG_RXD
@{ */
#define BOARD_DEBUG_UART_RX_PORT PORTE /*!<@brief PORT device name: PORTE */
#define BOARD_DEBUG_UART_RX_PIN 1U /*!<@brief PORTE pin index: 1 */
/* @} */
/*!
* @brief Configures pin routing and optionally pin electrical features.
*
*/
void BOARD_InitDEBUG_UART(void);
/*! @name PORTE6 (number 7), CN9[7]/CN3[4]/USB_ID
@{ */
#define BOARD_USB_ID_GPIO GPIOE /*!<@brief GPIO device name: GPIOE */
#define BOARD_USB_ID_PORT PORTE /*!<@brief PORT device name: PORTE */
#define BOARD_USB_ID_PIN 6U /*!<@brief PORTE pin index: 6 */
/* @} */
/*! @name USB0_DP (number 10), CN9[10]/CN2[15]/CN3[3]/USB_DP
@{ */
/* @} */
/*! @name USB0_DM (number 11), CN9[11]/CN2[16]/CN3[2]/USB_DM
@{ */
/* @} */
/*! @name PORTE26 (number 33), CN9[33]/USB_CLKIN
@{ */
#define BOARD_USB_CLKIN_PORT PORTE /*!<@brief PORT device name: PORTE */
#define BOARD_USB_CLKIN_PIN 26U /*!<@brief PORTE pin index: 26 */
/* @} */
/*!
* @brief Configures pin routing and optionally pin electrical features.
*
*/
void BOARD_InitUSB(void);
#define PORT_DFER_DFE_1_MASK 0x02u /*!<@brief Digital Filter Enable Mask for item 1. */
#define PORT_DFER_DFE_4_MASK 0x10u /*!<@brief Digital Filter Enable Mask for item 4. */
#define PORT_DFER_DFE_5_MASK 0x20u /*!<@brief Digital Filter Enable Mask for item 5. */
#define PORT_DFER_DFE_6_MASK 0x40u /*!<@brief Digital Filter Enable Mask for item 6. */
#define PORT_DFER_DFE_7_MASK 0x80u /*!<@brief Digital Filter Enable Mask for item 7. */
/*! @name PORTD1 (number 94), CN9[94]/CN13[23]/CLCD_BLC
@{ */
#define BOARD_CLCD_BLC_PORT PORTD /*!<@brief PORT device name: PORTD */
#define BOARD_CLCD_BLC_PIN 1U /*!<@brief PORTD pin index: 1 */
/* @} */
/*! @name PORTD4 (number 97), CN9[97]/CN13[1]/SPI1_PCS0/CLCD_CS
@{ */
#define BOARD_CLCD_CS_PORT PORTD /*!<@brief PORT device name: PORTD */
#define BOARD_CLCD_CS_PIN 4U /*!<@brief PORTD pin index: 4 */
/* @} */
/*! @name PORTD5 (number 98), CN9[98]/CN13[3]/SPI1_SCK/CLCD_SCLK
@{ */
#define BOARD_CLCD_SCLK_PORT PORTD /*!<@brief PORT device name: PORTD */
#define BOARD_CLCD_SCLK_PIN 5U /*!<@brief PORTD pin index: 5 */
/* @} */
/*! @name PORTD6 (number 99), CN9[99]/CN13[30]/SPI1_SOUT/CLCD_MOSI
@{ */
#define BOARD_CLCD_MOSI_PORT PORTD /*!<@brief PORT device name: PORTD */
#define BOARD_CLCD_MOSI_PIN 6U /*!<@brief PORTD pin index: 6 */
/* @} */
/*! @name PORTD7 (number 100), CN9[100]/CN13[29]/SPI1_SIN/CLCD_MISO
@{ */
#define BOARD_CLCD_MISO_PORT PORTD /*!<@brief PORT device name: PORTD */
#define BOARD_CLCD_MISO_PIN 7U /*!<@brief PORTD pin index: 7 */
/* @} */
/*! @name RESET_b (number 52), CN9[52]/CN6[15]/CN1[25]/K1/nRST
@{ */
/* @} */
/*!
* @brief Configures pin routing and optionally pin electrical features.
*
*/
void BOARD_InitCLCD(void);
/*! @name PORTB3 (number 56), CN9[56]/CN2[4]/CN2[22]/LED0/KEY_DOWN
@{ */
#define BOARD_LED_RED1_GPIO GPIOB /*!<@brief GPIO device name: GPIOB */
#define BOARD_LED_RED1_PORT PORTB /*!<@brief PORT device name: PORTB */
#define BOARD_LED_RED1_PIN 3U /*!<@brief PORTB pin index: 3 */
/* @} */
/*! @name PORTB9 (number 57), CN9[57]/CN2[2]/CN2[21]/LED1/KEY_UP
@{ */
#define BOARD_LED_RED2_GPIO GPIOB /*!<@brief GPIO device name: GPIOB */
#define BOARD_LED_RED2_PORT PORTB /*!<@brief PORT device name: PORTB */
#define BOARD_LED_RED2_PIN 9U /*!<@brief PORTB pin index: 9 */
/* @} */
/*! @name PORTB10 (number 58), CN9[58]/CN2[1]/CN2[20]/LED2/KEY_RIGHT
@{ */
#define BOARD_LED_RED3_GPIO GPIOB /*!<@brief GPIO device name: GPIOB */
#define BOARD_LED_RED3_PORT PORTB /*!<@brief PORT device name: PORTB */
#define BOARD_LED_RED3_PIN 10U /*!<@brief PORTB pin index: 10 */
/* @} */
/*! @name PORTB11 (number 59), CN9[59]/CN2[3]/CN2[19]/LED3/KEY_LEFT
@{ */
#define BOARD_LED_GREEN_GPIO GPIOB /*!<@brief GPIO device name: GPIOB */
#define BOARD_LED_GREEN_PORT PORTB /*!<@brief PORT device name: PORTB */
#define BOARD_LED_GREEN_PIN 11U /*!<@brief PORTB pin index: 11 */
/* @} */
/*!
* @brief Configures pin routing and optionally pin electrical features.
*
*/
void BOARD_InitLEDs(void);
/*! @name PORTC12 (number 84), CN9[84]/CN1[7]/KEY0
@{ */
#define BAORD_KEY0_GPIO GPIOC /*!<@brief GPIO device name: GPIOC */
#define BAORD_KEY0_PORT PORTC /*!<@brief PORT device name: PORTC */
#define BAORD_KEY0_PIN 12U /*!<@brief PORTC pin index: 12 */
/* @} */
/*! @name PORTC13 (number 85), CN9[85]/CN1[8]/KEY1
@{ */
#define BAORD_KEY1_GPIO GPIOC /*!<@brief GPIO device name: GPIOC */
#define BAORD_KEY1_PORT PORTC /*!<@brief PORT device name: PORTC */
#define BAORD_KEY1_PIN 13U /*!<@brief PORTC pin index: 13 */
/* @} */
/*! @name PORTC14 (number 86), CN9[86]/CN1[9]/KEY2
@{ */
#define BAORD_KEY2_GPIO GPIOC /*!<@brief GPIO device name: GPIOC */
#define BAORD_KEY2_PORT PORTC /*!<@brief PORT device name: PORTC */
#define BAORD_KEY2_PIN 14U /*!<@brief PORTC pin index: 14 */
/* @} */
/*! @name PORTC15 (number 87), CN9[87]/CN1[10]/KEY3
@{ */
#define BAORD_KEY3_GPIO GPIOC /*!<@brief GPIO device name: GPIOC */
#define BAORD_KEY3_PORT PORTC /*!<@brief PORT device name: PORTC */
#define BAORD_KEY3_PIN 15U /*!<@brief PORTC pin index: 15 */
/* @} */
/*!
* @brief Configures pin routing and optionally pin electrical features.
*
*/
void BOARD_InitKEYS(void);
#define SOPT5_UART0TXSRC_UART_TX 0x00u /*!<@brief UART 0 transmit data source select: UART0_TX pin */
/*! @name PORTC10 (number 82), CN9[82]/CN8[2]/ISO7816_RST
@{ */
#define BOARD_I2S1_RX_FS_GPIO GPIOC /*!<@brief GPIO device name: GPIOC */
#define BOARD_I2S1_RX_FS_PORT PORTC /*!<@brief PORT device name: PORTC */
#define BOARD_I2S1_RX_FS_PIN 10U /*!<@brief PORTC pin index: 10 */
/* @} */
/*! @name PORTA1 (number 35), CN9[35]/CN8[3]/JP5[1]/ISO7816_CLK/TPM1_CH1
@{ */
#define BOARD_ISO7816_CLK_PORT PORTA /*!<@brief PORT device name: PORTA */
#define BOARD_ISO7816_CLK_PIN 1U /*!<@brief PORTA pin index: 1 */
/* @} */
/*! @name PORTA2 (number 36), CN9[36]/CN8[7]/ISO7816_IO/UART0_TX
@{ */
#define BOARD_UART0_TX_PORT PORTA /*!<@brief PORT device name: PORTA */
#define BOARD_UART0_TX_PIN 2U /*!<@brief PORTA pin index: 2 */
/* @} */
/*!
* @brief Configures pin routing and optionally pin electrical features.
*
*/
void BOARD_InitSMART_CARD(void);
#define PORT_DFER_DFE_2_MASK 0x04u /*!<@brief Digital Filter Enable Mask for item 2. */
#define PORT_DFER_DFE_3_MASK 0x08u /*!<@brief Digital Filter Enable Mask for item 3. */
/*! @name PORTC0 (number 70), CN9[70]/CN2[32]/SD_DET
@{ */
#define BOARD_SD_DET_PORT PORTC /*!<@brief PORT device name: PORTC */
#define BOARD_SD_DET_PIN 0U /*!<@brief PORTC pin index: 0 */
/* @} */
/*! @name PORTC3 (number 73), CN9[73]/CN1[4]/SD_CS/SPI0_PCS1/SD_DAT3
@{ */
#define BOARD_SPI0_PCS1_PORT PORTC /*!<@brief PORT device name: PORTC */
#define BOARD_SPI0_PCS1_PIN 3U /*!<@brief PORTC pin index: 3 */
/* @} */
/*! @name PORTC5 (number 77), CN9[77]/CN2[27]/CN1[3]/SPI0_SCK/SD_CLK
@{ */
#define BOARD_SPI0_SCK_PORT PORTC /*!<@brief PORT device name: PORTC */
#define BOARD_SPI0_SCK_PIN 5U /*!<@brief PORTC pin index: 5 */
/* @} */
/*! @name PORTD2 (number 95), CN9[95]/CN2[28]/CN2[18]/SPI0_SOUT/SD_CMD/IR_IN
@{ */
#define BOARD_IR_IN_PORT PORTD /*!<@brief PORT device name: PORTD */
#define BOARD_IR_IN_PIN 2U /*!<@brief PORTD pin index: 2 */
/* @} */
/*! @name PORTD3 (number 96), CN9[96]/CN2[30]/CN1[2]/CN2[5]/SPI0_SIN/SD_DAT0/IR_OUT
@{ */
#define BOARD_IR_OUT_PORT PORTD /*!<@brief PORT device name: PORTD */
#define BOARD_IR_OUT_PIN 3U /*!<@brief PORTD pin index: 3 */
/* @} */
/*!
* @brief Configures pin routing and optionally pin electrical features.
*
*/
void BOARD_InitSD(void);
/*! @name PORTA19 (number 51), CN9[51]/XTAL
@{ */
#define BAORD_XTAL_PORT PORTA /*!<@brief PORT device name: PORTA */
#define BAORD_XTAL_PIN 19U /*!<@brief PORTA pin index: 19 */
/* @} */
/*! @name PORTA18 (number 50), CN9[50]/EXTAL
@{ */
#define BAORD_EXTAL_PORT PORTA /*!<@brief PORT device name: PORTA */
#define BAORD_EXTAL_PIN 18U /*!<@brief PORTA pin index: 18 */
/* @} */
/*! @name EXTAL32 (number 29), CN9[29]/EXTAL32_RTC
@{ */
/* @} */
/*! @name XTAL32 (number 28), CN9[28]/XTAL32_RTC
@{ */
/* @} */
/*!
* @brief Configures pin routing and optionally pin electrical features.
*
*/
void BOARD_InitOSC(void);
#if defined(__cplusplus)
}
#endif
/*!
* @}
*/
#endif /* _PIN_MUX_H_ */
/***********************************************************************************************************************
* EOF
**********************************************************************************************************************/