]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/RISC-V_RV32M1_Vega_GCC_Eclipse/common/pin_mux.c
21f863a3cb4d17d67c7185ec526d25b1093e16fa
[freertos] / FreeRTOS / Demo / RISC-V_RV32M1_Vega_GCC_Eclipse / common / pin_mux.c
1 /*
2  * Copyright 2017 NXP
3  * All rights reserved.
4  * 
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7
8 /*
9  * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
10 !!GlobalInfo
11 product: Pins v3.0
12 processor: RV32M1
13 package_id: RV32M1
14 mcu_data: ksdk2_0
15 processor_version: 0.0.0
16  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
17  */
18
19 #include "fsl_common.h"
20 #include "fsl_port.h"
21 #include "pin_mux.h"
22
23 /*FUNCTION**********************************************************************
24  * 
25  * Function Name : BOARD_InitBootPins
26  * Description   : Calls initialization functions.
27  * 
28  *END**************************************************************************/
29 void BOARD_InitBootPins(void) {
30     BOARD_InitPins();
31 }
32
33 #define PIN7_IDX                         7u   /*!< Pin number for pin 7 in a port */
34 #define PIN8_IDX                         8u   /*!< Pin number for pin 8 in a port */
35
36 /*
37  * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
38 BOARD_InitPins:
39 - options: {callFromInitBoot: 'true', coreID: cm4, enableClock: 'true'}
40 - pin_list:
41   - {pin_num: N2, peripheral: LPUART0, signal: RX, pin_signal: LPCMP0_IN0/PTC7/LLWU_P15/LPSPI0_PCS3/LPUART0_RX/LPI2C1_HREQ/TPM0_CH0/LPTMR1_ALT1}
42   - {pin_num: P3, peripheral: LPUART0, signal: TX, pin_signal: LPCMP0_IN1/PTC8/LPSPI0_SCK/LPUART0_TX/LPI2C0_HREQ/TPM0_CH1}
43  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
44  */
45
46 /*FUNCTION**********************************************************************
47  *
48  * Function Name : BOARD_InitPins
49  * Description   : Configures pin routing and optionally pin electrical features.
50  *
51  *END**************************************************************************/
52 void BOARD_InitPins(void) {
53   CLOCK_EnableClock(kCLOCK_PortC);                           /* Clock Gate Control: 0x01u */
54
55   PORT_SetPinMux(PORTC, PIN7_IDX, kPORT_MuxAlt3);            /* PORTC7 (pin N2) is configured as LPUART0_RX */
56   PORT_SetPinMux(PORTC, PIN8_IDX, kPORT_MuxAlt3);            /* PORTC8 (pin P3) is configured as LPUART0_TX */
57 }
58
59 /*******************************************************************************
60  * EOF
61  ******************************************************************************/