diff options
Diffstat (limited to 'lib/chibios-contrib/ext/mcux-sdk/boards/lpcxpresso845max/project_template/pin_mux.h')
-rw-r--r-- | lib/chibios-contrib/ext/mcux-sdk/boards/lpcxpresso845max/project_template/pin_mux.h | 321 |
1 files changed, 321 insertions, 0 deletions
diff --git a/lib/chibios-contrib/ext/mcux-sdk/boards/lpcxpresso845max/project_template/pin_mux.h b/lib/chibios-contrib/ext/mcux-sdk/boards/lpcxpresso845max/project_template/pin_mux.h new file mode 100644 index 000000000..4ef0b0226 --- /dev/null +++ b/lib/chibios-contrib/ext/mcux-sdk/boards/lpcxpresso845max/project_template/pin_mux.h | |||
@@ -0,0 +1,321 @@ | |||
1 | /* | ||
2 | * Copyright 2018 NXP. | ||
3 | * All rights reserved. | ||
4 | * | ||
5 | * SPDX-License-Identifier: BSD-3-Clause | ||
6 | */ | ||
7 | |||
8 | /*********************************************************************************************************************** | ||
9 | * This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file | ||
10 | * will be overwritten if the respective MCUXpresso Config Tools is used to update this file. | ||
11 | **********************************************************************************************************************/ | ||
12 | |||
13 | #ifndef _PIN_MUX_H_ | ||
14 | #define _PIN_MUX_H_ | ||
15 | |||
16 | /*********************************************************************************************************************** | ||
17 | * Definitions | ||
18 | **********************************************************************************************************************/ | ||
19 | |||
20 | /*! @brief Direction type */ | ||
21 | typedef enum _pin_mux_direction | ||
22 | { | ||
23 | kPIN_MUX_DirectionInput = 0U, /* Input direction */ | ||
24 | kPIN_MUX_DirectionOutput = 1U, /* Output direction */ | ||
25 | kPIN_MUX_DirectionInputOrOutput = 2U /* Input or output direction */ | ||
26 | } pin_mux_direction_t; | ||
27 | |||
28 | /*! | ||
29 | * @addtogroup pin_mux | ||
30 | * @{ | ||
31 | */ | ||
32 | |||
33 | /*********************************************************************************************************************** | ||
34 | * API | ||
35 | **********************************************************************************************************************/ | ||
36 | |||
37 | #if defined(__cplusplus) | ||
38 | extern "C" { | ||
39 | #endif | ||
40 | |||
41 | /*! | ||
42 | * @brief Calls initialization functions. | ||
43 | * | ||
44 | */ | ||
45 | void BOARD_InitBootPins(void); | ||
46 | |||
47 | /*! | ||
48 | * @brief Configures pin routing and optionally pin electrical features. | ||
49 | * | ||
50 | */ | ||
51 | void BOARD_InitPins(void); /* Function assigned for the Cortex-M0P */ | ||
52 | |||
53 | #define IOCON_PIO_CLKDIV0 0x00u /*!<@brief IOCONCLKDIV0 */ | ||
54 | #define IOCON_PIO_HYS_EN 0x20u /*!<@brief Enable hysteresis */ | ||
55 | #define IOCON_PIO_INV_DI 0x00u /*!<@brief Input not invert */ | ||
56 | #define IOCON_PIO_MODE_PULLUP 0x10u /*!<@brief Selects pull-up function */ | ||
57 | #define IOCON_PIO_OD_DI 0x00u /*!<@brief Disables Open-drain function */ | ||
58 | #define IOCON_PIO_OD_EN 0x0400u /*!<@brief Enables Open-drain function */ | ||
59 | #define IOCON_PIO_SMODE_BYPASS 0x00u /*!<@brief Bypass input filter */ | ||
60 | |||
61 | /*! @name PIO0_0 (number 48), D1/P0_0-GREEN | ||
62 | @{ */ | ||
63 | /*! | ||
64 | * @brief Device name: GPIO */ | ||
65 | #define BOARD_INITLEDSPINS_LED_GREEN_PERIPHERAL GPIO | ||
66 | /*! | ||
67 | * @brief GPIO signal: PIO0 */ | ||
68 | #define BOARD_INITLEDSPINS_LED_GREEN_SIGNAL PIO0 | ||
69 | /*! | ||
70 | * @brief GPIO device name: GPIO */ | ||
71 | #define BOARD_INITLEDSPINS_LED_GREEN_GPIO GPIO | ||
72 | /*! | ||
73 | * @brief PIO0 pin index: 0 */ | ||
74 | #define BOARD_INITLEDSPINS_LED_GREEN_GPIO_PIN 0U | ||
75 | /*! | ||
76 | * @brief PORT device name: 0U */ | ||
77 | #define BOARD_INITLEDSPINS_LED_GREEN_PORT 0U | ||
78 | /*! | ||
79 | * @brief 0U pin index: 0 */ | ||
80 | #define BOARD_INITLEDSPINS_LED_GREEN_PIN 0U | ||
81 | /*! | ||
82 | * @brief GPIO PIO0 channel: 0 */ | ||
83 | #define BOARD_INITLEDSPINS_LED_GREEN_CHANNEL 0 | ||
84 | /*! | ||
85 | * @brief Pin name */ | ||
86 | #define BOARD_INITLEDSPINS_LED_GREEN_PIN_NAME PIO0_0 | ||
87 | /*! | ||
88 | * @brief Label */ | ||
89 | #define BOARD_INITLEDSPINS_LED_GREEN_LABEL "D1/P0_0-GREEN" | ||
90 | /*! | ||
91 | * @brief Identifier name */ | ||
92 | #define BOARD_INITLEDSPINS_LED_GREEN_NAME "LED_GREEN" | ||
93 | /*! | ||
94 | * @brief Direction */ | ||
95 | #define BOARD_INITLEDSPINS_LED_GREEN_DIRECTION kPIN_MUX_DirectionOutput | ||
96 | /* @} */ | ||
97 | |||
98 | /*! @name PIO1_15 (number 24), D2/P3[44]/P1_15-BLUE | ||
99 | @{ */ | ||
100 | #define BOARD_INITLEDSPINS_LED_BLUE_PERIPHERAL GPIO /*!<@brief Device name: GPIO */ | ||
101 | #define BOARD_INITLEDSPINS_LED_BLUE_SIGNAL PIO1 /*!<@brief GPIO signal: PIO1 */ | ||
102 | #define BOARD_INITLEDSPINS_LED_BLUE_GPIO GPIO /*!<@brief GPIO device name: GPIO */ | ||
103 | #define BOARD_INITLEDSPINS_LED_BLUE_GPIO_PIN 15U /*!<@brief PIO1 pin index: 15 */ | ||
104 | #define BOARD_INITLEDSPINS_LED_BLUE_PORT 1U /*!<@brief PORT device name: 1U */ | ||
105 | #define BOARD_INITLEDSPINS_LED_BLUE_PIN 15U /*!<@brief 1U pin index: 15 */ | ||
106 | #define BOARD_INITLEDSPINS_LED_BLUE_CHANNEL 15 /*!<@brief GPIO PIO1 channel: 15 */ | ||
107 | #define BOARD_INITLEDSPINS_LED_BLUE_PIN_NAME PIO1_15 /*!<@brief Pin name */ | ||
108 | #define BOARD_INITLEDSPINS_LED_BLUE_LABEL "D2/P3[44]/P1_15-BLUE" /*!<@brief Label */ | ||
109 | #define BOARD_INITLEDSPINS_LED_BLUE_NAME "LED_BLUE" /*!<@brief Identifier name */ | ||
110 | #define BOARD_INITLEDSPINS_LED_BLUE_DIRECTION kPIN_MUX_DirectionOutput /*!<@brief Direction */ | ||
111 | /* @} */ | ||
112 | |||
113 | /*! @name PIO0_12 (number 4), D3/P3[45]/SW1/P0_12-RED-ISP | ||
114 | @{ */ | ||
115 | #define BOARD_INITLEDSPINS_LED_RED_PERIPHERAL GPIO /*!<@brief Device name: GPIO */ | ||
116 | #define BOARD_INITLEDSPINS_LED_RED_SIGNAL PIO0 /*!<@brief GPIO signal: PIO0 */ | ||
117 | #define BOARD_INITLEDSPINS_LED_RED_GPIO GPIO /*!<@brief GPIO device name: GPIO */ | ||
118 | #define BOARD_INITLEDSPINS_LED_RED_GPIO_PIN 12U /*!<@brief PIO0 pin index: 12 */ | ||
119 | #define BOARD_INITLEDSPINS_LED_RED_PORT 0U /*!<@brief PORT device name: 0U */ | ||
120 | #define BOARD_INITLEDSPINS_LED_RED_PIN 12U /*!<@brief 0U pin index: 12 */ | ||
121 | #define BOARD_INITLEDSPINS_LED_RED_CHANNEL 12 /*!<@brief GPIO PIO0 channel: 12 */ | ||
122 | #define BOARD_INITLEDSPINS_LED_RED_PIN_NAME PIO0_12 /*!<@brief Pin name */ | ||
123 | #define BOARD_INITLEDSPINS_LED_RED_LABEL "D3/P3[45]/SW1/P0_12-RED-ISP" /*!<@brief Label */ | ||
124 | #define BOARD_INITLEDSPINS_LED_RED_NAME "LED_RED" /*!<@brief Identifier name */ | ||
125 | #define BOARD_INITLEDSPINS_LED_RED_DIRECTION kPIN_MUX_DirectionOutput /*!<@brief Direction */ | ||
126 | /* @} */ | ||
127 | |||
128 | /*! | ||
129 | * @brief Configures pin routing and optionally pin electrical features. | ||
130 | * | ||
131 | */ | ||
132 | void BOARD_InitLEDsPins(void); /* Function assigned for the Cortex-M0P */ | ||
133 | |||
134 | #define IOCON_PIO_CLKDIV0 0x00u /*!<@brief IOCONCLKDIV0 */ | ||
135 | #define IOCON_PIO_HYS_EN 0x20u /*!<@brief Enable hysteresis */ | ||
136 | #define IOCON_PIO_INV_DI 0x00u /*!<@brief Input not invert */ | ||
137 | #define IOCON_PIO_MODE_PULLUP 0x10u /*!<@brief Selects pull-up function */ | ||
138 | #define IOCON_PIO_OD_DI 0x00u /*!<@brief Disables Open-drain function */ | ||
139 | #define IOCON_PIO_SMODE_BYPASS 0x00u /*!<@brief Bypass input filter */ | ||
140 | |||
141 | /*! @name PIO1_17 (number 37), P3[13]/P6[1]/U4[31]/TARGET_TX_DEBUG_P1_17 | ||
142 | @{ */ | ||
143 | /*! | ||
144 | * @brief Device name: USART0 */ | ||
145 | #define BOARD_INITDEBUG_UARTPINS_DEBUG_UART_TX_PERIPHERAL USART0 | ||
146 | /*! | ||
147 | * @brief USART0 signal: TXD */ | ||
148 | #define BOARD_INITDEBUG_UARTPINS_DEBUG_UART_TX_SIGNAL TXD | ||
149 | /*! | ||
150 | * @brief PORT device name: 1U */ | ||
151 | #define BOARD_INITDEBUG_UARTPINS_DEBUG_UART_TX_PORT 1U | ||
152 | /*! | ||
153 | * @brief 1U pin index: 17 */ | ||
154 | #define BOARD_INITDEBUG_UARTPINS_DEBUG_UART_TX_PIN 17U | ||
155 | /*! | ||
156 | * @brief Pin name */ | ||
157 | #define BOARD_INITDEBUG_UARTPINS_DEBUG_UART_TX_PIN_NAME PIO1_17 | ||
158 | /*! | ||
159 | * @brief Label */ | ||
160 | #define BOARD_INITDEBUG_UARTPINS_DEBUG_UART_TX_LABEL "P3[13]/P6[1]/U4[31]/TARGET_TX_DEBUG_P1_17" | ||
161 | /*! | ||
162 | * @brief Identifier name */ | ||
163 | #define BOARD_INITDEBUG_UARTPINS_DEBUG_UART_TX_NAME "DEBUG_UART_TX" | ||
164 | /* @} */ | ||
165 | |||
166 | /*! @name PIO1_16 (number 36), P7[1]/U4[32]/TARGET_RX_DEBUG_P1_16 | ||
167 | @{ */ | ||
168 | /*! | ||
169 | * @brief Device name: USART0 */ | ||
170 | #define BOARD_INITDEBUG_UARTPINS_DEBUG_UART_RX_PERIPHERAL USART0 | ||
171 | /*! | ||
172 | * @brief USART0 signal: RXD */ | ||
173 | #define BOARD_INITDEBUG_UARTPINS_DEBUG_UART_RX_SIGNAL RXD | ||
174 | /*! | ||
175 | * @brief PORT device name: 1U */ | ||
176 | #define BOARD_INITDEBUG_UARTPINS_DEBUG_UART_RX_PORT 1U | ||
177 | /*! | ||
178 | * @brief 1U pin index: 16 */ | ||
179 | #define BOARD_INITDEBUG_UARTPINS_DEBUG_UART_RX_PIN 16U | ||
180 | /*! | ||
181 | * @brief Pin name */ | ||
182 | #define BOARD_INITDEBUG_UARTPINS_DEBUG_UART_RX_PIN_NAME PIO1_16 | ||
183 | /*! | ||
184 | * @brief Label */ | ||
185 | #define BOARD_INITDEBUG_UARTPINS_DEBUG_UART_RX_LABEL "P7[1]/U4[32]/TARGET_RX_DEBUG_P1_16" | ||
186 | /*! | ||
187 | * @brief Identifier name */ | ||
188 | #define BOARD_INITDEBUG_UARTPINS_DEBUG_UART_RX_NAME "DEBUG_UART_RX" | ||
189 | /* @} */ | ||
190 | |||
191 | /*! | ||
192 | * @brief Configures pin routing and optionally pin electrical features. | ||
193 | * | ||
194 | */ | ||
195 | void BOARD_InitDEBUG_UARTPins(void); /* Function assigned for the Cortex-M0P */ | ||
196 | |||
197 | #define IOCON_PIO_CLKDIV0 0x00u /*!<@brief IOCONCLKDIV0 */ | ||
198 | #define IOCON_PIO_HYS_EN 0x20u /*!<@brief Enable hysteresis */ | ||
199 | #define IOCON_PIO_INV_DI 0x00u /*!<@brief Input not invert */ | ||
200 | #define IOCON_PIO_MODE_PULLUP 0x10u /*!<@brief Selects pull-up function */ | ||
201 | #define IOCON_PIO_OD_DI 0x00u /*!<@brief Disables Open-drain function */ | ||
202 | #define IOCON_PIO_SMODE_BYPASS 0x00u /*!<@brief Bypass input filter */ | ||
203 | |||
204 | /*! @name SWCLK (number 12), U4[16]/P4[4]/TARGET_SWCLK | ||
205 | @{ */ | ||
206 | /*! | ||
207 | * @brief Device name: SWD */ | ||
208 | #define BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_SWCLK_PERIPHERAL SWD | ||
209 | /*! | ||
210 | * @brief SWD signal: SWCLK */ | ||
211 | #define BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_SWCLK_SIGNAL SWCLK | ||
212 | /*! | ||
213 | * @brief Pin name */ | ||
214 | #define BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_SWCLK_PIN_NAME SWCLK | ||
215 | /*! | ||
216 | * @brief Label */ | ||
217 | #define BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_SWCLK_LABEL "U4[16]/P4[4]/TARGET_SWCLK" | ||
218 | /*! | ||
219 | * @brief Identifier name */ | ||
220 | #define BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_SWCLK_NAME "DEBUG_SWD_SWCLK" | ||
221 | /* @} */ | ||
222 | |||
223 | /*! @name SWDIO (number 14), U4[17]/P4[2]/TARGET_SWDIO | ||
224 | @{ */ | ||
225 | /*! | ||
226 | * @brief Device name: SWD */ | ||
227 | #define BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_SWDIO_PERIPHERAL SWD | ||
228 | /*! | ||
229 | * @brief SWD signal: SWDIO */ | ||
230 | #define BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_SWDIO_SIGNAL SWDIO | ||
231 | /*! | ||
232 | * @brief Pin name */ | ||
233 | #define BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_SWDIO_PIN_NAME SWDIO | ||
234 | /*! | ||
235 | * @brief Label */ | ||
236 | #define BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_SWDIO_LABEL "U4[17]/P4[2]/TARGET_SWDIO" | ||
237 | /*! | ||
238 | * @brief Identifier name */ | ||
239 | #define BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_SWDIO_NAME "DEBUG_SWD_SWDIO" | ||
240 | /* @} */ | ||
241 | |||
242 | /*! @name RESETN (number 5), P3[4]/J5[3]/U4[8]/P4[10]/SW3[1]/TARGET_nRESET-P0_5 | ||
243 | @{ */ | ||
244 | /*! | ||
245 | * @brief Device name: SYSCON */ | ||
246 | #define BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_RESETN_PERIPHERAL SYSCON | ||
247 | /*! | ||
248 | * @brief SYSCON signal: RESETN */ | ||
249 | #define BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_RESETN_SIGNAL RESETN | ||
250 | /*! | ||
251 | * @brief Pin name */ | ||
252 | #define BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_RESETN_PIN_NAME RESETN | ||
253 | /*! | ||
254 | * @brief Label */ | ||
255 | #define BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_RESETN_LABEL "P3[4]/J5[3]/U4[8]/P4[10]/SW3[1]/TARGET_nRESET-P0_5" | ||
256 | /*! | ||
257 | * @brief Identifier name */ | ||
258 | #define BOARD_INITSWD_DEBUGPINS_DEBUG_SWD_RESETN_NAME "DEBUG_SWD_RESETN" | ||
259 | /* @} */ | ||
260 | |||
261 | /*! | ||
262 | * @brief Configures pin routing and optionally pin electrical features. | ||
263 | * | ||
264 | */ | ||
265 | void BOARD_InitSWD_DEBUGPins(void); /* Function assigned for the Cortex-M0P */ | ||
266 | |||
267 | #define IOCON_PIO_CLKDIV0 0x00u /*!<@brief IOCONCLKDIV0 */ | ||
268 | #define IOCON_PIO_HYS_EN 0x20u /*!<@brief Enable hysteresis */ | ||
269 | #define IOCON_PIO_INV_DI 0x00u /*!<@brief Input not invert */ | ||
270 | #define IOCON_PIO_MODE_PULLUP 0x10u /*!<@brief Selects pull-up function */ | ||
271 | #define IOCON_PIO_OD_DI 0x00u /*!<@brief Disables Open-drain function */ | ||
272 | #define IOCON_PIO_SMODE_BYPASS 0x00u /*!<@brief Bypass input filter */ | ||
273 | |||
274 | /*! @name PIO0_12 (number 4), D3/P3[45]/SW1/P0_12-RED-ISP | ||
275 | @{ */ | ||
276 | #define BOARD_INITBUTTONSPINS_SW1_PERIPHERAL GPIO /*!<@brief Device name: GPIO */ | ||
277 | #define BOARD_INITBUTTONSPINS_SW1_SIGNAL PIO0 /*!<@brief GPIO signal: PIO0 */ | ||
278 | #define BOARD_INITBUTTONSPINS_SW1_GPIO GPIO /*!<@brief GPIO device name: GPIO */ | ||
279 | #define BOARD_INITBUTTONSPINS_SW1_GPIO_PIN 12U /*!<@brief PIO0 pin index: 12 */ | ||
280 | #define BOARD_INITBUTTONSPINS_SW1_PORT 0U /*!<@brief PORT device name: 0U */ | ||
281 | #define BOARD_INITBUTTONSPINS_SW1_PIN 12U /*!<@brief 0U pin index: 12 */ | ||
282 | #define BOARD_INITBUTTONSPINS_SW1_CHANNEL 12 /*!<@brief GPIO PIO0 channel: 12 */ | ||
283 | #define BOARD_INITBUTTONSPINS_SW1_PIN_NAME PIO0_12 /*!<@brief Pin name */ | ||
284 | #define BOARD_INITBUTTONSPINS_SW1_LABEL "D3/P3[45]/SW1/P0_12-RED-ISP" /*!<@brief Label */ | ||
285 | #define BOARD_INITBUTTONSPINS_SW1_NAME "SW1" /*!<@brief Identifier name */ | ||
286 | #define BOARD_INITBUTTONSPINS_SW1_DIRECTION kPIN_MUX_DirectionInput /*!<@brief Direction */ | ||
287 | /* @} */ | ||
288 | |||
289 | /*! @name PIO0_4 (number 6), P3[50]/SW2/P0_4-WAKEUP | ||
290 | @{ */ | ||
291 | #define BOARD_INITBUTTONSPINS_SW2_PERIPHERAL GPIO /*!<@brief Device name: GPIO */ | ||
292 | #define BOARD_INITBUTTONSPINS_SW2_SIGNAL PIO0 /*!<@brief GPIO signal: PIO0 */ | ||
293 | #define BOARD_INITBUTTONSPINS_SW2_GPIO GPIO /*!<@brief GPIO device name: GPIO */ | ||
294 | #define BOARD_INITBUTTONSPINS_SW2_GPIO_PIN 4U /*!<@brief PIO0 pin index: 4 */ | ||
295 | #define BOARD_INITBUTTONSPINS_SW2_PORT 0U /*!<@brief PORT device name: 0U */ | ||
296 | #define BOARD_INITBUTTONSPINS_SW2_PIN 4U /*!<@brief 0U pin index: 4 */ | ||
297 | #define BOARD_INITBUTTONSPINS_SW2_CHANNEL 4 /*!<@brief GPIO PIO0 channel: 4 */ | ||
298 | #define BOARD_INITBUTTONSPINS_SW2_PIN_NAME PIO0_4 /*!<@brief Pin name */ | ||
299 | #define BOARD_INITBUTTONSPINS_SW2_LABEL "P3[50]/SW2/P0_4-WAKEUP" /*!<@brief Label */ | ||
300 | #define BOARD_INITBUTTONSPINS_SW2_NAME "SW2" /*!<@brief Identifier name */ | ||
301 | #define BOARD_INITBUTTONSPINS_SW2_DIRECTION kPIN_MUX_DirectionInput /*!<@brief Direction */ | ||
302 | /* @} */ | ||
303 | |||
304 | /*! | ||
305 | * @brief Configures pin routing and optionally pin electrical features. | ||
306 | * | ||
307 | */ | ||
308 | void BOARD_InitBUTTONsPins(void); /* Function assigned for the Cortex-M0P */ | ||
309 | |||
310 | #if defined(__cplusplus) | ||
311 | } | ||
312 | #endif | ||
313 | |||
314 | /*! | ||
315 | * @} | ||
316 | */ | ||
317 | #endif /* _PIN_MUX_H_ */ | ||
318 | |||
319 | /*********************************************************************************************************************** | ||
320 | * EOF | ||
321 | **********************************************************************************************************************/ | ||