summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBorja Martinez2016-10-04 15:13:37 -0500
committerBorja Martinez2016-10-04 15:13:37 -0500
commitf611ddb66e2c029cf20b6dc1d2c6e0b827a01637 (patch)
treef0e0e98bd2c549ef8f125e743126e6271f2a1330
parentd57fedb1cc6b34edf15ce1064e6d2bcf49212b50 (diff)
downloadi3-mote-f611ddb66e2c029cf20b6dc1d2c6e0b827a01637.tar.gz
i3-mote-f611ddb66e2c029cf20b6dc1d2c6e0b827a01637.tar.xz
i3-mote-f611ddb66e2c029cf20b6dc1d2c6e0b827a01637.zip
Created Test_CC2650_3wSPI_Slave_MSP432_Master
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/Board.h87
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/CC2650_I3M.cmd88
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/cc2650_I3M.cfg617
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/ccfg.c57
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/main.c155
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/uart_printf.c173
-rw-r--r--Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/uart_printf.h81
7 files changed, 1258 insertions, 0 deletions
diff --git a/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/Board.h b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/Board.h
new file mode 100644
index 0000000..6740834
--- /dev/null
+++ b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/Board.h
@@ -0,0 +1,87 @@
1/*
2 * Copyright (c) 2015-2016, 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#ifndef __BOARD_H
34#define __BOARD_H
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40#include <ti/drivers/Power.h>
41
42#include "CC2650_I3M.h"
43
44
45/* These #defines allow us to reuse TI-RTOS across other device families */
46#define Board_LED0 Board_LEDR
47#define Board_LED1 Board_LEDG
48
49#define Board_BUTTON0 Board_BTN1
50#define Board_BUTTON1 Board_BTN2
51
52#define Board_I2C0 Board_I2C
53
54#define Board_UART0 Board_UART
55#define Board_AES0 Board_AES
56#define Board_WATCHDOG0 Board_WATCHDOG
57
58#define Board_ADC0 CC2650_I3MOTE_ADCVSS
59#define Board_ADC1 CC2650_I3MOTE_ADCVDDS
60
61#define Board_ADCBuf0 CC2650_I3MOTE_ADCBuf0
62#define Board_ADCBufChannel0 (0)
63#define Board_ADCBufChannel1 (1)
64
65#define Board_initGeneral() { \
66 Power_init(); \
67 if (PIN_init(BoardGpioInitTable) != PIN_SUCCESS) \
68 {System_abort("Error with PIN_init\n"); \
69 } \
70}
71
72#define Board_initGPIO()
73#define Board_initPWM() PWM_init()
74#define Board_initSPI() SPI_init()
75#define Board_initI2C() I2C_init()
76#define Board_initUART() UART_init()
77#define Board_initWatchdog() Watchdog_init()
78#define Board_initADCBuf() ADCBuf_init()
79#define Board_initADC() ADC_init()
80#define GPIO_toggle(n)
81#define GPIO_write(n,m)
82
83#ifdef __cplusplus
84}
85#endif
86
87#endif /* __BOARD_H */
diff --git a/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/CC2650_I3M.cmd b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/CC2650_I3M.cmd
new file mode 100644
index 0000000..c30c09f
--- /dev/null
+++ b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/CC2650_I3M.cmd
@@ -0,0 +1,88 @@
1/*
2 * Copyright (c) 2015-2016, 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 * ======== CC2650_LAUNCHXL.cmd ========
34 * CC26x0F128 PG2 linker configuration file for Code Composer Studio
35 */
36
37/* Override default entry point. */
38--entry_point ResetISR
39/* Allow main() to take args */
40--args 0x8
41/* Suppress warnings and errors: */
42/* - 10063: Warning about entry point not being _c_int00 */
43/* - 16011, 16012: 8-byte alignment errors. Observed when linking in object */
44/* files compiled using Keil (ARM compiler) */
45--diag_suppress=10063,16011,16012
46
47/* The starting address of the application. Normally the interrupt vectors */
48/* must be located at the beginning of the application. */
49#define FLASH_BASE 0x0
50#define FLASH_SIZE 0x20000
51#define RAM_BASE 0x20000000
52#define RAM_SIZE 0x5000
53
54/* System memory map */
55
56MEMORY
57{
58 /* Application stored in and executes from internal flash */
59 FLASH (RX) : origin = FLASH_BASE, length = FLASH_SIZE
60 /* Application uses internal RAM for data */
61 SRAM (RWX) : origin = RAM_BASE, length = RAM_SIZE
62}
63
64/* Section allocation in memory */
65
66SECTIONS
67{
68 .text : > FLASH
69 .const : > FLASH
70 .constdata : > FLASH
71 .rodata : > FLASH
72 .cinit : > FLASH
73 .pinit : > FLASH
74 .init_array : > FLASH
75 .emb_text : > FLASH
76 .ccfg : > FLASH (HIGH)
77
78#ifdef __TI_COMPILER_VERSION__
79#if __TI_COMPILER_VERSION__ >= 15009000
80 .TI.ramfunc : {} load=FLASH, run=SRAM, table(BINIT)
81#endif
82#endif
83 .data : > SRAM
84 .bss : > SRAM
85 .sysmem : > SRAM
86 .stack : > SRAM (HIGH)
87 .nonretenvar : > SRAM
88}
diff --git a/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/cc2650_I3M.cfg b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/cc2650_I3M.cfg
new file mode 100644
index 0000000..c4d7b01
--- /dev/null
+++ b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/cc2650_I3M.cfg
@@ -0,0 +1,617 @@
1/*
2 * Copyright (c) 2015-2016, 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
35/* ================ Boot configuration ================ */
36var Boot = xdc.useModule('ti.sysbios.family.arm.cc26xx.Boot');
37/*
38 * This module contains family specific Boot APIs and configuration settings.
39 * See the SYS/BIOS API guide for more information.
40 */
41
42
43
44/* ================ Clock configuration ================ */
45var Clock = xdc.useModule('ti.sysbios.knl.Clock');
46/*
47 * When using Power and calibrateRCOSC is set to true, this should be set to 10.
48 * The timer used by the Clock module supports TickMode_DYNAMIC. This enables us
49 * to set the tick period to 10 us without generating the overhead of additional
50 * interrupts.
51 *
52 * Note: The calibrateRCOSC parameter is set within the Power configuration
53 * structure in the "Board.c" file.
54 */
55Clock.tickPeriod = 10;
56
57
58
59/* ================ Defaults (module) configuration ================ */
60var Defaults = xdc.useModule('xdc.runtime.Defaults');
61/*
62 * A flag to allow module names to be loaded on the target. Module name
63 * strings are placed in the .const section for debugging purposes.
64 *
65 * Pick one:
66 * - true (default)
67 * Setting this parameter to true will include name strings in the .const
68 * section so that Errors and Asserts are easier to debug.
69 * - false
70 * Setting this parameter to false will reduce footprint in the .const
71 * section. As a result, Error and Assert messages will contain an
72 * "unknown module" prefix instead of the actual module name.
73 *
74 * When using BIOS in ROM:
75 * This option must be set to false.
76 */
77//Defaults.common$.namedModule = true;
78Defaults.common$.namedModule = false;
79
80
81
82/* ================ Error configuration ================ */
83var Error = xdc.useModule('xdc.runtime.Error');
84/*
85 * This function is called to handle all raised errors, but unlike
86 * Error.raiseHook, this function is responsible for completely handling the
87 * error with an appropriately initialized Error_Block.
88 *
89 * Pick one:
90 * - Error.policyDefault (default)
91 * Calls Error.raiseHook with an initialized Error_Block structure and logs
92 * the error using the module's logger.
93 * - Error.policySpin
94 * Simple alternative that traps on a while(1) loop for minimized target
95 * footprint.
96 * Using Error.policySpin, the Error.raiseHook will NOT called.
97 */
98//Error.policyFxn = Error.policyDefault;
99Error.policyFxn = Error.policySpin;
100
101/*
102 * If Error.policyFxn is set to Error.policyDefault, this function is called
103 * whenever an error is raised by the Error module.
104 *
105 * Pick one:
106 * - Error.print (default)
107 * Errors are formatted and output via System_printf() for easier
108 * debugging.
109 * - null
110 * Errors are not formatted or logged. This option reduces code footprint.
111 * - non-null function
112 * Errors invoke custom user function. See the Error module documentation
113 * for more details.
114 */
115//Error.raiseHook = Error.print;
116Error.raiseHook = null;
117//Error.raiseHook = "&myErrorFxn";
118
119/*
120 * If Error.policyFxn is set to Error.policyDefault, this option applies to the
121 * maximum number of times the Error.raiseHook function can be recursively
122 * invoked. This option limits the possibility of an infinite recursion that
123 * could lead to a stack overflow.
124 * The default value is 16.
125 */
126Error.maxDepth = 2;
127
128
129
130/* ================ Hwi configuration ================ */
131var halHwi = xdc.useModule('ti.sysbios.hal.Hwi');
132var m3Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');
133/*
134 * Checks for Hwi (system) stack overruns while in the Idle loop.
135 *
136 * Pick one:
137 * - true (default)
138 * Checks the top word for system stack overflows during the idle loop and
139 * raises an Error if one is detected.
140 * - false
141 * Disabling the runtime check improves runtime performance and yields a
142 * reduced flash footprint.
143 */
144//halHwi.checkStackFlag = true;
145halHwi.checkStackFlag = false;
146
147/*
148 * The following options alter the system's behavior when a hardware exception
149 * is detected.
150 *
151 * Pick one:
152 * - Hwi.enableException = true
153 * This option causes the default m3Hwi.excHandlerFunc function to fully
154 * decode an exception and dump the registers to the system console.
155 * This option raises errors in the Error module and displays the
156 * exception in ROV.
157 * - Hwi.enableException = false
158 * This option reduces code footprint by not decoding or printing the
159 * exception to the system console.
160 * It however still raises errors in the Error module and displays the
161 * exception in ROV.
162 * - Hwi.excHandlerFunc = null
163 * This is the most aggressive option for code footprint savings; but it
164 * can difficult to debug exceptions. It reduces flash footprint by
165 * plugging in a default while(1) trap when exception occur. This option
166 * does not raise an error with the Error module.
167 */
168//m3Hwi.enableException = true;
169//m3Hwi.enableException = false;
170m3Hwi.excHandlerFunc = null;
171
172/*
173 * Enable hardware exception generation when dividing by zero.
174 *
175 * Pick one:
176 * - 0 (default)
177 * Disables hardware exceptions when dividing by zero
178 * - 1
179 * Enables hardware exceptions when dividing by zero
180 */
181m3Hwi.nvicCCR.DIV_0_TRP = 0;
182//m3Hwi.nvicCCR.DIV_0_TRP = 1;
183
184/*
185 * Enable hardware exception generation for invalid data alignment.
186 *
187 * Pick one:
188 * - 0 (default)
189 * Disables hardware exceptions for data alignment
190 * - 1
191 * Enables hardware exceptions for data alignment
192 */
193m3Hwi.nvicCCR.UNALIGN_TRP = 0;
194//m3Hwi.nvicCCR.UNALIGN_TRP = 1;
195
196/*
197 * Assign an address for the reset vector.
198 *
199 * Default is 0x0, which is the start of Flash. Ordinarily this setting should
200 * not be changed.
201 */
202m3Hwi.resetVectorAddress = 0x0;
203
204/*
205 * Assign an address for the vector table in RAM.
206 *
207 * The default is the start of RAM. This table is placed in RAM so interrupts
208 * can be added at runtime.
209 *
210 * Note: To change, verify address in the device specific datasheets'
211 * memory map.
212 */
213m3Hwi.vectorTableAddress = 0x20000000;
214
215
216
217/* ================ Idle configuration ================ */
218var Idle = xdc.useModule('ti.sysbios.knl.Idle');
219/*
220 * The Idle module is used to specify a list of functions to be called when no
221 * other tasks are running in the system.
222 *
223 * Functions added here will be run continuously within the idle task.
224 *
225 * Function signature:
226 * Void func(Void);
227 */
228//Idle.addFunc("&myIdleFunc");
229Idle.addFunc('&uartPrintf_flush'); // BMH flushing function.
230
231
232/* ================ Kernel (SYS/BIOS) configuration ================ */
233var BIOS = xdc.useModule('ti.sysbios.BIOS');
234/*
235 * Enable asserts in the BIOS library.
236 *
237 * Pick one:
238 * - true (default)
239 * Enables asserts for debugging purposes.
240 * - false
241 * Disables asserts for a reduced code footprint and better performance.
242 *
243 * When using BIOS in ROM:
244 * This option must be set to false.
245 */
246//BIOS.assertsEnabled = true;
247BIOS.assertsEnabled = false;
248
249/*
250 * Specify default heap size for BIOS.
251 */
252BIOS.heapSize = 1024;
253
254/*
255 * Specify default CPU Frequency.
256 */
257BIOS.cpuFreq.lo = 48000000;
258
259/*
260 * A flag to determine if xdc.runtime sources are to be included in a custom
261 * built BIOS library.
262 *
263 * Pick one:
264 * - false (default)
265 * The pre-built xdc.runtime library is provided by the respective target
266 * used to build the application.
267 * - true
268 * xdc.runtime library sources are to be included in the custom BIOS
269 * library. This option yields the most efficient library in both code
270 * footprint and runtime performance.
271 */
272//BIOS.includeXdcRuntime = false;
273BIOS.includeXdcRuntime = true;
274
275/*
276 * The SYS/BIOS runtime is provided in the form of a library that is linked
277 * with the application. Several forms of this library are provided with the
278 * SYS/BIOS product.
279 *
280 * Pick one:
281 * - BIOS.LibType_Custom
282 * Custom built library that is highly optimized for code footprint and
283 * runtime performance.
284 * - BIOS.LibType_Debug
285 * Custom built library that is non-optimized that can be used to
286 * single-step through APIs with a debugger.
287 *
288 */
289BIOS.libType = BIOS.LibType_Custom;
290//BIOS.libType = BIOS.LibType_Debug;
291
292/*
293 * Runtime instance creation enable flag.
294 *
295 * Pick one:
296 * - true (default)
297 * Allows Mod_create() and Mod_delete() to be called at runtime which
298 * requires a default heap for dynamic memory allocation.
299 * - false
300 * Reduces code footprint by disallowing Mod_create() and Mod_delete() to
301 * be called at runtime. Object instances are constructed via
302 * Mod_construct() and destructed via Mod_destruct().
303 *
304 * When using BIOS in ROM:
305 * This option must be set to true.
306 */
307BIOS.runtimeCreatesEnabled = true;
308//BIOS.runtimeCreatesEnabled = false;
309
310/*
311 * Enable logs in the BIOS library.
312 *
313 * Pick one:
314 * - true (default)
315 * Enables logs for debugging purposes.
316 * - false
317 * Disables logging for reduced code footprint and improved runtime
318 * performance.
319 *
320 * When using BIOS in ROM:
321 * This option must be set to false.
322 */
323//BIOS.logsEnabled = true;
324BIOS.logsEnabled = false;
325
326
327
328/* ================ Memory configuration ================ */
329var Memory = xdc.useModule('xdc.runtime.Memory');
330/*
331 * The Memory module itself simply provides a common interface for any
332 * variety of system and application specific memory management policies
333 * implemented by the IHeap modules(Ex. HeapMem, HeapBuf).
334 */
335
336
337
338/* ================ Program configuration ================ */
339/*
340 * Program.stack is ignored with IAR. Use the project options in
341 * IAR Embedded Workbench to alter the system stack size.
342 */
343if (!Program.build.target.$name.match(/iar/)) {
344 /*
345 * Reducing the system stack size (used by ISRs and Swis) to reduce
346 * RAM usage.
347 */
348 Program.stack = 768;
349}
350
351
352
353/*
354 * Uncomment to enable Semihosting for GNU targets to print to the CCS console.
355 * Please read the following TIRTOS Wiki page for more information on Semihosting:
356 * http://processors.wiki.ti.com/index.php/TI-RTOS_Examples_SemiHosting
357 */
358
359if (Program.build.target.$name.match(/gnu/)) {
360 //var SemiHost = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
361}
362
363/* ================ ROM configuration ================ */
364/*
365 * To use BIOS in flash, comment out the code block below.
366 */
367var ROM = xdc.useModule('ti.sysbios.rom.ROM');
368if (Program.cpu.deviceName.match(/CC26/)) {
369 ROM.romName = ROM.CC2650;
370}
371else if (Program.cpu.deviceName.match(/CC13/)) {
372 ROM.romName = ROM.CC1350;
373}
374
375
376
377/* ================ Semaphore configuration ================ */
378var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
379/*
380 * Enables global support for Task priority pend queuing.
381 *
382 * Pick one:
383 * - true (default)
384 * This allows pending tasks to be serviced based on their task priority.
385 * - false
386 * Pending tasks are services based on first in, first out basis.
387 *
388 * When using BIOS in ROM:
389 * This option must be set to false.
390 */
391//Semaphore.supportsPriority = true;
392Semaphore.supportsPriority = false;
393
394/*
395 * Allows for the implicit posting of events through the semaphore,
396 * disable for additional code saving.
397 *
398 * Pick one:
399 * - true
400 * This allows the Semaphore module to post semaphores and events
401 * simultaneously.
402 * - false (default)
403 * Events must be explicitly posted to unblock tasks.
404 *
405 * When using BIOS in ROM:
406 * This option must be set to false.
407 */
408//Semaphore.supportsEvents = true;
409Semaphore.supportsEvents = false;
410
411
412
413/* ================ Swi configuration ================ */
414var Swi = xdc.useModule('ti.sysbios.knl.Swi');
415/*
416 * A software interrupt is an object that encapsulates a function to be
417 * executed and a priority. Software interrupts are prioritized, preempt tasks
418 * and are preempted by hardware interrupt service routines.
419 *
420 * This module is included to allow Swi's in a users' application.
421 */
422
423/*
424 * Reduce the number of swi priorities from the default of 16.
425 * Decreasing the number of swi priorities yields memory savings.
426 */
427Swi.numPriorities = 6;
428
429
430
431/* ================ System configuration ================ */
432var System = xdc.useModule('xdc.runtime.System');
433/*
434 * The Abort handler is called when the system exits abnormally.
435 *
436 * Pick one:
437 * - System.abortStd (default)
438 * Call the ANSI C Standard 'abort()' to terminate the application.
439 * - System.abortSpin
440 * A lightweight abort function that loops indefinitely in a while(1) trap
441 * function.
442 * - A custom abort handler
443 * A user-defined function. See the System module documentation for
444 * details.
445 */
446//System.abortFxn = System.abortStd;
447System.abortFxn = System.abortSpin;
448//System.abortFxn = "&myAbortSystem";
449
450/*
451 * The Exit handler is called when the system exits normally.
452 *
453 * Pick one:
454 * - System.exitStd (default)
455 * Call the ANSI C Standard 'exit()' to terminate the application.
456 * - System.exitSpin
457 * A lightweight exit function that loops indefinitely in a while(1) trap
458 * function.
459 * - A custom exit function
460 * A user-defined function. See the System module documentation for
461 * details.
462 */
463//System.exitFxn = System.exitStd;
464System.exitFxn = System.exitSpin;
465//System.exitFxn = "&myExitSystem";
466
467/*
468 * Minimize exit handler array in the System module. The System module includes
469 * an array of functions that are registered with System_atexit() which is
470 * called by System_exit(). The default value is 8.
471 */
472System.maxAtexitHandlers = 0;
473
474/*
475 * The System.SupportProxy defines a low-level implementation of System
476 * functions such as System_printf(), System_flush(), etc.
477 *
478 * Pick one pair:
479 * - SysMin
480 * This module maintains an internal configurable circular buffer that
481 * stores the output until System_flush() is called.
482 * The size of the circular buffer is set via SysMin.bufSize.
483 * - SysCallback
484 * SysCallback allows for user-defined implementations for System APIs.
485 * The SysCallback support proxy has a smaller code footprint and can be
486 * used to supply custom System_printf services.
487 * The default SysCallback functions point to stub functions. See the
488 * SysCallback module's documentation.
489 */
490//var SysMin = xdc.useModule('xdc.runtime.SysMin');
491//SysMin.bufSize = 128;
492//System.SupportProxy = SysMin;
493var SysCallback = xdc.useModule('xdc.runtime.SysCallback');
494System.SupportProxy = SysCallback;
495//SysCallback.abortFxn = "&myUserAbort";
496//SysCallback.exitFxn = "&myUserExit";
497//SysCallback.flushFxn = "&myUserFlush";
498//SysCallback.putchFxn = "&myUserPutch";
499SysCallback.putchFxn = "&uartPrintf_putch"; // BMH Modified
500//SysCallback.readyFxn = "&myUserReady";
501
502
503
504/* ================ Task configuration ================ */
505var Task = xdc.useModule('ti.sysbios.knl.Task');
506/*
507 * Check task stacks for overflow conditions.
508 *
509 * Pick one:
510 * - true (default)
511 * Enables runtime checks for task stack overflow conditions during
512 * context switching ("from" and "to")
513 * - false
514 * Disables runtime checks for task stack overflow conditions.
515 *
516 * When using BIOS in ROM:
517 * This option must be set to false.
518 */
519//Task.checkStackFlag = true;
520Task.checkStackFlag = false;
521
522/*
523 * Set the default task stack size when creating tasks.
524 *
525 * The default is dependent on the device being used. Reducing the default stack
526 * size yields greater memory savings.
527 */
528Task.defaultStackSize = 512;
529
530/*
531 * Enables the idle task.
532 *
533 * Pick one:
534 * - true (default)
535 * Creates a task with priority of 0 which calls idle hook functions. This
536 * option must be set to true to gain power savings provided by the Power
537 * module.
538 * - false
539 * No idle task is created. This option consumes less memory as no
540 * additional default task stack is needed.
541 * To gain power savings by the Power module without having the idle task,
542 * add Idle.run as the Task.allBlockedFunc.
543 */
544Task.enableIdleTask = true;
545//Task.enableIdleTask = false;
546//Task.allBlockedFunc = Idle.run;
547
548/*
549 * If Task.enableIdleTask is set to true, this option sets the idle task's
550 * stack size.
551 *
552 * Reducing the idle stack size yields greater memory savings.
553 */
554Task.idleTaskStackSize = 512;
555
556/*
557 * Reduce the number of task priorities.
558 * The default is 16.
559 * Decreasing the number of task priorities yield memory savings.
560 */
561Task.numPriorities = 4;
562
563
564
565/* ================ Text configuration ================ */
566var Text = xdc.useModule('xdc.runtime.Text');
567/*
568 * These strings are placed in the .const section. Setting this parameter to
569 * false will save space in the .const section. Error, Assert and Log messages
570 * will print raw ids and args instead of a formatted message.
571 *
572 * Pick one:
573 * - true (default)
574 * This option loads test string into the .const for easier debugging.
575 * - false
576 * This option reduces the .const footprint.
577 */
578//Text.isLoaded = true;
579Text.isLoaded = false;
580
581
582
583/* ================ Types configuration ================ */
584var Types = xdc.useModule('xdc.runtime.Types');
585/*
586 * This module defines basic constants and types used throughout the
587 * xdc.runtime package.
588 */
589
590
591
592/* ================ TI-RTOS middleware configuration ================ */
593var mwConfig = xdc.useModule('ti.mw.Config');
594/*
595 * Include TI-RTOS middleware libraries
596 */
597
598
599
600/* ================ TI-RTOS drivers' configuration ================ */
601var driversConfig = xdc.useModule('ti.drivers.Config');
602/*
603 * Include TI-RTOS drivers
604 *
605 * Pick one:
606 * - driversConfig.LibType_NonInstrumented (default)
607 * Use TI-RTOS drivers library optimized for footprint and performance
608 * without asserts or logs.
609 * - driversConfig.LibType_Instrumented
610 * Use TI-RTOS drivers library for debugging with asserts and logs enabled.
611 */
612driversConfig.libType = driversConfig.LibType_NonInstrumented;
613//driversConfig.libType = driversConfig.LibType_Instrumented;
614
615
616
617/* ================ Application Specific Instances ================ */
diff --git a/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/ccfg.c b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/ccfg.c
new file mode 100644
index 0000000..40b80b0
--- /dev/null
+++ b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/ccfg.c
@@ -0,0 +1,57 @@
1/*
2 * Copyright (c) 2015, 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 * ======== ccfg.c ========
35 * Customer Configuration for CC26xx and CC13xx devices. This file is used to
36 * configure Boot ROM, start-up code, and SW radio behaviour.
37 *
38 * By default, driverlib startup_files/ccfg.c settings are used. However, if
39 * changes are required there are two means to do so:
40 *
41 * 1. Remove this file and copy driverlib's startup_files/ccfg.c file in
42 * its place. Make all changes to the file. Changes made are local to
43 * the project and will not affect other projects.
44 *
45 * 2. Perform changes to driverlib startup_files/ccfg.c file. Changes
46 * made to this file will be applied to all projects. This file must
47 * remain unmodified.
48 */
49
50
51#define SET_CCFG_BL_CONFIG_BOOTLOADER_ENABLE 0xC5 // Enable ROM boot loader
52#define SET_CCFG_BL_CONFIG_BL_LEVEL 0x00 // Active low to open boot loader backdoor
53#define SET_CCFG_BL_CONFIG_BL_PIN_NUMBER 0x0B // DIO number for boot loader backdoor
54#define SET_CCFG_BL_CONFIG_BL_ENABLE 0xC5 // Enabled boot loader backdoor
55
56
57#include <startup_files/ccfg.c>
diff --git a/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/main.c b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/main.c
new file mode 100644
index 0000000..9a6dadf
--- /dev/null
+++ b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/main.c
@@ -0,0 +1,155 @@
1/*
2 * ======== empty_min.c ========
3 */
4/* XDCtools Header files */
5#include <xdc/std.h>
6#include <xdc/runtime/System.h>
7
8/* BIOS Header files */
9#include <ti/sysbios/BIOS.h>
10#include <ti/sysbios/knl/Task.h>
11#include <ti/sysbios/knl/Clock.h>
12
13/* TI-RTOS Header files */
14//#include <ti/drivers/I2C.h>
15#include <ti/drivers/PIN.h>
16#include <ti/drivers/SPI.h>
17#include <ti/drivers/UART.h>
18// #include <ti/drivers/Watchdog.h>
19
20/* Board Header files */
21#include "Board.h"
22#include "uart_printf.h"
23
24#define TASKSTACKSIZE 512
25
26Task_Struct task0Struct;
27Char task0Stack[TASKSTACKSIZE];
28
29Task_Struct task1Struct;
30Char task1Stack[TASKSTACKSIZE];
31
32
33/* Pin driver handle */
34static PIN_Handle ledPinHandle;
35static PIN_State ledPinState;
36
37/*
38 * Application LED pin configuration table:
39 * - All LEDs board LEDs are off.
40 */
41
42PIN_Config ledPinTable[] = {
43 Board_LED0 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
44 Board_LED1 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
45 PIN_TERMINATE
46};
47
48Void echoFxn(UArg arg0, UArg arg1)
49{
50 uint8_t rxBufferPointer[4];
51 uint8_t txBufferPointer[4];
52 SPI_Handle spi;
53 SPI_Params spiParams;
54 SPI_Transaction spiTransaction;
55
56 SPI_Params_init(&spiParams);
57 // Slave mode
58 spiParams.mode = SPI_SLAVE;
59 spiParams.bitRate = 500000;
60 spiParams.frameFormat = SPI_POL1_PHA1;
61 // params.transferMode = SPI_MODE_CALLBACK;
62 //spiParams.transferCallbackFxn = spi_tx_call;
63
64 spi=SPI_open(Board_SPI1,&spiParams);
65 if(!spi){
66 System_printf("SPI did not open");
67 }
68 System_printf("SPI-Slave Open\r\n");
69
70 rxBufferPointer[0]='*';
71 while(1) {
72
73 spiTransaction.rxBuf= rxBufferPointer;
74 spiTransaction.txBuf = txBufferPointer;
75 spiTransaction.count=1;
76
77 PIN_setOutputValue(ledPinHandle, Board_LEDG,!PIN_getOutputValue(Board_LEDG));
78 if (SPI_transfer(spi,&spiTransaction)) {
79
80 txBufferPointer[0]=rxBufferPointer[0];
81 System_printf("RxData: %x TxData: %x\r\n",rxBufferPointer[0],txBufferPointer[0]);
82
83 }
84
85
86 }
87
88 /* Deinitialized I2C */
89 SPI_close(spi);
90}
91
92
93/*
94 * ======== heartBeatFxn ========
95 * Toggle the Board_LED0. The Task_sleep is determined by arg0 which
96 * is configured for the heartBeat Task instance.
97 */
98Void heartBeatFxn(UArg arg0, UArg arg1)
99{
100 while (1) {
101 Task_sleep((UInt)arg0);
102 //PIN_setOutputValue(ledPinHandle, Board_LEDG,!PIN_getOutputValue(Board_LEDG));
103 //PIN_setOutputValue(ledPinHandle, Board_LEDR,!PIN_getOutputValue(Board_LEDR));
104 }
105}
106
107/*
108 * ======== main ========
109 */
110int main(void)
111{
112 Task_Params taskParams;
113
114 /* Call board init functions */
115 Board_initGeneral();
116 Board_initSPI();
117 // Board_initI2C();
118 // Board_initUART();
119 // Board_initWatchdog();
120
121 /* Init UART for System_printf()*/
122 UART_Params uartParams;
123 UART_Params_init(&uartParams);
124 uartParams.baudRate = 115200;
125 UartPrintf_init(UART_open(Board_UART, &uartParams));
126 System_printf("Uart open\r\n");
127
128 /* Construct heartBeat Task thread */
129 Task_Params_init(&taskParams);
130 taskParams.arg0 = 200000 / Clock_tickPeriod;
131 taskParams.stackSize = TASKSTACKSIZE;
132 taskParams.stack = &task0Stack;
133 Task_construct(&task0Struct, (Task_FuncPtr)heartBeatFxn, &taskParams, NULL);
134
135 /* Construct SPI Echo Task thread */
136 Task_Params_init(&taskParams);
137 taskParams.arg0 = 0;
138 taskParams.stackSize = TASKSTACKSIZE;
139 taskParams.stack = &task1Stack;
140 Task_construct(&task1Struct, (Task_FuncPtr)echoFxn, &taskParams, NULL);
141
142 /* Open LED pins */
143 ledPinHandle = PIN_open(&ledPinState, ledPinTable);
144 if(!ledPinHandle) {
145 System_abort("Error initializing board LED pins\n");
146 }
147
148 PIN_setOutputValue(ledPinHandle, Board_LED0, 0);
149 PIN_setOutputValue(ledPinHandle, Board_LED1, 0);
150
151 /* Start BIOS */
152 BIOS_start();
153
154 return (0);
155}
diff --git a/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/uart_printf.c b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/uart_printf.c
new file mode 100644
index 0000000..140b3da
--- /dev/null
+++ b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/uart_printf.c
@@ -0,0 +1,173 @@
1/**************************************************************************************************
2 Filename: uart_printf.c
3
4 Description: This file contains the TI-RTOS hooks for printing to UART via
5 System_printf(..).
6
7 This is a very basic implementation made for the purposes of
8 terminal feedback in workshops, trainings and debug.
9
10 Copyright 2015 Texas Instruments Incorporated. All rights reserved.
11
12 IMPORTANT: Your use of this Software is limited to those specific rights
13 granted under the terms of a software license agreement between the user
14 who downloaded the software, his/her employer (which must be your employer)
15 and Texas Instruments Incorporated (the "License"). You may not use this
16 Software unless you agree to abide by the terms of the License. The License
17 limits your use, and you acknowledge, that the Software may not be modified,
18 copied or distributed unless embedded on a Texas Instruments microcontroller
19 or used solely and exclusively in conjunction with a Texas Instruments radio
20 frequency transceiver, which is integrated into your product. Other than for
21 the foregoing purpose, you may not use, reproduce, copy, prepare derivative
22 works of, modify, distribute, perform, display or sell this Software and/or
23 its documentation for any purpose.
24
25 YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
26 PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
27 INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
28 NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
29 TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
30 NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
31 LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
32 INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
33 OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
34 OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
35 (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
36
37 Should you have any questions regarding your right to use this Software,
38 contact Texas Instruments Incorporated at www.TI.com.
39**************************************************************************************************/
40
41/*********************************************************************
42 * INCLUDES
43 */
44#include <Board.h>
45#include <ti/drivers/UART.h>
46#include <ti/drivers/uart/UARTCC26XX.h>
47#include <stdint.h>
48
49/*********************************************************************
50 * CONSTANTS
51 */
52#define UART_PRINTF_BUF_LEN 1024
53
54/*********************************************************************
55 * TYPEDEFS
56 */
57
58/*********************************************************************
59 * LOCAL VARIABLES
60 */
61static uint8_t uartPrintf_outArray[UART_PRINTF_BUF_LEN];
62static uint16_t uartPrintf_head = 0;
63static uint16_t uartPrintf_tail = 0;
64static UART_Handle hUart = NULL;
65
66
67/*********************************************************************
68 * PUBLIC FUNCTIONS
69 */
70
71/*********************************************************************
72 * @fn UartPrintf_init
73 *
74 * @brief Initializes the putchar hooks with the handle to the UART.
75 *
76 * @param handle - UART driver handle to an initialized and opened UART.
77 *
78 * @return None.
79 */
80void UartPrintf_init(UART_Handle handle)
81{
82 hUart = handle;
83}
84
85/*********************************************************************
86 * SYSTEM HOOK FUNCTIONS
87 */
88
89/*********************************************************************
90 * @fn uartPrintf_putch
91 *
92 * @brief User supplied PutChar function.
93 * typedef Void (*SysCallback_PutchFxn)(Char);
94 *
95 * This function is called whenever the System module needs
96 * to output a character.
97 *
98 * This implementation fills a very basic ring-buffer, and relies
99 * on another function to flush this buffer out to UART.
100 *
101 * Requires SysCallback to be the system provider module.
102 * Initialized via SysCallback.putchFxn = "&uartPrintf_putch"; in the
103 * TI-RTOS configuration script.
104 *
105 * @param ch - Character
106 *
107 * @return None.
108 *
109 * @post ::uartPrintf_head is incremented by one with wrap at UART_PRINTF_BUF_LEN
110 * if there is room.
111 */
112void uartPrintf_putch(char ch)
113{
114 // uartPrintf_tail should never catch up with uartPrintf_head. Discard in-between bytes.
115 if ( (uartPrintf_head + 1) % UART_PRINTF_BUF_LEN == uartPrintf_tail )
116 return;
117
118 uartPrintf_outArray[uartPrintf_head] = ch;
119 uartPrintf_head++;
120
121 if (uartPrintf_head >= UART_PRINTF_BUF_LEN)
122 uartPrintf_head = 0;
123}
124
125/*********************************************************************
126 * @fn uartPrintf_flush
127 *
128 * @brief Printf-buffer flush function
129 *
130 * In this implementation it is intended to be called by the
131 * Idle task when nothing else is running.
132 *
133 * This is achieved by setting up the Idle task in the TI-RTOS
134 * configuration script like so:
135 *
136 * var Idle = xdc.useModule('ti.sysbios.knl.Idle');
137 * Idle.addFunc('&uartPrintf_flush');
138 *
139 * @param None. Relies on global state.
140 *
141 * @return None.
142 *
143 * @post ::uartPrintf_tail is incremented to where uartPrintf_head
144 * was at the time the function was called.
145 */
146void uartPrintf_flush()
147{
148 // Abort in case UART hasn't been initialized.
149 if (NULL == hUart)
150 return;
151
152 // Lock head position to avoid race conditions
153 uint16_t curHead = uartPrintf_head;
154
155 // Find out how much data must be output, and how to output it.
156 bool needWrap = curHead < uartPrintf_tail;
157 uint16_t outLen = needWrap?(UART_PRINTF_BUF_LEN-uartPrintf_tail+curHead):(curHead-uartPrintf_tail);
158
159 if (outLen)
160 {
161 if (needWrap)
162 {
163 UART_write(hUart, &uartPrintf_outArray[uartPrintf_tail], UART_PRINTF_BUF_LEN - uartPrintf_tail);
164 UART_write(hUart, uartPrintf_outArray, curHead);
165 }
166 else
167 {
168 UART_write(hUart, &uartPrintf_outArray[uartPrintf_tail], outLen);
169 }
170 }
171
172 uartPrintf_tail = curHead;
173}
diff --git a/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/uart_printf.h b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/uart_printf.h
new file mode 100644
index 0000000..84b82fe
--- /dev/null
+++ b/Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/uart_printf.h
@@ -0,0 +1,81 @@
1/**************************************************************************************************
2 Filename: uart_printf.c
3
4 Description: This file contains the TI-RTOS hooks for printing to UART via
5 System_printf(..).
6
7 This is a very basic implementation made for the purposes of
8 terminal feedback in workshops, trainings and debug.
9
10 Copyright 2015 Texas Instruments Incorporated. All rights reserved.
11
12 IMPORTANT: Your use of this Software is limited to those specific rights
13 granted under the terms of a software license agreement between the user
14 who downloaded the software, his/her employer (which must be your employer)
15 and Texas Instruments Incorporated (the "License"). You may not use this
16 Software unless you agree to abide by the terms of the License. The License
17 limits your use, and you acknowledge, that the Software may not be modified,
18 copied or distributed unless embedded on a Texas Instruments microcontroller
19 or used solely and exclusively in conjunction with a Texas Instruments radio
20 frequency transceiver, which is integrated into your product. Other than for
21 the foregoing purpose, you may not use, reproduce, copy, prepare derivative
22 works of, modify, distribute, perform, display or sell this Software and/or
23 its documentation for any purpose.
24
25 YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
26 PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
27 INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
28 NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
29 TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
30 NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
31 LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
32 INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
33 OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
34 OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
35 (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
36
37 Should you have any questions regarding your right to use this Software,
38 contact Texas Instruments Incorporated at www.TI.com.
39**************************************************************************************************/
40
41#ifndef UART_PRINTF_H
42#define UART_PRINTF_H
43
44#ifdef __cplusplus
45extern "C"
46{
47#endif
48/*********************************************************************
49 * INCLUDES
50 */
51#include <ti/drivers/UART.h>
52
53/*********************************************************************
54 * CONSTANTS
55 */
56
57/*********************************************************************
58 * TYPEDEFS
59 */
60
61/*********************************************************************
62 * PUBLIC FUNCTIONS
63 */
64
65/*********************************************************************
66 * @fn UartPrintf_init
67 *
68 * @brief Initializes the putchar hooks with the handle to the UART.
69 *
70 * @param handle - UART driver handle to an initialized and opened UART.
71 *
72 * @return None.
73 */
74void UartPrintf_init(UART_Handle handle);
75
76
77#ifdef __cplusplus
78}
79#endif
80
81#endif // UART_PRINTF_H