diff options
Diffstat (limited to 'lib/chibios-contrib/ext/mcux-sdk/devices/MIMX8QX1/project_template/pin_mux.c')
-rw-r--r-- | lib/chibios-contrib/ext/mcux-sdk/devices/MIMX8QX1/project_template/pin_mux.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/lib/chibios-contrib/ext/mcux-sdk/devices/MIMX8QX1/project_template/pin_mux.c b/lib/chibios-contrib/ext/mcux-sdk/devices/MIMX8QX1/project_template/pin_mux.c new file mode 100644 index 000000000..fed658434 --- /dev/null +++ b/lib/chibios-contrib/ext/mcux-sdk/devices/MIMX8QX1/project_template/pin_mux.c | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016, Freescale Semiconductor, Inc. | ||
3 | * Copyright 2017-2018 NXP | ||
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: MIMX8QX6xxxFZ | ||
13 | mcu_data: i_mx_1_0 | ||
14 | processor_version: 0.0.0 | ||
15 | * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** | ||
16 | */ | ||
17 | |||
18 | #include "pin_mux.h" | ||
19 | #include "fsl_common.h" | ||
20 | #include "main/imx8qx_pads.h" | ||
21 | #include "svc/pad/pad_api.h" | ||
22 | |||
23 | /* | ||
24 | * TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* | ||
25 | BOARD_InitPins: | ||
26 | - options: {callFromInitBoot: 'true', coreID: m4} | ||
27 | - pin_list: | ||
28 | - {pin_num: V30, peripheral: M40__UART0, signal: uart_tx, pin_signal: ADC_IN3, sw_config: sw_config_0} | ||
29 | - {pin_num: V32, peripheral: M40__UART0, signal: uart_rx, pin_signal: ADC_IN2, sw_config: sw_config_0} | ||
30 | * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** | ||
31 | */ | ||
32 | |||
33 | /*FUNCTION********************************************************************** | ||
34 | * | ||
35 | * Function Name : BOARD_InitPins | ||
36 | * Description : Configures pin routing and optionally pin electrical features. | ||
37 | * | ||
38 | *END**************************************************************************/ | ||
39 | void BOARD_InitPins(void) { /*!< Function assigned for the core: Cortex-M4F[m4] */ | ||
40 | sc_ipc_t ipc; | ||
41 | sc_err_t err = SC_ERR_NONE; | ||
42 | ipc = SystemGetScfwIpcHandle(); | ||
43 | |||
44 | err = sc_pad_set_all(ipc, SC_P_ADC_IN2, 1U, SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF, 0x0 ,SC_PAD_WAKEUP_OFF);/* IOMUXD_REG_ADC_IN2 register modification value */ | ||
45 | if (SC_ERR_NONE != err) | ||
46 | { | ||
47 | assert(false); | ||
48 | } | ||
49 | err = sc_pad_set_all(ipc, SC_P_ADC_IN3, 1U, SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF, 0x0 ,SC_PAD_WAKEUP_OFF);/* IOMUXD_REG_ADC_IN3 register modification value */ | ||
50 | if (SC_ERR_NONE != err) | ||
51 | { | ||
52 | assert(false); | ||
53 | } | ||
54 | } | ||
55 | |||
56 | /******************************************************************************* | ||
57 | * EOF | ||
58 | ******************************************************************************/ | ||