ISSDK  1.7
IoT Sensing Software Development Kit
pin_mux.c
Go to the documentation of this file.
1 /*
2  * The Clear BSD License
3  * Copyright (c) 2015, Freescale Semiconductor, Inc.
4  * Copyright 2016-2017 NXP
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without modification,
8  * are permitted (subject to the limitations in the disclaimer below) provided
9  * that the following conditions are met:
10  *
11  * o Redistributions of source code must retain the above copyright notice, this list
12  * of conditions and the following disclaimer.
13  *
14  * o Redistributions in binary form must reproduce the above copyright notice, this
15  * list of conditions and the following disclaimer in the documentation and/or
16  * other materials provided with the distribution.
17  *
18  * o Neither the name of the copyright holder nor the names of its
19  * contributors may be used to endorse or promote products derived from this
20  * software without specific prior written permission.
21  *
22  * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
27  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
30  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33  */
34 
35 /*
36  * TEXT BELOW IS USED AS SETTING FOR THE PINS TOOL *****************************
37 PinsProfile:
38 - !!product 'Pins v2.0'
39 - !!processor 'MK64FN1M0xxx12'
40 - !!package 'MK64FN1M0VLL12'
41 - !!mcu_data 'ksdk2_0'
42 - !!processor_version '1.0.9'
43  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE PINS TOOL ***
44  */
45 
46 #include "fsl_common.h"
47 #include "fsl_port.h"
48 #include "pin_mux.h"
49 
50 
51 #define PIN6_IDX 6u /*!< Pin number for pin 6 in a port */
52 #define PIN7_IDX 7u /*!< Pin number for pin 7 in a port */
53 
54 /*
55  * TEXT BELOW IS USED AS SETTING FOR THE PINS TOOL *****************************
56 BOARD_InitPins:
57 - options: {coreID: singlecore, enableClock: 'true'}
58 - pin_list:
59  - {pin_num: '81', peripheral: LPUART1, signal: RX, pin_signal: ADC1_SE4/TSI0_CH15/PTC6/LPUART1_RX}
60  - {pin_num: '80', peripheral: LPUART1, signal: TX, pin_signal: ADC1_SE5/TSI0_CH16/PTC7/LPUART1_TX}
61  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE PINS TOOL ***
62  */
63 
64 /*FUNCTION**********************************************************************
65  *
66  * Function Name : BOARD_InitPins
67  * Description : Configures pin routing and optionally pin electrical features.
68  *
69  *END**************************************************************************/
70 void BOARD_InitPins(void) {
71  CLOCK_EnableClock(kCLOCK_PortC); /* Clock Control: 0x01u */
72 
73  PORT_SetPinMux(PORTC, PIN6_IDX, kPORT_MuxAlt2); /* PORTC6 (pin 81) is configured as LPUART1_RX */
74  PORT_SetPinMux(PORTC, PIN7_IDX, kPORT_MuxAlt2); /* PORTC7 (pin 80) is configured as LPUART1_TX */
75 }
76 
77 
78 #define PIN0_IDX 0u /*!< Pin number for pin 0 in a port */
79 #define PIN1_IDX 1u /*!< Pin number for pin 1 in a port */
80 
81 /*
82  * TEXT BELOW IS USED AS SETTING FOR THE PINS TOOL *****************************
83 LPUART0_InitPins:
84 - options: {coreID: singlecore, enableClock: 'true'}
85 - pin_list:
86  - {pin_num: '54', peripheral: LPUART0, signal: RX, pin_signal: ADC0_SE4/PTB0/LPUART0_RX/LPSPI0_PCS0/LPTMR0_ALT3/PWT_IN3}
87  - {pin_num: '53', peripheral: LPUART0, signal: TX, pin_signal: ADC0_SE5/PTB1/LPUART0_TX/LPSPI0_SOUT/TCLK0}
88  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE PINS TOOL ***
89  */
90 
91 /*FUNCTION**********************************************************************
92  *
93  * Function Name : LPUART0_InitPins
94  * Description : Configures pin routing and optionally pin electrical features.
95  *
96  *END**************************************************************************/
97 void LPUART0_InitPins(void) {
98  CLOCK_EnableClock(kCLOCK_PortB); /* Clock Control: 0x01u */
99 
100  PORT_SetPinMux(PORTB, PIN0_IDX, kPORT_MuxAlt2); /* PORTB0 (pin 54) is configured as LPUART0_RX */
101  PORT_SetPinMux(PORTB, PIN1_IDX, kPORT_MuxAlt2); /* PORTB1 (pin 53) is configured as LPUART0_TX */
102 }
103 
104 
105 #define PIN0_IDX 0u /*!< Pin number for pin 0 in a port */
106 #define PIN1_IDX 1u /*!< Pin number for pin 1 in a port */
107 /*
108  * TEXT BELOW IS USED AS SETTING FOR THE PINS TOOL *****************************
109 LPUART0_DeinitPins:
110 - options: {coreID: singlecore, enableClock: 'true'}
111 - pin_list:
112  - {pin_num: '54', peripheral: ADC0, signal: 'SE, 4', pin_signal: ADC0_SE4/PTB0/LPUART0_RX/LPSPI0_PCS0/LPTMR0_ALT3/PWT_IN3}
113  - {pin_num: '53', peripheral: ADC0, signal: 'SE, 5', pin_signal: ADC0_SE5/PTB1/LPUART0_TX/LPSPI0_SOUT/TCLK0}
114  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE PINS TOOL ***
115  */
116 
117 /*FUNCTION**********************************************************************
118  *
119  * Function Name : LPUART0_DeinitPins
120  * Description : Configures pin routing and optionally pin electrical features.
121  *
122  *END**************************************************************************/
123 void LPUART0_DeinitPins(void) {
124  CLOCK_EnableClock(kCLOCK_PortB); /* Clock Control: 0x01u */
125 
126  PORT_SetPinMux(PORTB, PIN0_IDX, kPORT_PinDisabledOrAnalog); /* PORTB0 (pin 54) is configured as ADC0_SE4 */
127  PORT_SetPinMux(PORTB, PIN1_IDX, kPORT_PinDisabledOrAnalog); /* PORTB1 (pin 53) is configured as ADC0_SE5 */
128 }
129 
130 
131 #define PIN6_IDX 6u /*!< Pin number for pin 6 in a port */
132 #define PIN7_IDX 7u /*!< Pin number for pin 7 in a port */
133 #define PIN8_IDX 8u /*!< Pin number for pin 8 in a port */
134 #define PIN9_IDX 9u /*!< Pin number for pin 9 in a port */
135 
136 /*
137  * TEXT BELOW IS USED AS SETTING FOR THE PINS TOOL *****************************
138 LPUART1_InitPins:
139 - options: {coreID: singlecore, enableClock: 'true'}
140 - pin_list:
141  - {pin_num: '81', peripheral: LPUART1, signal: RX, pin_signal: ADC1_SE4/TSI0_CH15/PTC6/LPUART1_RX}
142  - {pin_num: '80', peripheral: LPUART1, signal: TX, pin_signal: ADC1_SE5/TSI0_CH16/PTC7/LPUART1_TX}
143  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE PINS TOOL ***
144  */
145 
146 /*FUNCTION**********************************************************************
147  *
148  * Function Name : LPUART1_InitPins
149  * Description : Configures pin routing and optionally pin electrical features.
150  *
151  *END**************************************************************************/
152 void LPUART1_InitPins(void) {
153  CLOCK_EnableClock(kCLOCK_PortC); /* Clock Control: 0x01u */
154 #ifndef USE_BLUETOOTH_PORT
155  PORT_SetPinMux(PORTC, PIN6_IDX, kPORT_MuxAlt2); /* PORTC6 (pin 81) is configured as LPUART1_RX */
156  PORT_SetPinMux(PORTC, PIN7_IDX, kPORT_MuxAlt2); /* PORTC7 (pin 80) is configured as LPUART1_TX */
157 #else
158  PORT_SetPinMux(PORTC, PIN8_IDX, kPORT_MuxAlt2); /* PORTC8 (pin 54) is configured as ADC0_SE4 */
159  PORT_SetPinMux(PORTC, PIN9_IDX, kPORT_MuxAlt2); /* PORTC9 (pin 53) is configured as ADC0_SE5 */
160 #endif
161 }
162 
163 
164 #define PIN6_IDX 6u /*!< Pin number for pin 6 in a port */
165 #define PIN7_IDX 7u /*!< Pin number for pin 7 in a port */
166 #define PIN8_IDX 8u /*!< Pin number for pin 8 in a port */
167 #define PIN9_IDX 9u /*!< Pin number for pin 9 in a port */
168 /*
169  * TEXT BELOW IS USED AS SETTING FOR THE PINS TOOL *****************************
170 LPUART1_DeinitPins:
171 - options: {coreID: singlecore, enableClock: 'true'}
172 - pin_list:
173  - {pin_num: '81', peripheral: ADC1, signal: 'SE, 4', pin_signal: ADC1_SE4/TSI0_CH15/PTC6/LPUART1_RX}
174  - {pin_num: '80', peripheral: ADC1, signal: 'SE, 5', pin_signal: ADC1_SE5/TSI0_CH16/PTC7/LPUART1_TX}
175  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE PINS TOOL ***
176  */
177 
178 /*FUNCTION**********************************************************************
179  *
180  * Function Name : LPUART1_DeinitPins
181  * Description : Configures pin routing and optionally pin electrical features.
182  *
183  *END**************************************************************************/
184 void LPUART1_DeinitPins(void) {
185  CLOCK_EnableClock(kCLOCK_PortC); /* Clock Control: 0x01u */
186 #ifndef USE_BLUETOOTH_PORT
187  PORT_SetPinMux(PORTC, PIN6_IDX, kPORT_PinDisabledOrAnalog); /* PORTC6 (pin 81) is configured as ADC1_SE4 */
188  PORT_SetPinMux(PORTC, PIN7_IDX, kPORT_PinDisabledOrAnalog); /* PORTC7 (pin 80) is configured as ADC1_SE5 */
189 #else
190  PORT_SetPinMux(PORTC, PIN8_IDX, kPORT_PinDisabledOrAnalog); /* PORTC8 (pin 54) is configured as ADC0_SE4 */
191  PORT_SetPinMux(PORTC, PIN9_IDX, kPORT_PinDisabledOrAnalog); /* PORTC9 (pin 53) is configured as ADC0_SE5 */
192 #endif
193 }
194 
195 
196 #define PIN6_IDX 6u /*!< Pin number for pin 6 in a port */
197 #define PIN7_IDX 7u /*!< Pin number for pin 7 in a port */
198 /*
199  * TEXT BELOW IS USED AS SETTING FOR THE PINS TOOL *****************************
200 LPUART2_InitPins:
201 - options: {coreID: singlecore, enableClock: 'true'}
202 - pin_list:
203  - {pin_num: '32', peripheral: LPUART2, signal: RX, pin_signal: TSI0_CH7/PTD6/LPUART2_RX/FTM2_FLT2}
204  - {pin_num: '31', peripheral: LPUART2, signal: TX, pin_signal: TSI0_CH10/PTD7/LPUART2_TX/FTM2_FLT3}
205  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE PINS TOOL ***
206  */
207 
208 /*FUNCTION**********************************************************************
209  *
210  * Function Name : LPUART2_InitPins
211  * Description : Configures pin routing and optionally pin electrical features.
212  *
213  *END**************************************************************************/
214 void LPUART2_InitPins(void) {
215  CLOCK_EnableClock(kCLOCK_PortD); /* Clock Control: 0x01u */
216 
217  PORT_SetPinMux(PORTD, PIN6_IDX, kPORT_MuxAlt2); /* PORTD6 (pin 32) is configured as LPUART2_RX */
218  PORT_SetPinMux(PORTD, PIN7_IDX, kPORT_MuxAlt2); /* PORTD7 (pin 31) is configured as LPUART2_TX */
219 }
220 
221 
222 #define PIN6_IDX 6u /*!< Pin number for pin 6 in a port */
223 #define PIN7_IDX 7u /*!< Pin number for pin 7 in a port */
224 /*
225  * TEXT BELOW IS USED AS SETTING FOR THE PINS TOOL *****************************
226 LPUART2_DeinitPins:
227 - options: {coreID: singlecore, enableClock: 'true'}
228 - pin_list:
229  - {pin_num: '32', peripheral: TSI, signal: 'CH, 7', pin_signal: TSI0_CH7/PTD6/LPUART2_RX/FTM2_FLT2}
230  - {pin_num: '31', peripheral: TSI, signal: 'CH, 10', pin_signal: TSI0_CH10/PTD7/LPUART2_TX/FTM2_FLT3}
231  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE PINS TOOL ***
232  */
233 
234 /*FUNCTION**********************************************************************
235  *
236  * Function Name : LPUART2_DeinitPins
237  * Description : Configures pin routing and optionally pin electrical features.
238  *
239  *END**************************************************************************/
240 void LPUART2_DeinitPins(void) {
241  CLOCK_EnableClock(kCLOCK_PortD); /* Clock Control: 0x01u */
242 
243  PORT_SetPinMux(PORTD, PIN6_IDX, kPORT_PinDisabledOrAnalog); /* PORTD6 (pin 32) is configured as TSI0_CH7 */
244  PORT_SetPinMux(PORTD, PIN7_IDX, kPORT_PinDisabledOrAnalog); /* PORTD7 (pin 31) is configured as TSI0_CH10 */
245 }
246 
247 
248 
249 #define PIN2_IDX 2u /*!< Pin number for pin 2 in a port */
250 #define PIN3_IDX 3u /*!< Pin number for pin 3 in a port */
251 
252 /*
253  * TEXT BELOW IS USED AS SETTING FOR THE PINS TOOL *****************************
254 LPI2C0_InitPins:
255 - options: {coreID: singlecore, enableClock: 'true'}
256 - pin_list:
257  - {pin_num: '73', peripheral: LPI2C0, signal: SDA, pin_signal: ADC1_SE0/PTA2/LPI2C0_SDA/EWM_OUT_b/LPUART0_RX, drive_strength: low, pull_select: up, pull_enable: enable,
258  passive_filter: disable}
259  - {pin_num: '72', peripheral: LPI2C0, signal: SCL, pin_signal: ADC1_SE1/PTA3/LPI2C0_SCL/EWM_IN/LPUART0_TX, drive_strength: low, pull_select: up, pull_enable: enable,
260  passive_filter: disable}
261  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE PINS TOOL ***
262  */
263 
264 /*FUNCTION**********************************************************************
265  *
266  * Function Name : LPI2C0_InitPins
267  * Description : Configures pin routing and optionally pin electrical features.
268  *
269  *END**************************************************************************/
270 void LPI2C0_InitPins(void) {
271  CLOCK_EnableClock(kCLOCK_PortA); /* Clock Control: 0x01u */
272 
273  const port_pin_config_t porta2_pin73_config = {
274  kPORT_PullUp, /* Internal pull-up resistor is enabled */
275  kPORT_PassiveFilterDisable, /* Passive filter is disabled */
276  kPORT_LowDriveStrength, /* Low drive strength is configured */
277  kPORT_MuxAlt3, /* Pin is configured as LPI2C0_SDA */
278  kPORT_UnlockRegister /* Pin Control Register fields [15:0] are not locked */
279  };
280  PORT_SetPinConfig(PORTA, PIN2_IDX, &porta2_pin73_config); /* PORTA2 (pin 73) is configured as LPI2C0_SDA */
281  const port_pin_config_t porta3_pin72_config = {
282  kPORT_PullUp, /* Internal pull-up resistor is enabled */
283  kPORT_PassiveFilterDisable, /* Passive filter is disabled */
284  kPORT_LowDriveStrength, /* Low drive strength is configured */
285  kPORT_MuxAlt3, /* Pin is configured as LPI2C0_SCL */
286  kPORT_UnlockRegister /* Pin Control Register fields [15:0] are not locked */
287  };
288  PORT_SetPinConfig(PORTA, PIN3_IDX, &porta3_pin72_config); /* PORTA3 (pin 72) is configured as LPI2C0_SCL */
289 }
290 
291 
292 #define PIN2_IDX 2u /*!< Pin number for pin 2 in a port */
293 #define PIN3_IDX 3u /*!< Pin number for pin 3 in a port */
294 /*
295  * TEXT BELOW IS USED AS SETTING FOR THE PINS TOOL *****************************
296 LPI2C0_DeinitPins:
297 - options: {coreID: singlecore, enableClock: 'true'}
298 - pin_list:
299  - {pin_num: '73', peripheral: ADC1, signal: 'SE, 0', pin_signal: ADC1_SE0/PTA2/LPI2C0_SDA/EWM_OUT_b/LPUART0_RX}
300  - {pin_num: '72', peripheral: ADC1, signal: 'SE, 1', pin_signal: ADC1_SE1/PTA3/LPI2C0_SCL/EWM_IN/LPUART0_TX}
301  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE PINS TOOL ***
302  */
303 
304 /*FUNCTION**********************************************************************
305  *
306  * Function Name : LPI2C0_DeinitPins
307  * Description : Configures pin routing and optionally pin electrical features.
308  *
309  *END**************************************************************************/
310 void LPI2C0_DeinitPins(void) {
311  CLOCK_EnableClock(kCLOCK_PortA); /* Clock Control: 0x01u */
312 
313  PORT_SetPinMux(PORTA, PIN2_IDX, kPORT_PinDisabledOrAnalog); /* PORTA2 (pin 73) is configured as ADC1_SE0 */
314  PORT_SetPinMux(PORTA, PIN3_IDX, kPORT_PinDisabledOrAnalog); /* PORTA3 (pin 72) is configured as ADC1_SE1 */
315 }
316 
317 
318 #define PIN8_IDX 8u /*!< Pin number for pin 8 in a port */
319 #define PIN9_IDX 9u /*!< Pin number for pin 9 in a port */
320 
321 /*
322  * TEXT BELOW IS USED AS SETTING FOR THE PINS TOOL *****************************
323 LPI2C1_InitPins:
324 - options: {coreID: singlecore, enableClock: 'true'}
325 - pin_list:
326  - {pin_num: '42', peripheral: LPI2C1, signal: SDA, pin_signal: PTD8/LPI2C1_SDA/FTM2_FLT2, drive_strength: low, pull_select: up, pull_enable: enable, passive_filter: disable}
327  - {pin_num: '41', peripheral: LPI2C1, signal: SCL, pin_signal: ACMP1_IN5/PTD9/LPI2C1_SCL/FTM2_FLT3, drive_strength: low, pull_select: up, pull_enable: enable, passive_filter: disable}
328  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE PINS TOOL ***
329  */
330 
331 /*FUNCTION**********************************************************************
332  *
333  * Function Name : LPI2C1_InitPins
334  * Description : Configures pin routing and optionally pin electrical features.
335  *
336  *END**************************************************************************/
337 void LPI2C1_InitPins(void) {
338  CLOCK_EnableClock(kCLOCK_PortD); /* Clock Control: 0x01u */
339 
340  const port_pin_config_t portd8_pin42_config = {
341  kPORT_PullUp, /* Internal pull-up resistor is enabled */
342  kPORT_PassiveFilterDisable, /* Passive filter is disabled */
343  kPORT_LowDriveStrength, /* Low drive strength is configured */
344  kPORT_MuxAlt2, /* Pin is configured as LPI2C1_SDA */
345  kPORT_UnlockRegister /* Pin Control Register fields [15:0] are not locked */
346  };
347  PORT_SetPinConfig(PORTD, PIN8_IDX, &portd8_pin42_config); /* PORTD8 (pin 42) is configured as LPI2C1_SDA */
348  const port_pin_config_t portd9_pin41_config = {
349  kPORT_PullUp, /* Internal pull-up resistor is enabled */
350  kPORT_PassiveFilterDisable, /* Passive filter is disabled */
351  kPORT_LowDriveStrength, /* Low drive strength is configured */
352  kPORT_MuxAlt2, /* Pin is configured as LPI2C1_SCL */
353  kPORT_UnlockRegister /* Pin Control Register fields [15:0] are not locked */
354  };
355  PORT_SetPinConfig(PORTD, PIN9_IDX, &portd9_pin41_config); /* PORTD9 (pin 41) is configured as LPI2C1_SCL */
356 }
357 
358 
359 #define PIN8_IDX 8u /*!< Pin number for pin 8 in a port */
360 #define PIN9_IDX 9u /*!< Pin number for pin 9 in a port */
361 /*
362  * TEXT BELOW IS USED AS SETTING FOR THE PINS TOOL *****************************
363 LPI2C1_DeinitPins:
364 - options: {coreID: singlecore, enableClock: 'true'}
365 - pin_list:
366  - {pin_num: '42', peripheral: n/a, signal: disabled, pin_signal: PTD8/LPI2C1_SDA/FTM2_FLT2}
367  - {pin_num: '41', peripheral: CMP1, signal: 'IN, 5', pin_signal: ACMP1_IN5/PTD9/LPI2C1_SCL/FTM2_FLT3}
368  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE PINS TOOL ***
369  */
370 
371 /*FUNCTION**********************************************************************
372  *
373  * Function Name : LPI2C1_DeinitPins
374  * Description : Configures pin routing and optionally pin electrical features.
375  *
376  *END**************************************************************************/
377 void LPI2C1_DeinitPins(void) {
378  CLOCK_EnableClock(kCLOCK_PortD); /* Clock Control: 0x01u */
379 
380  PORT_SetPinMux(PORTD, PIN8_IDX, kPORT_PinDisabledOrAnalog); /* PORTD8 (pin 42) is disabled */
381  PORT_SetPinMux(PORTD, PIN9_IDX, kPORT_PinDisabledOrAnalog); /* PORTD9 (pin 41) is configured as ACMP1_IN5 */
382 }
383 
384 
385 
386 #define PIN0_IDX 0u /*!< Pin number for pin 0 in a port */
387 #define PIN1_IDX 1u /*!< Pin number for pin 1 in a port */
388 #define PIN2_IDX 2u /*!< Pin number for pin 2 in a port */
389 
390 /*
391  * TEXT BELOW IS USED AS SETTING FOR THE PINS TOOL *****************************
392 LPSPI0_InitPins:
393 - options: {coreID: singlecore, enableClock: 'true'}
394 - pin_list:
395  - {pin_num: '94', peripheral: LPSPI0, signal: SCK, pin_signal: TSI0_CH13/PTE0/LPSPI0_SCK/TCLK1/LPI2C1_SDA/FTM1_FLT2}
396  - {pin_num: '93', peripheral: LPSPI0, signal: SIN, pin_signal: TSI0_CH14/PTE1/LPSPI0_SIN/LPI2C0_HREQ/LPI2C1_SCL}
397  - {pin_num: '85', peripheral: LPSPI0, signal: SOUT, pin_signal: ADC1_SE10/TSI0_CH19/PTE2/LPSPI0_SOUT/LPTMR0_ALT3/PWT_IN3/LPUART1_CTS}
398  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE PINS TOOL ***
399  */
400 
401 /*FUNCTION**********************************************************************
402  *
403  * Function Name : LPSPI0_InitPins
404  * Description : Configures pin routing and optionally pin electrical features.
405  *
406  *END**************************************************************************/
407 void LPSPI0_InitPins(void) {
408  CLOCK_EnableClock(kCLOCK_PortE); /* Clock Control: 0x01u */
409 
410  PORT_SetPinMux(PORTE, PIN0_IDX, kPORT_MuxAlt2); /* PORTE0 (pin 94) is configured as LPSPI0_SCK */
411  PORT_SetPinMux(PORTE, PIN1_IDX, kPORT_MuxAlt2); /* PORTE1 (pin 93) is configured as LPSPI0_SIN */
412  PORT_SetPinMux(PORTE, PIN2_IDX, kPORT_MuxAlt2); /* PORTE2 (pin 85) is configured as LPSPI0_SOUT */
413 }
414 
415 
416 #define PIN0_IDX 0u /*!< Pin number for pin 0 in a port */
417 #define PIN1_IDX 1u /*!< Pin number for pin 1 in a port */
418 #define PIN2_IDX 2u /*!< Pin number for pin 2 in a port */
419 /*
420  * TEXT BELOW IS USED AS SETTING FOR THE PINS TOOL *****************************
421 LPSPI0_DeinitPins:
422 - options: {coreID: singlecore, enableClock: 'true'}
423 - pin_list:
424  - {pin_num: '94', peripheral: TSI, signal: 'CH, 13', pin_signal: TSI0_CH13/PTE0/LPSPI0_SCK/TCLK1/LPI2C1_SDA/FTM1_FLT2}
425  - {pin_num: '93', peripheral: TSI, signal: 'CH, 14', pin_signal: TSI0_CH14/PTE1/LPSPI0_SIN/LPI2C0_HREQ/LPI2C1_SCL}
426  - {pin_num: '85', peripheral: TSI, signal: 'CH, 19', pin_signal: ADC1_SE10/TSI0_CH19/PTE2/LPSPI0_SOUT/LPTMR0_ALT3/PWT_IN3/LPUART1_CTS}
427  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE PINS TOOL ***
428  */
429 
430 /*FUNCTION**********************************************************************
431  *
432  * Function Name : LPSPI0_DeinitPins
433  * Description : Configures pin routing and optionally pin electrical features.
434  *
435  *END**************************************************************************/
436 void LPSPI0_DeinitPins(void) {
437  CLOCK_EnableClock(kCLOCK_PortA); /* Clock Control: 0x01u */
438 
439  PORT_SetPinMux(PORTE, PIN0_IDX, kPORT_PinDisabledOrAnalog); /* PORTE0 (pin 94) is configured as TSI0_CH13 */
440  PORT_SetPinMux(PORTE, PIN1_IDX, kPORT_PinDisabledOrAnalog); /* PORTE1 (pin 93) is configured as TSI0_CH14 */
441  PORT_SetPinMux(PORTE, PIN2_IDX, kPORT_PinDisabledOrAnalog); /* PORTE2 (pin 85) is configured as TSI0_CH19 */
442 }
443 
444 
445 #define PIN14_IDX 14u /*!< Pin number for pin 14 in a port */
446 #define PIN15_IDX 15u /*!< Pin number for pin 15 in a port */
447 #define PIN16_IDX 16u /*!< Pin number for pin 16 in a port */
448 
449 /*
450  * TEXT BELOW IS USED AS SETTING FOR THE PINS TOOL *****************************
451 LPSPI1_InitPins:
452 - options: {coreID: singlecore, enableClock: 'true'}
453 - pin_list:
454  - {pin_num: '66', peripheral: LPSPI1, signal: SCK, pin_signal: ADC1_SE9/PTB14/FTM0_CH2/LPSPI1_SCK}
455  - {pin_num: '65', peripheral: LPSPI1, signal: SIN, pin_signal: PTB15/FTM0_CH3/LPSPI1_SIN}
456  - {pin_num: '64', peripheral: LPSPI1, signal: SOUT, pin_signal: PTB16/FTM0_CH4/LPSPI1_SOUT}
457  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE PINS TOOL ***
458  */
459 
460 /*FUNCTION**********************************************************************
461  *
462  * Function Name : LPSPI1_InitPins
463  * Description : Configures pin routing and optionally pin electrical features.
464  *
465  *END**************************************************************************/
466 void LPSPI1_InitPins(void) {
467  CLOCK_EnableClock(kCLOCK_PortB); /* Clock Control: 0x01u */
468 
469  PORT_SetPinMux(PORTB, PIN14_IDX, kPORT_MuxAlt3); /* PORTB14 (pin 66) is configured as LPSPI1_SCK */
470  PORT_SetPinMux(PORTB, PIN15_IDX, kPORT_MuxAlt3); /* PORTB15 (pin 65) is configured as LPSPI1_SIN */
471  PORT_SetPinMux(PORTB, PIN16_IDX, kPORT_MuxAlt3); /* PORTB16 (pin 64) is configured as LPSPI1_SOUT */
472 }
473 
474 
475 #define PIN14_IDX 14u /*!< Pin number for pin 14 in a port */
476 #define PIN15_IDX 15u /*!< Pin number for pin 15 in a port */
477 #define PIN16_IDX 16u /*!< Pin number for pin 16 in a port */
478 /*
479  * TEXT BELOW IS USED AS SETTING FOR THE PINS TOOL *****************************
480 LPSPI1_DeinitPins:
481 - options: {coreID: singlecore, enableClock: 'true'}
482 - pin_list:
483  - {pin_num: '66', peripheral: ADC1, signal: 'SE, 9', pin_signal: ADC1_SE9/PTB14/FTM0_CH2/LPSPI1_SCK}
484  - {pin_num: '65', peripheral: n/a, signal: disabled, pin_signal: PTB15/FTM0_CH3/LPSPI1_SIN}
485  - {pin_num: '64', peripheral: n/a, signal: disabled, pin_signal: PTB16/FTM0_CH4/LPSPI1_SOUT}
486  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE PINS TOOL ***
487  */
488 
489 /*FUNCTION**********************************************************************
490  *
491  * Function Name : LPSPI1_DeinitPins
492  * Description : Configures pin routing and optionally pin electrical features.
493  *
494  *END**************************************************************************/
495 void LPSPI1_DeinitPins(void) {
496  CLOCK_EnableClock(kCLOCK_PortB); /* Clock Control: 0x01u */
497 
498  PORT_SetPinMux(PORTB, PIN14_IDX, kPORT_PinDisabledOrAnalog); /* PORTB14 (pin 66) is configured as ADC1_SE9 */
499  PORT_SetPinMux(PORTB, PIN15_IDX, kPORT_PinDisabledOrAnalog); /* PORTB15 (pin 65) is disabled */
500  PORT_SetPinMux(PORTB, PIN16_IDX, kPORT_PinDisabledOrAnalog); /* PORTB16 (pin 64) is disabled */
501 }
502 
503 /*******************************************************************************
504  * EOF
505  ******************************************************************************/
void LPI2C1_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:337
void LPI2C0_DeinitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:310
#define PIN9_IDX
Definition: pin_mux.c:360
void LPUART2_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:214
void LPUART1_DeinitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:447
#define PIN14_IDX
Definition: pin_mux.c:475
void LPSPI1_DeinitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:495
void LPI2C0_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:270
#define PIN16_IDX
Definition: pin_mux.c:477
#define PIN15_IDX
Definition: pin_mux.c:476
#define PIN0_IDX
Definition: pin_mux.c:416
#define PIN1_IDX
Definition: pin_mux.c:417
void LPUART1_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:413
void LPI2C1_DeinitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:377
void LPSPI1_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:466
void LPSPI0_DeinitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:436
#define PIN8_IDX
Definition: pin_mux.c:359
#define PIN7_IDX
Definition: pin_mux.c:223
void LPSPI0_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:407
#define PIN3_IDX
Definition: pin_mux.c:293
#define PIN6_IDX
Definition: pin_mux.c:222
#define PIN2_IDX
Definition: pin_mux.c:418
void LPUART0_DeinitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:382
void LPUART2_DeinitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:240
void BOARD_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:73
void LPUART0_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:349