Contiki-NG
CC2650STK.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  * ====================== CC2650STK.c =========================================
35  * This file is responsible for setting up the board specific items for the
36  * CC2650STK board.
37  */
38 
39 #include <stdbool.h>
40 #include <stddef.h>
41 #include <stdint.h>
42 
43 #include <ti/drivers/Power.h>
44 #include <ti/drivers/power/PowerCC26XX.h>
45 
46 #include <ti/devices/DeviceFamily.h>
47 #include DeviceFamily_constructPath(driverlib/ioc.h)
48 #include DeviceFamily_constructPath(driverlib/udma.h)
49 #include DeviceFamily_constructPath(inc/hw_ints.h)
50 #include DeviceFamily_constructPath(inc/hw_memmap.h)
51 
52 #include "CC2650STK.h"
53 
54 /*
55  * =============================== ADCBuf ===============================
56  */
57 #include <ti/drivers/ADCBuf.h>
58 #include <ti/drivers/adcbuf/ADCBufCC26XX.h>
59 
60 ADCBufCC26XX_Object adcBufCC26XXobjects[CC2650STK_ADCBUFCOUNT];
61 
62 /*
63  * This table converts a virtual adc channel into a dio and internal analogue
64  * input signal. This table is necessary for the functioning of the adcBuf
65  * driver. Comment out unused entries to save flash. Dio and internal signal
66  * pairs are hardwired. Do not remap them in the table. You may reorder entire
67  * entries. The mapping of dio and internal signals is package dependent.
68  */
69 const ADCBufCC26XX_AdcChannelLutEntry ADCBufCC26XX_adcChannelLut[CC2650STK_ADCBUF0CHANNELCOUNT] = {
70  {CC2650STK_DIO23_ANALOG, ADC_COMPB_IN_AUXIO7},
71  {CC2650STK_DIO24_ANALOG, ADC_COMPB_IN_AUXIO6},
72  {CC2650STK_DIO25_ANALOG, ADC_COMPB_IN_AUXIO5},
73  {CC2650STK_DIO26_ANALOG, ADC_COMPB_IN_AUXIO4},
74  {CC2650STK_DIO27_ANALOG, ADC_COMPB_IN_AUXIO3},
75  {CC2650STK_DIO28_ANALOG, ADC_COMPB_IN_AUXIO2},
76  {CC2650STK_DIO29_ANALOG, ADC_COMPB_IN_AUXIO1},
77  {CC2650STK_DIO30_ANALOG, ADC_COMPB_IN_AUXIO0},
78  {PIN_UNASSIGNED, ADC_COMPB_IN_VDDS},
79  {PIN_UNASSIGNED, ADC_COMPB_IN_DCOUPL},
80  {PIN_UNASSIGNED, ADC_COMPB_IN_VSS},
81 };
82 
83 const ADCBufCC26XX_HWAttrs adcBufCC26XXHWAttrs[CC2650STK_ADCBUFCOUNT] = {
84  {
85  .intPriority = ~0,
86  .swiPriority = 0,
87  .adcChannelLut = ADCBufCC26XX_adcChannelLut,
88  }
89 };
90 
91 const ADCBuf_Config ADCBuf_config[CC2650STK_ADCBUFCOUNT] = {
92  {
93  &ADCBufCC26XX_fxnTable,
94  &adcBufCC26XXobjects[CC2650STK_ADCBUF0],
95  &adcBufCC26XXHWAttrs[CC2650STK_ADCBUF0]
96  },
97 };
98 
99 const uint_least8_t ADCBuf_count = CC2650STK_ADCBUFCOUNT;
100 
101 /*
102  * =============================== ADC ===============================
103  */
104 #include <ti/drivers/ADC.h>
105 #include <ti/drivers/adc/ADCCC26XX.h>
106 
107 ADCCC26XX_Object adcCC26xxObjects[CC2650STK_ADCCOUNT];
108 
109 const ADCCC26XX_HWAttrs adcCC26xxHWAttrs[CC2650STK_ADCCOUNT] = {
110  {
111  .adcDIO = CC2650STK_DIO23_ANALOG,
112  .adcCompBInput = ADC_COMPB_IN_AUXIO7,
113  .refSource = ADCCC26XX_FIXED_REFERENCE,
114  .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
115  .inputScalingEnabled = true,
116  .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
117  .returnAdjustedVal = false
118  },
119  {
120  .adcDIO = CC2650STK_DIO24_ANALOG,
121  .adcCompBInput = ADC_COMPB_IN_AUXIO6,
122  .refSource = ADCCC26XX_FIXED_REFERENCE,
123  .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
124  .inputScalingEnabled = true,
125  .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
126  .returnAdjustedVal = false
127  },
128  {
129  .adcDIO = CC2650STK_DIO25_ANALOG,
130  .adcCompBInput = ADC_COMPB_IN_AUXIO5,
131  .refSource = ADCCC26XX_FIXED_REFERENCE,
132  .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
133  .inputScalingEnabled = true,
134  .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
135  .returnAdjustedVal = false
136  },
137  {
138  .adcDIO = CC2650STK_DIO26_ANALOG,
139  .adcCompBInput = ADC_COMPB_IN_AUXIO4,
140  .refSource = ADCCC26XX_FIXED_REFERENCE,
141  .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
142  .inputScalingEnabled = true,
143  .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
144  .returnAdjustedVal = false
145  },
146  {
147  .adcDIO = CC2650STK_DIO27_ANALOG,
148  .adcCompBInput = ADC_COMPB_IN_AUXIO3,
149  .refSource = ADCCC26XX_FIXED_REFERENCE,
150  .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
151  .inputScalingEnabled = true,
152  .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
153  .returnAdjustedVal = false
154  },
155  {
156  .adcDIO = CC2650STK_DIO28_ANALOG,
157  .adcCompBInput = ADC_COMPB_IN_AUXIO2,
158  .refSource = ADCCC26XX_FIXED_REFERENCE,
159  .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
160  .inputScalingEnabled = true,
161  .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
162  .returnAdjustedVal = false
163  },
164  {
165  .adcDIO = CC2650STK_DIO29_ANALOG,
166  .adcCompBInput = ADC_COMPB_IN_AUXIO1,
167  .refSource = ADCCC26XX_FIXED_REFERENCE,
168  .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
169  .inputScalingEnabled = true,
170  .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
171  .returnAdjustedVal = false
172  },
173  {
174  .adcDIO = CC2650STK_DIO30_ANALOG,
175  .adcCompBInput = ADC_COMPB_IN_AUXIO0,
176  .refSource = ADCCC26XX_FIXED_REFERENCE,
177  .samplingDuration = ADCCC26XX_SAMPLING_DURATION_10P9_MS,
178  .inputScalingEnabled = true,
179  .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
180  .returnAdjustedVal = false
181  },
182  {
183  .adcDIO = PIN_UNASSIGNED,
184  .adcCompBInput = ADC_COMPB_IN_DCOUPL,
185  .refSource = ADCCC26XX_FIXED_REFERENCE,
186  .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
187  .inputScalingEnabled = true,
188  .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
189  .returnAdjustedVal = false
190  },
191  {
192  .adcDIO = PIN_UNASSIGNED,
193  .adcCompBInput = ADC_COMPB_IN_VSS,
194  .refSource = ADCCC26XX_FIXED_REFERENCE,
195  .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
196  .inputScalingEnabled = true,
197  .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
198  .returnAdjustedVal = false
199  },
200  {
201  .adcDIO = PIN_UNASSIGNED,
202  .adcCompBInput = ADC_COMPB_IN_VDDS,
203  .refSource = ADCCC26XX_FIXED_REFERENCE,
204  .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
205  .inputScalingEnabled = true,
206  .triggerSource = ADCCC26XX_TRIGGER_MANUAL,
207  .returnAdjustedVal = false
208  }
209 };
210 
211 const ADC_Config ADC_config[CC2650STK_ADCCOUNT] = {
212  {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650STK_ADC0], &adcCC26xxHWAttrs[CC2650STK_ADC0]},
213  {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650STK_ADC1], &adcCC26xxHWAttrs[CC2650STK_ADC1]},
214  {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650STK_ADC2], &adcCC26xxHWAttrs[CC2650STK_ADC2]},
215  {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650STK_ADC3], &adcCC26xxHWAttrs[CC2650STK_ADC3]},
216  {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650STK_ADC4], &adcCC26xxHWAttrs[CC2650STK_ADC4]},
217  {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650STK_ADC5], &adcCC26xxHWAttrs[CC2650STK_ADC5]},
218  {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650STK_ADC6], &adcCC26xxHWAttrs[CC2650STK_ADC6]},
219  {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650STK_ADC7], &adcCC26xxHWAttrs[CC2650STK_ADC7]},
220  {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650STK_ADCDCOUPL], &adcCC26xxHWAttrs[CC2650STK_ADCDCOUPL]},
221  {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650STK_ADCVSS], &adcCC26xxHWAttrs[CC2650STK_ADCVSS]},
222  {&ADCCC26XX_fxnTable, &adcCC26xxObjects[CC2650STK_ADCVDDS], &adcCC26xxHWAttrs[CC2650STK_ADCVDDS]},
223 };
224 
225 const uint_least8_t ADC_count = CC2650STK_ADCCOUNT;
226 
227 /*
228  * =============================== Crypto ===============================
229  */
230 #include <ti/drivers/crypto/CryptoCC26XX.h>
231 
232 CryptoCC26XX_Object cryptoCC26XXObjects[CC2650STK_CRYPTOCOUNT];
233 
234 const CryptoCC26XX_HWAttrs cryptoCC26XXHWAttrs[CC2650STK_CRYPTOCOUNT] = {
235  {
236  .baseAddr = CRYPTO_BASE,
237  .powerMngrId = PowerCC26XX_PERIPH_CRYPTO,
238  .intNum = INT_CRYPTO_RESULT_AVAIL_IRQ,
239  .intPriority = ~0,
240  }
241 };
242 
243 const CryptoCC26XX_Config CryptoCC26XX_config[CC2650STK_CRYPTOCOUNT] = {
244  {
245  .object = &cryptoCC26XXObjects[CC2650STK_CRYPTO0],
246  .hwAttrs = &cryptoCC26XXHWAttrs[CC2650STK_CRYPTO0]
247  }
248 };
249 
250 /*
251  * =============================== AESCCM ===============================
252  */
253 #include <ti/drivers/AESCCM.h>
254 #include <ti/drivers/aesccm/AESCCMCC26XX.h>
255 
256 AESCCMCC26XX_Object aesccmCC26XXObjects[CC2650STK_AESCCMCOUNT];
257 
258 const AESCCMCC26XX_HWAttrs aesccmCC26XXHWAttrs[CC2650STK_AESCCMCOUNT] = {
259  {
260  .intPriority = ~0,
261  }
262 };
263 
264 const AESCCM_Config AESCCM_config[CC2650STK_AESCCMCOUNT] = {
265  {
266  .object = &aesccmCC26XXObjects[CC2650STK_AESCCM0],
267  .hwAttrs = &aesccmCC26XXHWAttrs[CC2650STK_AESCCM0]
268  },
269 };
270 
271 const uint_least8_t AESCCM_count = CC2650STK_AESCCMCOUNT;
272 
273 
274 /*
275  * =============================== AESGCM ===============================
276  */
277 #include <ti/drivers/AESGCM.h>
278 #include <ti/drivers/aesgcm/AESGCMCC26XX.h>
279 
280 AESGCMCC26XX_Object aesgcmCC26XXObjects[CC2650STK_AESGCMCOUNT];
281 
282 const AESGCMCC26XX_HWAttrs aesgcmCC26XXHWAttrs[CC2650STK_AESGCMCOUNT] = {
283  {
284  .intPriority = ~0,
285  }
286 };
287 
288 const AESGCM_Config AESGCM_config[CC2650STK_AESGCMCOUNT] = {
289  {
290  .object = &aesgcmCC26XXObjects[CC2650STK_AESGCM0],
291  .hwAttrs = &aesgcmCC26XXHWAttrs[CC2650STK_AESGCM0]
292  },
293 };
294 
295 const uint_least8_t AESGCM_count = CC2650STK_AESGCMCOUNT;
296 
297 /*
298  * =============================== AESCBC ===============================
299  */
300 #include <ti/drivers/AESCBC.h>
301 #include <ti/drivers/aescbc/AESCBCCC26XX.h>
302 
303 AESCBCCC26XX_Object aescbcCC26XXObjects[CC2650STK_AESCBCCOUNT];
304 
305 const AESCBCCC26XX_HWAttrs aescbcCC26XXHWAttrs[CC2650STK_AESCBCCOUNT] = {
306  {
307  .intPriority = ~0,
308  }
309 };
310 
311 const AESCBC_Config AESCBC_config[CC2650STK_AESCBCCOUNT] = {
312  {
313  .object = &aescbcCC26XXObjects[CC2650STK_AESCBC0],
314  .hwAttrs = &aescbcCC26XXHWAttrs[CC2650STK_AESCBC0]
315  },
316 };
317 
318 const uint_least8_t AESCBC_count = CC2650STK_AESCBCCOUNT;
319 
320 /*
321  * =============================== AESCTR ===============================
322  */
323 #include <ti/drivers/AESCTR.h>
324 #include <ti/drivers/aesctr/AESCTRCC26XX.h>
325 
326 AESCTRCC26XX_Object aesctrCC26XXObjects[CC2650STK_AESCTRCOUNT];
327 
328 const AESCTRCC26XX_HWAttrs aesctrCC26XXHWAttrs[CC2650STK_AESCTRCOUNT] = {
329  {
330  .intPriority = ~0,
331  }
332 };
333 
334 const AESCTR_Config AESCTR_config[CC2650STK_AESCTRCOUNT] = {
335  {
336  .object = &aesctrCC26XXObjects[CC2650STK_AESCTR0],
337  .hwAttrs = &aesctrCC26XXHWAttrs[CC2650STK_AESCTR0]
338  },
339 };
340 
341 const uint_least8_t AESCTR_count = CC2650STK_AESCTRCOUNT;
342 
343 /*
344  * =============================== AESECB ===============================
345  */
346 #include <ti/drivers/AESECB.h>
347 #include <ti/drivers/aesecb/AESECBCC26XX.h>
348 
349 AESECBCC26XX_Object aesecbCC26XXObjects[CC2650STK_AESECBCOUNT];
350 
351 const AESECBCC26XX_HWAttrs aesecbCC26XXHWAttrs[CC2650STK_AESECBCOUNT] = {
352  {
353  .intPriority = ~0,
354  }
355 };
356 
357 const AESECB_Config AESECB_config[CC2650STK_AESECBCOUNT] = {
358  {
359  .object = &aesecbCC26XXObjects[CC2650STK_AESECB0],
360  .hwAttrs = &aesecbCC26XXHWAttrs[CC2650STK_AESECB0]
361  },
362 };
363 
364 const uint_least8_t AESECB_count = CC2650STK_AESECBCOUNT;
365 
366 /*
367  * =============================== AESCTRDRBG ===============================
368  */
369 #include <ti/drivers/AESCTRDRBG.h>
370 #include <ti/drivers/aesctrdrbg/AESCTRDRBGXX.h>
371 
372 AESCTRDRBGXX_Object aesctrdrbgXXObjects[CC2650STK_AESCTRDRBGCOUNT];
373 
374 const AESCTRDRBGXX_HWAttrs aesctrdrbgXXHWAttrs[CC2650STK_AESCTRDRBGCOUNT] = {
375  {
376  .aesctrIndex = CC2650STK_AESCTR0,
377  }
378 };
379 
380 const AESCTRDRBG_Config AESCTRDRBG_config[CC2650STK_AESCTRDRBGCOUNT] = {
381  {
382  .object = &aesctrdrbgXXObjects[CC2650STK_AESCTRDRBG0],
383  .hwAttrs = &aesctrdrbgXXHWAttrs[CC2650STK_AESCTRDRBG0]
384  },
385 };
386 
387 const uint_least8_t AESCTRDRBG_count = CC2650STK_AESCTRDRBGCOUNT;
388 
389 /*
390  * =============================== TRNG ===============================
391  */
392 #include <ti/drivers/TRNG.h>
393 #include <ti/drivers/trng/TRNGCC26XX.h>
394 
395 TRNGCC26XX_Object trngCC26XXObjects[CC2650STK_TRNGCOUNT];
396 
397 const TRNGCC26XX_HWAttrs trngCC26X2HWAttrs[CC2650STK_TRNGCOUNT] = {
398  {
399  .intPriority = ~0,
400  .swiPriority = 0,
401  .samplesPerCycle = 240000,
402  }
403 };
404 
405 const TRNG_Config TRNG_config[CC2650STK_TRNGCOUNT] = {
406  {
407  .object = &trngCC26XXObjects[CC2650STK_TRNG0],
408  .hwAttrs = &trngCC26X2HWAttrs[CC2650STK_TRNG0]
409  },
410 };
411 
412 const uint_least8_t TRNG_count = CC2650STK_TRNGCOUNT;
413 
414 /*
415  * =============================== GPIO ===============================
416  */
417 #include <ti/drivers/GPIO.h>
418 #include <ti/drivers/gpio/GPIOCC26XX.h>
419 
420 /*
421  * Array of Pin configurations
422  * NOTE: The order of the pin configurations must coincide with what was
423  * defined in CC2650STK.h
424  * NOTE: Pins not used for interrupts should be placed at the end of the
425  * array. Callback entries can be omitted from callbacks array to
426  * reduce memory usage.
427  */
428 GPIO_PinConfig gpioPinConfigs[] = {
429  /* Input pins */
430  GPIOCC26XX_DIO_15 | GPIO_DO_NOT_CONFIG, /* Button 0 */
431  GPIOCC26XX_DIO_04 | GPIO_DO_NOT_CONFIG, /* Button 1 */
432 
433  /* Output pins */
434  GPIOCC26XX_DIO_10 | GPIO_DO_NOT_CONFIG, /* LED */
435 
436  /* SPI Flash CSN */
437  GPIOCC26XX_DIO_14 | GPIO_DO_NOT_CONFIG,
438 };
439 
440 /*
441  * Array of callback function pointers
442  * NOTE: The order of the pin configurations must coincide with what was
443  * defined in CC2650STK.h
444  * NOTE: Pins not used for interrupts can be omitted from callbacks array to
445  * reduce memory usage (if placed at end of gpioPinConfigs array).
446  */
447 GPIO_CallbackFxn gpioCallbackFunctions[] = {
448  NULL, /* Button 0 */
449  NULL, /* Button 1 */
450 };
451 
452 const GPIOCC26XX_Config GPIOCC26XX_config = {
453  .pinConfigs = (GPIO_PinConfig *)gpioPinConfigs,
454  .callbacks = (GPIO_CallbackFxn *)gpioCallbackFunctions,
455  .numberOfPinConfigs = CC2650STK_GPIOCOUNT,
456  .numberOfCallbacks = sizeof(gpioCallbackFunctions)/sizeof(GPIO_CallbackFxn),
457  .intPriority = (~0)
458 };
459 
460 /*
461  * =============================== GPTimer ===============================
462  * Remove unused entries to reduce flash usage both in Board.c and Board.h
463  */
464 #include <ti/drivers/timer/GPTimerCC26XX.h>
465 
466 GPTimerCC26XX_Object gptimerCC26XXObjects[CC2650STK_GPTIMERCOUNT];
467 
468 const GPTimerCC26XX_HWAttrs gptimerCC26xxHWAttrs[CC2650STK_GPTIMERPARTSCOUNT] = {
469  { .baseAddr = GPT0_BASE, .intNum = INT_GPT0A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT0, .pinMux = GPT_PIN_0A, },
470  { .baseAddr = GPT0_BASE, .intNum = INT_GPT0B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT0, .pinMux = GPT_PIN_0B, },
471  { .baseAddr = GPT1_BASE, .intNum = INT_GPT1A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT1, .pinMux = GPT_PIN_1A, },
472  { .baseAddr = GPT1_BASE, .intNum = INT_GPT1B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT1, .pinMux = GPT_PIN_1B, },
473  { .baseAddr = GPT2_BASE, .intNum = INT_GPT2A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT2, .pinMux = GPT_PIN_2A, },
474  { .baseAddr = GPT2_BASE, .intNum = INT_GPT2B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT2, .pinMux = GPT_PIN_2B, },
475  { .baseAddr = GPT3_BASE, .intNum = INT_GPT3A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT3, .pinMux = GPT_PIN_3A, },
476  { .baseAddr = GPT3_BASE, .intNum = INT_GPT3B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT3, .pinMux = GPT_PIN_3B, },
477 };
478 
479 const GPTimerCC26XX_Config GPTimerCC26XX_config[CC2650STK_GPTIMERPARTSCOUNT] = {
480  { &gptimerCC26XXObjects[CC2650STK_GPTIMER0], &gptimerCC26xxHWAttrs[CC2650STK_GPTIMER0A], GPT_A },
481  { &gptimerCC26XXObjects[CC2650STK_GPTIMER0], &gptimerCC26xxHWAttrs[CC2650STK_GPTIMER0B], GPT_B },
482  { &gptimerCC26XXObjects[CC2650STK_GPTIMER1], &gptimerCC26xxHWAttrs[CC2650STK_GPTIMER1A], GPT_A },
483  { &gptimerCC26XXObjects[CC2650STK_GPTIMER1], &gptimerCC26xxHWAttrs[CC2650STK_GPTIMER1B], GPT_B },
484  { &gptimerCC26XXObjects[CC2650STK_GPTIMER2], &gptimerCC26xxHWAttrs[CC2650STK_GPTIMER2A], GPT_A },
485  { &gptimerCC26XXObjects[CC2650STK_GPTIMER2], &gptimerCC26xxHWAttrs[CC2650STK_GPTIMER2B], GPT_B },
486  { &gptimerCC26XXObjects[CC2650STK_GPTIMER3], &gptimerCC26xxHWAttrs[CC2650STK_GPTIMER3A], GPT_A },
487  { &gptimerCC26XXObjects[CC2650STK_GPTIMER3], &gptimerCC26xxHWAttrs[CC2650STK_GPTIMER3B], GPT_B },
488 };
489 
490 /*
491  * =============================== I2C ===============================
492 */
493 #include <ti/drivers/I2C.h>
494 #include <ti/drivers/i2c/I2CCC26XX.h>
495 
496 #if TI_I2C_CONF_ENABLE
497 
498 I2CCC26XX_Object i2cCC26xxObjects[CC2650STK_I2CCOUNT];
499 
500 const I2CCC26XX_HWAttrsV1 i2cCC26xxHWAttrs[CC2650STK_I2CCOUNT] = {
501 #if TI_I2C_CONF_I2C0_ENABLE
502  {
503  .baseAddr = I2C0_BASE,
504  .powerMngrId = PowerCC26XX_PERIPH_I2C0,
505  .intNum = INT_I2C_IRQ,
506  .intPriority = ~0,
507  .swiPriority = 0,
508  .sdaPin = CC2650STK_I2C0_SDA0,
509  .sclPin = CC2650STK_I2C0_SCL0,
510  },
511 #endif
512 };
513 
514 const I2C_Config I2C_config[CC2650STK_I2CCOUNT] = {
515 #if TI_I2C_CONF_I2C0_ENABLE
516  {
517  .fxnTablePtr = &I2CCC26XX_fxnTable,
518  .object = &i2cCC26xxObjects[CC2650STK_I2C0],
519  .hwAttrs = &i2cCC26xxHWAttrs[CC2650STK_I2C0]
520  },
521 #endif
522 };
523 
524 const uint_least8_t I2C_count = CC2650STK_I2CCOUNT;
525 
526 #endif /* TI_I2C_CONF_ENABLE */
527 
528 /*
529  * =============================== I2S ===============================
530 */
531 #include <ti/drivers/I2S.h>
532 #include <ti/drivers/i2s/I2SCC26XX.h>
533 
534 I2SCC26XX_Object i2sCC26XXObjects[CC2650STK_I2SCOUNT];
535 
536 const I2SCC26XX_HWAttrs i2sCC26XXHWAttrs[CC2650STK_I2SCOUNT] = {
537  {
538  .pinSD1 = CC2650STK_I2S_ADI,
539  .pinSD0 = CC2650STK_I2S_ADO,
540  .pinSCK = CC2650STK_I2S_BCLK,
541  .pinMCLK = CC2650STK_I2S_MCLK,
542  .pinWS = CC2650STK_I2S_WCLK,
543  .intPriority = ~0,
544  }
545 };
546 
547 const I2S_Config I2S_config[CC2650STK_I2SCOUNT] = {
548  {
549  .object = &i2sCC26XXObjects[CC2650STK_I2S0],
550  .hwAttrs = &i2sCC26XXHWAttrs[CC2650STK_I2S0]
551  },
552 };
553 
554 const uint_least8_t I2S_count = CC2650STK_I2SCOUNT;
555 
556 /*
557  * =============================== NVS ===============================
558  */
559 #include <ti/drivers/NVS.h>
560 #include <ti/drivers/nvs/NVSSPI25X.h>
561 #include <ti/drivers/nvs/NVSCC26XX.h>
562 
563 #define NVS_REGIONS_BASE 0x1A000
564 #define SECTORSIZE 0x1000
565 #define REGIONSIZE (SECTORSIZE * 4)
566 
567 #if TI_NVS_CONF_ENABLE
568 
569 #if TI_NVS_CONF_NVS_INTERNAL_ENABLE
570 
571 /*
572  * Reserve flash sectors for NVS driver use by placing an uninitialized byte
573  * array at the desired flash address.
574  */
575 #if defined(__TI_COMPILER_VERSION__)
576 
577 /*
578  * Place uninitialized array at NVS_REGIONS_BASE
579  */
580 #pragma LOCATION(flashBuf, NVS_REGIONS_BASE);
581 #pragma NOINIT(flashBuf);
582 static char flashBuf[REGIONSIZE];
583 
584 #elif defined(__IAR_SYSTEMS_ICC__)
585 
586 /*
587  * Place uninitialized array at NVS_REGIONS_BASE
588  */
589 static __no_init char flashBuf[REGIONSIZE] @ NVS_REGIONS_BASE;
590 
591 #elif defined(__GNUC__)
592 
593 /*
594  * Place the flash buffers in the .nvs section created in the gcc linker file.
595  * The .nvs section enforces alignment on a sector boundary but may
596  * be placed anywhere in flash memory. If desired the .nvs section can be set
597  * to a fixed address by changing the following in the gcc linker file:
598  *
599  * .nvs (FIXED_FLASH_ADDR) (NOLOAD) : AT (FIXED_FLASH_ADDR) {
600  * *(.nvs)
601  * } > REGION_TEXT
602  */
603 __attribute__ ((section (".nvs")))
604 static char flashBuf[REGIONSIZE];
605 
606 #endif
607 
608 /* Allocate objects for NVS Internal Regions */
609 NVSCC26XX_Object nvsCC26xxObjects[1];
610 
611 /* Hardware attributes for NVS Internal Regions */
612 const NVSCC26XX_HWAttrs nvsCC26xxHWAttrs[1] = {
613  {
614  .regionBase = (void *)flashBuf,
615  .regionSize = REGIONSIZE,
616  },
617 };
618 
619 #endif /* TI_NVS_CONF_NVS_INTERNAL_ENABLE */
620 
621 #if TI_NVS_CONF_NVS_EXTERNAL_ENABLE
622 
623 #define SPISECTORSIZE 0x1000
624 #define SPIREGIONSIZE (SPISECTORSIZE * 32)
625 #define VERIFYBUFSIZE 64
626 
627 static uint8_t verifyBuf[VERIFYBUFSIZE];
628 
629 /* Allocate objects for NVS External Regions */
630 NVSSPI25X_Object nvsSPI25XObjects[1];
631 
632 /* Hardware attributes for NVS External Regions */
633 const NVSSPI25X_HWAttrs nvsSPI25XHWAttrs[1] = {
634  {
635  .regionBaseOffset = 0,
636  .regionSize = SPIREGIONSIZE,
637  .sectorSize = SPISECTORSIZE,
638  .verifyBuf = verifyBuf,
639  .verifyBufSize = VERIFYBUFSIZE,
640  .spiHandle = NULL,
641  .spiIndex = 0,
642  .spiBitRate = 4000000,
643  .spiCsnGpioIndex = CC2650STK_GPIO_SPI_FLASH_CS,
644  .statusPollDelayUs = 100,
645  },
646 };
647 
648 #endif /* Board_EXCLUDE_NVS_EXTERNAL_FLASH */
649 
650 /* NVS Region index 0 and 1 refer to NVS and NVS SPI respectively */
651 const NVS_Config NVS_config[CC2650STK_NVSCOUNT] = {
652 #if TI_NVS_CONF_NVS_INTERNAL_ENABLE
653  {
654  .fxnTablePtr = &NVSCC26XX_fxnTable,
655  .object = &nvsCC26xxObjects[0],
656  .hwAttrs = &nvsCC26xxHWAttrs[0],
657  },
658 #endif
659 #if TI_NVS_CONF_NVS_EXTERNAL_ENABLE
660  {
661  .fxnTablePtr = &NVSSPI25X_fxnTable,
662  .object = &nvsSPI25XObjects[0],
663  .hwAttrs = &nvsSPI25XHWAttrs[0],
664  },
665 #endif
666 };
667 
668 const uint_least8_t NVS_count = CC2650STK_NVSCOUNT;
669 
670 #endif /* TI_NVS_CONF_ENABLE */
671 
672 /*
673  * =============================== PIN ===============================
674  */
675 #include <ti/drivers/PIN.h>
676 #include <ti/drivers/pin/PINCC26XX.h>
677 
678 const PIN_Config BoardGpioInitTable[] = {
679 
680  CC2650STK_PIN_RLED | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
681  CC2650STK_PIN_GLED | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
682  CC2650STK_PIN_BTN1 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS, /* Button is active low */
683  CC2650STK_PIN_BTN2 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS, /* Button is active low */
684  CC2650STK_SPI_FLASH_CS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MIN, /* External flash chip select */
685  CC2650STK_UART_TX | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL, /* DevPack */
686  CC2650STK_UART_RX | PIN_INPUT_EN | PIN_PULLDOWN, /* DevPack */
687  CC2650STK_SPI0_MOSI | PIN_INPUT_EN | PIN_PULLDOWN, /* SPI master out - slave in */
688  CC2650STK_SPI0_MISO | PIN_INPUT_EN | PIN_PULLDOWN, /* SPI master in - slave out */
689  CC2650STK_SPI0_CLK | PIN_INPUT_EN | PIN_PULLDOWN, /* SPI clock */
690  CC2650STK_RELAY | PIN_INPUT_EN | PIN_PULLDOWN | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS, /* Relay is active high */
691  CC2650STK_MPU_INT | PIN_INPUT_EN | PIN_PULLDOWN | PIN_IRQ_NEGEDGE | PIN_HYSTERESIS, /* MPU_INT is active low */
692  CC2650STK_TMP_RDY | PIN_INPUT_EN | PIN_PULLUP | PIN_HYSTERESIS, /* TMP_RDY is active high */
693  CC2650STK_BUZZER | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* Buzzer initially off */
694  CC2650STK_MPU_POWER | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* MPU initially on */
695  CC2650STK_MIC_POWER | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MIN, /* MIC initially off */
696  PIN_TERMINATE
697 };
698 
699 const PINCC26XX_HWAttrs PINCC26XX_hwAttrs = {
700  .intPriority = ~0,
701  .swiPriority = 0
702 };
703 
704 /*
705  * =============================== Power ===============================
706  */
707 #include <ti/drivers/Power.h>
708 #include <ti/drivers/power/PowerCC26XX.h>
709 #include "clock-arch.h"
710 
711 const PowerCC26XX_Config PowerCC26XX_config = {
712  .policyInitFxn = NULL,
713  .policyFxn = &clock_arch_standby_policy,
714  .calibrateFxn = &PowerCC26XX_calibrate,
715  .enablePolicy = true,
716  .calibrateRCOSC_LF = true,
717  .calibrateRCOSC_HF = true,
718 };
719 
720 /*
721  * =============================== PWM ===============================
722  * Remove unused entries to reduce flash usage both in Board.c and Board.h
723  */
724 #include <ti/drivers/PWM.h>
725 #include <ti/drivers/pwm/PWMTimerCC26XX.h>
726 
727 PWMTimerCC26XX_Object pwmtimerCC26xxObjects[CC2650STK_PWMCOUNT];
728 
729 const PWMTimerCC26XX_HwAttrs pwmtimerCC26xxHWAttrs[CC2650STK_PWMCOUNT] = {
730  { .pwmPin = CC2650STK_PWMPIN0, .gpTimerUnit = CC2650STK_GPTIMER0A },
731  { .pwmPin = CC2650STK_PWMPIN1, .gpTimerUnit = CC2650STK_GPTIMER0B },
732  { .pwmPin = CC2650STK_PWMPIN2, .gpTimerUnit = CC2650STK_GPTIMER1A },
733  { .pwmPin = CC2650STK_PWMPIN3, .gpTimerUnit = CC2650STK_GPTIMER1B },
734  { .pwmPin = CC2650STK_PWMPIN4, .gpTimerUnit = CC2650STK_GPTIMER2A },
735  { .pwmPin = CC2650STK_PWMPIN5, .gpTimerUnit = CC2650STK_GPTIMER2B },
736  { .pwmPin = CC2650STK_PWMPIN6, .gpTimerUnit = CC2650STK_GPTIMER3A },
737  { .pwmPin = CC2650STK_PWMPIN7, .gpTimerUnit = CC2650STK_GPTIMER3B },
738 };
739 
740 const PWM_Config PWM_config[CC2650STK_PWMCOUNT] = {
741  { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[CC2650STK_PWM0], &pwmtimerCC26xxHWAttrs[CC2650STK_PWM0] },
742  { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[CC2650STK_PWM1], &pwmtimerCC26xxHWAttrs[CC2650STK_PWM1] },
743  { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[CC2650STK_PWM2], &pwmtimerCC26xxHWAttrs[CC2650STK_PWM2] },
744  { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[CC2650STK_PWM3], &pwmtimerCC26xxHWAttrs[CC2650STK_PWM3] },
745  { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[CC2650STK_PWM4], &pwmtimerCC26xxHWAttrs[CC2650STK_PWM4] },
746  { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[CC2650STK_PWM5], &pwmtimerCC26xxHWAttrs[CC2650STK_PWM5] },
747  { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[CC2650STK_PWM6], &pwmtimerCC26xxHWAttrs[CC2650STK_PWM6] },
748  { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[CC2650STK_PWM7], &pwmtimerCC26xxHWAttrs[CC2650STK_PWM7] },
749 };
750 
751 const uint_least8_t PWM_count = CC2650STK_PWMCOUNT;
752 
753 /*
754  * =============================== RF Driver ===============================
755  */
756 #include <ti/drivers/rf/RF.h>
757 
758 const RFCC26XX_HWAttrsV2 RFCC26XX_hwAttrs = {
759  .hwiPriority = ~0, /* Lowest HWI priority */
760  .swiPriority = 0, /* Lowest SWI priority */
761  .xoscHfAlwaysNeeded = true, /* Keep XOSC dependency while in stanby */
762  .globalCallback = NULL, /* No board specific callback */
763  .globalEventMask = 0 /* No events subscribed to */
764 };
765 
766 /*
767  * =============================== SPI DMA ===============================
768  */
769 #include <ti/drivers/SPI.h>
770 #include <ti/drivers/spi/SPICC26XXDMA.h>
771 
772 #if TI_SPI_CONF_ENABLE
773 
774 SPICC26XXDMA_Object spiCC26XXDMAObjects[CC2650STK_SPICOUNT];
775 
776 /*
777  * NOTE: The SPI instances below can be used by the SD driver to communicate
778  * with a SD card via SPI. The 'defaultTxBufValue' fields below are set to 0xFF
779  * to satisfy the SDSPI driver requirement.
780  */
781 const SPICC26XXDMA_HWAttrsV1 spiCC26XXDMAHWAttrs[CC2650STK_SPICOUNT] = {
782 #if TI_SPI_CONF_SPI0_ENABLE
783  {
784  .baseAddr = SSI0_BASE,
785  .intNum = INT_SSI0_COMB,
786  .intPriority = ~0,
787  .swiPriority = 0,
788  .powerMngrId = PowerCC26XX_PERIPH_SSI0,
789  .defaultTxBufValue = 0xFF,
790  .rxChannelBitMask = 1<<UDMA_CHAN_SSI0_RX,
791  .txChannelBitMask = 1<<UDMA_CHAN_SSI0_TX,
792  .mosiPin = CC2650STK_SPI0_MOSI,
793  .misoPin = CC2650STK_SPI0_MISO,
794  .clkPin = CC2650STK_SPI0_CLK,
795  .csnPin = CC2650STK_SPI0_CSN,
796  .minDmaTransferSize = 10
797  },
798 #endif
799 #if TI_SPI_CONF_SPI1_ENABLE
800  {
801  .baseAddr = SSI1_BASE,
802  .intNum = INT_SSI1_COMB,
803  .intPriority = ~0,
804  .swiPriority = 0,
805  .powerMngrId = PowerCC26XX_PERIPH_SSI1,
806  .defaultTxBufValue = 0xFF,
807  .rxChannelBitMask = 1<<UDMA_CHAN_SSI1_RX,
808  .txChannelBitMask = 1<<UDMA_CHAN_SSI1_TX,
809  .mosiPin = CC2650STK_SPI1_MOSI,
810  .misoPin = CC2650STK_SPI1_MISO,
811  .clkPin = CC2650STK_SPI1_CLK,
812  .csnPin = CC2650STK_SPI1_CSN,
813  .minDmaTransferSize = 10
814  },
815 #endif
816 };
817 
818 const SPI_Config SPI_config[CC2650STK_SPICOUNT] = {
819 #if TI_SPI_CONF_SPI0_ENABLE
820  {
821  .fxnTablePtr = &SPICC26XXDMA_fxnTable,
822  .object = &spiCC26XXDMAObjects[CC2650STK_SPI0],
823  .hwAttrs = &spiCC26XXDMAHWAttrs[CC2650STK_SPI0]
824  },
825 #endif
826 #if TI_SPI_CONF_SPI1_ENABLE
827  {
828  .fxnTablePtr = &SPICC26XXDMA_fxnTable,
829  .object = &spiCC26XXDMAObjects[CC2650STK_SPI1],
830  .hwAttrs = &spiCC26XXDMAHWAttrs[CC2650STK_SPI1]
831  },
832 #endif
833 };
834 
835 const uint_least8_t SPI_count = CC2650STK_SPICOUNT;
836 
837 #endif /* TI_SPI_CONF_ENABLE */
838 
839 /*
840  * =============================== UART ===============================
841  */
842 #include <ti/drivers/UART.h>
843 #include <ti/drivers/uart/UARTCC26XX.h>
844 
845 #if TI_UART_CONF_ENABLE
846 
847 UARTCC26XX_Object uartCC26XXObjects[CC2650STK_UARTCOUNT];
848 
849 uint8_t uartCC26XXRingBuffer[CC2650STK_UARTCOUNT][32];
850 
851 const UARTCC26XX_HWAttrsV2 uartCC26XXHWAttrs[CC2650STK_UARTCOUNT] = {
852 #if TI_UART_CONF_UART0_ENABLE
853  {
854  .baseAddr = UART0_BASE,
855  .powerMngrId = PowerCC26XX_PERIPH_UART0,
856  .intNum = INT_UART0_COMB,
857  .intPriority = ~0,
858  .swiPriority = 0,
859  .txPin = CC2650STK_UART_TX,
860  .rxPin = CC2650STK_UART_RX,
861  .ctsPin = PIN_UNASSIGNED,
862  .rtsPin = PIN_UNASSIGNED,
863  .ringBufPtr = uartCC26XXRingBuffer[CC2650STK_UART0],
864  .ringBufSize = sizeof(uartCC26XXRingBuffer[CC2650STK_UART0]),
865  .txIntFifoThr = UARTCC26XX_FIFO_THRESHOLD_1_8,
866  .rxIntFifoThr = UARTCC26XX_FIFO_THRESHOLD_4_8,
867  .errorFxn = NULL
868  },
869 #endif
870 };
871 
872 const UART_Config UART_config[CC2650STK_UARTCOUNT] = {
873 #if TI_UART_CONF_UART0_ENABLE
874  {
875  .fxnTablePtr = &UARTCC26XX_fxnTable,
876  .object = &uartCC26XXObjects[CC2650STK_UART0],
877  .hwAttrs = &uartCC26XXHWAttrs[CC2650STK_UART0]
878  },
879 #endif
880 };
881 
882 const uint_least8_t UART_count = CC2650STK_UARTCOUNT;
883 
884 #endif /* TI_UART_CONF_ENABLE */
885 
886 /*
887  * =============================== UDMA ===============================
888  */
889 #include <ti/drivers/dma/UDMACC26XX.h>
890 
891 UDMACC26XX_Object udmaObjects[CC2650STK_UDMACOUNT];
892 
893 const UDMACC26XX_HWAttrs udmaHWAttrs[CC2650STK_UDMACOUNT] = {
894  {
895  .baseAddr = UDMA0_BASE,
896  .powerMngrId = PowerCC26XX_PERIPH_UDMA,
897  .intNum = INT_DMA_ERR,
898  .intPriority = ~0
899  }
900 };
901 
902 const UDMACC26XX_Config UDMACC26XX_config[CC2650STK_UDMACOUNT] = {
903  {
904  .object = &udmaObjects[CC2650STK_UDMA0],
905  .hwAttrs = &udmaHWAttrs[CC2650STK_UDMA0]
906  },
907 };
908 
909 /*
910  * =============================== Watchdog ===============================
911  */
912 #include <ti/drivers/Watchdog.h>
913 #include <ti/drivers/watchdog/WatchdogCC26XX.h>
914 
915 WatchdogCC26XX_Object watchdogCC26XXObjects[CC2650STK_WATCHDOGCOUNT];
916 
917 const WatchdogCC26XX_HWAttrs watchdogCC26XXHWAttrs[CC2650STK_WATCHDOGCOUNT] = {
918  {
919  .baseAddr = WDT_BASE,
920  .reloadValue = 1000 /* Reload value in milliseconds */
921  },
922 };
923 
924 const Watchdog_Config Watchdog_config[CC2650STK_WATCHDOGCOUNT] = {
925  {
926  .fxnTablePtr = &WatchdogCC26XX_fxnTable,
927  .object = &watchdogCC26XXObjects[CC2650STK_WATCHDOG0],
928  .hwAttrs = &watchdogCC26XXHWAttrs[CC2650STK_WATCHDOG0]
929  },
930 };
931 
932 const uint_least8_t Watchdog_count = CC2650STK_WATCHDOGCOUNT;
933 
934 /*
935  * Board-specific initialization function to disable external flash.
936  * This function is defined in the file CC2650STK_fxns.c
937  */
938 extern void Board_initHook(void);
939 
940 /*
941  * ======== CC2650STK_initGeneral ========
942  */
944 {
945  Power_init();
946 
947  if (PIN_init(BoardGpioInitTable) != PIN_SUCCESS) {
948  /* Error with PIN_init */
949  while (1);
950  }
951 
952  /* Perform board-specific initialization */
953  Board_initHook();
954 }
955 
956 /*
957  * ======== Board_init ========
958  */
959 void Board_init(void)
960 {
962 }
#define SSI1_BASE
Base address for SSI1.
Definition: ssi.h:59
============================================================================
#define SSI0_BASE
Base address for SSI0.
Definition: ssi.h:58
void CC2650STK_initGeneral(void)
Initialize the general board specific settings.
Definition: CC2650STK.c:943
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