ISSDK  1.7
IoT Sensing Software Development Kit
pin_mux.h
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 #ifndef _PIN_MUX_H_
36 #define _PIN_MUX_H_
37 #define PIN0_IDX 0u /*!< Pin number for pin 0 in a port */
38 #define PIN1_IDX 1u /*!< Pin number for pin 1 in a port */
39 #define PIN2_IDX 2u /*!< Pin number for pin 2 in a port */
40 #define PIN3_IDX 3u /*!< Pin number for pin 3 in a port */
41 #define PIN4_IDX 4u /*!< Pin number for pin 4 in a port */
42 #define PIN5_IDX 5u /*!< Pin number for pin 5 in a port */
43 #define PIN6_IDX 6u /*!< Pin number for pin 6 in a port */
44 #define PIN7_IDX 7u /*!< Pin number for pin 7 in a port */
45 #define PIN9_IDX 9u /*!< Pin number for pin 9 in a port */
46 #define PIN10_IDX 10u /*!< Pin number for pin 10 in a port */
47 #define PIN11_IDX 11u /*!< Pin number for pin 11 in a port */
48 #define PIN16_IDX 16u /*!< Pin number for pin 16 in a port */
49 #define PIN17_IDX 17u /*!< Pin number for pin 17 in a port */
50 #define PIN21_IDX 21u /*!< Pin number for pin 21 in a port */
51 #define PIN22_IDX 22u /*!< Pin number for pin 22 in a port */
52 #define PIN23_IDX 23u /*!< Pin number for pin 23 in a port */
53 #define PIN24_IDX 24u /*!< Pin number for pin 24 in a port */
54 #define PIN25_IDX 25u /*!< Pin number for pin 25 in a port */
55 #define PIN26_IDX 26u /*!< Pin number for pin 26 in a port */
56 
57 
58 /*******************************************************************************
59  * Definitions
60  ******************************************************************************/
61 
62 /*! @brief Direction type */
63 typedef enum _pin_mux_direction
64 {
65  kPIN_MUX_DirectionInput = 0U, /* Input direction */
66  kPIN_MUX_DirectionOutput = 1U, /* Output direction */
67  kPIN_MUX_DirectionInputOrOutput = 2U /* Input or output direction */
69 
70 /*!
71  * @addtogroup pin_mux
72  * @{
73  */
74 
75 /*******************************************************************************
76  * API
77  ******************************************************************************/
78 
79 #if defined(__cplusplus)
80 extern "C" {
81 #endif
82 
83 
84 /*!
85  * @brief Configures pin routing and optionally pin electrical features.
86  *
87  */
88 void BOARD_InitPins(void);
89 
90 /*!
91  * @brief Configures pin routing and optionally pin electrical features.
92  *
93  */
94 void I2C0_InitPins(void);
95 
96 /*!
97  * @brief Configures pin routing and optionally pin electrical features.
98  *
99  */
100 void I2C0_DeinitPins(void);
101 
102 /*!
103  * @brief Configures pin routing and optionally pin electrical features.
104  *
105  */
106 void I2C1_InitPins(void);
107 
108 /*!
109  * @brief Configures pin routing and optionally pin electrical features.
110  *
111  */
112 void I2C1_DeinitPins(void);
113 
114 /*!
115  * @brief Configures pin routing and optionally pin electrical features.
116  *
117  */
118 void SPI0_InitPins(void);
119 
120 /*!
121  * @brief Configures pin routing and optionally pin electrical features.
122  *
123  */
124 void SPI0_DeinitPins(void);
125 
126 /*!
127  * @brief Configures pin routing and optionally pin electrical features.
128  *
129  */
130 void SPI1_InitPins(void);
131 
132 /*!
133  * @brief Configures pin routing and optionally pin electrical features.
134  *
135  */
136 void SPI1_DeinitPins(void);
137 
138 /*!
139  * @brief Configures pin routing and optionally pin electrical features.
140  *
141  */
142 void UART0_InitPins(void);
143 
144 /*!
145  * @brief Configures pin routing and optionally pin electrical features.
146  *
147  */
148 void UART0_DeinitPins(void);
149 
150 /*!
151  * @brief Configures pin routing and optionally pin electrical features.
152  *
153  */
154 void UART1_InitPins(void);
155 
156 /*!
157  * @brief Configures pin routing and optionally pin electrical features.
158  *
159  */
160 void UART1_DeinitPins(void);
161 
162 /*!
163  * @brief Configures pin routing and optionally pin electrical features.
164  *
165  */
166 void UART2_InitPins(void);
167 
168 /*!
169  * @brief Configures pin routing and optionally pin electrical features.
170  *
171  */
172 void UART2_DeinitPins(void);
173 #if defined(__cplusplus)
174 }
175 #endif
176 
177 /*!
178  * @}
179  */
180 #endif /* _PIN_MUX_H_ */
181 
182 /*******************************************************************************
183  * EOF
184  ******************************************************************************/
void I2C0_DeinitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:438
void UART2_DeinitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:255
void UART0_DeinitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:139
void I2C0_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:392
void UART1_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:168
void I2C1_DeinitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:513
_pin_mux_direction
Direction type.
Definition: pin_mux.h:44
void UART0_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:107
void UART2_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:227
void SPI1_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:302
void UART1_DeinitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:200
void SPI0_DeinitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:274
enum _pin_mux_direction pin_mux_direction_t
Direction type.
void I2C1_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:467
void BOARD_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:73
void SPI1_DeinitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:334
void SPI0_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:242