[i3-mote/i3-mote.git] / Basic-Test-Package / CC2650 / Test_CC2650_3wSPI_Master_MSP432_SlaveIRQ / Board.h
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 */
33 #ifndef __BOARD_H
34 #define __BOARD_H
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
40 #include <ti/drivers/Power.h>
42 #include "CC2650_I3M.h"
44 /* These #defines allow us to reuse TI-RTOS across other device families */
45 #define Board_LED0 Board_LEDR
46 #define Board_LED1 Board_LEDG
48 #define Board_BUTTON0 Board_BTN1
49 #define Board_BUTTON1 Board_SPI1_IRQ
51 #define Board_I2C0 Board_I2C
53 #define Board_UART0 Board_UART
54 #define Board_AES0 Board_AES
55 #define Board_WATCHDOG0 Board_WATCHDOG
57 #define Board_ADC0 CC2650_I3MOTE_ADCVSS
58 #define Board_ADC1 CC2650_I3MOTE_ADCVDDS
60 #define Board_ADCBuf0 CC2650_I3MOTE_ADCBuf0
61 #define Board_ADCBufChannel0 (0)
62 #define Board_ADCBufChannel1 (1)
64 #define Board_initGeneral() { \
65 Power_init(); \
66 if (PIN_init(BoardGpioInitTable) != PIN_SUCCESS) \
67 {System_abort("Error with PIN_init\n"); \
68 } \
69 }
71 #define Board_initGPIO()
72 #define Board_initPWM() PWM_init()
73 #define Board_initSPI() SPI_init()
74 #define Board_initI2C() I2C_init()
75 #define Board_initUART() UART_init()
76 #define Board_initWatchdog() Watchdog_init()
77 #define Board_initADCBuf() ADCBuf_init()
78 #define Board_initADC() ADC_init()
79 #define GPIO_toggle(n)
80 #define GPIO_write(n,m)
82 #ifdef __cplusplus
83 }
84 #endif
86 #endif /* __BOARD_H */