Created Test CC2650 3wSPI_Mastee MSP432_SlaveIRQ
[i3-mote/i3-mote.git] / Basic-Test-Package / CC2650 / Test_CC2650_3wSPI_Master_MSP432_SlaveIRQ / CC2650_I3M.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  */
32 /** ============================================================================
33  *  @file       CC2650_I3MOTE.h
34  *
35  *  @brief      CC2650 LaunchPad Board Specific header file.
36  *
37  *  NB! This is the board file for CC2650 LaunchPad PCB version 1.1
38  *
39  *  ============================================================================
40  */
41 #ifndef __CC2650_I3MOTE_BOARD_H__
42 #define __CC2650_I3MOTE_BOARD_H__
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
48 /** ============================================================================
49  *  Includes
50  *  ==========================================================================*/
51 #include <ti/drivers/PIN.h>
52 #include <driverlib/ioc.h>
54 /** ============================================================================
55  *  Externs
56  *  ==========================================================================*/
57 extern const PIN_Config BoardGpioInitTable[];
59 /** ============================================================================
60  *  Defines
61  *  ==========================================================================*/
63 /* Same RF Configuration as 7x7 EM */
64 #define CC2650EM_7ID
65 #define CC2650_I3MOTE
68 /* Sensors */
69 #define Board_INA219_ADDR    (0x41)
70 #define Board_HDC1000_ADDR   (0x43)
71 #define Board_HDC1080_ADDR   (0x40)
72 #define Board_TMP007_ADDR    (0x44)
73 #define Board_OPT3001_ADDR   (0x45)
74 #define Board_MPU9250_ADDR   (0x68)
75 #define Board_BMP280_ADDR    (0x77)
78 /* Mapping of pins to board signals using general board aliases
79  *      <board signal alias>        <pin mapping>
80  */
81 /* Discrete outputs */
82 /* I2C */
84 #define Board_I2C0_SDA0             IOID_23
85 #define Board_I2C0_SCL0             IOID_24
87 #define Board_LEDR                  IOID_5
88 #define Board_LEDG                  IOID_6
90 #define Board_LED_ON                1
91 #define Board_LED_OFF               0
93 /* Discrete inputs */
94 #define Board_BTN1                  IOID_4
95 #define Board_BTN2                  PIN_UNASSIGNED
97 /* Debug UART */
98 #define Board_UART_RX               IOID_2          /* RXD  */
99 #define Board_UART_TX               IOID_3          /* TXD  */
101 /* DAC8730 UART */
102 //#define Board_UART_TX               IOID_8          /* TCD to DAC*/
103 //#define Board_UART_RX               IOID_9          /* RXD from DAC  */
105 /* SPI Board */
106 #define Board_SPI0_IRQ              IOID_10
107 #define Board_SPI0_MISO             IOID_12
108 #define Board_SPI0_MOSI             IOID_13
109 #define Board_SPI0_CLK              IOID_14
110 #define Board_SPI0_CSN              IOID_15
112 #define Board_SPI1_MISO             IOID_18
113 #define Board_SPI1_MOSI             IOID_19
114 #define Board_SPI1_CLK              IOID_20
115 #define Board_SPI1_CSN              IOID_21
116 #define Board_SPI1_IRQ              IOID_22
118 /* Power */
119 //#define Board_DIO0                IOID_0  // VCCIO_DAC
120 //#define Board_DIO1                IOID_1  // GPS_PWR_nEN
121 //#define Board_DIO7                IOID_7  // EH_nBYPASS
122 //#define Board_DIO25               IOID_25 // SSM_PWR_nEN
123 //#define Board_DIO26               IOID_26 // GPS_PWR_nEN
124 //#define Board_DIO27               IOID_27 // VBAT_OK
125 //#define Board_DIO28               IOID_28 // SSM_5V_EN
127 /* Misc */
128 //#define Board_DIO11                 IOID_11 // BSL
129 //#define Board_DIO16                 IOID_16 // JTAG_TDO
130 //#define Board_DIO17                 IOID_17 // JTAG_TDI
134 /* Analog */
135 #define Board_DIO23_ANALOG          PIN_UNASSIGNED
136 #define Board_DIO24_ANALOG          PIN_UNASSIGNED
137 #define Board_DIO25_ANALOG          PIN_UNASSIGNED
138 #define Board_DIO26_ANALOG          PIN_UNASSIGNED
139 #define Board_DIO27_ANALOG          PIN_UNASSIGNED
140 #define Board_DIO28_ANALOG          PIN_UNASSIGNED
141 #define Board_DIO29_ANALOG          PIN_UNASSIGNED
142 #define Board_DIO30_ANALOG          PIN_UNASSIGNED
145 /* PWM outputs */
146 #define Board_PWMPIN0                PIN_UNASSIGNED
147 #define Board_PWMPIN1                PIN_UNASSIGNED
148 #define Board_PWMPIN2                PIN_UNASSIGNED
149 #define Board_PWMPIN3                PIN_UNASSIGNED
150 #define Board_PWMPIN4                PIN_UNASSIGNED
151 #define Board_PWMPIN5                PIN_UNASSIGNED
152 #define Board_PWMPIN6                PIN_UNASSIGNED
153 #define Board_PWMPIN7                PIN_UNASSIGNED
156 /** ============================================================================
157  *  Instance identifiers
158  *  ==========================================================================*/
159 /* Generic I2C instance identifiers */
160 #define Board_I2C                   CC2650_I3MOTE_I2C0
161 /* Generic SPI instance identifiers */
162 #define Board_SPI0                  CC2650_I3MOTE_SPI0
163 #define Board_SPI1                  CC2650_I3MOTE_SPI1
164 /* Generic UART instance identifiers */
165 #define Board_UART                  CC2650_I3MOTE_UART0
166 /* Generic Crypto instance identifiers */
167 #define Board_CRYPTO                CC2650_I3MOTE_CRYPTO0
168 /* Generic GPTimer instance identifiers */
169 #define Board_GPTIMER0A             CC2650_I3MOTE_GPTIMER0A
170 #define Board_GPTIMER0B             CC2650_I3MOTE_GPTIMER0B
171 #define Board_GPTIMER1A             CC2650_I3MOTE_GPTIMER1A
172 #define Board_GPTIMER1B             CC2650_I3MOTE_GPTIMER1B
173 #define Board_GPTIMER2A             CC2650_I3MOTE_GPTIMER2A
174 #define Board_GPTIMER2B             CC2650_I3MOTE_GPTIMER2B
175 #define Board_GPTIMER3A             CC2650_I3MOTE_GPTIMER3A
176 #define Board_GPTIMER3B             CC2650_I3MOTE_GPTIMER3B
177 /* Generic PWM instance identifiers */
178 #define Board_PWM0                  CC2650_I3MOTE_PWM0
179 #define Board_PWM1                  CC2650_I3MOTE_PWM1
180 #define Board_PWM2                  CC2650_I3MOTE_PWM2
181 #define Board_PWM3                  CC2650_I3MOTE_PWM3
182 #define Board_PWM4                  CC2650_I3MOTE_PWM4
183 #define Board_PWM5                  CC2650_I3MOTE_PWM5
184 #define Board_PWM6                  CC2650_I3MOTE_PWM6
185 #define Board_PWM7                  CC2650_I3MOTE_PWM7
187 /** ============================================================================
188  *  Number of peripherals and their names
189  *  ==========================================================================*/
191 /*!
192  *  @def    CC2650_I3MOTE_I2CName
193  *  @brief  Enum of I2C names on the CC2650 dev board
194  */
195 typedef enum CC2650_I3MOTE_I2CName {
196     CC2650_I3MOTE_I2C0 = 0,
198     CC2650_I3MOTE_I2CCOUNT
199 } CC2650_I3MOTE_I2CName;
201 /*!
202  *  @def    CC2650_I3MOTE_CryptoName
203  *  @brief  Enum of Crypto names on the CC2650 dev board
204  */
205 typedef enum CC2650_I3MOTE_CryptoName {
206     CC2650_I3MOTE_CRYPTO0 = 0,
208     CC2650_I3MOTE_CRYPTOCOUNT
209 } CC2650_I3MOTE_CryptoName;
212 /*!
213  *  @def    CC2650_I3MOTE_SPIName
214  *  @brief  Enum of SPI names on the CC2650 dev board
215  */
216 typedef enum CC2650_I3MOTE_SPIName {
217     CC2650_I3MOTE_SPI0 = 0,
218     CC2650_I3MOTE_SPI1,
220     CC2650_I3MOTE_SPICOUNT
221 } CC2650_I3MOTE_SPIName;
223 /*!
224  *  @def    CC2650_I3MOTE_UARTName
225  *  @brief  Enum of UARTs on the CC2650 dev board
226  */
227 typedef enum CC2650_I3MOTE_UARTName {
228     CC2650_I3MOTE_UART0 = 0,
230     CC2650_I3MOTE_UARTCOUNT
231 } CC2650_I3MOTE_UARTName;
233 /*!
234  *  @def    CC2650_I3MOTE_UdmaName
235  *  @brief  Enum of DMA buffers
236  */
237 typedef enum CC2650_I3MOTE_UdmaName {
238     CC2650_I3MOTE_UDMA0 = 0,
240     CC2650_I3MOTE_UDMACOUNT
241 } CC2650_I3MOTE_UdmaName;
243 /*!
244  *  @def    CC2650_I3MOTE_GPTimerName
245  *  @brief  Enum of GPTimer parts
246  */
247 typedef enum CC2650_I3MOTE_GPTimerName
249     CC2650_I3MOTE_GPTIMER0A = 0,
250     CC2650_I3MOTE_GPTIMER0B,
251     CC2650_I3MOTE_GPTIMER1A,
252     CC2650_I3MOTE_GPTIMER1B,
253     CC2650_I3MOTE_GPTIMER2A,
254     CC2650_I3MOTE_GPTIMER2B,
255     CC2650_I3MOTE_GPTIMER3A,
256     CC2650_I3MOTE_GPTIMER3B,
257     CC2650_I3MOTE_GPTIMERPARTSCOUNT
258 } CC2650_I3MOTE_GPTimerName;
260 /*!
261  *  @def    CC2650_I3MOTE_GPTimers
262  *  @brief  Enum of GPTimers
263  */
264 typedef enum CC2650_I3MOTE_GPTimers
266     CC2650_I3MOTE_GPTIMER0 = 0,
267     CC2650_I3MOTE_GPTIMER1,
268     CC2650_I3MOTE_GPTIMER2,
269     CC2650_I3MOTE_GPTIMER3,
270     CC2650_I3MOTE_GPTIMERCOUNT
271 } CC2650_I3MOTE_GPTimers;
273 /*!
274  *  @def    CC2650_I3MOTE_PWM
275  *  @brief  Enum of PWM outputs on the board
276  */
277 typedef enum CC2650_I3MOTE_PWM
279     CC2650_I3MOTE_PWM0 = 0,
280     CC2650_I3MOTE_PWM1,
281     CC2650_I3MOTE_PWM2,
282     CC2650_I3MOTE_PWM3,
283     CC2650_I3MOTE_PWM4,
284     CC2650_I3MOTE_PWM5,
285     CC2650_I3MOTE_PWM6,
286     CC2650_I3MOTE_PWM7,
287     CC2650_I3MOTE_PWMCOUNT
288 } CC2650_I3MOTE_PWM;
290 /*!
291  *  @def    CC2650_I3MOTE_ADCBufName
292  *  @brief  Enum of ADCs
293  */
294 typedef enum CC2650_I3MOTE_ADCBufName {
295     CC2650_I3MOTE_ADCBuf0 = 0,
296     CC2650_I3MOTE_ADCBufCOUNT
297 } CC2650_I3MOTE_ADCBufName;
300 /*!
301  *  @def    CC2650_I3MOTE_ADCName
302  *  @brief  Enum of ADCs
303  */
304 typedef enum CC2650_I3MOTE_ADCName {
305     CC2650_I3MOTE_ADC0 = 0,
306     CC2650_I3MOTE_ADC1,
307     CC2650_I3MOTE_ADC2,
308     CC2650_I3MOTE_ADC3,
309     CC2650_I3MOTE_ADC4,
310     CC2650_I3MOTE_ADC5,
311     CC2650_I3MOTE_ADC6,
312     CC2650_I3MOTE_ADC7,
313     CC2650_I3MOTE_ADCDCOUPL,
314     CC2650_I3MOTE_ADCVSS,
315     CC2650_I3MOTE_ADCVDDS,
316     CC2650_I3MOTE_ADCCOUNT
317 } CC2650_I3MOTE_ADCName;
320 #ifdef __cplusplus
322 #endif
324 #endif /* __CC2650_I3MOTE_BOARD_H__ */