BSP430  20141115
Board Support Package for MSP430 microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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_RF2500T_BSP430_CONFIG_H
40 #define BSP430_PLATFORM_RF2500T_BSP430_CONFIG_H
41 
42 #ifndef configBSP430_RF_RF2500T
43 
50 #define configBSP430_RF_RF2500T (configBSP430_PLATFORM_RF - 0)
51 #endif /* configBSP430_RF_RF2500T */
52 
57 #ifndef BSP430_PLATFORM_BOOT_LFXT1_DELAY_SEC
58 #define BSP430_PLATFORM_BOOT_LFXT1_DELAY_SEC 0
59 #endif /* BSP430_PLATFORM_BOOT_LFXT1_DELAY_SEC */
60 
61 /* Use native USCI for genericized serial port unless told not to */
62 #ifndef configBSP430_SERIAL_USE_USCI
63 #define configBSP430_SERIAL_USE_USCI 1
64 #endif /* configBSP430_SERIAL_USE_USCI */
65 
66 /* What to use as a console */
67 #if (configBSP430_CONSOLE - 0)
68 #ifndef BSP430_CONSOLE_SERIAL_PERIPH_CPPID
69 #define BSP430_CONSOLE_SERIAL_PERIPH_CPPID BSP430_PERIPH_CPPID_USCI_A0
70 #endif /* BSP430_CONSOLE_SERIAL_PERIPH_CPPID */
71 #endif /* configBSP430_CONSOLE */
72 
73 /* How to use ACLK as a capture/compare input source */
74 /* Settings for TB0: T0B2 ccis=1 ; clk P4.7 ; cc0 P4.0 ; cc1 P4.1 */
75 #if (configBSP430_TIMER_CCACLK - 0)
76 #ifndef BSP430_TIMER_CCACLK_PERIPH_CPPID
77 #define BSP430_TIMER_CCACLK_PERIPH_CPPID BSP430_PERIPH_CPPID_TB0
78 #endif /* BSP430_TIMER_CCACLK_PERIPH_CPPID */
79 #ifndef BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID
80 #define BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT4
81 #endif /* BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID */
82 #ifndef BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID
83 #define BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT4
84 #endif /* BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID */
85 #ifndef BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID
86 #define BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT4
87 #endif /* BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID */
88 #endif /* configBSP430_TIMER_CCACLK */
89 
90 /* Enable buttons as requested */
91 #if (configBSP430_PLATFORM_BUTTON0 - 0)
92 #if !defined(configBSP430_HAL_PORT1)
93 #define configBSP430_HAL_PORT1 1
94 #else /* configBSP430_HAL_PORT1 */
95 #if !defined(configBSP430_HPL_PORT1)
96 #define configBSP430_HPL_PORT1 1
97 #endif /* configBSP430_HPL_PORT1 */
98 #endif /* configBSP430_HAL_PORT1 */
99 #endif /* configBSP430_PLATFORM_BUTTON0 */
100 
101 #if (configBSP430_RF_TIMER - 0)
102 #define BSP430_RF_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
103 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_TIMER_PERIPH_CPPID
104 #define BSP430_WANT_CONFIG_HAL_ISR 1
105 #include <bsp430/periph/want_.h>
106 #undef BSP430_WANT_CONFIG_HAL_ISR
107 #undef BSP430_WANT_PERIPH_CPPID
108 #endif /* configBSP430_RF_TIMER */
109 
110 /* !BSP430! insert=emk_config emk=rf2500t mcu=msp430f2274 spi=UCB0SOMI tag=cc110x hal=CSn gpio=GDO0,GDO1,GDO2 */
111 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [emk_config] */
112 #if (configBSP430_RF_RF2500T - 0)
113 #define BSP430_RF_CC110X_SPI_PERIPH_CPPID BSP430_PERIPH_CPPID_USCI_B0
114 #define configBSP430_SERIAL_ENABLE_SPI 1
115 #define configBSP430_HAL_USCI_B0 1
116 #define BSP430_RF_CC110X_GDO0_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
117 #define BSP430_RF_CC110X_GDO1_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
118 #define BSP430_RF_CC110X_GDO2_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
119 #define BSP430_RF_CC110X_CSn_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
120 /* Request HAL (and HPL) for all GPIO and HAL-enabled ports */
121 #define BSP430_WANT_CONFIG_HAL 1
122 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO0_PORT_PERIPH_CPPID
123 #include <bsp430/periph/want_.h>
124 #undef BSP430_WANT_PERIPH_CPPID
125 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO1_PORT_PERIPH_CPPID
126 #include <bsp430/periph/want_.h>
127 #undef BSP430_WANT_PERIPH_CPPID
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_CSn_PORT_PERIPH_CPPID
132 #include <bsp430/periph/want_.h>
133 #undef BSP430_WANT_PERIPH_CPPID
134 #undef BSP430_WANT_CONFIG_HAL
135 /* Request HAL for GPIO timers */
136 #define BSP430_WANT_CONFIG_HAL 1
137 
138 #if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC110X_GDO0_TIMER_PERIPH_CPPID)
139 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO0_TIMER_PERIPH_CPPID
140 #if 0 == BSP430_RF_CC110X_GDO0_TIMER_CCIDX
141 #define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
142 #else /* BSP430_RF_CC110X_GDO0_TIMER_CCIDX */
143 #define BSP430_WANT_CONFIG_HAL_ISR 1
144 #endif /* BSP430_RF_CC110X_GDO0_TIMER_CCIDX */
145 #include <bsp430/periph/want_.h>
146 #undef BSP430_WANT_CONFIG_HAL_ISR
147 #undef BSP430_WANT_CONFIG_HAL_CC0_ISR
148 #undef BSP430_WANT_PERIPH_CPPID
149 #endif /* BSP430_RF_CC110X_GDO0 timer */
150 
151 #if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC110X_GDO1_TIMER_PERIPH_CPPID)
152 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO1_TIMER_PERIPH_CPPID
153 #if 0 == BSP430_RF_CC110X_GDO1_TIMER_CCIDX
154 #define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
155 #else /* BSP430_RF_CC110X_GDO1_TIMER_CCIDX */
156 #define BSP430_WANT_CONFIG_HAL_ISR 1
157 #endif /* BSP430_RF_CC110X_GDO1_TIMER_CCIDX */
158 #include <bsp430/periph/want_.h>
159 #undef BSP430_WANT_CONFIG_HAL_ISR
160 #undef BSP430_WANT_CONFIG_HAL_CC0_ISR
161 #undef BSP430_WANT_PERIPH_CPPID
162 #endif /* BSP430_RF_CC110X_GDO1 timer */
163 
164 #if (configBSP430_RF_TIMER - 0) && defined(BSP430_RF_CC110X_GDO2_TIMER_PERIPH_CPPID)
165 #define BSP430_WANT_PERIPH_CPPID BSP430_RF_CC110X_GDO2_TIMER_PERIPH_CPPID
166 #if 0 == BSP430_RF_CC110X_GDO2_TIMER_CCIDX
167 #define BSP430_WANT_CONFIG_HAL_CC0_ISR 1
168 #else /* BSP430_RF_CC110X_GDO2_TIMER_CCIDX */
169 #define BSP430_WANT_CONFIG_HAL_ISR 1
170 #endif /* BSP430_RF_CC110X_GDO2_TIMER_CCIDX */
171 #include <bsp430/periph/want_.h>
172 #undef BSP430_WANT_CONFIG_HAL_ISR
173 #undef BSP430_WANT_CONFIG_HAL_CC0_ISR
174 #undef BSP430_WANT_PERIPH_CPPID
175 #endif /* BSP430_RF_CC110X_GDO2 timer */
176 #undef BSP430_WANT_CONFIG_HAL
177 #endif /* configBSP430_RF_RF2500T */
178 /* END AUTOMATICALLY GENERATED CODE [emk_config] */
179 /* !BSP430! end=emk_config */
180 
183 #endif /* BSP430_PLATFORM_RF2500T_BSP430_CONFIG_H */
Translate functional resource requests to core resource requests.