Contiki-NG
Loading...
Searching...
No Matches
CC2650_LAUNCHXL.c
1/*
2 * Copyright (c) 2016-2019, Texas Instruments Incorporated
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33/*
34 * ============================ CC2650_LAUNCHXL.c ============================
35 * This file is responsible for setting up the board specific items for the
36 * CC2650_LAUNCHXL board.
37 */
38
39#include <stdbool.h>
40#include <stddef.h>
41#include <stdint.h>
42
43#include <ti/devices/DeviceFamily.h>
44#include DeviceFamily_constructPath(driverlib/ioc.h)
45#include DeviceFamily_constructPath(driverlib/udma.h)
46#include DeviceFamily_constructPath(inc/hw_ints.h)
47#include DeviceFamily_constructPath(inc/hw_memmap.h)
48
49#include "CC2650_LAUNCHXL.h"
50
51/*
52 * =============================== ADCBuf ===============================
53 */
54#include <ti/drivers/ADCBuf.h>
55#include <ti/drivers/adcbuf/ADCBufCC26XX.h>
56
57ADCBufCC26XX_Object adcBufCC26XXobjects[CC2650_LAUNCHXL_ADCBUFCOUNT];
58
59/*
60 * This table converts a virtual adc channel into a dio and internal analogue
61 * input signal. This table is necessary for the functioning of the adcBuf
62 * driver. Comment out unused entries to save flash. Dio and internal signal
63 * pairs are hardwired. Do not remap them in the table. You may reorder entire
64 * entries. The mapping of dio and internal signals is package dependent.
65 */
66const ADCBufCC26XX_AdcChannelLutEntry ADCBufCC26XX_adcChannelLut[CC2650_LAUNCHXL_ADCBUF0CHANNELCOUNT] = {
67 {CC2650_LAUNCHXL_DIO23_ANALOG, ADC_COMPB_IN_AUXIO7},
68 {CC2650_LAUNCHXL_DIO24_ANALOG, ADC_COMPB_IN_AUXIO6},
69 {CC2650_LAUNCHXL_DIO25_ANALOG, ADC_COMPB_IN_AUXIO5},
70 {CC2650_LAUNCHXL_DIO26_ANALOG, ADC_COMPB_IN_AUXIO4},
71 {CC2650_LAUNCHXL_DIO27_ANALOG, ADC_COMPB_IN_AUXIO3},
72 {CC2650_LAUNCHXL_DIO28_ANALOG, ADC_COMPB_IN_AUXIO2},
73 {CC2650_LAUNCHXL_DIO29_ANALOG, ADC_COMPB_IN_AUXIO1},
74 {CC2650_LAUNCHXL_DIO30_ANALOG, ADC_COMPB_IN_AUXIO0},
75 {PIN_UNASSIGNED, ADC_COMPB_IN_VDDS},
76 {PIN_UNASSIGNED, ADC_COMPB_IN_DCOUPL},
77 {PIN_UNASSIGNED, ADC_COMPB_IN_VSS},
78};
79
80const ADCBufCC26XX_HWAttrs adcBufCC26XXHWAttrs[CC2650_LAUNCHXL_ADCBUFCOUNT] = {
81 {
82 .intPriority = ~0,
83 .swiPriority = 0,
84 .adcChannelLut = ADCBufCC26XX_adcChannelLut,
85 }
86};
87
88const ADCBuf_Config ADCBuf_config[CC2650_LAUNCHXL_ADCBUFCOUNT] = {
89 {
90 &ADCBufCC26XX_fxnTable,
91 &adcBufCC26XXobjects[CC2650_LAUNCHXL_ADCBUF0],
92 &adcBufCC26XXHWAttrs[CC2650_LAUNCHXL_ADCBUF0]
93 },
94};
95
96const uint_least8_t ADCBuf_count = CC2650_LAUNCHXL_ADCBUFCOUNT;
97
98/*
99 * =============================== ADC ===============================
100 */
101#include <ti/drivers/ADC.h>
102#include <ti/drivers/adc/ADCCC26XX.h>
103
104ADCCC26XX_Object adcCC26xxObjects[CC2650_LAUNCHXL_ADCCOUNT];
105
106const ADCCC26XX_HWAttrs adcCC26xxHWAttrs[CC2650_LAUNCHXL_ADCCOUNT] = {
107 {
108 .adcDIO = CC2650_LAUNCHXL_DIO23_ANALOG,
109 .adcCompBInput = ADC_COMPB_IN_AUXIO7,
110 .refSource = ADCCC26XX_FIXED_REFERENCE,
111 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
112 .inputScalingEnabled = true,
113 .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
114 .returnAdjustedVal = false
115 },
116 {
117 .adcDIO = CC2650_LAUNCHXL_DIO24_ANALOG,
118 .adcCompBInput = ADC_COMPB_IN_AUXIO6,
119 .refSource = ADCCC26XX_FIXED_REFERENCE,
120 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
121 .inputScalingEnabled = true,
122 .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
123 .returnAdjustedVal = false
124 },
125 {
126 .adcDIO = CC2650_LAUNCHXL_DIO25_ANALOG,
127 .adcCompBInput = ADC_COMPB_IN_AUXIO5,
128 .refSource = ADCCC26XX_FIXED_REFERENCE,
129 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
130 .inputScalingEnabled = true,
131 .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
132 .returnAdjustedVal = false
133 },
134 {
135 .adcDIO = CC2650_LAUNCHXL_DIO26_ANALOG,
136 .adcCompBInput = ADC_COMPB_IN_AUXIO4,
137 .refSource = ADCCC26XX_FIXED_REFERENCE,
138 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
139 .inputScalingEnabled = true,
140 .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
141 .returnAdjustedVal = false
142 },
143 {
144 .adcDIO = CC2650_LAUNCHXL_DIO27_ANALOG,
145 .adcCompBInput = ADC_COMPB_IN_AUXIO3,
146 .refSource = ADCCC26XX_FIXED_REFERENCE,
147 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
148 .inputScalingEnabled = true,
149 .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
150 .returnAdjustedVal = false
151 },
152 {
153 .adcDIO = CC2650_LAUNCHXL_DIO28_ANALOG,
154 .adcCompBInput = ADC_COMPB_IN_AUXIO2,
155 .refSource = ADCCC26XX_FIXED_REFERENCE,
156 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
157 .inputScalingEnabled = true,
158 .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
159 .returnAdjustedVal = false
160 },
161 {
162 .adcDIO = CC2650_LAUNCHXL_DIO29_ANALOG,
163 .adcCompBInput = ADC_COMPB_IN_AUXIO1,
164 .refSource = ADCCC26XX_FIXED_REFERENCE,
165 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
166 .inputScalingEnabled = true,
167 .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
168 .returnAdjustedVal = false
169 },
170 {
171 .adcDIO = CC2650_LAUNCHXL_DIO30_ANALOG,
172 .adcCompBInput = ADC_COMPB_IN_AUXIO0,
173 .refSource = ADCCC26XX_FIXED_REFERENCE,
174 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_10P9_MS,
175 .inputScalingEnabled = true,
176 .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
177 .returnAdjustedVal = false
178 },
179 {
180 .adcDIO = PIN_UNASSIGNED,
181 .adcCompBInput = ADC_COMPB_IN_DCOUPL,
182 .refSource = ADCCC26XX_FIXED_REFERENCE,
183 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
184 .inputScalingEnabled = true,
185 .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
186 .returnAdjustedVal = false
187 },
188 {
189 .adcDIO = PIN_UNASSIGNED,
190 .adcCompBInput = ADC_COMPB_IN_VSS,
191 .refSource = ADCCC26XX_FIXED_REFERENCE,
192 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
193 .inputScalingEnabled = true,
194 .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
195 .returnAdjustedVal = false
196 },
197 {
198 .adcDIO = PIN_UNASSIGNED,
199 .adcCompBInput = ADC_COMPB_IN_VDDS,
200 .refSource = ADCCC26XX_FIXED_REFERENCE,
201 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
202 .inputScalingEnabled = true,
203 .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
204 .returnAdjustedVal = false
205 }
206};
207
208const ADC_Config ADC_config[CC2650_LAUNCHXL_ADCCOUNT] = {
209 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650_LAUNCHXL_ADC0], &adcCC26xxHWAttrs[CC2650_LAUNCHXL_ADC0]},
210 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650_LAUNCHXL_ADC1], &adcCC26xxHWAttrs[CC2650_LAUNCHXL_ADC1]},
211 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650_LAUNCHXL_ADC2], &adcCC26xxHWAttrs[CC2650_LAUNCHXL_ADC2]},
212 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650_LAUNCHXL_ADC3], &adcCC26xxHWAttrs[CC2650_LAUNCHXL_ADC3]},
213 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650_LAUNCHXL_ADC4], &adcCC26xxHWAttrs[CC2650_LAUNCHXL_ADC4]},
214 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650_LAUNCHXL_ADC5], &adcCC26xxHWAttrs[CC2650_LAUNCHXL_ADC5]},
215 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650_LAUNCHXL_ADC6], &adcCC26xxHWAttrs[CC2650_LAUNCHXL_ADC6]},
216 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650_LAUNCHXL_ADC7], &adcCC26xxHWAttrs[CC2650_LAUNCHXL_ADC7]},
217 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650_LAUNCHXL_ADCDCOUPL], &adcCC26xxHWAttrs[CC2650_LAUNCHXL_ADCDCOUPL]},
218 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650_LAUNCHXL_ADCVSS], &adcCC26xxHWAttrs[CC2650_LAUNCHXL_ADCVSS]},
219 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650_LAUNCHXL_ADCVDDS], &adcCC26xxHWAttrs[CC2650_LAUNCHXL_ADCVDDS]},
220};
221
222const uint_least8_t ADC_count = CC2650_LAUNCHXL_ADCCOUNT;
223
224/*
225 * =============================== Crypto ===============================
226 */
227#include <ti/drivers/crypto/CryptoCC26XX.h>
228
229CryptoCC26XX_Object cryptoCC26XXObjects[CC2650_LAUNCHXL_CRYPTOCOUNT];
230
231const CryptoCC26XX_HWAttrs cryptoCC26XXHWAttrs[CC2650_LAUNCHXL_CRYPTOCOUNT] = {
232 {
233 .baseAddr = CRYPTO_BASE,
234 .powerMngrId = PowerCC26XX_PERIPH_CRYPTO,
235 .intNum = INT_CRYPTO_RESULT_AVAIL_IRQ,
236 .intPriority = ~0,
237 }
238};
239
240const CryptoCC26XX_Config CryptoCC26XX_config[CC2650_LAUNCHXL_CRYPTOCOUNT] = {
241 {
242 .object = &cryptoCC26XXObjects[CC2650_LAUNCHXL_CRYPTO0],
243 .hwAttrs = &cryptoCC26XXHWAttrs[CC2650_LAUNCHXL_CRYPTO0]
244 },
245};
246
247/*
248 * =============================== AESCCM ===============================
249 */
250#include <ti/drivers/AESCCM.h>
251#include <ti/drivers/aesccm/AESCCMCC26XX.h>
252
253AESCCMCC26XX_Object aesccmCC26XXObjects[CC2650_LAUNCHXL_AESCCMCOUNT];
254
255const AESCCMCC26XX_HWAttrs aesccmCC26XXHWAttrs[CC2650_LAUNCHXL_AESCCMCOUNT] = {
256 {
257 .intPriority = ~0,
258 }
259};
260
261const AESCCM_Config AESCCM_config[CC2650_LAUNCHXL_AESCCMCOUNT] = {
262 {
263 .object = &aesccmCC26XXObjects[CC2650_LAUNCHXL_AESCCM0],
264 .hwAttrs = &aesccmCC26XXHWAttrs[CC2650_LAUNCHXL_AESCCM0]
265 },
266};
267
268const uint_least8_t AESCCM_count = CC2650_LAUNCHXL_AESCCMCOUNT;
269
270
271/*
272 * =============================== AESGCM ===============================
273 */
274#include <ti/drivers/AESGCM.h>
275#include <ti/drivers/aesgcm/AESGCMCC26XX.h>
276
277AESGCMCC26XX_Object aesgcmCC26XXObjects[CC2650_LAUNCHXL_AESGCMCOUNT];
278
279const AESGCMCC26XX_HWAttrs aesgcmCC26XXHWAttrs[CC2650_LAUNCHXL_AESGCMCOUNT] = {
280 {
281 .intPriority = ~0,
282 }
283};
284
285const AESGCM_Config AESGCM_config[CC2650_LAUNCHXL_AESGCMCOUNT] = {
286 {
287 .object = &aesgcmCC26XXObjects[CC2650_LAUNCHXL_AESGCM0],
288 .hwAttrs = &aesgcmCC26XXHWAttrs[CC2650_LAUNCHXL_AESGCM0]
289 },
290};
291
292const uint_least8_t AESGCM_count = CC2650_LAUNCHXL_AESGCMCOUNT;
293
294/*
295 * =============================== AESCBC ===============================
296 */
297#include <ti/drivers/AESCBC.h>
298#include <ti/drivers/aescbc/AESCBCCC26XX.h>
299
300AESCBCCC26XX_Object aescbcCC26XXObjects[CC2650_LAUNCHXL_AESCBCCOUNT];
301
302const AESCBCCC26XX_HWAttrs aescbcCC26XXHWAttrs[CC2650_LAUNCHXL_AESCBCCOUNT] = {
303 {
304 .intPriority = ~0,
305 }
306};
307
308const AESCBC_Config AESCBC_config[CC2650_LAUNCHXL_AESCBCCOUNT] = {
309 {
310 .object = &aescbcCC26XXObjects[CC2650_LAUNCHXL_AESCBC0],
311 .hwAttrs = &aescbcCC26XXHWAttrs[CC2650_LAUNCHXL_AESCBC0]
312 },
313};
314
315const uint_least8_t AESCBC_count = CC2650_LAUNCHXL_AESCBCCOUNT;
316
317/*
318 * =============================== AESCTR ===============================
319 */
320#include <ti/drivers/AESCTR.h>
321#include <ti/drivers/aesctr/AESCTRCC26XX.h>
322
323AESCTRCC26XX_Object aesctrCC26XXObjects[CC2650_LAUNCHXL_AESCTRCOUNT];
324
325const AESCTRCC26XX_HWAttrs aesctrCC26XXHWAttrs[CC2650_LAUNCHXL_AESCTRCOUNT] = {
326 {
327 .intPriority = ~0,
328 }
329};
330
331const AESCTR_Config AESCTR_config[CC2650_LAUNCHXL_AESCTRCOUNT] = {
332 {
333 .object = &aesctrCC26XXObjects[CC2650_LAUNCHXL_AESCTR0],
334 .hwAttrs = &aesctrCC26XXHWAttrs[CC2650_LAUNCHXL_AESCTR0]
335 },
336};
337
338const uint_least8_t AESCTR_count = CC2650_LAUNCHXL_AESCTRCOUNT;
339
340/*
341 * =============================== AESECB ===============================
342 */
343#include <ti/drivers/AESECB.h>
344#include <ti/drivers/aesecb/AESECBCC26XX.h>
345
346AESECBCC26XX_Object aesecbCC26XXObjects[CC2650_LAUNCHXL_AESECBCOUNT];
347
348const AESECBCC26XX_HWAttrs aesecbCC26XXHWAttrs[CC2650_LAUNCHXL_AESECBCOUNT] = {
349 {
350 .intPriority = ~0,
351 }
352};
353
354const AESECB_Config AESECB_config[CC2650_LAUNCHXL_AESECBCOUNT] = {
355 {
356 .object = &aesecbCC26XXObjects[CC2650_LAUNCHXL_AESECB0],
357 .hwAttrs = &aesecbCC26XXHWAttrs[CC2650_LAUNCHXL_AESECB0]
358 },
359};
360
361const uint_least8_t AESECB_count = CC2650_LAUNCHXL_AESECBCOUNT;
362
363/*
364 * =============================== AESCTRDRBG ===============================
365 */
366#include <ti/drivers/AESCTRDRBG.h>
367#include <ti/drivers/aesctrdrbg/AESCTRDRBGXX.h>
368
369AESCTRDRBGXX_Object aesctrdrbgXXObjects[CC2650_LAUNCHXL_AESCTRDRBGCOUNT];
370
371const AESCTRDRBGXX_HWAttrs aesctrdrbgXXHWAttrs[CC2650_LAUNCHXL_AESCTRDRBGCOUNT] = {
372 {
373 .aesctrIndex = CC2650_LAUNCHXL_AESCTR0,
374 }
375};
376
377const AESCTRDRBG_Config AESCTRDRBG_config[CC2650_LAUNCHXL_AESCTRDRBGCOUNT] = {
378 {
379 .object = &aesctrdrbgXXObjects[CC2650_LAUNCHXL_AESCTRDRBG0],
380 .hwAttrs = &aesctrdrbgXXHWAttrs[CC2650_LAUNCHXL_AESCTRDRBG0]
381 },
382};
383
384const uint_least8_t AESCTRDRBG_count = CC2650_LAUNCHXL_AESCTRDRBGCOUNT;
385
386/*
387 * =============================== TRNG ===============================
388 */
389#include <ti/drivers/TRNG.h>
390#include <ti/drivers/trng/TRNGCC26XX.h>
391
392TRNGCC26XX_Object trngCC26XXObjects[CC2650_LAUNCHXL_TRNGCOUNT];
393
394const TRNGCC26XX_HWAttrs trngCC26X2HWAttrs[CC2650_LAUNCHXL_TRNGCOUNT] = {
395 {
396 .intPriority = ~0,
397 .swiPriority = 0,
398 .samplesPerCycle = 240000,
399 }
400};
401
402const TRNG_Config TRNG_config[CC2650_LAUNCHXL_TRNGCOUNT] = {
403 {
404 .object = &trngCC26XXObjects[CC2650_LAUNCHXL_TRNG0],
405 .hwAttrs = &trngCC26X2HWAttrs[CC2650_LAUNCHXL_TRNG0]
406 },
407};
408
409const uint_least8_t TRNG_count = CC2650_LAUNCHXL_TRNGCOUNT;
410
411/*
412 * =============================== GPIO ===============================
413 */
414#include <ti/drivers/GPIO.h>
415#include <ti/drivers/gpio/GPIOCC26XX.h>
416
417/*
418 * Array of Pin configurations
419 * NOTE: The order of the pin configurations must coincide with what was
420 * defined in CC2650_LAUNCHXL.h
421 * NOTE: Pins not used for interrupts should be placed at the end of the
422 * array. Callback entries can be omitted from callbacks array to
423 * reduce memory usage.
424 */
425GPIO_PinConfig gpioPinConfigs[] = {
426 /* Input pins */
427 GPIOCC26XX_DIO_13 | GPIO_DO_NOT_CONFIG, /* Button 0 */
428 GPIOCC26XX_DIO_14 | GPIO_DO_NOT_CONFIG, /* Button 1 */
429
430 GPIOCC26XX_DIO_15 | GPIO_DO_NOT_CONFIG, /* CC2650_LAUNCHXL_SPI_MASTER_READY */
431 GPIOCC26XX_DIO_21 | GPIO_DO_NOT_CONFIG, /* CC2650_LAUNCHXL_SPI_SLAVE_READY */
432
433 /* Output pins */
434 GPIOCC26XX_DIO_07 | GPIO_DO_NOT_CONFIG, /* Green LED */
435 GPIOCC26XX_DIO_06 | GPIO_DO_NOT_CONFIG, /* Red LED */
436
437 /* SPI Flash CSN */
438 GPIOCC26XX_DIO_20 | GPIO_DO_NOT_CONFIG,
439
440 /* SD CS */
441 GPIOCC26XX_DIO_21 | GPIO_DO_NOT_CONFIG,
442};
443
444/*
445 * Array of callback function pointers
446 * NOTE: The order of the pin configurations must coincide with what was
447 * defined in CC2650_LAUNCHXL.h
448 * NOTE: Pins not used for interrupts can be omitted from callbacks array to
449 * reduce memory usage (if placed at end of gpioPinConfigs array).
450 */
451GPIO_CallbackFxn gpioCallbackFunctions[] = {
452 NULL, /* Button 0 */
453 NULL, /* Button 1 */
454 NULL, /* CC2650_LAUNCHXL_SPI_MASTER_READY */
455 NULL, /* CC2650_LAUNCHXL_SPI_SLAVE_READY */
456};
457
458const GPIOCC26XX_Config GPIOCC26XX_config = {
459 .pinConfigs = (GPIO_PinConfig *)gpioPinConfigs,
460 .callbacks = (GPIO_CallbackFxn *)gpioCallbackFunctions,
461 .numberOfPinConfigs = sizeof(gpioPinConfigs)/sizeof(GPIO_PinConfig),
462 .numberOfCallbacks = sizeof(gpioCallbackFunctions)/sizeof(GPIO_CallbackFxn),
463 .intPriority = (~0)
464};
465
466/*
467 * =============================== GPTimer ===============================
468 * Remove unused entries to reduce flash usage both in Board.c and Board.h
469 */
470#include <ti/drivers/timer/GPTimerCC26XX.h>
471
472GPTimerCC26XX_Object gptimerCC26XXObjects[CC2650_LAUNCHXL_GPTIMERCOUNT];
473
474const GPTimerCC26XX_HWAttrs gptimerCC26xxHWAttrs[CC2650_LAUNCHXL_GPTIMERPARTSCOUNT] = {
475 { .baseAddr = GPT0_BASE, .intNum = INT_GPT0A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT0, .pinMux = GPT_PIN_0A, },
476 { .baseAddr = GPT0_BASE, .intNum = INT_GPT0B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT0, .pinMux = GPT_PIN_0B, },
477 { .baseAddr = GPT1_BASE, .intNum = INT_GPT1A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT1, .pinMux = GPT_PIN_1A, },
478 { .baseAddr = GPT1_BASE, .intNum = INT_GPT1B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT1, .pinMux = GPT_PIN_1B, },
479 { .baseAddr = GPT2_BASE, .intNum = INT_GPT2A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT2, .pinMux = GPT_PIN_2A, },
480 { .baseAddr = GPT2_BASE, .intNum = INT_GPT2B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT2, .pinMux = GPT_PIN_2B, },
481 { .baseAddr = GPT3_BASE, .intNum = INT_GPT3A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT3, .pinMux = GPT_PIN_3A, },
482 { .baseAddr = GPT3_BASE, .intNum = INT_GPT3B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT3, .pinMux = GPT_PIN_3B, },
483};
484
485const GPTimerCC26XX_Config GPTimerCC26XX_config[CC2650_LAUNCHXL_GPTIMERPARTSCOUNT] = {
486 { &gptimerCC26XXObjects[CC2650_LAUNCHXL_GPTIMER0], &gptimerCC26xxHWAttrs[CC2650_LAUNCHXL_GPTIMER0A], GPT_A },
487 { &gptimerCC26XXObjects[CC2650_LAUNCHXL_GPTIMER0], &gptimerCC26xxHWAttrs[CC2650_LAUNCHXL_GPTIMER0B], GPT_B },
488 { &gptimerCC26XXObjects[CC2650_LAUNCHXL_GPTIMER1], &gptimerCC26xxHWAttrs[CC2650_LAUNCHXL_GPTIMER1A], GPT_A },
489 { &gptimerCC26XXObjects[CC2650_LAUNCHXL_GPTIMER1], &gptimerCC26xxHWAttrs[CC2650_LAUNCHXL_GPTIMER1B], GPT_B },
490 { &gptimerCC26XXObjects[CC2650_LAUNCHXL_GPTIMER2], &gptimerCC26xxHWAttrs[CC2650_LAUNCHXL_GPTIMER2A], GPT_A },
491 { &gptimerCC26XXObjects[CC2650_LAUNCHXL_GPTIMER2], &gptimerCC26xxHWAttrs[CC2650_LAUNCHXL_GPTIMER2B], GPT_B },
492 { &gptimerCC26XXObjects[CC2650_LAUNCHXL_GPTIMER3], &gptimerCC26xxHWAttrs[CC2650_LAUNCHXL_GPTIMER3A], GPT_A },
493 { &gptimerCC26XXObjects[CC2650_LAUNCHXL_GPTIMER3], &gptimerCC26xxHWAttrs[CC2650_LAUNCHXL_GPTIMER3B], GPT_B },
494};
495
496/*
497 * =============================== I2C ===============================
498*/
499#include <ti/drivers/I2C.h>
500#include <ti/drivers/i2c/I2CCC26XX.h>
501
502#if TI_I2C_CONF_ENABLE
503
504I2CCC26XX_Object i2cCC26xxObjects[CC2650_LAUNCHXL_I2CCOUNT];
505
506const I2CCC26XX_HWAttrsV1 i2cCC26xxHWAttrs[CC2650_LAUNCHXL_I2CCOUNT] = {
507#if TI_I2C_CONF_I2C0_ENABLE
508 {
509 .baseAddr = I2C0_BASE,
510 .powerMngrId = PowerCC26XX_PERIPH_I2C0,
511 .intNum = INT_I2C_IRQ,
512 .intPriority = ~0,
513 .swiPriority = 0,
514 .sdaPin = CC2650_LAUNCHXL_I2C0_SDA0,
515 .sclPin = CC2650_LAUNCHXL_I2C0_SCL0,
516 },
517#endif
518};
519
520const I2C_Config I2C_config[CC2650_LAUNCHXL_I2CCOUNT] = {
521#if TI_I2C_CONF_I2C0_ENABLE
522 {
523 .fxnTablePtr = &I2CCC26XX_fxnTable,
524 .object = &i2cCC26xxObjects[CC2650_LAUNCHXL_I2C0],
525 .hwAttrs = &i2cCC26xxHWAttrs[CC2650_LAUNCHXL_I2C0]
526 },
527#endif
528};
529
530const uint_least8_t I2C_count = CC2650_LAUNCHXL_I2CCOUNT;
531
532#endif /* TI_I2C_CONF_ENABLE */
533
534/*
535 * =============================== I2S ===============================
536*/
537#include <ti/drivers/I2S.h>
538#include <ti/drivers/i2s/I2SCC26XX.h>
539
540I2SCC26XX_Object i2sCC26XXObjects[CC2650_LAUNCHXL_I2SCOUNT];
541
542const I2SCC26XX_HWAttrs i2sCC26XXHWAttrs[CC2650_LAUNCHXL_I2SCOUNT] = {
543 {
544 .pinSD1 = CC2650_LAUNCHXL_I2S_ADI,
545 .pinSD0 = CC2650_LAUNCHXL_I2S_ADO,
546 .pinSCK = CC2650_LAUNCHXL_I2S_BCLK,
547 .pinMCLK = CC2650_LAUNCHXL_I2S_MCLK,
548 .pinWS = CC2650_LAUNCHXL_I2S_WCLK,
549 .intPriority = ~0,
550 }
551};
552
553const I2S_Config I2S_config[CC2650_LAUNCHXL_I2SCOUNT] = {
554 {
555 .object = &i2sCC26XXObjects[CC2650_LAUNCHXL_I2S0],
556 .hwAttrs = &i2sCC26XXHWAttrs[CC2650_LAUNCHXL_I2S0]
557 },
558};
559
560const uint_least8_t I2S_count = CC2650_LAUNCHXL_I2SCOUNT;
561
562/*
563 * =============================== NVS ===============================
564 */
565#include <ti/drivers/NVS.h>
566#include <ti/drivers/nvs/NVSSPI25X.h>
567#include <ti/drivers/nvs/NVSCC26XX.h>
568
569#define NVS_REGIONS_BASE 0x1A000
570#define SECTORSIZE 0x1000
571#define REGIONSIZE (SECTORSIZE * 4)
572
573#if TI_NVS_CONF_ENABLE
574
575#if TI_NVS_CONF_NVS_INTERNAL_ENABLE
576
577/*
578 * Reserve flash sectors for NVS driver use by placing an uninitialized byte
579 * array at the desired flash address.
580 */
581#if defined(__TI_COMPILER_VERSION__)
582
583/*
584 * Place uninitialized array at NVS_REGIONS_BASE
585 */
586#pragma LOCATION(flashBuf, NVS_REGIONS_BASE);
587#pragma NOINIT(flashBuf);
588static char flashBuf[REGIONSIZE];
589
590#elif defined(__IAR_SYSTEMS_ICC__)
591
592/*
593 * Place uninitialized array at NVS_REGIONS_BASE
594 */
595static __no_init char flashBuf[REGIONSIZE] @ NVS_REGIONS_BASE;
596
597#elif defined(__GNUC__)
598
599/*
600 * Place the flash buffers in the .nvs section created in the gcc linker file.
601 * The .nvs section enforces alignment on a sector boundary but may
602 * be placed anywhere in flash memory. If desired the .nvs section can be set
603 * to a fixed address by changing the following in the gcc linker file:
604 *
605 * .nvs (FIXED_FLASH_ADDR) (NOLOAD) : AT (FIXED_FLASH_ADDR) {
606 * *(.nvs)
607 * } > REGION_TEXT
608 */
609__attribute__ ((section (".nvs")))
610static char flashBuf[REGIONSIZE];
611
612#endif
613
614/* Allocate objects for NVS Internal Regions */
615NVSCC26XX_Object nvsCC26xxObjects[1];
616
617/* Hardware attributes for NVS Internal Regions */
618const NVSCC26XX_HWAttrs nvsCC26xxHWAttrs[1] = {
619 {
620 .regionBase = (void *)flashBuf,
621 .regionSize = REGIONSIZE,
622 },
623};
624
625#endif /* TI_NVS_CONF_NVS_INTERNAL_ENABLE */
626
627#if TI_NVS_CONF_NVS_EXTERNAL_ENABLE
628
629#define SPISECTORSIZE 0x1000
630#define SPIREGIONSIZE (SPISECTORSIZE * 32)
631#define VERIFYBUFSIZE 64
632
633static uint8_t verifyBuf[VERIFYBUFSIZE];
634
635/* Allocate objects for NVS External Regions */
636NVSSPI25X_Object nvsSPI25XObjects[1];
637
638/* Hardware attributes for NVS External Regions */
639const NVSSPI25X_HWAttrs nvsSPI25XHWAttrs[1] = {
640 {
641 .regionBaseOffset = 0,
642 .regionSize = SPIREGIONSIZE,
643 .sectorSize = SPISECTORSIZE,
644 .verifyBuf = verifyBuf,
645 .verifyBufSize = VERIFYBUFSIZE,
646 .spiHandle = NULL,
647 .spiIndex = 0,
648 .spiBitRate = 4000000,
649 .spiCsnGpioIndex = CC2650_LAUNCHXL_GPIO_SPI_FLASH_CS,
650 .statusPollDelayUs = 100,
651 },
652};
653
654#endif /* TI_NVS_CONF_NVS_EXTERNAL_ENABLE */
655
656/* NVS Region index 0 and 1 refer to NVS and NVS SPI respectively */
657const NVS_Config NVS_config[CC2650_LAUNCHXL_NVSCOUNT] = {
658#if TI_NVS_CONF_NVS_INTERNAL_ENABLE
659 {
660 .fxnTablePtr = &NVSCC26XX_fxnTable,
661 .object = &nvsCC26xxObjects[0],
662 .hwAttrs = &nvsCC26xxHWAttrs[0],
663 },
664#endif
665#if TI_NVS_CONF_NVS_EXTERNAL_ENABLE
666 {
667 .fxnTablePtr = &NVSSPI25X_fxnTable,
668 .object = &nvsSPI25XObjects[0],
669 .hwAttrs = &nvsSPI25XHWAttrs[0],
670 },
671#endif
672};
673
674const uint_least8_t NVS_count = CC2650_LAUNCHXL_NVSCOUNT;
675
676#endif /* TI_NVS_CONF_ENABLE */
677
678/*
679 * =============================== PIN ===============================
680 */
681#include <ti/drivers/PIN.h>
682#include <ti/drivers/pin/PINCC26XX.h>
683
684const PIN_Config BoardGpioInitTable[] = {
685
686 CC2650_LAUNCHXL_PIN_RLED | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
687 CC2650_LAUNCHXL_PIN_GLED | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
688 CC2650_LAUNCHXL_PIN_BTN1 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS, /* Button is active low */
689 CC2650_LAUNCHXL_PIN_BTN2 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS, /* Button is active low */
690 CC2650_LAUNCHXL_SPI_FLASH_CS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MIN, /* External flash chip select */
691 CC2650_LAUNCHXL_UART_RX | PIN_INPUT_EN | PIN_PULLDOWN, /* UART RX via debugger back channel */
692 CC2650_LAUNCHXL_UART_TX | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL, /* UART TX via debugger back channel */
693 CC2650_LAUNCHXL_SPI0_MOSI | PIN_INPUT_EN | PIN_PULLDOWN, /* SPI master out - slave in */
694 CC2650_LAUNCHXL_SPI0_MISO | PIN_INPUT_EN | PIN_PULLDOWN, /* SPI master in - slave out */
695 CC2650_LAUNCHXL_SPI0_CLK | PIN_INPUT_EN | PIN_PULLDOWN, /* SPI clock */
696
697 PIN_TERMINATE
698};
699
700const PINCC26XX_HWAttrs PINCC26XX_hwAttrs = {
701 .intPriority = ~0,
702 .swiPriority = 0
703};
704
705/*
706 * =============================== Power ===============================
707 */
708#include <ti/drivers/Power.h>
709#include <ti/drivers/power/PowerCC26XX.h>
710#include "clock-arch.h"
711
712const PowerCC26XX_Config PowerCC26XX_config = {
713 .policyInitFxn = NULL,
714 .policyFxn = &clock_arch_standby_policy,
715 .calibrateFxn = &PowerCC26XX_calibrate,
716 .enablePolicy = true,
717 .calibrateRCOSC_LF = true,
718 .calibrateRCOSC_HF = true,
719};
720
721/*
722 * =============================== PWM ===============================
723 * Remove unused entries to reduce flash usage both in Board.c and Board.h
724 */
725#include <ti/drivers/PWM.h>
726#include <ti/drivers/pwm/PWMTimerCC26XX.h>
727
728PWMTimerCC26XX_Object pwmtimerCC26xxObjects[CC2650_LAUNCHXL_PWMCOUNT];
729
730const PWMTimerCC26XX_HwAttrs pwmtimerCC26xxHWAttrs[CC2650_LAUNCHXL_PWMCOUNT] = {
731 { .pwmPin = CC2650_LAUNCHXL_PWMPIN0, .gpTimerUnit = CC2650_LAUNCHXL_GPTIMER0A },
732 { .pwmPin = CC2650_LAUNCHXL_PWMPIN1, .gpTimerUnit = CC2650_LAUNCHXL_GPTIMER0B },
733 { .pwmPin = CC2650_LAUNCHXL_PWMPIN2, .gpTimerUnit = CC2650_LAUNCHXL_GPTIMER1A },
734 { .pwmPin = CC2650_LAUNCHXL_PWMPIN3, .gpTimerUnit = CC2650_LAUNCHXL_GPTIMER1B },
735 { .pwmPin = CC2650_LAUNCHXL_PWMPIN4, .gpTimerUnit = CC2650_LAUNCHXL_GPTIMER2A },
736 { .pwmPin = CC2650_LAUNCHXL_PWMPIN5, .gpTimerUnit = CC2650_LAUNCHXL_GPTIMER2B },
737 { .pwmPin = CC2650_LAUNCHXL_PWMPIN6, .gpTimerUnit = CC2650_LAUNCHXL_GPTIMER3A },
738 { .pwmPin = CC2650_LAUNCHXL_PWMPIN7, .gpTimerUnit = CC2650_LAUNCHXL_GPTIMER3B },
739};
740
741const PWM_Config PWM_config[CC2650_LAUNCHXL_PWMCOUNT] = {
742 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[CC2650_LAUNCHXL_PWM0], &pwmtimerCC26xxHWAttrs[CC2650_LAUNCHXL_PWM0] },
743 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[CC2650_LAUNCHXL_PWM1], &pwmtimerCC26xxHWAttrs[CC2650_LAUNCHXL_PWM1] },
744 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[CC2650_LAUNCHXL_PWM2], &pwmtimerCC26xxHWAttrs[CC2650_LAUNCHXL_PWM2] },
745 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[CC2650_LAUNCHXL_PWM3], &pwmtimerCC26xxHWAttrs[CC2650_LAUNCHXL_PWM3] },
746 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[CC2650_LAUNCHXL_PWM4], &pwmtimerCC26xxHWAttrs[CC2650_LAUNCHXL_PWM4] },
747 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[CC2650_LAUNCHXL_PWM5], &pwmtimerCC26xxHWAttrs[CC2650_LAUNCHXL_PWM5] },
748 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[CC2650_LAUNCHXL_PWM6], &pwmtimerCC26xxHWAttrs[CC2650_LAUNCHXL_PWM6] },
749 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[CC2650_LAUNCHXL_PWM7], &pwmtimerCC26xxHWAttrs[CC2650_LAUNCHXL_PWM7] },
750};
751
752const uint_least8_t PWM_count = CC2650_LAUNCHXL_PWMCOUNT;
753
754/*
755 * =============================== RF Driver ===============================
756 */
757#include <ti/drivers/rf/RF.h>
758
759const RFCC26XX_HWAttrsV2 RFCC26XX_hwAttrs = {
760 .hwiPriority = ~0, /* Lowest HWI priority */
761 .swiPriority = 0, /* Lowest SWI priority */
762 .xoscHfAlwaysNeeded = true, /* Keep XOSC dependency while in standby */
763 .globalCallback = NULL, /* No board specific callback */
764 .globalEventMask = 0 /* No events subscribed to */
765};
766
767/*
768 * =============================== SD ===============================
769 */
770#include <ti/drivers/SD.h>
771#include <ti/drivers/sd/SDSPI.h>
772
773#if TI_SD_CONF_ENABLE
774
775#if !(TI_SPI_CONF_SPI0_ENABLE)
776#error "SD driver requires SPI0 enabled"
777#endif
778
779SDSPI_Object sdspiObjects[CC2650_LAUNCHXL_SDCOUNT];
780
781const SDSPI_HWAttrs sdspiHWAttrs[CC2650_LAUNCHXL_SDCOUNT] = {
782 {
783 .spiIndex = CC2650_LAUNCHXL_SPI0,
784 .spiCsGpioIndex = CC2650_LAUNCHXL_SDSPI_CS
785 }
786};
787
788const SD_Config SD_config[CC2650_LAUNCHXL_SDCOUNT] = {
789 {
790 .fxnTablePtr = &SDSPI_fxnTable,
791 .object = &sdspiObjects[CC2650_LAUNCHXL_SDSPI0],
792 .hwAttrs = &sdspiHWAttrs[CC2650_LAUNCHXL_SDSPI0]
793 },
794};
795
796const uint_least8_t SD_count = CC2650_LAUNCHXL_SDCOUNT;
797
798#endif /* TI_SD_CONF_ENABLE */
799
800/*
801 * =============================== SPI DMA ===============================
802 */
803#include <ti/drivers/SPI.h>
804#include <ti/drivers/spi/SPICC26XXDMA.h>
805
806#if TI_SPI_CONF_ENABLE
807
808SPICC26XXDMA_Object spiCC26XXDMAObjects[CC2650_LAUNCHXL_SPICOUNT];
809
810/*
811 * NOTE: The SPI instances below can be used by the SD driver to communicate
812 * with a SD card via SPI. The 'defaultTxBufValue' fields below are set to 0xFF
813 * to satisfy the SDSPI driver requirement.
814 */
815const SPICC26XXDMA_HWAttrsV1 spiCC26XXDMAHWAttrs[CC2650_LAUNCHXL_SPICOUNT] = {
816#if TI_SPI_CONF_SPI0_ENABLE
817 {
818 .baseAddr = SSI0_BASE,
819 .intNum = INT_SSI0_COMB,
820 .intPriority = ~0,
821 .swiPriority = 0,
822 .powerMngrId = PowerCC26XX_PERIPH_SSI0,
823 .defaultTxBufValue = 0xFF,
824 .rxChannelBitMask = 1<<UDMA_CHAN_SSI0_RX,
825 .txChannelBitMask = 1<<UDMA_CHAN_SSI0_TX,
826 .mosiPin = CC2650_LAUNCHXL_SPI0_MOSI,
827 .misoPin = CC2650_LAUNCHXL_SPI0_MISO,
828 .clkPin = CC2650_LAUNCHXL_SPI0_CLK,
829 .csnPin = CC2650_LAUNCHXL_SPI0_CSN,
830 .minDmaTransferSize = 10
831 },
832#endif
833#if TI_SPI_CONF_SPI1_ENABLE
834 {
835 .baseAddr = SSI1_BASE,
836 .intNum = INT_SSI1_COMB,
837 .intPriority = ~0,
838 .swiPriority = 0,
839 .powerMngrId = PowerCC26XX_PERIPH_SSI1,
840 .defaultTxBufValue = 0xFF,
841 .rxChannelBitMask = 1<<UDMA_CHAN_SSI1_RX,
842 .txChannelBitMask = 1<<UDMA_CHAN_SSI1_TX,
843 .mosiPin = CC2650_LAUNCHXL_SPI1_MOSI,
844 .misoPin = CC2650_LAUNCHXL_SPI1_MISO,
845 .clkPin = CC2650_LAUNCHXL_SPI1_CLK,
846 .csnPin = CC2650_LAUNCHXL_SPI1_CSN,
847 .minDmaTransferSize = 10
848 },
849#endif
850};
851
852const SPI_Config SPI_config[CC2650_LAUNCHXL_SPICOUNT] = {
853#if TI_SPI_CONF_SPI0_ENABLE
854 {
855 .fxnTablePtr = &SPICC26XXDMA_fxnTable,
856 .object = &spiCC26XXDMAObjects[CC2650_LAUNCHXL_SPI0],
857 .hwAttrs = &spiCC26XXDMAHWAttrs[CC2650_LAUNCHXL_SPI0]
858 },
859#endif
860#if TI_SPI_CONF_SPI1_ENABLE
861 {
862 .fxnTablePtr = &SPICC26XXDMA_fxnTable,
863 .object = &spiCC26XXDMAObjects[CC2650_LAUNCHXL_SPI1],
864 .hwAttrs = &spiCC26XXDMAHWAttrs[CC2650_LAUNCHXL_SPI1]
865 },
866#endif
867};
868
869const uint_least8_t SPI_count = CC2650_LAUNCHXL_SPICOUNT;
870
871#endif /* TI_SPI_CONF_ENABLE */
872
873/*
874 * =============================== UART ===============================
875 */
876#include <ti/drivers/UART.h>
877#include <ti/drivers/uart/UARTCC26XX.h>
878
879#if TI_UART_CONF_ENABLE
880
881UARTCC26XX_Object uartCC26XXObjects[CC2650_LAUNCHXL_UARTCOUNT];
882
883uint8_t uartCC26XXRingBuffer[CC2650_LAUNCHXL_UARTCOUNT][32];
884
885const UARTCC26XX_HWAttrsV2 uartCC26XXHWAttrs[CC2650_LAUNCHXL_UARTCOUNT] = {
886#if TI_UART_CONF_UART0_ENABLE
887 {
888 .baseAddr = UART0_BASE,
889 .powerMngrId = PowerCC26XX_PERIPH_UART0,
890 .intNum = INT_UART0_COMB,
891 .intPriority = ~0,
892 .swiPriority = 0,
893 .txPin = CC2650_LAUNCHXL_UART_TX,
894 .rxPin = CC2650_LAUNCHXL_UART_RX,
895 .ctsPin = PIN_UNASSIGNED,
896 .rtsPin = PIN_UNASSIGNED,
897 .ringBufPtr = uartCC26XXRingBuffer[CC2650_LAUNCHXL_UART0],
898 .ringBufSize = sizeof(uartCC26XXRingBuffer[CC2650_LAUNCHXL_UART0]),
899 .txIntFifoThr = UARTCC26XX_FIFO_THRESHOLD_1_8,
900 .rxIntFifoThr = UARTCC26XX_FIFO_THRESHOLD_4_8,
901 .errorFxn = NULL
902 },
903#endif
904};
905
906const UART_Config UART_config[CC2650_LAUNCHXL_UARTCOUNT] = {
907#if TI_UART_CONF_UART0_ENABLE
908 {
909 .fxnTablePtr = &UARTCC26XX_fxnTable,
910 .object = &uartCC26XXObjects[CC2650_LAUNCHXL_UART0],
911 .hwAttrs = &uartCC26XXHWAttrs[CC2650_LAUNCHXL_UART0]
912 },
913#endif
914};
915
916const uint_least8_t UART_count = CC2650_LAUNCHXL_UARTCOUNT;
917
918#endif /* TI_UART_CONF_ENABLE */
919
920/*
921 * =============================== UDMA ===============================
922 */
923#include <ti/drivers/dma/UDMACC26XX.h>
924
925UDMACC26XX_Object udmaObjects[CC2650_LAUNCHXL_UDMACOUNT];
926
927const UDMACC26XX_HWAttrs udmaHWAttrs[CC2650_LAUNCHXL_UDMACOUNT] = {
928 {
929 .baseAddr = UDMA0_BASE,
930 .powerMngrId = PowerCC26XX_PERIPH_UDMA,
931 .intNum = INT_DMA_ERR,
932 .intPriority = ~0
933 }
934};
935
936const UDMACC26XX_Config UDMACC26XX_config[CC2650_LAUNCHXL_UDMACOUNT] = {
937 {
938 .object = &udmaObjects[CC2650_LAUNCHXL_UDMA0],
939 .hwAttrs = &udmaHWAttrs[CC2650_LAUNCHXL_UDMA0]
940 },
941};
942
943
944
945/*
946 * =============================== Watchdog ===============================
947 */
948#include <ti/drivers/Watchdog.h>
949#include <ti/drivers/watchdog/WatchdogCC26XX.h>
950
951WatchdogCC26XX_Object watchdogCC26XXObjects[CC2650_LAUNCHXL_WATCHDOGCOUNT];
952
953const WatchdogCC26XX_HWAttrs watchdogCC26XXHWAttrs[CC2650_LAUNCHXL_WATCHDOGCOUNT] = {
954 {
955 .baseAddr = WDT_BASE,
956 .reloadValue = 1000 /* Reload value in milliseconds */
957 },
958};
959
960const Watchdog_Config Watchdog_config[CC2650_LAUNCHXL_WATCHDOGCOUNT] = {
961 {
962 .fxnTablePtr = &WatchdogCC26XX_fxnTable,
963 .object = &watchdogCC26XXObjects[CC2650_LAUNCHXL_WATCHDOG0],
964 .hwAttrs = &watchdogCC26XXHWAttrs[CC2650_LAUNCHXL_WATCHDOG0]
965 },
966};
967
968const uint_least8_t Watchdog_count = CC2650_LAUNCHXL_WATCHDOGCOUNT;
969
970/*
971 * Board-specific initialization function to disable external flash.
972 * This function is defined in the file CC2650_LAUNCHXL_fxns.c
973 */
974extern void Board_initHook(void);
975
976/*
977 * ======== CC2650_LAUNCHXL_initGeneral ========
978 */
979void CC2650_LAUNCHXL_initGeneral(void)
980{
981 Power_init();
982
983 if (PIN_init(BoardGpioInitTable) != PIN_SUCCESS) {
984 /* Error with PIN_init */
985 while (1);
986 }
987
988 /* Perform board-specific initialization */
989 Board_initHook();
990}
991
992/*
993 * ======== Board_init ========
994 */
995void Board_init(void)
996{
997 CC2650_LAUNCHXL_initGeneral();
998}
============================================================================
Header file for the CC13xx/CC26xx clock implementation.
void clock_arch_standby_policy(void)
Called by the Power driver when dropping to some low-power state.
Definition clock-arch.c:184
#define SSI1_BASE
Base address for SSI1.
Definition ssi.h:59
#define SSI0_BASE
Base address for SSI0.
Definition ssi.h:58