Contiki-NG
Loading...
Searching...
No Matches
Board.h
1/*
2 * Copyright (c) 2015-2019, 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/Board.h>
41#include "CC1350STK.h"
42
43#define Board_CC1350STK
44#define BOARD_STRING "TI CC1350 SensorTag"
45
46#define Board_initGeneral() Board_init() /* deprecated */
47#define Board_shutDownExtFlash() CC1350STK_shutDownExtFlash()
48#define Board_wakeUpExtFlash() CC1350STK_wakeUpExtFlash()
49
50/* These #defines allow us to reuse TI-RTOS across other device families */
51#define Board_ADC0 CC1350STK_ADC0
52#define Board_ADC1 CC1350STK_ADC1
53
54#define Board_ADCBUF0 CC1350STK_ADCBUF0
55#define Board_ADCBUF0CHANNEL0 CC1350STK_ADCBUF0CHANNEL0
56#define Board_ADCBUF0CHANNEL1 CC1350STK_ADCBUF0CHANNEL1
57
58#define Board_CRYPTO0 CC1350STK_CRYPTO0
59#define Board_AESCCM0 CC1350STK_AESCCM0
60#define Board_AESGCM0 CC1350STK_AESGCM0
61#define Board_AESCBC0 CC1350STK_AESCBC0
62#define Board_AESCTR0 CC1350STK_AESCTR0
63#define Board_AESECB0 CC1350STK_AESECB0
64#define Board_AESCTRDRBG0 CC1350STK_AESCTRDRBG0
65#define Board_TRNG0 CC1350STK_TRNG0
66
67#define Board_DIO16_TDO CC1350STK_DIO16_TDO
68#define Board_DIO17_TDI CC1350STK_DIO17_TDI
69#define Board_DIO22 CC1350STK_DIO22
70
71#define Board_DIO23_ANALOG CC1350STK_DIO23_ANALOG
72#define Board_DIO24_ANALOG CC1350STK_DIO24_ANALOG
73#define Board_DIO25_ANALOG CC1350STK_DIO25_ANALOG
74#define Board_DIO26_ANALOG CC1350STK_DIO26_ANALOG
75#define Board_DIO27_ANALOG CC1350STK_DIO27_ANALOG
76#define Board_DIO28_ANALOG CC1350STK_DIO28_ANALOG
77#define Board_DIO29_ANALOG CC1350STK_DIO29_ANALOG
78#define Board_DIO30_ANALOG CC1350STK_DIO30_ANALOG
79
80#define Board_GPIO_BUTTON0 CC1350STK_GPIO_S1
81#define Board_GPIO_BUTTON1 CC1350STK_GPIO_S2
82#define Board_GPIO_BTN1 CC1350STK_GPIO_S1
83#define Board_GPIO_BTN2 CC1350STK_GPIO_S2
84#define Board_GPIO_LED0 CC1350STK_GPIO_LED_RED
85#define Board_GPIO_LED1 CC1350STK_GPIO_LED_RED
86#define Board_GPIO_RLED CC1350STK_GPIO_LED_RED
87#define Board_GPIO_LED_ON CC1350STK_GPIO_LED_ON
88#define Board_GPIO_LED_OFF CC1350STK_GPIO_LED_OFF
89
90#define Board_GPTIMER0A CC1350STK_GPTIMER0A
91#define Board_GPTIMER0B CC1350STK_GPTIMER0B
92#define Board_GPTIMER1A CC1350STK_GPTIMER1A
93#define Board_GPTIMER1B CC1350STK_GPTIMER1B
94#define Board_GPTIMER2A CC1350STK_GPTIMER2A
95#define Board_GPTIMER2B CC1350STK_GPTIMER2B
96#define Board_GPTIMER3A CC1350STK_GPTIMER3A
97#define Board_GPTIMER3B CC1350STK_GPTIMER3B
98
99#define Board_NVSINTERNAL CC1350STK_NVSCC26XX0
100#define Board_NVSEXTERNAL CC1350STK_NVSSPI25X0
101
102#define Board_I2C0 CC1350STK_I2C0
103#define Board_I2C1 CC1350STK_I2C1
104
105#define Board_PIN_BUTTON0 CC1350STK_PIN_BTN1
106#define Board_PIN_BUTTON1 CC1350STK_PIN_BTN2
107#define Board_PIN_BTN1 CC1350STK_PIN_BTN1
108#define Board_PIN_BTN2 CC1350STK_PIN_BTN2
109#define Board_PIN_LED0 CC1350STK_PIN_RLED
110#define Board_PIN_LED1 CC1350STK_PIN_RLED
111#define Board_PIN_LED2 CC1350STK_PIN_RLED
112#define Board_PIN_RLED CC1350STK_PIN_RLED
113
114#define Board_KEY_LEFT CC1350STK_KEY_LEFT
115#define Board_KEY_RIGHT CC1350STK_KEY_RIGHT
116#define Board_RELAY CC1350STK_RELAY
117
118#define Board_BUZZER CC1350STK_BUZZER
119#define Board_BUZZER_ON CC1350STK_LED_ON
120#define Board_BUZZER_OFF CC1350STK_LED_OFF
121
122#define Board_MIC_POWER CC1350STK_MIC_POWER
123#define Board_MIC_POWER_OM CC1350STK_MIC_POWER_ON
124#define Board_MIC_POWER_OFF CC1350STK_MIC_POWER_OFF
125
126#define Board_MPU_INT CC1350STK_MPU_INT
127#define Board_MPU_POWER CC1350STK_MPU_POWER
128#define Board_MPU_POWER_OFF CC1350STK_MPU_POWER_OFF
129#define Board_MPU_POWER_ON CC1350STK_MPU_POWER_ON
130
131#define Board_TMP_RDY CC1350STK_TMP_RDY
132
133#define Board_I2S0 CC1350STK_I2S0
134#define Board_I2S_ADO CC1350STK_I2S_ADO
135#define Board_I2S_ADI CC1350STK_I2S_ADI
136#define Board_I2S_BCLK CC1350STK_I2S_BCLK
137#define Board_I2S_MCLK CC1350STK_I2S_MCLK
138#define Board_I2S_WCLK CC1350STK_I2S_WCLK
139
140#define Board_PWM0 CC1350STK_PWM0
141#define Board_PWM1 CC1350STK_PWM0
142#define Board_PWM2 CC1350STK_PWM2
143#define Board_PWM3 CC1350STK_PWM3
144#define Board_PWM4 CC1350STK_PWM4
145#define Board_PWM5 CC1350STK_PWM5
146#define Board_PWM6 CC1350STK_PWM6
147#define Board_PWM7 CC1350STK_PWM7
148
149#define Board_SPI0 CC1350STK_SPI0
150#define Board_SPI0_MISO CC1350STK_SPI0_MISO
151#define Board_SPI0_MOSI CC1350STK_SPI0_MOSI
152#define Board_SPI0_CLK CC1350STK_SPI0_CLK
153#define Board_SPI0_CSN CC1350STK_SPI0_CSN
154#define Board_SPI1 CC1350STK_SPI1
155#define Board_SPI1_MISO CC1350STK_SPI1_MISO
156#define Board_SPI1_MOSI CC1350STK_SPI1_MOSI
157#define Board_SPI1_CLK CC1350STK_SPI1_CLK
158#define Board_SPI1_CSN CC1350STK_SPI1_CSN
159#define Board_SPI_FLASH_CS CC1350STK_SPI_FLASH_CS
160#define Board_FLASH_CS_ON (0)
161#define Board_FLASH_CS_OFF (1)
162
163#define Board_UART0 CC1350STK_UART0
164
165#define Board_WATCHDOG0 CC1350STK_WATCHDOG0
166
167/* Board specific I2C addresses */
168#define Board_BMP280_ADDR (0x77)
169#define Board_HDC1000_ADDR (0x43)
170#define Board_MPU9250_ADDR (0x68)
171#define Board_MPU9250_MAG_ADDR (0x0C)
172#define Board_OPT3001_ADDR (0x45)
173#define Board_TMP_ADDR (0x44)
174
175#ifdef __cplusplus
176}
177#endif
178
179#endif /* __BOARD_H */
============================================================================