Contiki 3.x
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 srf06-cc13xx-peripherals Peripherals for the SmartRF06EB + CC1310EM
35  *
36  * Defines related to the SmartRF06 Evaluation Board with a CC1310EM
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 CC1310EM
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 configurations
62  *
63  * Those values are not meant to be modified by the user
64  * @{
65  */
66 /* Some files include leds.h before us, so we need to get rid of defaults in
67  * leds.h before we provide correct definitions */
68 #undef LEDS_GREEN
69 #undef LEDS_YELLOW
70 #undef LEDS_RED
71 #undef LEDS_CONF_ALL
72 
73 #define LEDS_RED 1 /**< LED1 (Red) */
74 #define LEDS_YELLOW 2 /**< LED2 (Yellow) */
75 #define LEDS_GREEN 4 /**< LED3 (Green) */
76 #define LEDS_ORANGE 8 /**< LED4 (Orange) */
77 
78 #define LEDS_CONF_ALL 15
79 
80 /* Notify various examples that we have LEDs */
81 #define PLATFORM_HAS_LEDS 1
82 /** @} */
83 /*---------------------------------------------------------------------------*/
84 /**
85  * \name LED IOID mappings
86  *
87  * Those values are not meant to be modified by the user
88  * @{
89  */
90 #define BOARD_IOID_LED_1 IOID_25
91 #define BOARD_IOID_LED_2 IOID_27
92 #define BOARD_IOID_LED_3 IOID_7
93 #define BOARD_IOID_LED_4 IOID_6
94 #define BOARD_LED_1 (1 << BOARD_IOID_LED_1)
95 #define BOARD_LED_2 (1 << BOARD_IOID_LED_2)
96 #define BOARD_LED_3 (1 << BOARD_IOID_LED_3)
97 #define BOARD_LED_4 (1 << BOARD_IOID_LED_4)
98 #define BOARD_LED_ALL (BOARD_LED_1 | BOARD_LED_2 | BOARD_LED_3 | \
99  BOARD_LED_4)
100 /** @} */
101 /*---------------------------------------------------------------------------*/
102 /**
103  * \name UART IOID mapping
104  *
105  * Those values are not meant to be modified by the user
106  * @{
107  */
108 #define BOARD_IOID_UART_RX IOID_2
109 #define BOARD_IOID_UART_TX IOID_3
110 #define BOARD_IOID_UART_CTS IOID_UNUSED
111 #define BOARD_IOID_UART_RTS IOID_UNUSED
112 #define BOARD_UART_RX (1 << BOARD_IOID_UART_RX)
113 #define BOARD_UART_TX (1 << BOARD_IOID_UART_TX)
114 #define BOARD_UART_CTS (1 << BOARD_IOID_UART_CTS)
115 #define BOARD_UART_RTS (1 << BOARD_IOID_UART_RTS)
116 /** @} */
117 /*---------------------------------------------------------------------------*/
118 /**
119  * \name Button IOID mapping
120  *
121  * Those values are not meant to be modified by the user
122  * @{
123  */
124 #define BOARD_IOID_KEY_LEFT IOID_15
125 #define BOARD_IOID_KEY_RIGHT IOID_18
126 #define BOARD_IOID_KEY_UP IOID_19
127 #define BOARD_IOID_KEY_DOWN IOID_12
128 #define BOARD_IOID_KEY_SELECT IOID_11
129 #define BOARD_KEY_LEFT (1 << BOARD_IOID_KEY_LEFT)
130 #define BOARD_KEY_RIGHT (1 << BOARD_IOID_KEY_RIGHT)
131 #define BOARD_KEY_UP (1 << BOARD_IOID_KEY_UP)
132 #define BOARD_KEY_DOWN (1 << BOARD_IOID_KEY_DOWN)
133 #define BOARD_KEY_SELECT (1 << BOARD_IOID_KEY_SELECT)
134 /** @} */
135 /*---------------------------------------------------------------------------*/
136 /**
137  * \name 3.3V domain IOID mapping
138  *
139  * Those values are not meant to be modified by the user
140  * @{
141  */
142 #define BOARD_IOID_3V3_EN IOID_13
143 #define BOARD_3V3_EN (1 << BOARD_IOID_3V3_EN)
144 /** @} */
145 /*---------------------------------------------------------------------------*/
146 /**
147  * \name SPI IOID mapping
148  *
149  * Those values are not meant to be modified by the user
150  * @{
151  */
152 #define BOARD_IOID_SPI_SCK IOID_10
153 #define BOARD_IOID_SPI_MOSI IOID_9
154 #define BOARD_IOID_SPI_MISO IOID_8
155 #define BOARD_SPI_SCK (1 << BOARD_IOID_SPI_SCK)
156 #define BOARD_SPI_MOSI (1 << BOARD_IOID_SPI_MOSI)
157 #define BOARD_SPI_MISO (1 << BOARD_IOID_SPI_MISO)
158 /** @} */
159 /*---------------------------------------------------------------------------*/
160 /**
161  * \name LCD IOID mapping
162  *
163  * Those values are not meant to be modified by the user
164  * @{
165  */
166 #define BOARD_IOID_LCD_MODE IOID_4
167 #define BOARD_IOID_LCD_RST IOID_5
168 #define BOARD_IOID_LCD_CS IOID_14
169 #define BOARD_IOID_LCD_SCK BOARD_IOID_SPI_SCK
170 #define BOARD_IOID_LCD_MOSI BOARD_IOID_SPI_MOSI
171 #define BOARD_LCD_MODE (1 << BOARD_IOID_LCD_MODE)
172 #define BOARD_LCD_RST (1 << BOARD_IOID_LCD_RST)
173 #define BOARD_LCD_CS (1 << BOARD_IOID_LCD_CS)
174 #define BOARD_LCD_SCK BOARD_SPI_SCK
175 #define BOARD_LCD_MOSI BOARD_SPI_MOSI
176 /** @} */
177 /*---------------------------------------------------------------------------*/
178 /**
179  * \name SD Card IOID mapping
180  *
181  * Those values are not meant to be modified by the user
182  * @{
183  */
184 #define BOARD_IOID_SDCARD_CS IOID_30
185 #define BOARD_SDCARD_CS (1 << BOARD_IOID_SDCARD_CS)
186 #define BOARD_IOID_SDCARD_SCK BOARD_IOID_SPI_SCK
187 #define BOARD_SDCARD_SCK BOARD_SPI_SCK
188 #define BOARD_IOID_SDCARD_MOSI BOARD_IOID_SPI_MOSI
189 #define BOARD_SDCARD_MOSI BOARD_SPI_MOSI
190 #define BOARD_IOID_SDCARD_MISO BOARD_IOID_SPI_MISO
191 #define BOARD_SDCARD_MISO BOARD_SPI_MISO
192 /** @} */
193 /*---------------------------------------------------------------------------*/
194 /**
195  * \name ALS IOID mapping
196  *
197  * Those values are not meant to be modified by the user
198  * @{
199  */
200 #define BOARD_IOID_ALS_PWR IOID_26
201 #define BOARD_IOID_ALS_OUT IOID_23
202 #define BOARD_ALS_PWR (1 << BOARD_IOID_ALS_PWR)
203 #define BOARD_ALS_OUT (1 << BOARD_IOID_ALS_OUT)
204 /** @} */
205 /*---------------------------------------------------------------------------*/
206 /**
207  * \name ACC IOID mapping
208  *
209  * Those values are not meant to be modified by the user
210  * @{
211  */
212 #define BOARD_IOID_ACC_PWR IOID_20
213 #define BOARD_IOID_ACC_INT IOID_28
214 #define BOARD_IOID_ACC_INT1 IOID_28
215 #define BOARD_IOID_ACC_INT2 IOID_29
216 #define BOARD_IOID_ACC_CS IOID_24
217 #define BOARD_ACC_PWR (1 << BOARD_IOID_ACC_PWR)
218 #define BOARD_ACC_INT (1 << BOARD_IOID_ACC_INT)
219 #define BOARD_ACC_INT1 (1 << BOARD_IOID_ACC_INT1)
220 #define BOARD_ACC_INT2 (1 << BOARD_IOID_ACC_INT2)
221 #define BOARD_ACC_CS (1 << BOARD_IOID_ACC_CS)
222 #define BOARD_IOID_ACC_SCK BOARD_IOID_SPI_SCK
223 #define BOARD_ACC_SCK BOARD_SPI_SCK
224 #define BOARD_IOID_ACC_MOSI BOARD_IOID_SPI_MOSI
225 #define BOARD_ACC_MOSI BOARD_SPI_MOSI
226 #define BOARD_IOID_ACC_MISO BOARD_IOID_SPI_MISO
227 #define BOARD_ACC_MISO BOARD_SPI_MISO
228 /** @} */
229 /*---------------------------------------------------------------------------*/
230 /**
231  * \name Device string used on startup
232  * @{
233  */
234 #define BOARD_STRING "TI SmartRF06EB + CC13xx EM"
235 /** @} */
236 /*---------------------------------------------------------------------------*/
237 #endif /* BOARD_H_ */
238 /*---------------------------------------------------------------------------*/
239 /**
240  * @}
241  * @}
242  */
Header file with declarations for the I/O Control module.