1 /*
2 */
4 /*
5 * ====================== CC2650_I3MOTE.c ===================================
6 * This file is responsible for setting up the board specific items for the
7 * CC2650 LaunchPad.
8 */
11 /*
12 * ====================== Includes ============================================
13 */
14 #include <xdc/std.h>
15 #include <xdc/runtime/System.h>
17 #include <ti/sysbios/family/arm/m3/Hwi.h>
18 #include <ti/drivers/PIN.h>
19 #include <ti/drivers/pin/PINCC26XX.h>
20 #include <ti/drivers/PWM.h>
21 #include <ti/drivers/pwm/PWMTimerCC26XX.h>
22 #include <ti/drivers/timer/GPTimerCC26XX.h>
23 #include <ti/drivers/Power.h>
24 #include <ti/drivers/power/PowerCC26XX.h>
26 #include <inc/hw_memmap.h>
27 #include <inc/hw_ints.h>
28 #include <driverlib/ioc.h>
29 #include <driverlib/udma.h>
31 #include <Board.h>
33 /*
34 * ========================= IO driver initialization =========================
35 * From main, PIN_init(BoardGpioInitTable) should be called to setup safe
36 * settings for this board.
37 * When a pin is allocated and then de-allocated, it will revert to the state
38 * configured in this table.
39 */
40 /* Place into subsections to allow the TI linker to remove items properly */
41 #if defined(__TI_COMPILER_VERSION__)
42 #pragma DATA_SECTION(BoardGpioInitTable, ".const:BoardGpioInitTable")
43 #pragma DATA_SECTION(PINCC26XX_hwAttrs, ".const:PINCC26XX_hwAttrs")
44 #endif
46 const PIN_Config BoardGpioInitTable[] = {
48 Board_LEDR | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
49 Board_LEDG | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, /* LED initially off */
50 Board_BTN1 | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_BOTHEDGES | PIN_HYSTERESIS, /* Button is active low */
51 Board_UART_RX | PIN_INPUT_EN | PIN_PULLDOWN, /* UART RX via debugger back channel */
52 Board_UART_TX | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL, /* UART TX via debugger back channel */
53 PIN_TERMINATE
54 };
56 const PINCC26XX_HWAttrs PINCC26XX_hwAttrs = {
57 .intPriority = ~0,
58 .swiPriority = 0
59 };
60 /*============================================================================*/
62 /*
63 * ============================= Power begin ==================================
64 */
65 /* Place into subsections to allow the TI linker to remove items properly */
66 #if defined(__TI_COMPILER_VERSION__)
67 #pragma DATA_SECTION(PowerCC26XX_config, ".const:PowerCC26XX_config")
68 #endif
69 const PowerCC26XX_Config PowerCC26XX_config = {
70 .policyInitFxn = NULL,
71 .policyFxn = &PowerCC26XX_standbyPolicy,
72 .calibrateFxn = &PowerCC26XX_calibrate,
73 .enablePolicy = TRUE,
74 .calibrateRCOSC_LF = TRUE,
75 .calibrateRCOSC_HF = TRUE,
76 };
77 /*
78 * ============================= Power end ====================================
79 */
81 /*
82 * ============================= UART begin ===================================
83 */
84 /* Place into subsections to allow the TI linker to remove items properly */
85 #if defined(__TI_COMPILER_VERSION__)
86 #pragma DATA_SECTION(UART_config, ".const:UART_config")
87 #pragma DATA_SECTION(uartCC26XXHWAttrs, ".const:uartCC26XXHWAttrs")
88 #endif
90 /* Include drivers */
91 #include <ti/drivers/UART.h>
92 #include <ti/drivers/uart/UARTCC26XX.h>
94 /* UART objects */
95 UARTCC26XX_Object uartCC26XXObjects[CC2650_I3MOTE_UARTCOUNT];
97 /* UART hardware parameter structure, also used to assign UART pins */
98 const UARTCC26XX_HWAttrsV1 uartCC26XXHWAttrs[CC2650_I3MOTE_UARTCOUNT] = {
99 {
100 .baseAddr = UART0_BASE,
101 .powerMngrId = PowerCC26XX_PERIPH_UART0,
102 .intNum = INT_UART0_COMB,
103 .intPriority = ~0,
104 .swiPriority = 0,
105 .txPin = Board_UART_TX,
106 .rxPin = Board_UART_RX,
107 .ctsPin = PIN_UNASSIGNED,
108 .rtsPin = PIN_UNASSIGNED
109 }
110 };
112 /* UART configuration structure */
113 const UART_Config UART_config[] = {
114 {
115 .fxnTablePtr = &UARTCC26XX_fxnTable,
116 .object = &uartCC26XXObjects[0],
117 .hwAttrs = &uartCC26XXHWAttrs[0]
118 },
119 {NULL, NULL, NULL}
120 };
121 /*
122 * ============================= UART end =====================================
123 */
125 /*
126 * ============================= UDMA begin ===================================
127 */
128 /* Place into subsections to allow the TI linker to remove items properly */
129 #if defined(__TI_COMPILER_VERSION__)
130 #pragma DATA_SECTION(UDMACC26XX_config, ".const:UDMACC26XX_config")
131 #pragma DATA_SECTION(udmaHWAttrs, ".const:udmaHWAttrs")
132 #endif
134 /* Include drivers */
135 #include <ti/drivers/dma/UDMACC26XX.h>
137 /* UDMA objects */
138 UDMACC26XX_Object udmaObjects[CC2650_I3MOTE_UDMACOUNT];
140 /* UDMA configuration structure */
141 const UDMACC26XX_HWAttrs udmaHWAttrs[CC2650_I3MOTE_UDMACOUNT] = {
142 {
143 .baseAddr = UDMA0_BASE,
144 .powerMngrId = PowerCC26XX_PERIPH_UDMA,
145 .intNum = INT_DMA_ERR,
146 .intPriority = ~0
147 }
148 };
150 /* UDMA configuration structure */
151 const UDMACC26XX_Config UDMACC26XX_config[] = {
152 {
153 .object = &udmaObjects[0],
154 .hwAttrs = &udmaHWAttrs[0]
155 },
156 {NULL, NULL}
157 };
158 /*
159 * ============================= UDMA end =====================================
160 */
162 /*
163 * ========================== SPI DMA begin ===================================
164 */
165 /* Place into subsections to allow the TI linker to remove items properly */
166 #if defined(__TI_COMPILER_VERSION__)
167 #pragma DATA_SECTION(SPI_config, ".const:SPI_config")
168 #pragma DATA_SECTION(spiCC26XXDMAHWAttrs, ".const:spiCC26XXDMAHWAttrs")
169 #endif
171 /* Include drivers */
172 #include <ti/drivers/spi/SPICC26XXDMA.h>
174 /* SPI objects */
175 SPICC26XXDMA_Object spiCC26XXDMAObjects[CC2650_I3MOTE_SPICOUNT];
177 /* SPI configuration structure, describing which pins are to be used */
178 const SPICC26XXDMA_HWAttrsV1 spiCC26XXDMAHWAttrs[CC2650_I3MOTE_SPICOUNT] = {
179 {
180 .baseAddr = SSI0_BASE,
181 .intNum = INT_SSI0_COMB,
182 .intPriority = ~0,
183 .swiPriority = 0,
184 .powerMngrId = PowerCC26XX_PERIPH_SSI0,
185 .defaultTxBufValue = 0,
186 .rxChannelBitMask = 1<<UDMA_CHAN_SSI0_RX,
187 .txChannelBitMask = 1<<UDMA_CHAN_SSI0_TX,
188 .mosiPin = Board_SPI0_MOSI,
189 .misoPin = Board_SPI0_MISO,
190 .clkPin = Board_SPI0_CLK,
191 .csnPin = Board_SPI0_CSN
192 },
193 {
194 .baseAddr = SSI1_BASE,
195 .intNum = INT_SSI1_COMB,
196 .intPriority = ~0,
197 .swiPriority = 0,
198 .powerMngrId = PowerCC26XX_PERIPH_SSI1,
199 .defaultTxBufValue = 0,
200 .rxChannelBitMask = 1<<UDMA_CHAN_SSI1_RX,
201 .txChannelBitMask = 1<<UDMA_CHAN_SSI1_TX,
202 .mosiPin = Board_SPI1_MOSI,
203 .misoPin = Board_SPI1_MISO,
204 .clkPin = Board_SPI1_CLK,
205 .csnPin = Board_SPI1_CSN
206 }
207 };
209 /* SPI configuration structure */
210 const SPI_Config SPI_config[] = {
211 {
212 .fxnTablePtr = &SPICC26XXDMA_fxnTable,
213 .object = &spiCC26XXDMAObjects[0],
214 .hwAttrs = &spiCC26XXDMAHWAttrs[0]
215 },
216 {
217 .fxnTablePtr = &SPICC26XXDMA_fxnTable,
218 .object = &spiCC26XXDMAObjects[1],
219 .hwAttrs = &spiCC26XXDMAHWAttrs[1]
220 },
221 {NULL, NULL, NULL}
222 };
223 /*
224 * ========================== SPI DMA end =====================================
225 */
228 /*
229 * ============================= I2C Begin=====================================
230 */
231 /* Place into subsections to allow the TI linker to remove items properly */
232 #if defined(__TI_COMPILER_VERSION__)
233 #pragma DATA_SECTION(I2C_config, ".const:I2C_config")
234 #pragma DATA_SECTION(i2cCC26xxHWAttrs, ".const:i2cCC26xxHWAttrs")
235 #endif
237 /* Include drivers */
238 #include <ti/drivers/i2c/I2CCC26XX.h>
240 /* I2C objects */
241 I2CCC26XX_Object i2cCC26xxObjects[CC2650_I3MOTE_I2CCOUNT];
243 /* I2C configuration structure, describing which pins are to be used */
244 const I2CCC26XX_HWAttrsV1 i2cCC26xxHWAttrs[CC2650_I3MOTE_I2CCOUNT] = {
245 {
246 .baseAddr = I2C0_BASE,
247 .powerMngrId = PowerCC26XX_PERIPH_I2C0,
248 .intNum = INT_I2C_IRQ,
249 .intPriority = ~0,
250 .swiPriority = 0,
251 .sdaPin = Board_I2C0_SDA0,
252 .sclPin = Board_I2C0_SCL0,
253 }
254 };
256 /* I2C configuration structure */
257 const I2C_Config I2C_config[] = {
258 {
259 .fxnTablePtr = &I2CCC26XX_fxnTable,
260 .object = &i2cCC26xxObjects[0],
261 .hwAttrs = &i2cCC26xxHWAttrs[0]
262 },
263 {NULL, NULL, NULL}
264 };
265 /*
266 * ========================== I2C end =========================================
267 */
269 /*
270 * ========================== Crypto begin ====================================
271 * NOTE: The Crypto implementation should be considered experimental
272 * and not validated!
273 */
274 /* Place into subsections to allow the TI linker to remove items properly */
275 #if defined(__TI_COMPILER_VERSION__)
276 #pragma DATA_SECTION(CryptoCC26XX_config, ".const:CryptoCC26XX_config")
277 #pragma DATA_SECTION(cryptoCC26XXHWAttrs, ".const:cryptoCC26XXHWAttrs")
278 #endif
280 /* Include drivers */
281 #include <ti/drivers/crypto/CryptoCC26XX.h>
283 /* Crypto objects */
284 CryptoCC26XX_Object cryptoCC26XXObjects[CC2650_I3MOTE_CRYPTOCOUNT];
286 /* Crypto configuration structure, describing which pins are to be used */
287 const CryptoCC26XX_HWAttrs cryptoCC26XXHWAttrs[CC2650_I3MOTE_CRYPTOCOUNT] = {
288 {
289 .baseAddr = CRYPTO_BASE,
290 .powerMngrId = PowerCC26XX_PERIPH_CRYPTO,
291 .intNum = INT_CRYPTO_RESULT_AVAIL_IRQ,
292 .intPriority = ~0,
293 }
294 };
296 /* Crypto configuration structure */
297 const CryptoCC26XX_Config CryptoCC26XX_config[] = {
298 {
299 .object = &cryptoCC26XXObjects[0],
300 .hwAttrs = &cryptoCC26XXHWAttrs[0]
301 },
302 {NULL, NULL}
303 };
304 /*
305 * ========================== Crypto end ======================================
306 */
309 /*
310 * ========================= RF driver begin ==================================
311 */
312 /* Place into subsections to allow the TI linker to remove items properly */
313 #if defined(__TI_COMPILER_VERSION__)
314 #pragma DATA_SECTION(RFCC26XX_hwAttrs, ".const:RFCC26XX_hwAttrs")
315 #endif
317 /* Include drivers */
318 #include <ti/drivers/rf/RF.h>
320 /* RF hwi and swi priority */
321 const RFCC26XX_HWAttrs RFCC26XX_hwAttrs = {
322 .hwiCpe0Priority = ~0,
323 .hwiHwPriority = ~0,
324 .swiCpe0Priority = 0,
325 .swiHwPriority = 0,
326 };
328 /*
329 * ========================== RF driver end ===================================
330 */
332 /*
333 * ========================= Display begin ====================================
334 */
336 /*
337 * ========================= Display end ======================================
338 */
340 /*
341 * ============================ GPTimer begin =================================
342 * Remove unused entries to reduce flash usage both in Board.c and Board.h
343 */
344 /* Place into subsections to allow the TI linker to remove items properly */
345 #if defined(__TI_COMPILER_VERSION__)
346 #pragma DATA_SECTION(GPTimerCC26XX_config, ".const:GPTimerCC26XX_config")
347 #pragma DATA_SECTION(gptimerCC26xxHWAttrs, ".const:gptimerCC26xxHWAttrs")
348 #endif
350 /* GPTimer hardware attributes, one per timer part (Timer 0A, 0B, 1A, 1B..) */
351 const GPTimerCC26XX_HWAttrs gptimerCC26xxHWAttrs[CC2650_I3MOTE_GPTIMERPARTSCOUNT] = {
352 { .baseAddr = GPT0_BASE, .intNum = INT_GPT0A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT0, .pinMux = GPT_PIN_0A, },
353 { .baseAddr = GPT0_BASE, .intNum = INT_GPT0B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT0, .pinMux = GPT_PIN_0B, },
354 { .baseAddr = GPT1_BASE, .intNum = INT_GPT1A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT1, .pinMux = GPT_PIN_1A, },
355 { .baseAddr = GPT1_BASE, .intNum = INT_GPT1B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT1, .pinMux = GPT_PIN_1B, },
356 { .baseAddr = GPT2_BASE, .intNum = INT_GPT2A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT2, .pinMux = GPT_PIN_2A, },
357 { .baseAddr = GPT2_BASE, .intNum = INT_GPT2B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT2, .pinMux = GPT_PIN_2B, },
358 { .baseAddr = GPT3_BASE, .intNum = INT_GPT3A, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT3, .pinMux = GPT_PIN_3A, },
359 { .baseAddr = GPT3_BASE, .intNum = INT_GPT3B, .intPriority = (~0), .powerMngrId = PowerCC26XX_PERIPH_GPT3, .pinMux = GPT_PIN_3B, },
360 };
362 /* GPTimer objects, one per full-width timer (A+B) (Timer 0, Timer 1..) */
363 GPTimerCC26XX_Object gptimerCC26XXObjects[CC2650_I3MOTE_GPTIMERCOUNT];
365 /* GPTimer configuration (used as GPTimer_Handle by driver and application) */
366 const GPTimerCC26XX_Config GPTimerCC26XX_config[CC2650_I3MOTE_GPTIMERPARTSCOUNT] = {
367 { &gptimerCC26XXObjects[0], &gptimerCC26xxHWAttrs[0], GPT_A },
368 { &gptimerCC26XXObjects[0], &gptimerCC26xxHWAttrs[1], GPT_B },
369 { &gptimerCC26XXObjects[1], &gptimerCC26xxHWAttrs[2], GPT_A },
370 { &gptimerCC26XXObjects[1], &gptimerCC26xxHWAttrs[3], GPT_B },
371 { &gptimerCC26XXObjects[2], &gptimerCC26xxHWAttrs[4], GPT_A },
372 { &gptimerCC26XXObjects[2], &gptimerCC26xxHWAttrs[5], GPT_B },
373 { &gptimerCC26XXObjects[3], &gptimerCC26xxHWAttrs[6], GPT_A },
374 { &gptimerCC26XXObjects[3], &gptimerCC26xxHWAttrs[7], GPT_B },
375 };
377 /*
378 * ============================ GPTimer end ===================================
379 */
383 /*
384 * ============================= PWM begin ====================================
385 * Remove unused entries to reduce flash usage both in Board.c and Board.h
386 */
387 /* Place into subsections to allow the TI linker to remove items properly */
388 #if defined(__TI_COMPILER_VERSION__)
389 #pragma DATA_SECTION(PWM_config, ".const:PWM_config")
390 #pragma DATA_SECTION(pwmtimerCC26xxHWAttrs, ".const:pwmtimerCC26xxHWAttrs")
391 #endif
393 /* PWM configuration, one per PWM output. */
394 PWMTimerCC26XX_HwAttrs pwmtimerCC26xxHWAttrs[CC2650_I3MOTE_PWMCOUNT] = {
395 { .pwmPin = Board_PWMPIN0, .gpTimerUnit = Board_GPTIMER0A },
396 { .pwmPin = Board_PWMPIN1, .gpTimerUnit = Board_GPTIMER0B },
397 { .pwmPin = Board_PWMPIN2, .gpTimerUnit = Board_GPTIMER1A },
398 { .pwmPin = Board_PWMPIN3, .gpTimerUnit = Board_GPTIMER1B },
399 { .pwmPin = Board_PWMPIN4, .gpTimerUnit = Board_GPTIMER2A },
400 { .pwmPin = Board_PWMPIN5, .gpTimerUnit = Board_GPTIMER2B },
401 { .pwmPin = Board_PWMPIN6, .gpTimerUnit = Board_GPTIMER3A },
402 { .pwmPin = Board_PWMPIN7, .gpTimerUnit = Board_GPTIMER3B },
403 };
405 /* PWM object, one per PWM output */
406 PWMTimerCC26XX_Object pwmtimerCC26xxObjects[CC2650_I3MOTE_PWMCOUNT];
408 extern const PWM_FxnTable PWMTimerCC26XX_fxnTable;
410 /* PWM configuration (used as PWM_Handle by driver and application) */
411 const PWM_Config PWM_config[CC2650_I3MOTE_PWMCOUNT + 1] = {
412 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[0], &pwmtimerCC26xxHWAttrs[0] },
413 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[1], &pwmtimerCC26xxHWAttrs[1] },
414 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[2], &pwmtimerCC26xxHWAttrs[2] },
415 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[3], &pwmtimerCC26xxHWAttrs[3] },
416 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[4], &pwmtimerCC26xxHWAttrs[4] },
417 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[5], &pwmtimerCC26xxHWAttrs[5] },
418 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[6], &pwmtimerCC26xxHWAttrs[6] },
419 { &PWMTimerCC26XX_fxnTable, &pwmtimerCC26xxObjects[7], &pwmtimerCC26xxHWAttrs[7] },
420 { NULL, NULL, NULL }
421 };
424 /*
425 * ============================= PWM end ======================================
426 */
428 /*
429 * ========================== ADCBuf begin =========================================
430 */
431 /* Place into subsections to allow the TI linker to remove items properly */
432 #if defined(__TI_COMPILER_VERSION__)
433 #pragma DATA_SECTION(ADCBuf_config, ".const:ADCBuf_config")
434 #pragma DATA_SECTION(adcBufCC26xxHWAttrs, ".const:adcBufCC26xxHWAttrs")
435 #pragma DATA_SECTION(ADCBufCC26XX_adcChannelLut, ".const:ADCBufCC26XX_adcChannelLut")
436 #endif
438 /* Include drivers */
439 #include <ti/drivers/ADCBuf.h>
440 #include <ti/drivers/adcbuf/ADCBufCC26XX.h>
442 /* ADCBuf objects */
443 ADCBufCC26XX_Object adcBufCC26xxObjects[CC2650_I3MOTE_ADCBufCOUNT];
445 /*
446 * This table converts a virtual adc channel into a dio and internal analogue input signal.
447 * This table is necessary for the functioning of the adcBuf driver.
448 * Comment out unused entries to save flash.
449 * Dio and internal signal pairs are hardwired. Do not remap them in the table. You may reorder entire entries though.
450 * The mapping of dio and internal signals is package dependent.
451 */
452 const ADCBufCC26XX_AdcChannelLutEntry ADCBufCC26XX_adcChannelLut[] = {
453 {PIN_UNASSIGNED, ADC_COMPB_IN_VDDS},
454 {PIN_UNASSIGNED, ADC_COMPB_IN_DCOUPL},
455 {PIN_UNASSIGNED, ADC_COMPB_IN_VSS},
456 //{Board_DIO23_ANALOG, ADC_COMPB_IN_AUXIO7},
457 //{Board_DIO24_ANALOG, ADC_COMPB_IN_AUXIO6},
458 //{Board_DIO25_ANALOG, ADC_COMPB_IN_AUXIO5},
459 //{Board_DIO26_ANALOG, ADC_COMPB_IN_AUXIO4},
460 //{Board_DIO27_ANALOG, ADC_COMPB_IN_AUXIO3},
461 //{Board_DIO28_ANALOG, ADC_COMPB_IN_AUXIO2},
462 //{Board_DIO29_ANALOG, ADC_COMPB_IN_AUXIO1},
463 //{Board_DIO30_ANALOG, ADC_COMPB_IN_AUXIO0},
464 };
466 const ADCBufCC26XX_HWAttrs adcBufCC26xxHWAttrs[CC2650_I3MOTE_ADCBufCOUNT] = {
467 {
468 .intPriority = ~0,
469 .swiPriority = 0,
470 .adcChannelLut = ADCBufCC26XX_adcChannelLut,
471 .gpTimerUnit = Board_GPTIMER0A,
472 .gptDMAChannelMask = 1 << UDMA_CHAN_TIMER0_A,
473 }
474 };
476 const ADCBuf_Config ADCBuf_config[] = {
477 {&ADCBufCC26XX_fxnTable, &adcBufCC26xxObjects[0], &adcBufCC26xxHWAttrs[0]},
478 {NULL, NULL, NULL},
479 };
480 /*
481 * ========================== ADCBuf end =========================================
482 */
486 /*
487 * ========================== ADC begin =========================================
488 */
489 /* Place into subsections to allow the TI linker to remove items properly */
490 #if defined(__TI_COMPILER_VERSION__)
491 #pragma DATA_SECTION(ADC_config, ".const:ADC_config")
492 #pragma DATA_SECTION(adcCC26xxHWAttrs, ".const:adcCC26xxHWAttrs")
493 #endif
495 /* Include drivers */
496 #include <ti/drivers/ADC.h>
497 #include <ti/drivers/adc/ADCCC26XX.h>
499 /* ADC objects */
500 ADCCC26XX_Object adcCC26xxObjects[CC2650_I3MOTE_ADCCOUNT];
503 const ADCCC26XX_HWAttrs adcCC26xxHWAttrs[CC2650_I3MOTE_ADCCOUNT] = {
504 {
505 .adcDIO = Board_DIO23_ANALOG,
506 .adcCompBInput = ADC_COMPB_IN_AUXIO7,
507 .refSource = ADCCC26XX_FIXED_REFERENCE,
508 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
509 .inputScalingEnabled = true,
510 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
511 },
512 {
513 .adcDIO = Board_DIO24_ANALOG,
514 .adcCompBInput = ADC_COMPB_IN_AUXIO6,
515 .refSource = ADCCC26XX_FIXED_REFERENCE,
516 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
517 .inputScalingEnabled = true,
518 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
519 },
520 {
521 .adcDIO = Board_DIO25_ANALOG,
522 .adcCompBInput = ADC_COMPB_IN_AUXIO5,
523 .refSource = ADCCC26XX_FIXED_REFERENCE,
524 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
525 .inputScalingEnabled = true,
526 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
527 },
528 {
529 .adcDIO = Board_DIO26_ANALOG,
530 .adcCompBInput = ADC_COMPB_IN_AUXIO4,
531 .refSource = ADCCC26XX_FIXED_REFERENCE,
532 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
533 .inputScalingEnabled = true,
534 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
535 },
536 {
537 .adcDIO = Board_DIO27_ANALOG,
538 .adcCompBInput = ADC_COMPB_IN_AUXIO3,
539 .refSource = ADCCC26XX_FIXED_REFERENCE,
540 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
541 .inputScalingEnabled = true,
542 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
543 },
544 {
545 .adcDIO = Board_DIO28_ANALOG,
546 .adcCompBInput = ADC_COMPB_IN_AUXIO2,
547 .refSource = ADCCC26XX_FIXED_REFERENCE,
548 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
549 .inputScalingEnabled = true,
550 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
551 },
552 {
553 .adcDIO = Board_DIO29_ANALOG,
554 .adcCompBInput = ADC_COMPB_IN_AUXIO1,
555 .refSource = ADCCC26XX_FIXED_REFERENCE,
556 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
557 .inputScalingEnabled = true,
558 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
559 },
560 {
561 .adcDIO = Board_DIO30_ANALOG,
562 .adcCompBInput = ADC_COMPB_IN_AUXIO0,
563 .refSource = ADCCC26XX_FIXED_REFERENCE,
564 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_10P9_MS,
565 .inputScalingEnabled = true,
566 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
567 },
568 {
569 .adcDIO = PIN_UNASSIGNED,
570 .adcCompBInput = ADC_COMPB_IN_DCOUPL,
571 .refSource = ADCCC26XX_FIXED_REFERENCE,
572 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
573 .inputScalingEnabled = true,
574 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
575 },
576 {
577 .adcDIO = PIN_UNASSIGNED,
578 .adcCompBInput = ADC_COMPB_IN_VSS,
579 .refSource = ADCCC26XX_FIXED_REFERENCE,
580 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
581 .inputScalingEnabled = true,
582 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
583 },
584 {
585 .adcDIO = PIN_UNASSIGNED,
586 .adcCompBInput = ADC_COMPB_IN_VDDS,
587 .refSource = ADCCC26XX_FIXED_REFERENCE,
588 .samplingDuration = ADCCC26XX_SAMPLING_DURATION_2P7_US,
589 .inputScalingEnabled = true,
590 .triggerSource = ADCCC26XX_TRIGGER_MANUAL
591 }
592 };
594 const ADC_Config ADC_config[] = {
595 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[0], &adcCC26xxHWAttrs[0]},
596 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[1], &adcCC26xxHWAttrs[1]},
597 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[2], &adcCC26xxHWAttrs[2]},
598 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[3], &adcCC26xxHWAttrs[3]},
599 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[4], &adcCC26xxHWAttrs[4]},
600 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[5], &adcCC26xxHWAttrs[5]},
601 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[6], &adcCC26xxHWAttrs[6]},
602 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[7], &adcCC26xxHWAttrs[7]},
603 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[8], &adcCC26xxHWAttrs[8]},
604 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[9], &adcCC26xxHWAttrs[9]},
605 {&ADCCC26XX_fxnTable, &adcCC26xxObjects[10], &adcCC26xxHWAttrs[10]},
606 {NULL, NULL, NULL},
607 };
609 /*
610 * ========================== ADC end =========================================
611 */