Contiki-NG
Main Page
Modules
Data Structures
Files
File List
Globals
arch
platform
srf06-cc26xx
launchpad
cc1350
board.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2016, 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 launchpad-peripherals
32
* @{
33
*
34
* \defgroup launchpad-cc1350-specific CC1350 LaunchPad Peripherals
35
*
36
* Defines related to the CC1350 LaunchPad
37
*
38
* This file provides connectivity information on LEDs, Buttons, UART and
39
* other peripherals
40
*
41
* This file is not meant to be modified by the user.
42
* @{
43
*
44
* \file
45
* Header file with definitions related to the I/O connections on the TI
46
* CC1350 LaunchPad
47
*
48
* \note Do not include this file directly. It gets included by contiki-conf
49
* after all relevant directives have been set.
50
*/
51
/*---------------------------------------------------------------------------*/
52
#ifndef BOARD_H_
53
#define BOARD_H_
54
/*---------------------------------------------------------------------------*/
55
#include "
ioc.h
"
56
/*---------------------------------------------------------------------------*/
57
/**
58
* \name LED HAL configuration
59
*
60
* Those values are not meant to be modified by the user
61
* @{
62
*/
63
#define LEDS_CONF_COUNT 2
64
#define LEDS_CONF_RED 1
65
#define LEDS_CONF_GREEN 2
66
/** @} */
67
/*---------------------------------------------------------------------------*/
68
/**
69
* \name LED IOID mappings
70
*
71
* Those values are not meant to be modified by the user
72
* @{
73
*/
74
#define BOARD_IOID_LED_1 IOID_6
75
#define BOARD_IOID_LED_2 IOID_7
76
/** @} */
77
/*---------------------------------------------------------------------------*/
78
/**
79
* \name UART IOID mapping
80
*
81
* Those values are not meant to be modified by the user
82
* @{
83
*/
84
#define BOARD_IOID_UART_RX IOID_2
85
#define BOARD_IOID_UART_TX IOID_3
86
#define BOARD_IOID_UART_RTS IOID_18
87
#define BOARD_IOID_UART_CTS IOID_19
88
#define BOARD_UART_RX (1 << BOARD_IOID_UART_RX)
89
#define BOARD_UART_TX (1 << BOARD_IOID_UART_TX)
90
#define BOARD_UART_RTS (1 << BOARD_IOID_UART_RTS)
91
#define BOARD_UART_CTS (1 << BOARD_IOID_UART_CTS)
92
/** @} */
93
/*---------------------------------------------------------------------------*/
94
/**
95
* \name Button IOID mapping
96
*
97
* Those values are not meant to be modified by the user
98
* @{
99
*/
100
#define BOARD_IOID_KEY_LEFT IOID_13
101
#define BOARD_IOID_KEY_RIGHT IOID_14
102
#define BOARD_KEY_LEFT (1 << BOARD_IOID_KEY_LEFT)
103
#define BOARD_KEY_RIGHT (1 << BOARD_IOID_KEY_RIGHT)
104
/** @} */
105
/*---------------------------------------------------------------------------*/
106
/**
107
* \name External flash IOID mapping
108
*
109
* Those values are not meant to be modified by the user
110
* @{
111
*/
112
#define EXT_FLASH_SPI_CONTROLLER SPI_CONTROLLER_SPI0
113
114
#define BOARD_IOID_FLASH_SCK IOID_10
115
#define BOARD_IOID_FLASH_MOSI IOID_9
116
#define BOARD_IOID_FLASH_MISO IOID_8
117
#define BOARD_IOID_FLASH_CS IOID_20
118
119
#define EXT_FLASH_SPI_PIN_SCK 10
120
#define EXT_FLASH_SPI_PIN_MOSI 9
121
#define EXT_FLASH_SPI_PIN_MISO 8
122
#define EXT_FLASH_SPI_PIN_CS 20
123
124
#define EXT_FLASH_DEVICE_ID 0x14
125
#define EXT_FLASH_MID 0xC2
126
127
#define EXT_FLASH_PROGRAM_PAGE_SIZE 256
128
#define EXT_FLASH_ERASE_SECTOR_SIZE 4096
129
/*---------------------------------------------------------------------------*/
130
/**
131
* \brief I2C IOID mappings
132
*
133
* Those values are not meant to be modified by the user
134
* @{
135
*/
136
#define BOARD_IOID_SCL IOID_4
137
#define BOARD_IOID_SDA IOID_5
138
/** @} */
139
/*---------------------------------------------------------------------------*/
140
/**
141
* \brief CC1350LP RF Switch
142
*
143
* Those values are not meant to be modified by the user
144
* @{
145
*/
146
#define RF_SWITCH_CONF_ENABLE 1
147
/** @} */
148
/*---------------------------------------------------------------------------*/
149
/**
150
* \brief TX power settings
151
*
152
* Those values are not meant to be modified by the user
153
* @{
154
*/
155
#define PROP_MODE_CONF_TX_POWER_779_930 tx_power_driver_779_930
156
/** @} */
157
/*---------------------------------------------------------------------------*/
158
/**
159
* \brief ROM bootloader configuration
160
*
161
* Change SET_CCFG_BL_CONFIG_BL_PIN_NUMBER to BOARD_IOID_KEY_xyz to select
162
* which button triggers the bootloader on reset.
163
*
164
* The remaining values are not meant to be modified by the user
165
* @{
166
*/
167
#if ROM_BOOTLOADER_ENABLE
168
#define SET_CCFG_BL_CONFIG_BOOTLOADER_ENABLE 0xC5
169
#define SET_CCFG_BL_CONFIG_BL_LEVEL 0x00
170
#define SET_CCFG_BL_CONFIG_BL_PIN_NUMBER BOARD_IOID_KEY_LEFT
171
#define SET_CCFG_BL_CONFIG_BL_ENABLE 0xC5
172
#else
173
#define SET_CCFG_BL_CONFIG_BOOTLOADER_ENABLE 0x00
174
#define SET_CCFG_BL_CONFIG_BL_LEVEL 0x01
175
#define SET_CCFG_BL_CONFIG_BL_PIN_NUMBER 0xFF
176
#define SET_CCFG_BL_CONFIG_BL_ENABLE 0xFF
177
#endif
178
/** @} */
179
/*---------------------------------------------------------------------------*/
180
/**
181
* \brief Remaining pins
182
*
183
* Those values are not meant to be modified by the user
184
* @{
185
*/
186
#define BOARD_IOID_CS IOID_11
187
#define BOARD_IOID_TDO IOID_16
188
#define BOARD_IOID_TDI IOID_17
189
#define BOARD_IOID_DIO12 IOID_12
190
#define BOARD_IOID_DIO15 IOID_15
191
#define BOARD_IOID_DIO21 IOID_21
192
#define BOARD_IOID_DIO22 IOID_22
193
#define BOARD_IOID_DIO23 IOID_23
194
#define BOARD_IOID_DIO24 IOID_24
195
#define BOARD_IOID_DIO25 IOID_25
196
#define BOARD_IOID_DIO26 IOID_26
197
#define BOARD_IOID_DIO27 IOID_27
198
#define BOARD_IOID_DIO28 IOID_28
199
#define BOARD_IOID_DIO29 IOID_29
200
#define BOARD_IOID_DIO30 IOID_30
201
202
#define BOARD_UNUSED_PINS { \
203
BOARD_IOID_CS, BOARD_IOID_TDO, BOARD_IOID_TDI, BOARD_IOID_DIO12, \
204
BOARD_IOID_DIO15, BOARD_IOID_DIO21, BOARD_IOID_DIO22, BOARD_IOID_DIO23, \
205
BOARD_IOID_DIO24, BOARD_IOID_DIO25, BOARD_IOID_DIO26, BOARD_IOID_DIO27, \
206
BOARD_IOID_DIO28, BOARD_IOID_DIO29, \
207
IOID_UNUSED \
208
}
209
/** @} */
210
/*---------------------------------------------------------------------------*/
211
/**
212
* \brief Board indices for the button HAL
213
*
214
* Those values are not meant to be modified by the user
215
* @{
216
*/
217
#define BOARD_BUTTON_HAL_INDEX_KEY_LEFT 0x00
218
#define BOARD_BUTTON_HAL_INDEX_KEY_RIGHT 0x01
219
/** @} */
220
/*---------------------------------------------------------------------------*/
221
/**
222
* \name Device string used on startup
223
* @{
224
*/
225
#define BOARD_STRING "TI CC1350 LaunchPad"
226
/** @} */
227
/*---------------------------------------------------------------------------*/
228
#endif
/* BOARD_H_ */
229
/*---------------------------------------------------------------------------*/
230
/**
231
* @}
232
* @}
233
*/
ioc.h
Header file with declarations for the I/O Control module.
Generated on Tue Jun 5 2018 21:07:17 for Contiki-NG by
1.8.11