Contiki-NG
board.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014, Texas Instruments Incorporated - http://www.ti.com/
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  * 1. Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * 3. Neither the name of the copyright holder nor the names of its
14  * contributors may be used to endorse or promote products derived
15  * from this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
20  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21  * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
28  * OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 /*---------------------------------------------------------------------------*/
31 /** \addtogroup cc26xx-srf-tag
32  * @{
33  *
34  * \defgroup cc26x0-cc13x0-peripherals Peripherals for the SmartRF06EB + CC26xxEM
35  *
36  * Defines related to the SmartRF06 Evaluation Board with a CC26xxEM
37  *
38  * This file provides connectivity information on LEDs, Buttons, UART and
39  * other peripherals
40  *
41  * This file can be used as the basis to configure other boards using the
42  * CC13xx/CC26xx code as their basis.
43  *
44  * This file is not meant to be modified by the user.
45  * @{
46  *
47  * \file
48  * Header file with definitions related to the I/O connections on the TI
49  * SmartRF06 Evaluation Board with a CC26xxEM
50  *
51  * \note Do not include this file directly. It gets included by contiki-conf
52  * after all relevant directives have been set.
53  */
54 /*---------------------------------------------------------------------------*/
55 #ifndef BOARD_H_
56 #define BOARD_H_
57 /*---------------------------------------------------------------------------*/
58 #include "ioc.h"
59 /*---------------------------------------------------------------------------*/
60 /**
61  * \name LED HAL configuration
62  *
63  * Those values are not meant to be modified by the user
64  * @{
65  */
66 #define LEDS_CONF_COUNT 4
67 #define LEDS_CONF_RED 1
68 #define LEDS_CONF_YELLOW 2
69 #define LEDS_CONF_GREEN 4
70 #define LEDS_CONF_ORANGE 8
71 /** @} */
72 /*---------------------------------------------------------------------------*/
73 /**
74  * \name LED IOID mappings
75  *
76  * Those values are not meant to be modified by the user
77  * @{
78  */
79 #define BOARD_IOID_LED_1 IOID_25
80 #define BOARD_IOID_LED_2 IOID_27
81 #define BOARD_IOID_LED_3 IOID_7
82 #define BOARD_IOID_LED_4 IOID_6
83 /** @} */
84 /*---------------------------------------------------------------------------*/
85 /**
86  * \name UART IOID mapping
87  *
88  * Those values are not meant to be modified by the user
89  * @{
90  */
91 #define BOARD_IOID_UART_RX IOID_2
92 #define BOARD_IOID_UART_TX IOID_3
93 #define BOARD_IOID_UART_CTS IOID_UNUSED
94 #define BOARD_IOID_UART_RTS IOID_UNUSED
95 #define BOARD_UART_RX (1 << BOARD_IOID_UART_RX)
96 #define BOARD_UART_TX (1 << BOARD_IOID_UART_TX)
97 #define BOARD_UART_CTS (1 << BOARD_IOID_UART_CTS)
98 #define BOARD_UART_RTS (1 << BOARD_IOID_UART_RTS)
99 /** @} */
100 /*---------------------------------------------------------------------------*/
101 /**
102  * \name Button IOID mapping
103  *
104  * Those values are not meant to be modified by the user
105  * @{
106  */
107 #define BOARD_IOID_KEY_LEFT IOID_15
108 #define BOARD_IOID_KEY_RIGHT IOID_18
109 #define BOARD_IOID_KEY_UP IOID_19
110 #define BOARD_IOID_KEY_DOWN IOID_12
111 #define BOARD_IOID_KEY_SELECT IOID_11
112 #define BOARD_KEY_LEFT (1 << BOARD_IOID_KEY_LEFT)
113 #define BOARD_KEY_RIGHT (1 << BOARD_IOID_KEY_RIGHT)
114 #define BOARD_KEY_UP (1 << BOARD_IOID_KEY_UP)
115 #define BOARD_KEY_DOWN (1 << BOARD_IOID_KEY_DOWN)
116 #define BOARD_KEY_SELECT (1 << BOARD_IOID_KEY_SELECT)
117 /** @} */
118 /*---------------------------------------------------------------------------*/
119 /**
120  * \name 3.3V domain IOID mapping
121  *
122  * Those values are not meant to be modified by the user
123  * @{
124  */
125 #define BOARD_IOID_3V3_EN IOID_13
126 #define BOARD_3V3_EN (1 << BOARD_IOID_3V3_EN)
127 /** @} */
128 /*---------------------------------------------------------------------------*/
129 /**
130  * \name SPI IOID mapping
131  *
132  * Those values are not meant to be modified by the user
133  * @{
134  */
135 #define BOARD_IOID_SPI_SCK IOID_10
136 #define BOARD_IOID_SPI_MOSI IOID_9
137 #define BOARD_IOID_SPI_MISO IOID_8
138 #define BOARD_SPI_SCK (1 << BOARD_IOID_SPI_SCK)
139 #define BOARD_SPI_MOSI (1 << BOARD_IOID_SPI_MOSI)
140 #define BOARD_SPI_MISO (1 << BOARD_IOID_SPI_MISO)
141 /** @} */
142 /*---------------------------------------------------------------------------*/
143 /**
144  * \name LCD IOID mapping
145  *
146  * Those values are not meant to be modified by the user
147  * @{
148  */
149 #define BOARD_IOID_LCD_MODE IOID_4
150 #define BOARD_IOID_LCD_RST IOID_5
151 #define BOARD_IOID_LCD_CS IOID_14
152 #define BOARD_IOID_LCD_SCK BOARD_IOID_SPI_SCK
153 #define BOARD_IOID_LCD_MOSI BOARD_IOID_SPI_MOSI
154 #define BOARD_LCD_MODE (1 << BOARD_IOID_LCD_MODE)
155 #define BOARD_LCD_RST (1 << BOARD_IOID_LCD_RST)
156 #define BOARD_LCD_CS (1 << BOARD_IOID_LCD_CS)
157 #define BOARD_LCD_SCK BOARD_SPI_SCK
158 #define BOARD_LCD_MOSI BOARD_SPI_MOSI
159 /** @} */
160 /*---------------------------------------------------------------------------*/
161 /**
162  * \name SD Card IOID mapping
163  *
164  * Those values are not meant to be modified by the user
165  * @{
166  */
167 #define BOARD_IOID_SDCARD_CS IOID_30
168 #define BOARD_SDCARD_CS (1 << BOARD_IOID_SDCARD_CS)
169 #define BOARD_IOID_SDCARD_SCK BOARD_IOID_SPI_SCK
170 #define BOARD_SDCARD_SCK BOARD_SPI_SCK
171 #define BOARD_IOID_SDCARD_MOSI BOARD_IOID_SPI_MOSI
172 #define BOARD_SDCARD_MOSI BOARD_SPI_MOSI
173 #define BOARD_IOID_SDCARD_MISO BOARD_IOID_SPI_MISO
174 #define BOARD_SDCARD_MISO BOARD_SPI_MISO
175 /** @} */
176 /*---------------------------------------------------------------------------*/
177 /**
178  * \name ALS IOID mapping
179  *
180  * Those values are not meant to be modified by the user
181  * @{
182  */
183 #define BOARD_IOID_ALS_PWR IOID_26
184 #define BOARD_IOID_ALS_OUT IOID_23
185 #define BOARD_ALS_PWR (1 << BOARD_IOID_ALS_PWR)
186 #define BOARD_ALS_OUT (1 << BOARD_IOID_ALS_OUT)
187 /** @} */
188 /*---------------------------------------------------------------------------*/
189 /**
190  * \name ACC IOID mapping
191  *
192  * Those values are not meant to be modified by the user
193  * @{
194  */
195 #define BOARD_IOID_ACC_PWR IOID_20
196 #define BOARD_IOID_ACC_INT IOID_28
197 #define BOARD_IOID_ACC_INT1 IOID_28
198 #define BOARD_IOID_ACC_INT2 IOID_29
199 #define BOARD_IOID_ACC_CS IOID_24
200 #define BOARD_ACC_PWR (1 << BOARD_IOID_ACC_PWR)
201 #define BOARD_ACC_INT (1 << BOARD_IOID_ACC_INT)
202 #define BOARD_ACC_INT1 (1 << BOARD_IOID_ACC_INT1)
203 #define BOARD_ACC_INT2 (1 << BOARD_IOID_ACC_INT2)
204 #define BOARD_ACC_CS (1 << BOARD_IOID_ACC_CS)
205 #define BOARD_IOID_ACC_SCK BOARD_IOID_SPI_SCK
206 #define BOARD_ACC_SCK BOARD_SPI_SCK
207 #define BOARD_IOID_ACC_MOSI BOARD_IOID_SPI_MOSI
208 #define BOARD_ACC_MOSI BOARD_SPI_MOSI
209 #define BOARD_IOID_ACC_MISO BOARD_IOID_SPI_MISO
210 #define BOARD_ACC_MISO BOARD_SPI_MISO
211 /** @} */
212 /*---------------------------------------------------------------------------*/
213 /**
214  * \brief ROM bootloader configuration
215  *
216  * Change CCXXWARE_CONF_BL_PIN_NUMBER to BOARD_IOID_KEY_xyz to select which
217  * button triggers the bootloader on reset. Use CCXXWARE_CONF_BL_LEVEL to
218  * control the pin level that enables the bootloader (0: low, 1: high). It is
219  * also possible to use any other externally-controlled DIO.
220  * @{
221  */
222 #define CCXXWARE_CONF_BL_PIN_NUMBER BOARD_IOID_KEY_SELECT
223 #define CCXXWARE_CONF_BL_LEVEL 0
224 /** @} */
225 /*---------------------------------------------------------------------------*/
226 /**
227  * \brief Board indices for the button HAL
228  *
229  * Those values are not meant to be modified by the user
230  * @{
231  */
232 #define BOARD_BUTTON_HAL_INDEX_KEY_LEFT 0x00
233 #define BOARD_BUTTON_HAL_INDEX_KEY_RIGHT 0x01
234 #define BOARD_BUTTON_HAL_INDEX_KEY_UP 0x02
235 #define BOARD_BUTTON_HAL_INDEX_KEY_DOWN 0x03
236 #define BOARD_BUTTON_HAL_INDEX_KEY_SELECT 0x04
237 /** @} */
238 /*---------------------------------------------------------------------------*/
239 /**
240  * \name Device string used on startup
241  * @{
242  */
243 #define BOARD_STRING "TI SmartRF06EB + CC26xx EM"
244 /** @} */
245 /*---------------------------------------------------------------------------*/
246 #endif /* BOARD_H_ */
247 /*---------------------------------------------------------------------------*/
248 /**
249  * @}
250  * @}
251  */
Header file with declarations for the I/O Control module.