]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - i3-mote/i3-mote.git/commitdiff
Created Test_CC2650_3wSPI_Slave_MSP432_Master
authorBorja Martinez <borja.martinez@gmail.com>
Tue, 4 Oct 2016 20:13:37 +0000 (22:13 +0200)
committerBorja Martinez <borja.martinez@gmail.com>
Tue, 4 Oct 2016 20:13:37 +0000 (22:13 +0200)
Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/Board.h [new file with mode: 0644]
Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/CC2650_I3M.cmd [new file with mode: 0644]
Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/cc2650_I3M.cfg [new file with mode: 0644]
Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/ccfg.c [new file with mode: 0644]
Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/main.c [new file with mode: 0644]
Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/uart_printf.c [new file with mode: 0644]
Basic-Test-Package/CC2650/Test_CC2650_3wSPI_Slave_MSP432_Master/uart_printf.h [new file with mode: 0644]

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 (file)
index 0000000..6740834
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2015-2016, Texas Instruments Incorporated
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * *  Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * *  Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * *  Neither the name of Texas Instruments Incorporated nor the names of
+ *    its contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __BOARD_H
+#define __BOARD_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <ti/drivers/Power.h>
+
+#include "CC2650_I3M.h"
+
+
+/* These #defines allow us to reuse TI-RTOS across other device families */
+#define     Board_LED0              Board_LEDR
+#define     Board_LED1              Board_LEDG
+
+#define     Board_BUTTON0           Board_BTN1
+#define     Board_BUTTON1           Board_BTN2
+
+#define     Board_I2C0              Board_I2C
+
+#define     Board_UART0             Board_UART
+#define     Board_AES0              Board_AES
+#define     Board_WATCHDOG0         Board_WATCHDOG
+
+#define     Board_ADC0              CC2650_I3MOTE_ADCVSS
+#define     Board_ADC1              CC2650_I3MOTE_ADCVDDS
+
+#define     Board_ADCBuf0           CC2650_I3MOTE_ADCBuf0
+#define     Board_ADCBufChannel0    (0)
+#define     Board_ADCBufChannel1    (1)
+
+#define     Board_initGeneral() { \
+    Power_init(); \
+    if (PIN_init(BoardGpioInitTable) != PIN_SUCCESS) \
+        {System_abort("Error with PIN_init\n"); \
+    } \
+}
+
+#define     Board_initGPIO()
+#define     Board_initPWM()        PWM_init()
+#define     Board_initSPI()         SPI_init()
+#define     Board_initI2C()         I2C_init()
+#define     Board_initUART()        UART_init()
+#define     Board_initWatchdog()    Watchdog_init()
+#define     Board_initADCBuf()      ADCBuf_init()
+#define     Board_initADC()         ADC_init()
+#define     GPIO_toggle(n)
+#define     GPIO_write(n,m)
+
+#ifdef __cplusplus
+}
+#endif
+
+#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 (file)
index 0000000..c30c09f
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2015-2016, Texas Instruments Incorporated
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * *  Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * *  Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * *  Neither the name of Texas Instruments Incorporated nor the names of
+ *    its contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+/*
+ *  ======== CC2650_LAUNCHXL.cmd ========
+ *  CC26x0F128 PG2 linker configuration file for Code Composer Studio
+ */
+
+/* Override default entry point.                                             */
+--entry_point ResetISR
+/* Allow main() to take args                                                 */
+--args 0x8
+/* Suppress warnings and errors:                                             */
+/* - 10063: Warning about entry point not being _c_int00                     */
+/* - 16011, 16012: 8-byte alignment errors. Observed when linking in object  */
+/*   files compiled using Keil (ARM compiler)                                */
+--diag_suppress=10063,16011,16012
+
+/* The starting address of the application.  Normally the interrupt vectors  */
+/* must be located at the beginning of the application.                      */
+#define FLASH_BASE              0x0
+#define FLASH_SIZE              0x20000
+#define RAM_BASE                0x20000000
+#define RAM_SIZE                0x5000
+
+/* System memory map */
+
+MEMORY
+{
+    /* Application stored in and executes from internal flash */
+    FLASH (RX) : origin = FLASH_BASE, length = FLASH_SIZE
+    /* Application uses internal RAM for data */
+    SRAM (RWX) : origin = RAM_BASE, length = RAM_SIZE
+}
+
+/* Section allocation in memory */
+
+SECTIONS
+{
+    .text           :   > FLASH
+    .const          :   > FLASH
+    .constdata      :   > FLASH
+    .rodata         :   > FLASH
+    .cinit          :   > FLASH
+    .pinit          :   > FLASH
+    .init_array     :   > FLASH
+    .emb_text       :   > FLASH
+    .ccfg           :   > FLASH (HIGH)
+
+#ifdef __TI_COMPILER_VERSION__
+#if __TI_COMPILER_VERSION__ >= 15009000
+    .TI.ramfunc     : {} load=FLASH, run=SRAM, table(BINIT)
+#endif
+#endif
+    .data           :   > SRAM
+    .bss            :   > SRAM
+    .sysmem         :   > SRAM
+    .stack          :   > SRAM (HIGH)
+    .nonretenvar    :   > SRAM
+}
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 (file)
index 0000000..c4d7b01
--- /dev/null
@@ -0,0 +1,617 @@
+/*
+ * Copyright (c) 2015-2016, Texas Instruments Incorporated
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * *  Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * *  Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * *  Neither the name of Texas Instruments Incorporated nor the names of
+ *    its contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+
+/* ================ Boot configuration ================ */
+var Boot = xdc.useModule('ti.sysbios.family.arm.cc26xx.Boot');
+/*
+ * This module contains family specific Boot APIs and configuration settings.
+ * See the SYS/BIOS API guide for more information.
+ */
+
+
+
+/* ================ Clock configuration ================ */
+var Clock = xdc.useModule('ti.sysbios.knl.Clock');
+/*
+ * When using Power and calibrateRCOSC is set to true, this should be set to 10.
+ * The timer used by the Clock module supports TickMode_DYNAMIC. This enables us
+ * to set the tick period to 10 us without generating the overhead of additional
+ * interrupts.
+ *
+ * Note: The calibrateRCOSC parameter is set within the Power configuration
+ *     structure in the "Board.c" file.
+ */
+Clock.tickPeriod = 10;
+
+
+
+/* ================ Defaults (module) configuration ================ */
+var Defaults = xdc.useModule('xdc.runtime.Defaults');
+/*
+ * A flag to allow module names to be loaded on the target. Module name
+ * strings are placed in the .const section for debugging purposes.
+ *
+ * Pick one:
+ *  - true (default)
+ *      Setting this parameter to true will include name strings in the .const
+ *      section so that Errors and Asserts are easier to debug.
+ *  - false
+ *      Setting this parameter to false will reduce footprint in the .const
+ *      section. As a result, Error and Assert messages will contain an
+ *      "unknown module" prefix instead of the actual module name.
+ *
+ *  When using BIOS in ROM:
+ *      This option must be set to false.
+ */
+//Defaults.common$.namedModule = true;
+Defaults.common$.namedModule = false;
+
+
+
+/* ================ Error configuration ================ */
+var Error = xdc.useModule('xdc.runtime.Error');
+/*
+ * This function is called to handle all raised errors, but unlike
+ * Error.raiseHook, this function is responsible for completely handling the
+ * error with an appropriately initialized Error_Block.
+ *
+ * Pick one:
+ *  - Error.policyDefault (default)
+ *      Calls Error.raiseHook with an initialized Error_Block structure and logs
+ *      the error using the module's logger.
+ *  - Error.policySpin
+ *      Simple alternative that traps on a while(1) loop for minimized target
+ *      footprint.
+ *      Using Error.policySpin, the Error.raiseHook will NOT called.
+ */
+//Error.policyFxn = Error.policyDefault;
+Error.policyFxn = Error.policySpin;
+
+/*
+ * If Error.policyFxn is set to Error.policyDefault, this function is called
+ * whenever an error is raised by the Error module.
+ *
+ * Pick one:
+ *  - Error.print (default)
+ *      Errors are formatted and output via System_printf() for easier
+ *      debugging.
+ *  - null
+ *      Errors are not formatted or logged. This option reduces code footprint.
+ *  - non-null function
+ *      Errors invoke custom user function. See the Error module documentation
+ *      for more details.
+ */
+//Error.raiseHook = Error.print;
+Error.raiseHook = null;
+//Error.raiseHook = "&myErrorFxn";
+
+/*
+ * If Error.policyFxn is set to Error.policyDefault, this option applies to the
+ * maximum number of times the Error.raiseHook function can be recursively
+ * invoked. This option limits the possibility of an infinite recursion that
+ * could lead to a stack overflow.
+ * The default value is 16.
+ */
+Error.maxDepth = 2;
+
+
+
+/* ================ Hwi configuration ================ */
+var halHwi = xdc.useModule('ti.sysbios.hal.Hwi');
+var m3Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');
+/*
+ * Checks for Hwi (system) stack overruns while in the Idle loop.
+ *
+ * Pick one:
+ *  - true (default)
+ *      Checks the top word for system stack overflows during the idle loop and
+ *      raises an Error if one is detected.
+ *  - false
+ *      Disabling the runtime check improves runtime performance and yields a
+ *      reduced flash footprint.
+ */
+//halHwi.checkStackFlag = true;
+halHwi.checkStackFlag = false;
+
+/*
+ * The following options alter the system's behavior when a hardware exception
+ * is detected.
+ *
+ * Pick one:
+ *  - Hwi.enableException = true
+ *      This option causes the default m3Hwi.excHandlerFunc function to fully
+ *      decode an exception and dump the registers to the system console.
+ *      This option raises errors in the Error module and displays the
+ *      exception in ROV.
+ *  - Hwi.enableException = false
+ *      This option reduces code footprint by not decoding or printing the
+ *      exception to the system console.
+ *      It however still raises errors in the Error module and displays the
+ *      exception in ROV.
+ *  - Hwi.excHandlerFunc = null
+ *      This is the most aggressive option for code footprint savings; but it
+ *      can difficult to debug exceptions. It reduces flash footprint by
+ *      plugging in a default while(1) trap when exception occur. This option
+ *      does not raise an error with the Error module.
+ */
+//m3Hwi.enableException = true;
+//m3Hwi.enableException = false;
+m3Hwi.excHandlerFunc = null;
+
+/*
+ * Enable hardware exception generation when dividing by zero.
+ *
+ * Pick one:
+ *  - 0 (default)
+ *      Disables hardware exceptions when dividing by zero
+ *  - 1
+ *      Enables hardware exceptions when dividing by zero
+ */
+m3Hwi.nvicCCR.DIV_0_TRP = 0;
+//m3Hwi.nvicCCR.DIV_0_TRP = 1;
+
+/*
+ * Enable hardware exception generation for invalid data alignment.
+ *
+ * Pick one:
+ *  - 0 (default)
+ *      Disables hardware exceptions for data alignment
+ *  - 1
+ *      Enables hardware exceptions for data alignment
+ */
+m3Hwi.nvicCCR.UNALIGN_TRP = 0;
+//m3Hwi.nvicCCR.UNALIGN_TRP = 1;
+
+/*
+ * Assign an address for the reset vector.
+ *
+ * Default is 0x0, which is the start of Flash. Ordinarily this setting should
+ * not be changed.
+ */
+m3Hwi.resetVectorAddress = 0x0;
+
+/*
+ * Assign an address for the vector table in RAM.
+ *
+ * The default is the start of RAM. This table is placed in RAM so interrupts
+ * can be added at runtime.
+ *
+ * Note: To change, verify address in the device specific datasheets'
+ *     memory map.
+ */
+m3Hwi.vectorTableAddress = 0x20000000;
+
+
+
+/* ================ Idle configuration ================ */
+var Idle = xdc.useModule('ti.sysbios.knl.Idle');
+/*
+ * The Idle module is used to specify a list of functions to be called when no
+ * other tasks are running in the system.
+ *
+ * Functions added here will be run continuously within the idle task.
+ *
+ * Function signature:
+ *     Void func(Void);
+ */
+//Idle.addFunc("&myIdleFunc");
+Idle.addFunc('&uartPrintf_flush'); // BMH flushing function.
+
+
+/* ================ Kernel (SYS/BIOS) configuration ================ */
+var BIOS = xdc.useModule('ti.sysbios.BIOS');
+/*
+ * Enable asserts in the BIOS library.
+ *
+ * Pick one:
+ *  - true (default)
+ *      Enables asserts for debugging purposes.
+ *  - false
+ *      Disables asserts for a reduced code footprint and better performance.
+ *
+ *  When using BIOS in ROM:
+ *      This option must be set to false.
+ */
+//BIOS.assertsEnabled = true;
+BIOS.assertsEnabled = false;
+
+/*
+ * Specify default heap size for BIOS.
+ */
+BIOS.heapSize = 1024;
+
+/*
+ * Specify default CPU Frequency.
+ */
+BIOS.cpuFreq.lo = 48000000;
+
+/*
+ * A flag to determine if xdc.runtime sources are to be included in a custom
+ * built BIOS library.
+ *
+ * Pick one:
+ *  - false (default)
+ *      The pre-built xdc.runtime library is provided by the respective target
+ *      used to build the application.
+ *  - true
+ *      xdc.runtime library sources are to be included in the custom BIOS
+ *      library. This option yields the most efficient library in both code
+ *      footprint and runtime performance.
+ */
+//BIOS.includeXdcRuntime = false;
+BIOS.includeXdcRuntime = true;
+
+/*
+ * The SYS/BIOS runtime is provided in the form of a library that is linked
+ * with the application. Several forms of this library are provided with the
+ * SYS/BIOS product.
+ *
+ * Pick one:
+ *   - BIOS.LibType_Custom
+ *      Custom built library that is highly optimized for code footprint and
+ *      runtime performance.
+ *   - BIOS.LibType_Debug
+ *      Custom built library that is non-optimized that can be used to
+ *      single-step through APIs with a debugger.
+ *
+ */
+BIOS.libType = BIOS.LibType_Custom;
+//BIOS.libType = BIOS.LibType_Debug;
+
+/*
+ * Runtime instance creation enable flag.
+ *
+ * Pick one:
+ *   - true (default)
+ *      Allows Mod_create() and Mod_delete() to be called at runtime which
+ *      requires a default heap for dynamic memory allocation.
+ *   - false
+ *      Reduces code footprint by disallowing Mod_create() and Mod_delete() to
+ *      be called at runtime. Object instances are constructed via
+ *      Mod_construct() and destructed via Mod_destruct().
+ *
+ *  When using BIOS in ROM:
+ *      This option must be set to true.
+ */
+BIOS.runtimeCreatesEnabled = true;
+//BIOS.runtimeCreatesEnabled = false;
+
+/*
+ * Enable logs in the BIOS library.
+ *
+ * Pick one:
+ *  - true (default)
+ *      Enables logs for debugging purposes.
+ *  - false
+ *      Disables logging for reduced code footprint and improved runtime
+ *      performance.
+ *
+ *  When using BIOS in ROM:
+ *      This option must be set to false.
+ */
+//BIOS.logsEnabled = true;
+BIOS.logsEnabled = false;
+
+
+
+/* ================ Memory configuration ================ */
+var Memory = xdc.useModule('xdc.runtime.Memory');
+/*
+ * The Memory module itself simply provides a common interface for any
+ * variety of system and application specific memory management policies
+ * implemented by the IHeap modules(Ex. HeapMem, HeapBuf).
+ */
+
+
+
+/* ================ Program configuration ================ */
+/*
+ *  Program.stack is ignored with IAR. Use the project options in
+ *  IAR Embedded Workbench to alter the system stack size.
+ */
+if (!Program.build.target.$name.match(/iar/)) {
+    /*
+     *  Reducing the system stack size (used by ISRs and Swis) to reduce
+     *  RAM usage.
+     */
+    Program.stack = 768;
+}
+
+
+
+/*
+ * Uncomment to enable Semihosting for GNU targets to print to the CCS console.
+ * Please read the following TIRTOS Wiki page for more information on Semihosting:
+ * http://processors.wiki.ti.com/index.php/TI-RTOS_Examples_SemiHosting
+ */
+
+if (Program.build.target.$name.match(/gnu/)) {
+    //var SemiHost = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
+}
+
+/* ================ ROM configuration ================ */
+/*
+ * To use BIOS in flash, comment out the code block below.
+ */
+var ROM = xdc.useModule('ti.sysbios.rom.ROM');
+if (Program.cpu.deviceName.match(/CC26/)) {
+    ROM.romName = ROM.CC2650;
+}
+else if (Program.cpu.deviceName.match(/CC13/)) {
+    ROM.romName = ROM.CC1350;
+}
+
+
+
+/* ================ Semaphore configuration ================ */
+var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
+/*
+ * Enables global support for Task priority pend queuing.
+ *
+ * Pick one:
+ *  - true (default)
+ *      This allows pending tasks to be serviced based on their task priority.
+ *  - false
+ *      Pending tasks are services based on first in, first out basis.
+ *
+ *  When using BIOS in ROM:
+ *      This option must be set to false.
+ */
+//Semaphore.supportsPriority = true;
+Semaphore.supportsPriority = false;
+
+/*
+ * Allows for the implicit posting of events through the semaphore,
+ * disable for additional code saving.
+ *
+ * Pick one:
+ *  - true
+ *      This allows the Semaphore module to post semaphores and events
+ *      simultaneously.
+ *  - false (default)
+ *      Events must be explicitly posted to unblock tasks.
+ *
+ *  When using BIOS in ROM:
+ *      This option must be set to false.
+ */
+//Semaphore.supportsEvents = true;
+Semaphore.supportsEvents = false;
+
+
+
+/* ================ Swi configuration ================ */
+var Swi = xdc.useModule('ti.sysbios.knl.Swi');
+/*
+ * A software interrupt is an object that encapsulates a function to be
+ * executed and a priority. Software interrupts are prioritized, preempt tasks
+ * and are preempted by hardware interrupt service routines.
+ *
+ * This module is included to allow Swi's in a users' application.
+ */
+
+/*
+ * Reduce the number of swi priorities from the default of 16.
+ * Decreasing the number of swi priorities yields memory savings.
+ */
+Swi.numPriorities = 6;
+
+
+
+/* ================ System configuration ================ */
+var System = xdc.useModule('xdc.runtime.System');
+/*
+ * The Abort handler is called when the system exits abnormally.
+ *
+ * Pick one:
+ *  - System.abortStd (default)
+ *      Call the ANSI C Standard 'abort()' to terminate the application.
+ *  - System.abortSpin
+ *      A lightweight abort function that loops indefinitely in a while(1) trap
+ *      function.
+ *  - A custom abort handler
+ *      A user-defined function. See the System module documentation for
+ *      details.
+ */
+//System.abortFxn = System.abortStd;
+System.abortFxn = System.abortSpin;
+//System.abortFxn = "&myAbortSystem";
+
+/*
+ * The Exit handler is called when the system exits normally.
+ *
+ * Pick one:
+ *  - System.exitStd (default)
+ *      Call the ANSI C Standard 'exit()' to terminate the application.
+ *  - System.exitSpin
+ *      A lightweight exit function that loops indefinitely in a while(1) trap
+ *      function.
+ *  - A custom exit function
+ *      A user-defined function. See the System module documentation for
+ *      details.
+ */
+//System.exitFxn = System.exitStd;
+System.exitFxn = System.exitSpin;
+//System.exitFxn = "&myExitSystem";
+
+/*
+ * Minimize exit handler array in the System module. The System module includes
+ * an array of functions that are registered with System_atexit() which is
+ * called by System_exit(). The default value is 8.
+ */
+System.maxAtexitHandlers = 0;
+
+/*
+ * The System.SupportProxy defines a low-level implementation of System
+ * functions such as System_printf(), System_flush(), etc.
+ *
+ * Pick one pair:
+ *  - SysMin
+ *      This module maintains an internal configurable circular buffer that
+ *      stores the output until System_flush() is called.
+ *      The size of the circular buffer is set via SysMin.bufSize.
+ *  - SysCallback
+ *      SysCallback allows for user-defined implementations for System APIs.
+ *      The SysCallback support proxy has a smaller code footprint and can be
+ *      used to supply custom System_printf services.
+ *      The default SysCallback functions point to stub functions. See the
+ *      SysCallback module's documentation.
+ */
+//var SysMin = xdc.useModule('xdc.runtime.SysMin');
+//SysMin.bufSize = 128;
+//System.SupportProxy = SysMin;
+var SysCallback = xdc.useModule('xdc.runtime.SysCallback');
+System.SupportProxy = SysCallback;
+//SysCallback.abortFxn = "&myUserAbort";
+//SysCallback.exitFxn  = "&myUserExit";
+//SysCallback.flushFxn = "&myUserFlush";
+//SysCallback.putchFxn = "&myUserPutch";
+SysCallback.putchFxn = "&uartPrintf_putch";  // BMH Modified
+//SysCallback.readyFxn = "&myUserReady";
+
+
+
+/* ================ Task configuration ================ */
+var Task = xdc.useModule('ti.sysbios.knl.Task');
+/*
+ * Check task stacks for overflow conditions.
+ *
+ * Pick one:
+ *  - true (default)
+ *      Enables runtime checks for task stack overflow conditions during
+ *      context switching ("from" and "to")
+ *  - false
+ *      Disables runtime checks for task stack overflow conditions.
+ *
+ *  When using BIOS in ROM:
+ *      This option must be set to false.
+ */
+//Task.checkStackFlag = true;
+Task.checkStackFlag = false;
+
+/*
+ * Set the default task stack size when creating tasks.
+ *
+ * The default is dependent on the device being used. Reducing the default stack
+ * size yields greater memory savings.
+ */
+Task.defaultStackSize = 512;
+
+/*
+ * Enables the idle task.
+ *
+ * Pick one:
+ *  - true (default)
+ *      Creates a task with priority of 0 which calls idle hook functions. This
+ *      option must be set to true to gain power savings provided by the Power
+ *      module.
+ *  - false
+ *      No idle task is created. This option consumes less memory as no
+ *      additional default task stack is needed.
+ *      To gain power savings by the Power module without having the idle task,
+ *      add Idle.run as the Task.allBlockedFunc.
+ */
+Task.enableIdleTask = true;
+//Task.enableIdleTask = false;
+//Task.allBlockedFunc = Idle.run;
+
+/*
+ * If Task.enableIdleTask is set to true, this option sets the idle task's
+ * stack size.
+ *
+ * Reducing the idle stack size yields greater memory savings.
+ */
+Task.idleTaskStackSize = 512;
+
+/*
+ * Reduce the number of task priorities.
+ * The default is 16.
+ * Decreasing the number of task priorities yield memory savings.
+ */
+Task.numPriorities = 4;
+
+
+
+/* ================ Text configuration ================ */
+var Text = xdc.useModule('xdc.runtime.Text');
+/*
+ * These strings are placed in the .const section. Setting this parameter to
+ * false will save space in the .const section. Error, Assert and Log messages
+ * will print raw ids and args instead of a formatted message.
+ *
+ * Pick one:
+ *  - true (default)
+ *      This option loads test string into the .const for easier debugging.
+ *  - false
+ *      This option reduces the .const footprint.
+ */
+//Text.isLoaded = true;
+Text.isLoaded = false;
+
+
+
+/* ================ Types configuration ================ */
+var Types = xdc.useModule('xdc.runtime.Types');
+/*
+ * This module defines basic constants and types used throughout the
+ * xdc.runtime package.
+ */
+
+
+
+/* ================ TI-RTOS middleware configuration ================ */
+var mwConfig = xdc.useModule('ti.mw.Config');
+/*
+ * Include TI-RTOS middleware libraries
+ */
+
+
+
+/* ================ TI-RTOS drivers' configuration ================ */
+var driversConfig = xdc.useModule('ti.drivers.Config');
+/*
+ * Include TI-RTOS drivers
+ *
+ * Pick one:
+ *  - driversConfig.LibType_NonInstrumented (default)
+ *      Use TI-RTOS drivers library optimized for footprint and performance
+ *      without asserts or logs.
+ *  - driversConfig.LibType_Instrumented
+ *      Use TI-RTOS drivers library for debugging with asserts and logs enabled.
+ */
+driversConfig.libType = driversConfig.LibType_NonInstrumented;
+//driversConfig.libType = driversConfig.LibType_Instrumented;
+
+
+
+/* ================ 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 (file)
index 0000000..40b80b0
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2015, Texas Instruments Incorporated
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * *  Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * *  Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * *  Neither the name of Texas Instruments Incorporated nor the names of
+ *    its contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ *  ======== ccfg.c ========
+ *  Customer Configuration for CC26xx and CC13xx devices.  This file is used to
+ *  configure Boot ROM, start-up code, and SW radio behaviour.
+ *
+ *  By default, driverlib startup_files/ccfg.c settings are used.  However, if
+ *  changes are required there are two means to do so:
+ *
+ *    1.  Remove this file and copy driverlib's startup_files/ccfg.c file in
+ *        its place.  Make all changes to the file.  Changes made are local to
+ *        the project and will not affect other projects.
+ *
+ *    2.  Perform changes to driverlib startup_files/ccfg.c file.  Changes
+ *        made to this file will be applied to all projects.  This file must
+ *        remain unmodified.
+ */
+
+
+#define SET_CCFG_BL_CONFIG_BOOTLOADER_ENABLE            0xC5       // Enable ROM boot loader
+#define SET_CCFG_BL_CONFIG_BL_LEVEL                    0x00       // Active low to open boot loader backdoor
+#define SET_CCFG_BL_CONFIG_BL_PIN_NUMBER                0x0B       // DIO number for boot loader backdoor
+#define SET_CCFG_BL_CONFIG_BL_ENABLE                   0xC5       // Enabled boot loader backdoor
+
+
+#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 (file)
index 0000000..9a6dadf
--- /dev/null
@@ -0,0 +1,155 @@
+/*
+ *  ======== empty_min.c ========
+ */
+/* XDCtools Header files */
+#include <xdc/std.h>
+#include <xdc/runtime/System.h>
+
+/* BIOS Header files */
+#include <ti/sysbios/BIOS.h>
+#include <ti/sysbios/knl/Task.h>
+#include <ti/sysbios/knl/Clock.h>
+
+/* TI-RTOS Header files */
+//#include <ti/drivers/I2C.h>
+#include <ti/drivers/PIN.h>
+#include <ti/drivers/SPI.h>
+#include <ti/drivers/UART.h>
+// #include <ti/drivers/Watchdog.h>
+
+/* Board Header files */
+#include "Board.h"
+#include "uart_printf.h"
+
+#define TASKSTACKSIZE   512
+
+Task_Struct task0Struct;
+Char task0Stack[TASKSTACKSIZE];
+
+Task_Struct task1Struct;
+Char task1Stack[TASKSTACKSIZE];
+
+
+/* Pin driver handle */
+static PIN_Handle ledPinHandle;
+static PIN_State ledPinState;
+
+/*
+ * Application LED pin configuration table:
+ *   - All LEDs board LEDs are off.
+ */
+
+PIN_Config ledPinTable[] = {
+    Board_LED0 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
+    Board_LED1 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX,
+    PIN_TERMINATE
+};
+
+Void echoFxn(UArg arg0, UArg arg1)
+{
+       uint8_t         rxBufferPointer[4];
+       uint8_t         txBufferPointer[4];
+    SPI_Handle      spi;
+    SPI_Params      spiParams;
+    SPI_Transaction spiTransaction;
+
+    SPI_Params_init(&spiParams);
+    // Slave mode
+    spiParams.mode = SPI_SLAVE;
+    spiParams.bitRate = 500000;
+    spiParams.frameFormat = SPI_POL1_PHA1;
+    // params.transferMode = SPI_MODE_CALLBACK;
+    //spiParams.transferCallbackFxn = spi_tx_call;
+
+    spi=SPI_open(Board_SPI1,&spiParams);
+    if(!spi){
+      System_printf("SPI did not open");
+    }
+    System_printf("SPI-Slave Open\r\n");
+
+    rxBufferPointer[0]='*';
+    while(1) {
+
+       spiTransaction.rxBuf= rxBufferPointer;
+       spiTransaction.txBuf = txBufferPointer;
+       spiTransaction.count=1;
+
+               PIN_setOutputValue(ledPinHandle, Board_LEDG,!PIN_getOutputValue(Board_LEDG));
+               if (SPI_transfer(spi,&spiTransaction)) {
+
+                       txBufferPointer[0]=rxBufferPointer[0];
+                       System_printf("RxData: %x TxData: %x\r\n",rxBufferPointer[0],txBufferPointer[0]);
+
+               }
+
+
+    }
+
+    /* Deinitialized I2C */
+    SPI_close(spi);
+}
+
+
+/*
+ *  ======== heartBeatFxn ========
+ *  Toggle the Board_LED0. The Task_sleep is determined by arg0 which
+ *  is configured for the heartBeat Task instance.
+ */
+Void heartBeatFxn(UArg arg0, UArg arg1)
+{
+    while (1) {
+        Task_sleep((UInt)arg0);
+        //PIN_setOutputValue(ledPinHandle, Board_LEDG,!PIN_getOutputValue(Board_LEDG));
+        //PIN_setOutputValue(ledPinHandle, Board_LEDR,!PIN_getOutputValue(Board_LEDR));
+    }
+}
+
+/*
+ *  ======== main ========
+ */
+int main(void)
+{
+    Task_Params taskParams;
+
+    /* Call board init functions */
+    Board_initGeneral();
+    Board_initSPI();
+    // Board_initI2C();
+    // Board_initUART();
+    // Board_initWatchdog();
+
+    /* Init UART for System_printf()*/
+    UART_Params uartParams;
+    UART_Params_init(&uartParams);
+    uartParams.baudRate = 115200;
+    UartPrintf_init(UART_open(Board_UART, &uartParams));
+    System_printf("Uart open\r\n");
+
+    /* Construct heartBeat Task thread */
+    Task_Params_init(&taskParams);
+    taskParams.arg0 = 200000 / Clock_tickPeriod;
+    taskParams.stackSize = TASKSTACKSIZE;
+    taskParams.stack = &task0Stack;
+    Task_construct(&task0Struct, (Task_FuncPtr)heartBeatFxn, &taskParams, NULL);
+
+    /* Construct SPI Echo Task thread */
+    Task_Params_init(&taskParams);
+    taskParams.arg0 = 0;
+    taskParams.stackSize = TASKSTACKSIZE;
+    taskParams.stack = &task1Stack;
+    Task_construct(&task1Struct, (Task_FuncPtr)echoFxn, &taskParams, NULL);
+
+    /* Open LED pins */
+    ledPinHandle = PIN_open(&ledPinState, ledPinTable);
+    if(!ledPinHandle) {
+        System_abort("Error initializing board LED pins\n");
+    }
+
+    PIN_setOutputValue(ledPinHandle, Board_LED0, 0);
+    PIN_setOutputValue(ledPinHandle, Board_LED1, 0);
+
+    /* Start BIOS */
+    BIOS_start();
+
+    return (0);
+}
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 (file)
index 0000000..140b3da
--- /dev/null
@@ -0,0 +1,173 @@
+/**************************************************************************************************\r
+  Filename:       uart_printf.c\r
+\r
+  Description:    This file contains the TI-RTOS hooks for printing to UART via\r
+                  System_printf(..).\r
+\r
+                  This is a very basic implementation made for the purposes of\r
+                  terminal feedback in workshops, trainings and debug.\r
+\r
+  Copyright 2015 Texas Instruments Incorporated. All rights reserved.\r
+\r
+  IMPORTANT: Your use of this Software is limited to those specific rights\r
+  granted under the terms of a software license agreement between the user\r
+  who downloaded the software, his/her employer (which must be your employer)\r
+  and Texas Instruments Incorporated (the "License").  You may not use this\r
+  Software unless you agree to abide by the terms of the License. The License\r
+  limits your use, and you acknowledge, that the Software may not be modified,\r
+  copied or distributed unless embedded on a Texas Instruments microcontroller\r
+  or used solely and exclusively in conjunction with a Texas Instruments radio\r
+  frequency transceiver, which is integrated into your product.  Other than for\r
+  the foregoing purpose, you may not use, reproduce, copy, prepare derivative\r
+  works of, modify, distribute, perform, display or sell this Software and/or\r
+  its documentation for any purpose.\r
+\r
+  YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE\r
+  PROVIDED \93AS IS\94 WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,\r
+  INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,\r
+  NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL\r
+  TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,\r
+  NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER\r
+  LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES\r
+  INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE\r
+  OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT\r
+  OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES\r
+  (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.\r
+\r
+  Should you have any questions regarding your right to use this Software,\r
+  contact Texas Instruments Incorporated at www.TI.com.\r
+**************************************************************************************************/\r
+\r
+/*********************************************************************\r
+ * INCLUDES\r
+ */\r
+#include <Board.h>\r
+#include <ti/drivers/UART.h>\r
+#include <ti/drivers/uart/UARTCC26XX.h>\r
+#include <stdint.h>\r
+\r
+/*********************************************************************\r
+ * CONSTANTS\r
+ */\r
+#define UART_PRINTF_BUF_LEN      1024\r
+\r
+/*********************************************************************\r
+ * TYPEDEFS\r
+ */\r
+\r
+/*********************************************************************\r
+ * LOCAL VARIABLES\r
+ */\r
+static uint8_t  uartPrintf_outArray[UART_PRINTF_BUF_LEN];\r
+static uint16_t uartPrintf_head = 0;\r
+static uint16_t uartPrintf_tail = 0;\r
+static UART_Handle hUart = NULL;\r
+\r
+\r
+/*********************************************************************\r
+ * PUBLIC FUNCTIONS\r
+ */\r
+\r
+/*********************************************************************\r
+ * @fn      UartPrintf_init\r
+ *\r
+ * @brief   Initializes the putchar hooks with the handle to the UART.\r
+ *\r
+ * @param   handle - UART driver handle to an initialized and opened UART.\r
+ *\r
+ * @return  None.\r
+ */\r
+void UartPrintf_init(UART_Handle handle)\r
+{\r
+       hUart = handle;\r
+}\r
+\r
+/*********************************************************************\r
+ * SYSTEM HOOK FUNCTIONS\r
+ */\r
+\r
+/*********************************************************************\r
+ * @fn      uartPrintf_putch\r
+ *\r
+ * @brief   User supplied PutChar function.\r
+ *          typedef Void (*SysCallback_PutchFxn)(Char);\r
+ *\r
+ *          This function is called whenever the System module needs\r
+ *          to output a character.\r
+ *\r
+ *          This implementation fills a very basic ring-buffer, and relies\r
+ *          on another function to flush this buffer out to UART.\r
+ *\r
+ *          Requires SysCallback to be the system provider module.\r
+ *          Initialized via SysCallback.putchFxn = "&uartPrintf_putch"; in the\r
+ *          TI-RTOS configuration script.\r
+ *\r
+ * @param   ch - Character\r
+ *\r
+ * @return  None.\r
+ *\r
+ * @post    ::uartPrintf_head is incremented by one with wrap at UART_PRINTF_BUF_LEN\r
+ *          if there is room.\r
+ */\r
+void uartPrintf_putch(char ch)\r
+{\r
+    // uartPrintf_tail should never catch up with uartPrintf_head. Discard in-between bytes.\r
+       if ( (uartPrintf_head + 1) % UART_PRINTF_BUF_LEN == uartPrintf_tail )\r
+               return;\r
+\r
+       uartPrintf_outArray[uartPrintf_head] = ch;\r
+       uartPrintf_head++;\r
+\r
+       if (uartPrintf_head >= UART_PRINTF_BUF_LEN)\r
+               uartPrintf_head = 0;\r
+}\r
+\r
+/*********************************************************************\r
+ * @fn      uartPrintf_flush\r
+ *\r
+ * @brief   Printf-buffer flush function\r
+ *\r
+ *          In this implementation it is intended to be called by the\r
+ *          Idle task when nothing else is running.\r
+ *\r
+ *          This is achieved by setting up the Idle task in the TI-RTOS\r
+ *          configuration script like so:\r
+ *\r
+ *          var Idle = xdc.useModule('ti.sysbios.knl.Idle');\r
+ *          Idle.addFunc('&uartPrintf_flush');\r
+ *\r
+ * @param   None. Relies on global state.\r
+ *\r
+ * @return  None.\r
+ *\r
+ * @post    ::uartPrintf_tail is incremented to where uartPrintf_head\r
+ *          was at the time the function was called.\r
+  */\r
+void uartPrintf_flush()\r
+{\r
+       // Abort in case UART hasn't been initialized.\r
+       if (NULL == hUart)\r
+               return;\r
+\r
+  // Lock head position to avoid race conditions\r
+  uint16_t curHead = uartPrintf_head;\r
+\r
+  // Find out how much data must be output, and how to output it.\r
+       bool needWrap = curHead < uartPrintf_tail;\r
+  uint16_t outLen = needWrap?(UART_PRINTF_BUF_LEN-uartPrintf_tail+curHead):(curHead-uartPrintf_tail);\r
+\r
+       if (outLen)\r
+       {\r
+               if (needWrap)\r
+               {\r
+                       UART_write(hUart, &uartPrintf_outArray[uartPrintf_tail], UART_PRINTF_BUF_LEN - uartPrintf_tail);\r
+                       UART_write(hUart, uartPrintf_outArray, curHead);\r
+               }\r
+               else\r
+               {\r
+                       UART_write(hUart, &uartPrintf_outArray[uartPrintf_tail], outLen);\r
+               }\r
+       }\r
+\r
+       uartPrintf_tail = curHead;\r
+}\r
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 (file)
index 0000000..84b82fe
--- /dev/null
@@ -0,0 +1,81 @@
+/**************************************************************************************************\r
+  Filename:       uart_printf.c\r
+\r
+  Description:    This file contains the TI-RTOS hooks for printing to UART via\r
+                  System_printf(..).\r
+\r
+                  This is a very basic implementation made for the purposes of\r
+                  terminal feedback in workshops, trainings and debug.\r
+\r
+  Copyright 2015 Texas Instruments Incorporated. All rights reserved.\r
+\r
+  IMPORTANT: Your use of this Software is limited to those specific rights\r
+  granted under the terms of a software license agreement between the user\r
+  who downloaded the software, his/her employer (which must be your employer)\r
+  and Texas Instruments Incorporated (the "License").  You may not use this\r
+  Software unless you agree to abide by the terms of the License. The License\r
+  limits your use, and you acknowledge, that the Software may not be modified,\r
+  copied or distributed unless embedded on a Texas Instruments microcontroller\r
+  or used solely and exclusively in conjunction with a Texas Instruments radio\r
+  frequency transceiver, which is integrated into your product.  Other than for\r
+  the foregoing purpose, you may not use, reproduce, copy, prepare derivative\r
+  works of, modify, distribute, perform, display or sell this Software and/or\r
+  its documentation for any purpose.\r
+\r
+  YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE\r
+  PROVIDED \93AS IS\94 WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,\r
+  INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,\r
+  NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL\r
+  TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,\r
+  NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER\r
+  LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES\r
+  INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE\r
+  OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT\r
+  OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES\r
+  (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.\r
+\r
+  Should you have any questions regarding your right to use this Software,\r
+  contact Texas Instruments Incorporated at www.TI.com.\r
+**************************************************************************************************/\r
+\r
+#ifndef UART_PRINTF_H\r
+#define UART_PRINTF_H\r
+\r
+#ifdef __cplusplus\r
+extern "C"\r
+{\r
+#endif\r
+/*********************************************************************\r
+ * INCLUDES\r
+ */\r
+#include <ti/drivers/UART.h>\r
+\r
+/*********************************************************************\r
+ * CONSTANTS\r
+ */\r
+\r
+/*********************************************************************\r
+ * TYPEDEFS\r
+ */\r
+\r
+/*********************************************************************\r
+ * PUBLIC FUNCTIONS\r
+ */\r
+\r
+/*********************************************************************\r
+ * @fn      UartPrintf_init\r
+ *\r
+ * @brief   Initializes the putchar hooks with the handle to the UART.\r
+ *\r
+ * @param   handle - UART driver handle to an initialized and opened UART.\r
+ *\r
+ * @return  None.\r
+ */\r
+void UartPrintf_init(UART_Handle handle);\r
+\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif // UART_PRINTF_H\r