diff options
Diffstat (limited to 'lib/chibios-contrib/ext/mcux-sdk/devices/MK22F51212/template/RTE_Device.h')
-rw-r--r-- | lib/chibios-contrib/ext/mcux-sdk/devices/MK22F51212/template/RTE_Device.h | 143 |
1 files changed, 143 insertions, 0 deletions
diff --git a/lib/chibios-contrib/ext/mcux-sdk/devices/MK22F51212/template/RTE_Device.h b/lib/chibios-contrib/ext/mcux-sdk/devices/MK22F51212/template/RTE_Device.h new file mode 100644 index 000000000..21d3a4511 --- /dev/null +++ b/lib/chibios-contrib/ext/mcux-sdk/devices/MK22F51212/template/RTE_Device.h | |||
@@ -0,0 +1,143 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016, Freescale Semiconductor, Inc. | ||
3 | * Copyright 2016-2020 NXP | ||
4 | * All rights reserved. | ||
5 | * | ||
6 | * SPDX-License-Identifier: BSD-3-Clause | ||
7 | */ | ||
8 | |||
9 | #ifndef _RTE_DEVICE_H | ||
10 | #define _RTE_DEVICE_H | ||
11 | |||
12 | #include "pin_mux.h" | ||
13 | |||
14 | /* USART Select. */ | ||
15 | /* Use UART0 - UART2. */ | ||
16 | /* User needs to provide the implementation of LPUARTX_GetFreq/LPUARTX_InitPins/LPUARTX_DeinitPins for the enabled | ||
17 | * LPUART instance. */ | ||
18 | #define RTE_USART0 0 | ||
19 | #define RTE_USART0_DMA_EN 0 | ||
20 | #define RTE_USART1 0 | ||
21 | #define RTE_USART1_DMA_EN 0 | ||
22 | #define RTE_USART2 0 | ||
23 | #define RTE_USART2_DMA_EN 0 | ||
24 | /*Use LPUART0. */ | ||
25 | #define RTE_USART3 0 | ||
26 | #define RTE_USART3_DMA_EN 0 | ||
27 | |||
28 | /* UART RX Buffer configuration. */ | ||
29 | #define USART_RX_BUFFER_LEN 64 | ||
30 | #define USART0_RX_BUFFER_ENABLE 0 | ||
31 | #define USART1_RX_BUFFER_ENABLE 0 | ||
32 | #define USART2_RX_BUFFER_ENABLE 0 | ||
33 | #define USART3_RX_BUFFER_ENABLE 0 | ||
34 | |||
35 | /* UART configuration. */ | ||
36 | |||
37 | #define RTE_USART0_PIN_INIT LPUART0_InitPins | ||
38 | #define RTE_USART0_PIN_DEINIT LPUART0_DeinitPins | ||
39 | #define RTE_USART0_DMA_TX_CH 0 | ||
40 | #define RTE_USART0_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMux0UART0Tx | ||
41 | #define RTE_USART0_DMA_TX_DMAMUX_BASE DMAMUX0 | ||
42 | #define RTE_USART0_DMA_TX_DMA_BASE DMA0 | ||
43 | #define RTE_USART0_DMA_RX_CH 1 | ||
44 | #define RTE_USART0_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMux0UART0Rx | ||
45 | #define RTE_USART0_DMA_RX_DMAMUX_BASE DMAMUX0 | ||
46 | #define RTE_USART0_DMA_RX_DMA_BASE DMA0 | ||
47 | |||
48 | #define RTE_USART1_PIN_INIT LPUART1_InitPins | ||
49 | #define RTE_USART1_PIN_DEINIT LPUART1_DeinitPins | ||
50 | #define RTE_USART1_DMA_TX_CH 0 | ||
51 | #define RTE_USART1_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMux0UART1Tx | ||
52 | #define RTE_USART1_DMA_TX_DMAMUX_BASE DMAMUX0 | ||
53 | #define RTE_USART1_DMA_TX_DMA_BASE DMA0 | ||
54 | #define RTE_USART1_DMA_RX_CH 1 | ||
55 | #define RTE_USART1_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMux0UART1Rx | ||
56 | #define RTE_USART1_DMA_RX_DMAMUX_BASE DMAMUX0 | ||
57 | #define RTE_USART1_DMA_RX_DMA_BASE DMA0 | ||
58 | |||
59 | #define RTE_USART2_PIN_INIT LPUART2_InitPins | ||
60 | #define RTE_USART2_PIN_DEINIT LPUART2_DeinitPins | ||
61 | #define RTE_USART2_DMA_TX_CH 0 | ||
62 | #define RTE_USART2_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMux0UART2Tx | ||
63 | #define RTE_USART2_DMA_TX_DMAMUX_BASE DMAMUX0 | ||
64 | #define RTE_USART2_DMA_TX_DMA_BASE DMA0 | ||
65 | #define RTE_USART2_DMA_RX_CH 1 | ||
66 | #define RTE_USART2_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMux0UART2Rx | ||
67 | #define RTE_USART2_DMA_RX_DMAMUX_BASE DMAMUX0 | ||
68 | #define RTE_USART2_DMA_RX_DMA_BASE DMA0 | ||
69 | |||
70 | #define RTE_USART3_PIN_INIT LPUART3_InitPins | ||
71 | #define RTE_USART3_PIN_DEINIT LPUART3_DeinitPins | ||
72 | #define RTE_USART3_DMA_TX_CH 0 | ||
73 | #define RTE_USART3_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMux0LPUART0Tx | ||
74 | #define RTE_USART3_DMA_TX_DMAMUX_BASE DMAMUX0 | ||
75 | #define RTE_USART3_DMA_TX_DMA_BASE DMA0 | ||
76 | #define RTE_USART3_DMA_RX_CH 1 | ||
77 | #define RTE_USART3_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMux0LPUART0Rx | ||
78 | #define RTE_USART3_DMA_RX_DMAMUX_BASE DMAMUX0 | ||
79 | #define RTE_USART3_DMA_RX_DMA_BASE DMA0 | ||
80 | |||
81 | /* I2C Select */ | ||
82 | /* User needs to provide the implementation of I2CX_GetFreq/I2CX_InitPins/I2CX_DeinitPins for the enabled I2C instance. | ||
83 | */ | ||
84 | #define RTE_I2C0 0 | ||
85 | #define RTE_I2C0_DMA_EN 0 | ||
86 | #define RTE_I2C1 0 | ||
87 | #define RTE_I2C1_DMA_EN 0 | ||
88 | |||
89 | /*I2C configuration*/ | ||
90 | #define RTE_I2C0_Master_DMA_BASE DMA0 | ||
91 | #define RTE_I2C0_Master_DMA_CH 0 | ||
92 | #define RTE_I2C0_Master_DMAMUX_BASE DMAMUX0 | ||
93 | #define RTE_I2C0_Master_PERI_SEL kDmaRequestMux0I2C0 | ||
94 | |||
95 | #define RTE_I2C1_Master_DMA_BASE DMA0 | ||
96 | #define RTE_I2C1_Master_DMA_CH 1 | ||
97 | #define RTE_I2C1_Master_DMAMUX_BASE DMAMUX0 | ||
98 | #define RTE_I2C1_Master_PERI_SEL kDmaRequestMux0I2C1 | ||
99 | |||
100 | /* DSPI Select. */ | ||
101 | /* User needs to provide the implementation of DSPIX_GetFreq/DSPIX_InitPins/DSPIX_DeinitPins for the enabled DSPI | ||
102 | * instance. */ | ||
103 | #define RTE_SPI0 0 | ||
104 | #define RTE_SPI0_DMA_EN 0 | ||
105 | #define RTE_SPI1 0 | ||
106 | #define RTE_SPI1_DMA_EN 0 | ||
107 | |||
108 | /* DSPI configuration. */ | ||
109 | #define RTE_SPI0_PCS_TO_SCK_DELAY 1000 | ||
110 | #define RTE_SPI0_SCK_TO_PSC_DELAY 1000 | ||
111 | #define RTE_SPI0_BETWEEN_TRANSFER_DELAY 1000 | ||
112 | #define RTE_SPI0_MASTER_PCS_PIN_SEL kDSPI_MasterPcs0 | ||
113 | #define RTE_SPI0_PIN_INIT DSPI0_InitPins | ||
114 | #define RTE_SPI0_PIN_DEINIT DSPI0_DeinitPins | ||
115 | #define RTE_SPI0_DMA_TX_CH 0 | ||
116 | #define RTE_SPI0_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMux0SPI0Tx | ||
117 | #define RTE_SPI0_DMA_TX_DMAMUX_BASE DMAMUX0 | ||
118 | #define RTE_SPI0_DMA_TX_DMA_BASE DMA0 | ||
119 | #define RTE_SPI0_DMA_RX_CH 1 | ||
120 | #define RTE_SPI0_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMux0SPI0Rx | ||
121 | #define RTE_SPI0_DMA_RX_DMAMUX_BASE DMAMUX0 | ||
122 | #define RTE_SPI0_DMA_RX_DMA_BASE DMA0 | ||
123 | #define RTE_SPI0_DMA_LINK_DMA_BASE DMA0 | ||
124 | #define RTE_SPI0_DMA_LINK_CH 2 | ||
125 | |||
126 | #define RTE_SPI1_PCS_TO_SCK_DELAY 1000 | ||
127 | #define RTE_SPI1_SCK_TO_PSC_DELAY 1000 | ||
128 | #define RTE_SPI1_BETWEEN_TRANSFER_DELAY 1000 | ||
129 | #define RTE_SPI1_MASTER_PCS_PIN_SEL kDSPI_MasterPcs0 | ||
130 | #define RTE_SPI1_PIN_INIT DSPI1_InitPins | ||
131 | #define RTE_SPI1_PIN_DEINIT DSPI1_DeinitPins | ||
132 | #define RTE_SPI1_DMA_TX_CH 0 | ||
133 | #define RTE_SPI1_DMA_TX_PERI_SEL (uint8_t) kDmaRequestMux0SPI1 | ||
134 | #define RTE_SPI1_DMA_TX_DMAMUX_BASE DMAMUX0 | ||
135 | #define RTE_SPI1_DMA_TX_DMA_BASE DMA0 | ||
136 | #define RTE_SPI1_DMA_RX_CH 1 | ||
137 | #define RTE_SPI1_DMA_RX_PERI_SEL (uint8_t) kDmaRequestMux0SPI1 | ||
138 | #define RTE_SPI1_DMA_RX_DMAMUX_BASE DMAMUX0 | ||
139 | #define RTE_SPI1_DMA_RX_DMA_BASE DMA0 | ||
140 | #define RTE_SPI1_DMA_LINK_DMA_BASE DMA0 | ||
141 | #define RTE_SPI1_DMA_LINK_CH 2 | ||
142 | |||
143 | #endif /* _RTE_DEVICE_H */ | ||