BSP430  20141115
Board Support Package for MSP430 microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
platform.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 
56 #ifndef BSP430_PLATFORM_EXP430G2_PLATFORM_H
57 #define BSP430_PLATFORM_EXP430G2_PLATFORM_H
58 
61 #define BSP430_PLATFORM_EXP430G2 1
62 
65 /* Enable if requested */
66 #if (configBSP430_PLATFORM_SPIN_FOR_JUMPER - 0)
67 #define BSP430_PLATFORM_SPIN_FOR_JUMPER 1
68 #endif /* configBSP430_PLATFORM_SPIN_FOR_JUMPER */
69 
70 /* Available button definitions */
71 #define BSP430_PLATFORM_BUTTON0_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
72 #define BSP430_PLATFORM_BUTTON0_PORT_BIT BIT3
73 
74 /* Standard LED colors */
75 #define BSP430_LED_RED 0
76 #define BSP430_LED_GREEN 1
77 
78 /* How to use ACLK as a capture/compare input source */
79 /* Settings for TA0: T0A0 ccis=1 ; clk P1.0 ; cc0 P1.1 ; cc1 P1.2 */
80 #ifndef BSP430_TIMER_CCACLK_ACLK_CCIDX
81 /* NB: Check against BSP430_TIMER_CCACLK_PERIPH_CPPID in bsp430_config.h */
82 #define BSP430_TIMER_CCACLK_ACLK_CCIDX 0
83 #endif /* BSP430_TIMER_CCACLK_ACLK_CCIDX */
84 #ifndef BSP430_TIMER_CCACLK_ACLK_CCIS
85 /* NB: Check against BSP430_TIMER_CCACLK_PERIPH_CPPID in bsp430_config.h */
86 #define BSP430_TIMER_CCACLK_ACLK_CCIS CCIS_1
87 #endif /* BSP430_TIMER_CCACLK_ACLK_CCIS */
88 #ifndef BSP430_TIMER_CCACLK_CLK_PORT_BIT
89 /* NB: Check against BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID in bsp430_config.h */
90 #define BSP430_TIMER_CCACLK_CLK_PORT_BIT BIT0
91 #endif /* BSP430_TIMER_CCACLK_CLK_PORT_BIT */
92 #ifndef BSP430_TIMER_CCACLK_CC0_PORT_BIT
93 /* NB: Check against BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID in bsp430_config.h */
94 #define BSP430_TIMER_CCACLK_CC0_PORT_BIT BIT1
95 #endif /* BSP430_TIMER_CCACLK_CC0_PORT_BIT */
96 #ifndef BSP430_TIMER_CCACLK_CC1_PORT_BIT
97 /* NB: Check against BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID in bsp430_config.h */
98 #define BSP430_TIMER_CCACLK_CC1_PORT_BIT BIT2
99 #endif /* BSP430_TIMER_CCACLK_CC1_PORT_BIT */
100 
101 /* !BSP430! insert=emk_platform boosterpack=anaren_cc110l platform=exp430g2 mcu=msp430g2553 spi=UCB0SOMI tag=cc110x hal=CSn gpio=GDO0,GDO1,GDO2 */
102 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [emk_platform] */
103 #if (configBSP430_RF_ANAREN_CC110L - 0)
104 #define BSP430_RF_CC110X 1
105 #define BSP430_RF_CC110X_SPI_PERIPH_HANDLE BSP430_PERIPH_USCI_B0
106 #define BSP430_RF_CC110X_GDO2_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
107 #define BSP430_RF_CC110X_GDO2_PORT_BIT BIT0
108 #define BSP430_RF_CC110X_GDO0_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
109 #define BSP430_RF_CC110X_GDO0_PORT_BIT BIT6
110 #define BSP430_RF_CC110X_CSn_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
111 #define BSP430_RF_CC110X_CSn_PORT_BIT BIT7
112 #define BSP430_RF_CC110X_GDO1_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
113 #define BSP430_RF_CC110X_GDO1_PORT_BIT BIT6
114 #endif /* configBSP430_RF_ANAREN_CC110L */
115 /* END AUTOMATICALLY GENERATED CODE [emk_platform] */
116 /* !BSP430! end=emk_platform */
117 
118 /* !BSP430! insert=emk_platform boosterpack=cc3000boost platform=exp430g2 mcu=msp430g2553 spi=UCB0SOMI tag=cc3000 hal=CSn gpio=IRQn */
119 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [emk_platform] */
120 #if (configBSP430_RF_CC3000BOOST - 0)
121 #define BSP430_RF_CC3000 1
122 #define BSP430_RF_CC3000_SPI_PERIPH_HANDLE BSP430_PERIPH_USCI_B0
123 #define BSP430_RF_CC3000_PWR_EN_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
124 #define BSP430_RF_CC3000_PWR_EN_PORT_BIT BIT0
125 #define BSP430_RF_CC3000_SCLK_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
126 #define BSP430_RF_CC3000_SCLK_PORT_BIT BIT5
127 #define BSP430_RF_CC3000_IRQn_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
128 #define BSP430_RF_CC3000_IRQn_PORT_BIT BIT6
129 #define BSP430_RF_CC3000_CSn_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
130 #define BSP430_RF_CC3000_CSn_PORT_BIT BIT7
131 #define BSP430_RF_CC3000_MOSI_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
132 #define BSP430_RF_CC3000_MOSI_PORT_BIT BIT7
133 #define BSP430_RF_CC3000_MISO_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
134 #define BSP430_RF_CC3000_MISO_PORT_BIT BIT6
135 #endif /* configBSP430_RF_CC3000BOOST */
136 /* END AUTOMATICALLY GENERATED CODE [emk_platform] */
137 /* !BSP430! end=emk_platform */
138 
139 /* !BSP430! insert=rfem_platform boosterpack=ccem platform=exp430g2 mcu=msp430g2553 */
140 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [rfem_platform] */
141 #if (configBSP430_RFEM_CCEM - 0)
142 #define BSP430_RFEM_CCEM 1
143 #define BSP430_RFEM 1
144 #endif /* configBSP430_RFEM_CCEM */
145 #if (BSP430_RFEM_CCEM - 0)
146 #define BSP430_RFEM_SERIAL_PERIPH_HANDLE BSP430_PERIPH_USCI_B0
147 #define BSP430_RFEM_RF1P3_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
148 #define BSP430_RFEM_RF1P3_PORT_BIT BIT4
149 #define BSP430_RFEM_RF1P3_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA1
150 #define BSP430_RFEM_RF1P3_TIMER_CCIDX 2
151 #define BSP430_RFEM_RF1P3_TIMER_CCIS CCIS_0
152 #define BSP430_RFEM_RF1P7_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
153 #define BSP430_RFEM_RF1P7_PORT_BIT BIT2
154 #define BSP430_RFEM_RF1P7_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA0
155 #define BSP430_RFEM_RF1P7_TIMER_CCIDX 1
156 #define BSP430_RFEM_RF1P7_TIMER_CCIS CCIS_0
157 #define BSP430_RFEM_RF1P9_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
158 #define BSP430_RFEM_RF1P9_PORT_BIT BIT1
159 #define BSP430_RFEM_RF1P9_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA0
160 #define BSP430_RFEM_RF1P9_TIMER_CCIDX 0
161 #define BSP430_RFEM_RF1P9_TIMER_CCIS CCIS_0
162 #define BSP430_RFEM_RF1P10_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
163 #define BSP430_RFEM_RF1P10_PORT_BIT BIT6
164 #define BSP430_RFEM_RF1P10_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA0
165 #define BSP430_RFEM_RF1P10_TIMER_CCIDX 1
166 #define BSP430_RFEM_RF1P12_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
167 #define BSP430_RFEM_RF1P12_PORT_BIT BIT0
168 #define BSP430_RFEM_RF1P14_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
169 #define BSP430_RFEM_RF1P14_PORT_BIT BIT7
170 #define BSP430_RFEM_RF1P16_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
171 #define BSP430_RFEM_RF1P16_PORT_BIT BIT5
172 #define BSP430_RFEM_RF1P16_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA0
173 #define BSP430_RFEM_RF1P16_TIMER_CCIDX 0
174 #define BSP430_RFEM_RF1P18_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
175 #define BSP430_RFEM_RF1P18_PORT_BIT BIT7
176 #define BSP430_RFEM_RF1P20_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
177 #define BSP430_RFEM_RF1P20_PORT_BIT BIT6
178 #define BSP430_RFEM_RF1P20_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA0
179 #define BSP430_RFEM_RF1P20_TIMER_CCIDX 1
180 #define BSP430_RFEM_RF2P15_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
181 #define BSP430_RFEM_RF2P15_PORT_BIT BIT5
182 #define BSP430_RFEM_RF2P15_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA1
183 #define BSP430_RFEM_RF2P15_TIMER_CCIDX 2
184 #define BSP430_RFEM_RF2P15_TIMER_CCIS CCIS_1
185 #define BSP430_RFEM_RF2P18_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
186 #define BSP430_RFEM_RF2P18_PORT_BIT BIT3
187 #define BSP430_RFEM_RF2P18_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA1
188 #define BSP430_RFEM_RF2P18_TIMER_CCIDX 0
189 #define BSP430_RFEM_RF2P18_TIMER_CCIS CCIS_1
190 #define BSP430_RFEM_RF2P19_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
191 #define BSP430_RFEM_RF2P19_PORT_BIT BIT2
192 #define BSP430_RFEM_RF2P19_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA1
193 #define BSP430_RFEM_RF2P19_TIMER_CCIDX 1
194 #define BSP430_RFEM_RF2P19_TIMER_CCIS CCIS_1
195 #endif /* BSP430_RFEM_CCEM */
196 /* END AUTOMATICALLY GENERATED CODE [rfem_platform] */
197 /* !BSP430! end=rfem_platform */
198 
201 /* Include generic file, in case this is being included directly */
202 #include <bsp430/platform.h>
203 
204 #endif /* BSP430_PLATFORM_EXP430G2_H */
Entrypoint for platform-specific capabilities.