Added Test Wake-Up
[i3-mote/i3-mote.git] / Basic-Test-Package / CC2650 / board / 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)
76 #define Board_LISHH12_ADDR   (0x1E)
81 /* Mapping of pins to board signals using general board aliases
82  *      <board signal alias>        <pin mapping>
83  */
84 /* Discrete outputs */
85 /* I2C */
87 #define Board_I2C0_SDA0             IOID_23
88 #define Board_I2C0_SCL0             IOID_24
90 #define Board_LEDG                  IOID_6
91 #define Board_LEDR                  IOID_5
93 #define Board_LED_ON                1
94 #define Board_LED_OFF               0
96 /* Discrete inputs */
97 #define Board_BTN1                  IOID_4
98 #define Board_BTN2                  PIN_UNASSIGNED
101 /* DAC8730 UART */
102 #ifdef Board_UART1
103   #warning "DAC8730-UART"
104   #define Board_UART_TX               IOID_8  // TXD to DAC
105   #define Board_UART_RX               IOID_9  // RXD from DAC
106 #else
107 /* Debug UART */
108   #define Board_UART_RX               IOID_2
109   #define Board_UART_TX               IOID_3
110 #endif
112 /* SPI Board */
113 #define Board_SPI0_IRQ              IOID_10
114 #define Board_SPI0_MISO             IOID_12
115 #define Board_SPI0_MOSI             IOID_13
116 #define Board_SPI0_CLK              IOID_14
117 #define Board_SPI0_CSN              IOID_15
119 #define Board_SPI1_MISO             IOID_18
120 #define Board_SPI1_MOSI             IOID_19
121 #define Board_SPI1_CLK              IOID_20
122 #define Board_SPI1_CSN              IOID_21
123 #define Board_SPI1_IRQ              IOID_22
125 /* Power */
126 //#define Board_DIO0                IOID_0  // VCCIO_DAC
127 //#define Board_DIO1                IOID_1  // GPS_PWR_nEN
128 //#define Board_DIO7                IOID_7  // EH_nBYPASS
129 //#define Board_DIO25               IOID_25 // SSM_PWR_nEN
130 //#define Board_DIO26               IOID_26 // GPS_PWR_nEN
131 //#define Board_DIO27               IOID_27 // VBAT_OK
132 //#define Board_DIO28               IOID_28 // SSM_5V_EN
134 /* Misc */
135 //#define Board_DIO11                 IOID_11 // BSL
136 //#define Board_DIO16                 IOID_16 // JTAG_TDO
137 //#define Board_DIO17                 IOID_17 // JTAG_TDI
141 /* Analog */
142 #define Board_DIO23_ANALOG          PIN_UNASSIGNED
143 #define Board_DIO24_ANALOG          PIN_UNASSIGNED
144 #define Board_DIO25_ANALOG          PIN_UNASSIGNED
145 #define Board_DIO26_ANALOG          PIN_UNASSIGNED
146 #define Board_DIO27_ANALOG          PIN_UNASSIGNED
147 #define Board_DIO28_ANALOG          PIN_UNASSIGNED
148 #define Board_DIO29_ANALOG          PIN_UNASSIGNED
149 #define Board_DIO30_ANALOG          PIN_UNASSIGNED
152 /* PWM outputs */
153 #define Board_PWMPIN0                PIN_UNASSIGNED
154 #define Board_PWMPIN1                PIN_UNASSIGNED
155 #define Board_PWMPIN2                PIN_UNASSIGNED
156 #define Board_PWMPIN3                PIN_UNASSIGNED
157 #define Board_PWMPIN4                PIN_UNASSIGNED
158 #define Board_PWMPIN5                PIN_UNASSIGNED
159 #define Board_PWMPIN6                PIN_UNASSIGNED
160 #define Board_PWMPIN7                PIN_UNASSIGNED
163 /** ============================================================================
164  *  Instance identifiers
165  *  ==========================================================================*/
166 /* Generic I2C instance identifiers */
167 #define Board_I2C                   CC2650_I3MOTE_I2C0
168 /* Generic SPI instance identifiers */
169 #define Board_SPI0                  CC2650_I3MOTE_SPI0
170 #define Board_SPI1                  CC2650_I3MOTE_SPI1
171 /* Generic UART instance identifiers */
172 #define Board_UART                  CC2650_I3MOTE_UART0
173 /* Generic Crypto instance identifiers */
174 #define Board_CRYPTO                CC2650_I3MOTE_CRYPTO0
175 /* Generic GPTimer instance identifiers */
176 #define Board_GPTIMER0A             CC2650_I3MOTE_GPTIMER0A
177 #define Board_GPTIMER0B             CC2650_I3MOTE_GPTIMER0B
178 #define Board_GPTIMER1A             CC2650_I3MOTE_GPTIMER1A
179 #define Board_GPTIMER1B             CC2650_I3MOTE_GPTIMER1B
180 #define Board_GPTIMER2A             CC2650_I3MOTE_GPTIMER2A
181 #define Board_GPTIMER2B             CC2650_I3MOTE_GPTIMER2B
182 #define Board_GPTIMER3A             CC2650_I3MOTE_GPTIMER3A
183 #define Board_GPTIMER3B             CC2650_I3MOTE_GPTIMER3B
184 /* Generic PWM instance identifiers */
185 #define Board_PWM0                  CC2650_I3MOTE_PWM0
186 #define Board_PWM1                  CC2650_I3MOTE_PWM1
187 #define Board_PWM2                  CC2650_I3MOTE_PWM2
188 #define Board_PWM3                  CC2650_I3MOTE_PWM3
189 #define Board_PWM4                  CC2650_I3MOTE_PWM4
190 #define Board_PWM5                  CC2650_I3MOTE_PWM5
191 #define Board_PWM6                  CC2650_I3MOTE_PWM6
192 #define Board_PWM7                  CC2650_I3MOTE_PWM7
194 /** ============================================================================
195  *  Number of peripherals and their names
196  *  ==========================================================================*/
198 /*!
199  *  @def    CC2650_I3MOTE_I2CName
200  *  @brief  Enum of I2C names on the CC2650 dev board
201  */
202 typedef enum CC2650_I3MOTE_I2CName {
203     CC2650_I3MOTE_I2C0 = 0,
205     CC2650_I3MOTE_I2CCOUNT
206 } CC2650_I3MOTE_I2CName;
208 /*!
209  *  @def    CC2650_I3MOTE_CryptoName
210  *  @brief  Enum of Crypto names on the CC2650 dev board
211  */
212 typedef enum CC2650_I3MOTE_CryptoName {
213     CC2650_I3MOTE_CRYPTO0 = 0,
215     CC2650_I3MOTE_CRYPTOCOUNT
216 } CC2650_I3MOTE_CryptoName;
219 /*!
220  *  @def    CC2650_I3MOTE_SPIName
221  *  @brief  Enum of SPI names on the CC2650 dev board
222  */
223 typedef enum CC2650_I3MOTE_SPIName {
224     CC2650_I3MOTE_SPI0 = 0,
225     CC2650_I3MOTE_SPI1,
227     CC2650_I3MOTE_SPICOUNT
228 } CC2650_I3MOTE_SPIName;
230 /*!
231  *  @def    CC2650_I3MOTE_UARTName
232  *  @brief  Enum of UARTs on the CC2650 dev board
233  */
234 typedef enum CC2650_I3MOTE_UARTName {
235     CC2650_I3MOTE_UART0 = 0,
237     CC2650_I3MOTE_UARTCOUNT
238 } CC2650_I3MOTE_UARTName;
240 /*!
241  *  @def    CC2650_I3MOTE_UdmaName
242  *  @brief  Enum of DMA buffers
243  */
244 typedef enum CC2650_I3MOTE_UdmaName {
245     CC2650_I3MOTE_UDMA0 = 0,
247     CC2650_I3MOTE_UDMACOUNT
248 } CC2650_I3MOTE_UdmaName;
250 /*!
251  *  @def    CC2650_I3MOTE_GPTimerName
252  *  @brief  Enum of GPTimer parts
253  */
254 typedef enum CC2650_I3MOTE_GPTimerName
256     CC2650_I3MOTE_GPTIMER0A = 0,
257     CC2650_I3MOTE_GPTIMER0B,
258     CC2650_I3MOTE_GPTIMER1A,
259     CC2650_I3MOTE_GPTIMER1B,
260     CC2650_I3MOTE_GPTIMER2A,
261     CC2650_I3MOTE_GPTIMER2B,
262     CC2650_I3MOTE_GPTIMER3A,
263     CC2650_I3MOTE_GPTIMER3B,
264     CC2650_I3MOTE_GPTIMERPARTSCOUNT
265 } CC2650_I3MOTE_GPTimerName;
267 /*!
268  *  @def    CC2650_I3MOTE_GPTimers
269  *  @brief  Enum of GPTimers
270  */
271 typedef enum CC2650_I3MOTE_GPTimers
273     CC2650_I3MOTE_GPTIMER0 = 0,
274     CC2650_I3MOTE_GPTIMER1,
275     CC2650_I3MOTE_GPTIMER2,
276     CC2650_I3MOTE_GPTIMER3,
277     CC2650_I3MOTE_GPTIMERCOUNT
278 } CC2650_I3MOTE_GPTimers;
280 /*!
281  *  @def    CC2650_I3MOTE_PWM
282  *  @brief  Enum of PWM outputs on the board
283  */
284 typedef enum CC2650_I3MOTE_PWM
286     CC2650_I3MOTE_PWM0 = 0,
287     CC2650_I3MOTE_PWM1,
288     CC2650_I3MOTE_PWM2,
289     CC2650_I3MOTE_PWM3,
290     CC2650_I3MOTE_PWM4,
291     CC2650_I3MOTE_PWM5,
292     CC2650_I3MOTE_PWM6,
293     CC2650_I3MOTE_PWM7,
294     CC2650_I3MOTE_PWMCOUNT
295 } CC2650_I3MOTE_PWM;
297 /*!
298  *  @def    CC2650_I3MOTE_ADCBufName
299  *  @brief  Enum of ADCs
300  */
301 typedef enum CC2650_I3MOTE_ADCBufName {
302     CC2650_I3MOTE_ADCBuf0 = 0,
303     CC2650_I3MOTE_ADCBufCOUNT
304 } CC2650_I3MOTE_ADCBufName;
307 /*!
308  *  @def    CC2650_I3MOTE_ADCName
309  *  @brief  Enum of ADCs
310  */
311 typedef enum CC2650_I3MOTE_ADCName {
312     CC2650_I3MOTE_ADC0 = 0,
313     CC2650_I3MOTE_ADC1,
314     CC2650_I3MOTE_ADC2,
315     CC2650_I3MOTE_ADC3,
316     CC2650_I3MOTE_ADC4,
317     CC2650_I3MOTE_ADC5,
318     CC2650_I3MOTE_ADC6,
319     CC2650_I3MOTE_ADC7,
320     CC2650_I3MOTE_ADCDCOUPL,
321     CC2650_I3MOTE_ADCVSS,
322     CC2650_I3MOTE_ADCVDDS,
323     CC2650_I3MOTE_ADCCOUNT
324 } CC2650_I3MOTE_ADCName;
327 #ifdef __cplusplus
329 #endif
331 #endif /* __CC2650_I3MOTE_BOARD_H__ */