Contiki-NG
Board.h
1 /*
2  * Copyright (c) 2017-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
37 extern "C" {
38 #endif
39 
40 #include <ti/drivers/Board.h>
41 #include "LPSTK.h"
42 
43 #define Board_LPSTK
44 #define BOARD_STRING "TI CC1352R SensorTag"
45 
46 #define Board_initGeneral() Board_init() /* deprecated */
47 #define Board_shutDownExtFlash() LPSTK_shutDownExtFlash()
48 #define Board_wakeUpExtFlash() LPSTK_wakeUpExtFlash()
49 
50 /* These #defines allow us to reuse TI-RTOS across other device families */
51 #define Board_ADC0 LPSTK_ADC0
52 #define Board_ADC1 LPSTK_ADC1
53 
54 #define Board_ADCBUF0 LPSTK_ADCBUF0
55 #define Board_ADCBUF0CHANNEL0 LPSTK_ADCBUF0CHANNEL0
56 #define Board_ADCBUF0CHANNEL1 LPSTK_ADCBUF0CHANNEL1
57 
58 #define Board_ECDH0 LPSTK_ECDH0
59 #define Board_ECDSA0 LPSTK_ECDSA0
60 #define Board_ECJPAKE0 LPSTK_ECJPAKE0
61 #define Board_AESCCM0 LPSTK_AESCCM0
62 #define Board_AESGCM0 LPSTK_AESGCM0
63 #define Board_AESCBC0 LPSTK_AESCBC0
64 #define Board_AESCTR0 LPSTK_AESCTR0
65 #define Board_AESECB0 LPSTK_AESECB0
66 #define Board_AESCTRDRBG0 LPSTK_AESCTRDRBG0
67 #define Board_SHA20 LPSTK_SHA20
68 #define Board_TRNG0 LPSTK_TRNG0
69 
70 #define Board_DIO16_TDO LPSTK_DIO16_TDO
71 #define Board_DIO17_TDI LPSTK_DIO17_TDI
72 #define Board_DIO22 LPSTK_DIO22
73 
74 #define Board_DIO24_ANALOG LPSTK_DIO24_ANALOG
75 #define Board_DIO26_ANALOG LPSTK_DIO26_ANALOG
76 #define Board_DIO28_ANALOG LPSTK_DIO28_ANALOG
77 #define Board_DIO29_ANALOG LPSTK_DIO29_ANALOG
78 
79 /*
80  * Board_RF_SUB1GHZ is the name generated by SysConfig. Define it
81  * here so that RF callback function can reference it.
82  */
83 #define Board_RF_SUB1GHZ LPSTK_DIO30_RF_SUB1GHZ
84 
85 #define Board_GPIO_BUTTON0 LPSTK_GPIO_S1
86 #define Board_GPIO_BUTTON1 LPSTK_GPIO_S2
87 #define Board_GPIO_BTN1 LPSTK_GPIO_S1
88 #define Board_GPIO_BTN2 LPSTK_GPIO_S2
89 #define Board_GPIO_LED0 LPSTK_GPIO_LED_RED
90 #define Board_GPIO_LED1 LPSTK_GPIO_LED_GREEN
91 #define Board_GPIO_LED2 LPSTK_GPIO_LED_RED
92 #define Board_GPIO_RLED LPSTK_GPIO_LED_RED
93 #define Board_GPIO_GLED LPSTK_GPIO_LED_GREEN
94 #define Board_GPIO_LED_ON LPSTK_GPIO_LED_ON
95 #define Board_GPIO_LED_OFF LPSTK_GPIO_LED_OFF
96 
97 #define Board_GPTIMER0A LPSTK_GPTIMER0A
98 #define Board_GPTIMER0B LPSTK_GPTIMER0B
99 #define Board_GPTIMER1A LPSTK_GPTIMER1A
100 #define Board_GPTIMER1B LPSTK_GPTIMER1B
101 #define Board_GPTIMER2A LPSTK_GPTIMER2A
102 #define Board_GPTIMER2B LPSTK_GPTIMER2B
103 #define Board_GPTIMER3A LPSTK_GPTIMER3A
104 #define Board_GPTIMER3B LPSTK_GPTIMER3B
105 
106 #define Board_NVSINTERNAL LPSTK_NVSCC26XX0
107 #define Board_NVSEXTERNAL LPSTK_NVSSPI25X0
108 
109 #define Board_I2C0 LPSTK_I2C0
110 #define Board_I2C1 LPSTK_I2C1
111 #define Board_I2C_TMP Board_I2C0
112 
113 #define Board_PIN_BUTTON0 LPSTK_PIN_BTN1
114 #define Board_PIN_BUTTON1 LPSTK_PIN_BTN2
115 #define Board_PIN_BTN1 LPSTK_PIN_BTN1
116 #define Board_PIN_BTN2 LPSTK_PIN_BTN2
117 #define Board_PIN_LED0 LPSTK_PIN_RLED
118 #define Board_PIN_LED1 LPSTK_PIN_GLED
119 #define Board_PIN_LED2 LPSTK_PIN_RLED
120 #define Board_PIN_RLED LPSTK_PIN_RLED
121 #define Board_PIN_GLED LPSTK_PIN_GLED
122 
123 #define Board_KEY_LEFT LPSTK_KEY_LEFT
124 #define Board_KEY_RIGHT LPSTK_KEY_RIGHT
125 #define Board_RELAY LPSTK_RELAY
126 
127 #define Board_BUZZER LPSTK_BUZZER
128 #define Board_BUZZER_ON LPSTK_LED_ON
129 #define Board_BUZZER_OFF LPSTK_LED_OFF
130 
131 #define Board_MPU_INT LPSTK_MPU_INT
132 #define Board_MPU_POWER LPSTK_MPU_POWER
133 #define Board_MPU_POWER_OFF LPSTK_MPU_POWER_OFF
134 #define Board_MPU_POWER_ON LPSTK_MPU_POWER_ON
135 
136 #define Board_TMP_RDY LPSTK_TMP_RDY
137 
138 #define Board_I2S0 LPSTK_I2S0
139 #define Board_I2S_ADO LPSTK_I2S_ADO
140 #define Board_I2S_ADI LPSTK_I2S_ADI
141 #define Board_I2S_BCLK LPSTK_I2S_BCLK
142 #define Board_I2S_MCLK LPSTK_I2S_MCLK
143 #define Board_I2S_WCLK LPSTK_I2S_WCLK
144 
145 #define Board_PWM0 LPSTK_PWM0
146 #define Board_PWM1 LPSTK_PWM1
147 #define Board_PWM2 LPSTK_PWM2
148 #define Board_PWM3 LPSTK_PWM3
149 #define Board_PWM4 LPSTK_PWM4
150 #define Board_PWM5 LPSTK_PWM5
151 #define Board_PWM6 LPSTK_PWM6
152 #define Board_PWM7 LPSTK_PWM7
153 
154 #define Board_SPI0 LPSTK_SPI0
155 #define Board_SPI0_MISO LPSTK_SPI0_MISO
156 #define Board_SPI0_MOSI LPSTK_SPI0_MOSI
157 #define Board_SPI0_CLK LPSTK_SPI0_CLK
158 #define Board_SPI0_CSN LPSTK_SPI0_CSN
159 #define Board_SPI1 LPSTK_SPI1
160 #define Board_SPI1_MISO LPSTK_SPI1_MISO
161 #define Board_SPI1_MOSI LPSTK_SPI1_MOSI
162 #define Board_SPI1_CLK LPSTK_SPI1_CLK
163 #define Board_SPI1_CSN LPSTK_SPI1_CSN
164 #define Board_SPI_FLASH_CS LPSTK_SPI_FLASH_CS
165 #define Board_FLASH_CS_ON (0)
166 #define Board_FLASH_CS_OFF (1)
167 
168 #define Board_UART0 LPSTK_UART0
169 
170 #define Board_WATCHDOG0 LPSTK_WATCHDOG0
171 
172 /* Board specific I2C addresses */
173 #define Board_BMP280_ADDR (0x77)
174 #define Board_HDC1000_ADDR (0x41)
175 #define Board_MPU9250_ADDR (0x68)
176 #define Board_MPU9250_MAG_ADDR (0x0C)
177 #define Board_OPT3001_ADDR (0x44)
178 #define Board_TMP_ADDR (0x45)
179 
180 #ifdef __cplusplus
181 }
182 #endif
183 
184 #endif /* __BOARD_H */
===========================================================================