BSP430
20141115
Board Support Package for MSP430 microcontrollers
Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
include
bsp430
platform
exp430g2
bsp430_config.h
Go to the documentation of this file.
1
/* Copyright 2012-2014, Peter A. Bigot
2
*
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 are met:
7
*
8
* * Redistributions of source code must retain the above copyright notice,
9
* this list of conditions and the following disclaimer.
10
*
11
* * Redistributions in binary form must reproduce the above copyright notice,
12
* this list of conditions and the following disclaimer in the documentation
13
* and/or other materials provided with the distribution.
14
*
15
* * Neither the name of the software nor the names of its contributors may be
16
* used to endorse or promote products derived from this software without
17
* specific prior written permission.
18
*
19
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
* POSSIBILITY OF SUCH DAMAGE.
30
*/
31
39
#ifndef BSP430_PLATFORM_EXP430G2_BSP430_CONFIG_H
40
#define BSP430_PLATFORM_EXP430G2_BSP430_CONFIG_H
41
44
/* Provide default for SEL2 support; TI toolchain does not provide
45
* information necessary to infer support from header contents. */
46
#ifndef BSP430_PORT_SUPPORTS_SEL2_2XX
47
#if defined(__MSP430G2553__)
48
#define BSP430_PORT_SUPPORTS_SEL2_2XX 1
49
#endif
/* MCU */
50
#endif
/* BSP430_PORT_SUPPORTS_SEL2_2XX */
51
52
/* Use native USCI for genericized serial port unless told not to */
53
#ifndef configBSP430_SERIAL_USE_USCI
54
#if defined(__MSP430G2553__)
55
#define configBSP430_SERIAL_USE_USCI 1
56
#endif
/* MCU */
57
#endif
/* configBSP430_SERIAL_USE_USCI */
58
60
#if (configBSP430_UPTIME - 0)
61
#ifndef BSP430_UPTIME_TIMER_PERIPH_CPPID
62
#if defined(__MSP430G2553__)
63
#define BSP430_UPTIME_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA1
64
#endif
/* MCU */
65
#endif
/* BSP430_UPTIME_TIMER_PERIPH_CPPID */
66
#endif
/* configBSP430_UPTIME */
67
68
/* What to use as a console */
69
#if (configBSP430_CONSOLE - 0)
70
#ifndef BSP430_CONSOLE_SERIAL_PERIPH_CPPID
71
#if defined(__MSP430G2553__)
72
#define BSP430_CONSOLE_SERIAL_PERIPH_CPPID BSP430_PERIPH_CPPID_USCI_A0
73
#endif
/* MCU */
74
#endif
/* BSP430_CONSOLE_SERIAL_PERIPH_CPPID */
75
#endif
/* configBSP430_CONSOLE */
76
77
/* How to use ACLK as a capture/compare input source */
78
/* Settings for TA0: T0A0 ccis=1 ; clk P1.0 ; cc0 P1.1 ; cc1 P1.2 */
79
#if (configBSP430_TIMER_CCACLK - 0)
80
#if defined(__MSP430G2553__)
81
#ifndef BSP430_TIMER_CCACLK_PERIPH_CPPID
82
#define BSP430_TIMER_CCACLK_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
83
#endif
/* BSP430_TIMER_CCACLK_PERIPH_CPPID */
84
#ifndef BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID
85
#define BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
86
#endif
/* BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID */
87
#ifndef BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID
88
#define BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
89
#endif
/* BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID */
90
#ifndef BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID
91
#define BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
92
#endif
/* BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID */
93
#endif
/* MCU */
94
#endif
/* configBSP430_TIMER_CCACLK */
95
96
/* Enable buttons as requested */
97
#if (configBSP430_PLATFORM_BUTTON0 - 0)
98
#if !defined(configBSP430_HAL_PORT1)
99
#define configBSP430_HAL_PORT1 1
100
#else
/* configBSP430_HAL_PORT1 */
101
#if !defined(configBSP430_HPL_PORT1)
102
#define configBSP430_HPL_PORT1 1
103
#endif
/* configBSP430_HPL_PORT1 */
104
#endif
/* configBSP430_HAL_PORT1 */
105
#endif
/* configBSP430_PLATFORM_BUTTON0 */
106
107
#if (configBSP430_RF_TIMER - 0)
108
#define BSP430_RF_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
109
#define BSP430_WANT_PERIPH_CPPID BSP430_RF_TIMER_PERIPH_CPPID
110
#define BSP430_WANT_CONFIG_HAL_ISR 1
111
#include <
bsp430/periph/want_.h
>
112
#undef BSP430_WANT_CONFIG_HAL_ISR
113
#undef BSP430_WANT_PERIPH_CPPID
114
#endif
/* configBSP430_RF_TIMER */
115
116
/* !BSP430! insert=emk_config boosterpack=anaren_cc110l platform=exp430g2 mcu=msp430g2553 spi=UCB0SOMI tag=cc110x hal=CSn gpio=GDO0,GDO1,GDO2 */
117
/* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [emk_config] */
118
#if (configBSP430_RF_ANAREN_CC110L - 0)
119
#define BSP430_RF_CC110X_SPI_PERIPH_CPPID BSP430_PERIPH_CPPID_USCI_B0
120
#define configBSP430_SERIAL_ENABLE_SPI 1
121
#define configBSP430_HAL_USCI_B0 1
122
#define BSP430_RF_CC110X_GDO2_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
123
#define BSP430_RF_CC110X_GDO0_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
124
#define BSP430_RF_CC110X_CSn_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
125
#define BSP430_RF_CC110X_GDO1_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
126
/* Request HAL (and HPL) for all GPIO and HAL-enabled ports */
127
#define BSP430_WANT_CONFIG_HAL 1
128
#define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO2_PORT_PERIPH_CPPID
129
#include <
bsp430/periph/want_.h
>
130
#undef BSP430_WANT_PERIPH_CPPID
131
#define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO0_PORT_PERIPH_CPPID
132
#include <
bsp430/periph/want_.h
>
133
#undef BSP430_WANT_PERIPH_CPPID
134
#define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_CSn_PORT_PERIPH_CPPID
135
#include <
bsp430/periph/want_.h
>
136
#undef BSP430_WANT_PERIPH_CPPID
137
#define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO1_PORT_PERIPH_CPPID
138
#include <
bsp430/periph/want_.h
>
139
#undef BSP430_WANT_PERIPH_CPPID
140
#undef BSP430_WANT_CONFIG_HAL
141
/* Request HAL for GPIO timers */
142
#define BSP430_WANT_CONFIG_HAL 1
143
144
#if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC110X_GDO2_TIMER_PERIPH_CPPID)
145
#define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO2_TIMER_PERIPH_CPPID
146
#if 0 == BSP430_RF_CC110X_GDO2_TIMER_CCIDX
147
#define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
148
#else
/* BSP430_RF_CC110X_GDO2_TIMER_CCIDX */
149
#define BSP430_WANT_CONFIG_HAL_ISR 1
150
#endif
/* BSP430_RF_CC110X_GDO2_TIMER_CCIDX */
151
#include <
bsp430/periph/want_.h
>
152
#undef BSP430_WANT_CONFIG_HAL_ISR
153
#undef BSP430_WANT_CONFIG_HAL_CC0_ISR
154
#undef BSP430_WANT_PERIPH_CPPID
155
#endif
/* BSP430_RF_CC110X_GDO2 timer */
156
157
#if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC110X_GDO0_TIMER_PERIPH_CPPID)
158
#define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO0_TIMER_PERIPH_CPPID
159
#if 0 == BSP430_RF_CC110X_GDO0_TIMER_CCIDX
160
#define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
161
#else
/* BSP430_RF_CC110X_GDO0_TIMER_CCIDX */
162
#define BSP430_WANT_CONFIG_HAL_ISR 1
163
#endif
/* BSP430_RF_CC110X_GDO0_TIMER_CCIDX */
164
#include <
bsp430/periph/want_.h
>
165
#undef BSP430_WANT_CONFIG_HAL_ISR
166
#undef BSP430_WANT_CONFIG_HAL_CC0_ISR
167
#undef BSP430_WANT_PERIPH_CPPID
168
#endif
/* BSP430_RF_CC110X_GDO0 timer */
169
170
#if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC110X_GDO1_TIMER_PERIPH_CPPID)
171
#define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO1_TIMER_PERIPH_CPPID
172
#if 0 == BSP430_RF_CC110X_GDO1_TIMER_CCIDX
173
#define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
174
#else
/* BSP430_RF_CC110X_GDO1_TIMER_CCIDX */
175
#define BSP430_WANT_CONFIG_HAL_ISR 1
176
#endif
/* BSP430_RF_CC110X_GDO1_TIMER_CCIDX */
177
#include <
bsp430/periph/want_.h
>
178
#undef BSP430_WANT_CONFIG_HAL_ISR
179
#undef BSP430_WANT_CONFIG_HAL_CC0_ISR
180
#undef BSP430_WANT_PERIPH_CPPID
181
#endif
/* BSP430_RF_CC110X_GDO1 timer */
182
#undef BSP430_WANT_CONFIG_HAL
183
#endif
/* configBSP430_RF_ANAREN_CC110L */
184
/* END AUTOMATICALLY GENERATED CODE [emk_config] */
185
/* !BSP430! end=emk_config */
186
187
/* !BSP430! insert=emk_config boosterpack=cc3000boost platform=exp430g2 mcu=msp430g2553 spi=UCB0SOMI tag=cc3000 hal=CSn gpio=IRQn */
188
/* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [emk_config] */
189
#if (configBSP430_RF_CC3000BOOST - 0)
190
#define BSP430_RF_CC3000_SPI_PERIPH_CPPID BSP430_PERIPH_CPPID_USCI_B0
191
#define configBSP430_SERIAL_ENABLE_SPI 1
192
#define configBSP430_HAL_USCI_B0 1
193
#define BSP430_RF_CC3000_PWR_EN_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
194
#define BSP430_RF_CC3000_SCLK_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
195
#define BSP430_RF_CC3000_IRQn_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
196
#define BSP430_RF_CC3000_CSn_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
197
#define BSP430_RF_CC3000_MOSI_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
198
#define BSP430_RF_CC3000_MISO_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
199
/* Request HAL (and HPL) for all GPIO and HAL-enabled ports */
200
#define BSP430_WANT_CONFIG_HAL 1
201
#define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_IRQn_PORT_PERIPH_CPPID
202
#include <
bsp430/periph/want_.h
>
203
#undef BSP430_WANT_PERIPH_CPPID
204
#define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_CSn_PORT_PERIPH_CPPID
205
#include <
bsp430/periph/want_.h
>
206
#undef BSP430_WANT_PERIPH_CPPID
207
#undef BSP430_WANT_CONFIG_HAL
208
/* Request HPL for all non-GPIO ports */
209
#define BSP430_WANT_CONFIG_HPL 1
210
#define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_PWR_EN_PORT_PERIPH_CPPID
211
#include <
bsp430/periph/want_.h
>
212
#undef BSP430_WANT_PERIPH_CPPID
213
#define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_SCLK_PORT_PERIPH_CPPID
214
#include <
bsp430/periph/want_.h
>
215
#undef BSP430_WANT_PERIPH_CPPID
216
#define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_MOSI_PORT_PERIPH_CPPID
217
#include <
bsp430/periph/want_.h
>
218
#undef BSP430_WANT_PERIPH_CPPID
219
#define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_MISO_PORT_PERIPH_CPPID
220
#include <
bsp430/periph/want_.h
>
221
#undef BSP430_WANT_PERIPH_CPPID
222
#undef BSP430_WANT_CONFIG_HPL
223
/* Request HAL for GPIO timers */
224
#define BSP430_WANT_CONFIG_HAL 1
225
226
#if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC3000_IRQn_TIMER_PERIPH_CPPID)
227
#define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC3000_IRQn_TIMER_PERIPH_CPPID
228
#if 0 == BSP430_RF_CC3000_IRQn_TIMER_CCIDX
229
#define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
230
#else
/* BSP430_RF_CC3000_IRQn_TIMER_CCIDX */
231
#define BSP430_WANT_CONFIG_HAL_ISR 1
232
#endif
/* BSP430_RF_CC3000_IRQn_TIMER_CCIDX */
233
#include <
bsp430/periph/want_.h
>
234
#undef BSP430_WANT_CONFIG_HAL_ISR
235
#undef BSP430_WANT_CONFIG_HAL_CC0_ISR
236
#undef BSP430_WANT_PERIPH_CPPID
237
#endif
/* BSP430_RF_CC3000_IRQn timer */
238
#undef BSP430_WANT_CONFIG_HAL
239
#endif
/* configBSP430_RF_CC3000BOOST */
240
/* END AUTOMATICALLY GENERATED CODE [emk_config] */
241
/* !BSP430! end=emk_config */
242
243
/* !BSP430! insert=rfem_config boosterpack=ccem platform=exp430g2 mcu=msp430g2553 */
244
/* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [rfem_config] */
245
#if (configBSP430_RFEM_CCEM - 0)
246
#define BSP430_RFEM_SERIAL_PERIPH_CPPID BSP430_PERIPH_CPPID_USCI_B0
247
#define configBSP430_SERIAL_ENABLE_SPI 1
248
#define configBSP430_HAL_USCI_B0 1
249
#define BSP430_RFEM_RF1P3_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
250
#define BSP430_RFEM_RF1P3_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA1
251
#define BSP430_RFEM_RF1P7_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
252
#define BSP430_RFEM_RF1P7_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
253
#define BSP430_RFEM_RF1P9_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
254
#define BSP430_RFEM_RF1P9_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
255
#define BSP430_RFEM_RF1P10_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
256
#define BSP430_RFEM_RF1P10_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
257
#define BSP430_RFEM_RF1P12_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
258
#define BSP430_RFEM_RF1P14_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
259
#define BSP430_RFEM_RF1P16_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
260
#define BSP430_RFEM_RF1P16_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
261
#define BSP430_RFEM_RF1P18_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
262
#define BSP430_RFEM_RF1P20_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
263
#define BSP430_RFEM_RF1P20_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
264
#define BSP430_RFEM_RF2P15_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
265
#define BSP430_RFEM_RF2P15_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA1
266
#define BSP430_RFEM_RF2P18_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
267
#define BSP430_RFEM_RF2P18_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA1
268
#define BSP430_RFEM_RF2P19_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
269
#define BSP430_RFEM_RF2P19_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA1
270
#endif
/* configBSP430_RFEM_CCEM */
271
/* END AUTOMATICALLY GENERATED CODE [rfem_config] */
272
/* !BSP430! end=rfem_config */
273
276
#endif
/* BSP430_PLATFORM_EXP430G2_BSP430_CONFIG_H */
want_.h
Translate functional resource requests to core resource requests.
Generated on Sat Nov 15 2014 11:27:13 for BSP430 by
1.8.8