2 ** ###################################################################
3 ** Version: rev. 1.0, 2014-05-14
7 ** Chip specific module features.
9 ** Copyright: 2014 Freescale Semiconductor, Inc.
10 ** All rights reserved.
12 ** Redistribution and use in source and binary forms, with or without modification,
13 ** are permitted provided that the following conditions are met:
15 ** o Redistributions of source code must retain the above copyright notice, this list
16 ** of conditions and the following disclaimer.
18 ** o Redistributions in binary form must reproduce the above copyright notice, this
19 ** list of conditions and the following disclaimer in the documentation and/or
20 ** other materials provided with the distribution.
22 ** o Neither the name of Freescale Semiconductor, Inc. nor the names of its
23 ** contributors may be used to endorse or promote products derived from this
24 ** software without specific prior written permission.
26 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
27 ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
28 ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
29 ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
30 ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
31 ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
33 ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 ** http: www.freescale.com
38 ** mail: support@freescale.com
41 ** - rev. 1.0 (2014-05-14)
44 ** ###################################################################
47 #if !defined(__FSL_DSPI_FEATURES_H__)
48 #define __FSL_DSPI_FEATURES_H__
50 #if defined(CPU_MK02FN128VFM10) || defined(CPU_MK02FN64VFM10) || defined(CPU_MK20DX128VFM5) || defined(CPU_MK20DN128VFM5) || \
51 defined(CPU_MK20DX64VFM5) || defined(CPU_MK20DN64VFM5) || defined(CPU_MK20DX32VFM5) || defined(CPU_MK20DN32VFM5) || \
52 defined(CPU_MKV30F128VFM10) || defined(CPU_MKV30F64VFM10)
53 /* @brief Receive/transmit FIFO size in number of items. */
54 #define FSL_FEATURE_DSPI_FIFO_SIZE (4)
55 #define FSL_FEATURE_DSPI_FIFO_SIZEn(x) \
56 ((x) == 0 ? (4) : (-1))
57 /* @brief Maximum transfer data width in bits. */
58 #define FSL_FEATURE_DSPI_MAX_DATA_WIDTH (16)
59 /* @brief Maximum number of chip select pins. (Reflects the width of register bit field PUSHR[PCS].) */
60 #define FSL_FEATURE_DSPI_MAX_CHIP_SELECT_COUNT (6)
61 /* @brief Number of chip select pins. */
62 #define FSL_FEATURE_DSPI_CHIP_SELECT_COUNT (4)
63 #define FSL_FEATURE_DSPI_CHIP_SELECT_COUNTn(x) \
64 ((x) == 0 ? (4) : (-1))
65 /* @brief Has chip select strobe capability on the PCS5 pin. */
66 #define FSL_FEATURE_DSPI_HAS_CHIP_SELECT_STROBE (1)
67 /* @brief Has 16-bit data transfer support. */
68 #define FSL_FEATURE_DSPI_16BIT_TRANSFERS (1)
69 #elif defined(CPU_MK02FN128VLF10) || defined(CPU_MK02FN64VLF10) || defined(CPU_MK02FN128VLH10) || defined(CPU_MK02FN64VLH10) || \
70 defined(CPU_MK20DX128VMP5) || defined(CPU_MK20DN128VMP5) || defined(CPU_MK20DX64VMP5) || defined(CPU_MK20DN64VMP5) || \
71 defined(CPU_MK20DX32VMP5) || defined(CPU_MK20DN32VMP5) || defined(CPU_MK20DX128VLH5) || defined(CPU_MK20DN128VLH5) || \
72 defined(CPU_MK20DX64VLH5) || defined(CPU_MK20DN64VLH5) || defined(CPU_MK20DX32VLH5) || defined(CPU_MK20DN32VLH5) || \
73 defined(CPU_MK20DX128VFT5) || defined(CPU_MK20DN128VFT5) || defined(CPU_MK20DX64VFT5) || defined(CPU_MK20DN64VFT5) || \
74 defined(CPU_MK20DX32VFT5) || defined(CPU_MK20DN32VFT5) || defined(CPU_MK20DX128VLF5) || defined(CPU_MK20DN128VLF5) || \
75 defined(CPU_MK20DX64VLF5) || defined(CPU_MK20DN64VLF5) || defined(CPU_MK20DX32VLF5) || defined(CPU_MK20DN32VLF5) || \
76 defined(CPU_MKV30F128VLF10) || defined(CPU_MKV30F64VLF10) || defined(CPU_MKV30F128VLH10) || defined(CPU_MKV30F64VLH10)
77 /* @brief Receive/transmit FIFO size in number of items. */
78 #define FSL_FEATURE_DSPI_FIFO_SIZE (4)
79 #define FSL_FEATURE_DSPI_FIFO_SIZEn(x) \
80 ((x) == 0 ? (4) : (-1))
81 /* @brief Maximum transfer data width in bits. */
82 #define FSL_FEATURE_DSPI_MAX_DATA_WIDTH (16)
83 /* @brief Maximum number of chip select pins. (Reflects the width of register bit field PUSHR[PCS].) */
84 #define FSL_FEATURE_DSPI_MAX_CHIP_SELECT_COUNT (6)
85 /* @brief Number of chip select pins. */
86 #define FSL_FEATURE_DSPI_CHIP_SELECT_COUNT (5)
87 #define FSL_FEATURE_DSPI_CHIP_SELECT_COUNTn(x) \
88 ((x) == 0 ? (5) : (-1))
89 /* @brief Has chip select strobe capability on the PCS5 pin. */
90 #define FSL_FEATURE_DSPI_HAS_CHIP_SELECT_STROBE (1)
91 /* @brief Has 16-bit data transfer support. */
92 #define FSL_FEATURE_DSPI_16BIT_TRANSFERS (1)
93 #elif defined(CPU_MK22FN128VDC10) || defined(CPU_MK22FN128VLL10) || defined(CPU_MK22FN256VDC12) || defined(CPU_MK22FN256VLL12) || \
94 defined(CPU_MK22FN512VDC12) || defined(CPU_MK22FN512VLL12) || defined(CPU_MKV31F128VLL10) || defined(CPU_MKV31F256VLL12) || \
95 defined(CPU_MKV31F512VLL12)
96 /* @brief Receive/transmit FIFO size in number of items. */
97 #define FSL_FEATURE_DSPI_FIFO_SIZE (4)
98 #define FSL_FEATURE_DSPI_FIFO_SIZEn(x) \
100 ((x) == 1 ? (1) : (-1)))
101 /* @brief Maximum transfer data width in bits. */
102 #define FSL_FEATURE_DSPI_MAX_DATA_WIDTH (16)
103 /* @brief Maximum number of chip select pins. (Reflects the width of register bit field PUSHR[PCS].) */
104 #define FSL_FEATURE_DSPI_MAX_CHIP_SELECT_COUNT (6)
105 /* @brief Number of chip select pins. */
106 #define FSL_FEATURE_DSPI_CHIP_SELECT_COUNT (6)
107 #define FSL_FEATURE_DSPI_CHIP_SELECT_COUNTn(x) \
109 ((x) == 1 ? (4) : (-1)))
110 /* @brief Has chip select strobe capability on the PCS5 pin. */
111 #define FSL_FEATURE_DSPI_HAS_CHIP_SELECT_STROBE (1)
112 /* @brief Has 16-bit data transfer support. */
113 #define FSL_FEATURE_DSPI_16BIT_TRANSFERS (1)
114 #elif defined(CPU_MK22FN128VLH10) || defined(CPU_MK22FN128VMP10) || defined(CPU_MK22FN256VLH12) || defined(CPU_MK22FN256VMP12) || \
115 defined(CPU_MK22FN512VLH12) || defined(CPU_MKV31F128VLH10) || defined(CPU_MKV31F256VLH12) || defined(CPU_MKV31F512VLH12)
116 /* @brief Receive/transmit FIFO size in number of items. */
117 #define FSL_FEATURE_DSPI_FIFO_SIZE (4)
118 #define FSL_FEATURE_DSPI_FIFO_SIZEn(x) \
120 ((x) == 1 ? (1) : (-1)))
121 /* @brief Maximum transfer data width in bits. */
122 #define FSL_FEATURE_DSPI_MAX_DATA_WIDTH (16)
123 /* @brief Maximum number of chip select pins. (Reflects the width of register bit field PUSHR[PCS].) */
124 #define FSL_FEATURE_DSPI_MAX_CHIP_SELECT_COUNT (6)
125 /* @brief Number of chip select pins. */
126 #define FSL_FEATURE_DSPI_CHIP_SELECT_COUNT (5)
127 #define FSL_FEATURE_DSPI_CHIP_SELECT_COUNTn(x) \
129 ((x) == 1 ? (2) : (-1)))
130 /* @brief Has chip select strobe capability on the PCS5 pin. */
131 #define FSL_FEATURE_DSPI_HAS_CHIP_SELECT_STROBE (1)
132 /* @brief Has 16-bit data transfer support. */
133 #define FSL_FEATURE_DSPI_16BIT_TRANSFERS (1)
134 #elif defined(CPU_MK24FN1M0VDC12) || defined(CPU_MK24FN1M0VLQ12) || defined(CPU_MK24FN256VDC12) || defined(CPU_MK63FN1M0VLQ12) || \
135 defined(CPU_MK63FN1M0VMD12) || defined(CPU_MK64FX512VDC12) || defined(CPU_MK64FN1M0VDC12) || defined(CPU_MK64FX512VLQ12) || \
136 defined(CPU_MK64FN1M0VLQ12) || defined(CPU_MK64FX512VMD12) || defined(CPU_MK64FN1M0VMD12) || defined(CPU_MK65FN2M0CAC18) || \
137 defined(CPU_MK65FX1M0CAC18) || defined(CPU_MK65FN2M0VMI18) || defined(CPU_MK65FX1M0VMI18) || defined(CPU_MK66FN2M0VLQ18) || \
138 defined(CPU_MK66FX1M0VLQ18) || defined(CPU_MK66FN2M0VMD18) || defined(CPU_MK66FX1M0VMD18)
139 /* @brief Receive/transmit FIFO size in number of items. */
140 #define FSL_FEATURE_DSPI_FIFO_SIZE (4)
141 #define FSL_FEATURE_DSPI_FIFO_SIZEn(x) \
144 ((x) == 2 ? (1) : (-1))))
145 /* @brief Maximum transfer data width in bits. */
146 #define FSL_FEATURE_DSPI_MAX_DATA_WIDTH (16)
147 /* @brief Maximum number of chip select pins. (Reflects the width of register bit field PUSHR[PCS].) */
148 #define FSL_FEATURE_DSPI_MAX_CHIP_SELECT_COUNT (6)
149 /* @brief Number of chip select pins. */
150 #define FSL_FEATURE_DSPI_CHIP_SELECT_COUNT (6)
151 #define FSL_FEATURE_DSPI_CHIP_SELECT_COUNTn(x) \
154 ((x) == 2 ? (2) : (-1))))
155 /* @brief Has chip select strobe capability on the PCS5 pin. */
156 #define FSL_FEATURE_DSPI_HAS_CHIP_SELECT_STROBE (1)
157 /* @brief Has 16-bit data transfer support. */
158 #define FSL_FEATURE_DSPI_16BIT_TRANSFERS (1)
159 #elif defined(CPU_MK24FN1M0VLL12) || defined(CPU_MK64FX512VLL12) || defined(CPU_MK64FN1M0VLL12)
160 /* @brief Receive/transmit FIFO size in number of items. */
161 #define FSL_FEATURE_DSPI_FIFO_SIZE (4)
162 #define FSL_FEATURE_DSPI_FIFO_SIZEn(x) \
165 ((x) == 2 ? (1) : (-1))))
166 /* @brief Maximum transfer data width in bits. */
167 #define FSL_FEATURE_DSPI_MAX_DATA_WIDTH (16)
168 /* @brief Maximum number of chip select pins. (Reflects the width of register bit field PUSHR[PCS].) */
169 #define FSL_FEATURE_DSPI_MAX_CHIP_SELECT_COUNT (6)
170 /* @brief Number of chip select pins. */
171 #define FSL_FEATURE_DSPI_CHIP_SELECT_COUNT (6)
172 #define FSL_FEATURE_DSPI_CHIP_SELECT_COUNTn(x) \
175 ((x) == 2 ? (1) : (-1))))
176 /* @brief Has chip select strobe capability on the PCS5 pin. */
177 #define FSL_FEATURE_DSPI_HAS_CHIP_SELECT_STROBE (1)
178 /* @brief Has 16-bit data transfer support. */
179 #define FSL_FEATURE_DSPI_16BIT_TRANSFERS (1)
180 #elif defined(CPU_MK70FN1M0VMF12) || defined(CPU_MK70FX512VMF12) || defined(CPU_MK70FN1M0VMF15) || defined(CPU_MK70FX512VMF15) || \
181 defined(CPU_MK70FN1M0VMJ12) || defined(CPU_MK70FX512VMJ12) || defined(CPU_MK70FN1M0VMJ15) || defined(CPU_MK70FX512VMJ15)
182 /* @brief Receive/transmit FIFO size in number of items. */
183 #define FSL_FEATURE_DSPI_FIFO_SIZE (4)
184 #define FSL_FEATURE_DSPI_FIFO_SIZEn(x) \
187 ((x) == 2 ? (4) : (-1))))
188 /* @brief Maximum transfer data width in bits. */
189 #define FSL_FEATURE_DSPI_MAX_DATA_WIDTH (16)
190 /* @brief Maximum number of chip select pins. (Reflects the width of register bit field PUSHR[PCS].) */
191 #define FSL_FEATURE_DSPI_MAX_CHIP_SELECT_COUNT (6)
192 /* @brief Number of chip select pins. */
193 #define FSL_FEATURE_DSPI_CHIP_SELECT_COUNT (6)
194 #define FSL_FEATURE_DSPI_CHIP_SELECT_COUNTn(x) \
197 ((x) == 2 ? (2) : (-1))))
198 /* @brief Has chip select strobe capability on the PCS5 pin. */
199 #define FSL_FEATURE_DSPI_HAS_CHIP_SELECT_STROBE (1)
200 /* @brief Has 16-bit data transfer support. */
201 #define FSL_FEATURE_DSPI_16BIT_TRANSFERS (1)
202 #elif defined(CPU_MKV40F128VLH15) || defined(CPU_MKV40F256VLH15) || defined(CPU_MKV40F64VLH15) || defined(CPU_MKV43F128VLH15) || \
203 defined(CPU_MKV43F64VLH15) || defined(CPU_MKV44F128VLH15) || defined(CPU_MKV44F64VLH15) || defined(CPU_MKV45F128VLH15) || \
204 defined(CPU_MKV45F256VLH15) || defined(CPU_MKV46F128VLH15) || defined(CPU_MKV46F256VLH15)
205 /* @brief Receive/transmit FIFO size in number of items. */
206 #define FSL_FEATURE_DSPI_FIFO_SIZE (4)
207 #define FSL_FEATURE_DSPI_FIFO_SIZEn(x) \
208 ((x) == 0 ? (4) : (-1))
209 /* @brief Maximum transfer data width in bits. */
210 #define FSL_FEATURE_DSPI_MAX_DATA_WIDTH (16)
211 /* @brief Maximum number of chip select pins. (Reflects the width of register bit field PUSHR[PCS].) */
212 #define FSL_FEATURE_DSPI_MAX_CHIP_SELECT_COUNT (6)
213 /* @brief Number of chip select pins. */
214 #define FSL_FEATURE_DSPI_CHIP_SELECT_COUNT (5)
215 #define FSL_FEATURE_DSPI_CHIP_SELECT_COUNTn(x) \
216 ((x) == 0 ? (5) : (-1))
217 /* @brief Has chip select strobe capability on the PCS5 pin. */
218 #define FSL_FEATURE_DSPI_HAS_CHIP_SELECT_STROBE (1)
219 /* @brief Has 16-bit data transfer support. */
220 #define FSL_FEATURE_DSPI_16BIT_TRANSFERS (1)
221 #elif defined(CPU_MKV40F128VLL15) || defined(CPU_MKV40F256VLL15) || defined(CPU_MKV43F128VLL15) || defined(CPU_MKV44F128VLL15) || \
222 defined(CPU_MKV45F128VLL15) || defined(CPU_MKV45F256VLL15) || defined(CPU_MKV46F128VLL15) || defined(CPU_MKV46F256VLL15)
223 /* @brief Receive/transmit FIFO size in number of items. */
224 #define FSL_FEATURE_DSPI_FIFO_SIZE (4)
225 #define FSL_FEATURE_DSPI_FIFO_SIZEn(x) \
226 ((x) == 0 ? (4) : (-1))
227 /* @brief Maximum transfer data width in bits. */
228 #define FSL_FEATURE_DSPI_MAX_DATA_WIDTH (16)
229 /* @brief Maximum number of chip select pins. (Reflects the width of register bit field PUSHR[PCS].) */
230 #define FSL_FEATURE_DSPI_MAX_CHIP_SELECT_COUNT (6)
231 /* @brief Number of chip select pins. */
232 #define FSL_FEATURE_DSPI_CHIP_SELECT_COUNT (6)
233 #define FSL_FEATURE_DSPI_CHIP_SELECT_COUNTn(x) \
234 ((x) == 0 ? (6) : (-1))
235 /* @brief Has chip select strobe capability on the PCS5 pin. */
236 #define FSL_FEATURE_DSPI_HAS_CHIP_SELECT_STROBE (1)
237 /* @brief Has 16-bit data transfer support. */
238 #define FSL_FEATURE_DSPI_16BIT_TRANSFERS (1)
240 #error "No valid CPU defined!"
243 #endif /* __FSL_DSPI_FEATURES_H__ */
245 /*******************************************************************************
247 ******************************************************************************/