84 lines
3.6 KiB
C
84 lines
3.6 KiB
C
/***********************************************************************************************************************
|
|
* 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 v11.0
|
|
processor: LPC54102J512
|
|
package_id: LPC54102J512BD64
|
|
mcu_data: ksdk2_0
|
|
processor_version: 11.0.1
|
|
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
|
|
*/
|
|
/* clang-format on */
|
|
|
|
#include "fsl_common.h"
|
|
#include "pin_mux.h"
|
|
|
|
/* FUNCTION ************************************************************************************************************
|
|
*
|
|
* Function Name : BOARD_InitBootPins
|
|
* Description : Calls initialization functions.
|
|
*
|
|
* END ****************************************************************************************************************/
|
|
void BOARD_InitBootPins(void)
|
|
{
|
|
BOARD_InitPins();
|
|
}
|
|
|
|
/* clang-format off */
|
|
/*
|
|
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
|
|
BOARD_InitPins:
|
|
- options: {callFromInitBoot: 'true', coreID: cm4, enableClock: 'true'}
|
|
- pin_list:
|
|
- {pin_num: '31', peripheral: USART0, signal: RXD, pin_signal: PIO0_0/U0_RXD/SPI0_SSEL0/CT32B0_CAP0/SCT0_OUT3}
|
|
- {pin_num: '32', peripheral: USART0, signal: TXD, pin_signal: PIO0_1/U0_TXD/SPI0_SSEL1/CT32B0_CAP1/SCT0_OUT1}
|
|
* 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)
|
|
{
|
|
/* Enables the clock for the IOCON block. 0 = Disable; 1 = Enable.: 0x01u */
|
|
CLOCK_EnableClock(kCLOCK_Iocon);
|
|
|
|
IOCON->PIO[0][0] = ((IOCON->PIO[0][0] &
|
|
/* Mask bits to zero which are setting */
|
|
(~(IOCON_PIO_FUNC_MASK | IOCON_PIO_DIGIMODE_MASK)))
|
|
|
|
/* Selects pin function.
|
|
* : PORT00 (pin 31) is configured as U0_RXD. */
|
|
| IOCON_PIO_FUNC(PIO00_FUNC_ALT1)
|
|
|
|
/* Select Analog/Digital mode.
|
|
* : Digital mode. */
|
|
| IOCON_PIO_DIGIMODE(PIO00_DIGIMODE_DIGITAL));
|
|
|
|
IOCON->PIO[0][1] = ((IOCON->PIO[0][1] &
|
|
/* Mask bits to zero which are setting */
|
|
(~(IOCON_PIO_FUNC_MASK | IOCON_PIO_DIGIMODE_MASK)))
|
|
|
|
/* Selects pin function.
|
|
* : PORT01 (pin 32) is configured as U0_TXD. */
|
|
| IOCON_PIO_FUNC(PIO01_FUNC_ALT1)
|
|
|
|
/* Select Analog/Digital mode.
|
|
* : Digital mode. */
|
|
| IOCON_PIO_DIGIMODE(PIO01_DIGIMODE_DIGITAL));
|
|
}
|
|
/***********************************************************************************************************************
|
|
* EOF
|
|
**********************************************************************************************************************/
|