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 
59 #ifndef BSP430_PLATFORM_RF2500T_PLATFORM_H
60 #define BSP430_PLATFORM_RF2500T_PLATFORM_H
61 
64 #define BSP430_PLATFORM_RF2500T 1
65 
69 #ifndef BSP430_CONSOLE_BAUD_RATE
70 #define BSP430_CONSOLE_BAUD_RATE 2400
71 #endif /* BSP430_CONSOLE_BAUD_RATE */
72 
73 /* Enable if requested */
74 #if (configBSP430_PLATFORM_SPIN_FOR_JUMPER - 0)
75 #define BSP430_PLATFORM_SPIN_FOR_JUMPER 1
76 #endif /* configBSP430_PLATFORM_SPIN_FOR_JUMPER */
77 
78 /* Available button definitions */
79 #define BSP430_PLATFORM_BUTTON0_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
80 #define BSP430_PLATFORM_BUTTON0_PORT_BIT BIT2
81 
82 /* Standard LED colors */
83 #define BSP430_LED_RED 0
84 #define BSP430_LED_GREEN 1
85 
86 /* How to use ACLK as a capture/compare input source */
87 /* Settings for TB0: T0B2 ccis=1 ; clk P4.7 ; cc0 P4.3 (CCI0B) ; cc1 P4.1 */
88 #ifndef BSP430_TIMER_CCACLK_ACLK_CCIDX
89 /* NB: Check against BSP430_TIMER_CCACLK_PERIPH_CPPID in bsp430_config.h */
90 #define BSP430_TIMER_CCACLK_ACLK_CCIDX 2
91 #endif /* BSP430_TIMER_CCACLK_ACLK_CCIDX */
92 #ifndef BSP430_TIMER_CCACLK_ACLK_CCIS
93 /* NB: Check against BSP430_TIMER_CCACLK_PERIPH_CPPID in bsp430_config.h */
94 #define BSP430_TIMER_CCACLK_ACLK_CCIS CCIS_1
95 #endif /* BSP430_TIMER_CCACLK_ACLK_CCIS */
96 #ifndef BSP430_TIMER_CCACLK_CLK_PORT_BIT
97 /* NB: Check against BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID in bsp430_config.h */
98 #define BSP430_TIMER_CCACLK_CLK_PORT_BIT BIT7
99 #endif /* BSP430_TIMER_CCACLK_CLK_PORT_BIT */
100 #ifndef BSP430_TIMER_CCACLK_CC0_PORT_BIT
101 /* NB: Check against BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID in bsp430_config.h */
102 #define BSP430_TIMER_CCACLK_CC0_PORT_BIT BIT3
103 #endif /* BSP430_TIMER_CCACLK_CC0_PORT_BIT */
104 #ifndef BSP430_TIMER_CCACLK_CC0_CCIS
105 #define BSP430_TIMER_CCACLK_CC0_CCIS CCIS_1
106 #endif /* BSP430_TIMER_CCACLK_CC0_CCIS */
107 #ifndef BSP430_TIMER_CCACLK_CC1_PORT_BIT
108 /* NB: Check against BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID in bsp430_config.h */
109 #define BSP430_TIMER_CCACLK_CC1_PORT_BIT BIT1
110 #endif /* BSP430_TIMER_CCACLK_CC1_PORT_BIT */
111 
112 /* !BSP430! insert=emk_platform emk=rf2500t mcu=msp430f2274 spi=UCB0SOMI tag=cc110x hal=CSn gpio=GDO0,GDO1,GDO2 */
113 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [emk_platform] */
114 #if (configBSP430_RF_RF2500T - 0)
115 #define BSP430_RF_CC110X 1
116 #define BSP430_RF_CC110X_SPI_PERIPH_HANDLE BSP430_PERIPH_USCI_B0
117 #define BSP430_RF_CC110X_GDO0_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
118 #define BSP430_RF_CC110X_GDO0_PORT_BIT BIT6
119 #define BSP430_RF_CC110X_GDO1_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT3
120 #define BSP430_RF_CC110X_GDO1_PORT_BIT BIT2
121 #define BSP430_RF_CC110X_GDO2_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT2
122 #define BSP430_RF_CC110X_GDO2_PORT_BIT BIT7
123 #define BSP430_RF_CC110X_CSn_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT3
124 #define BSP430_RF_CC110X_CSn_PORT_BIT BIT0
125 #endif /* configBSP430_RF_RF2500T */
126 /* END AUTOMATICALLY GENERATED CODE [emk_platform] */
127 /* !BSP430! end=emk_platform */
128 
131 /* Include generic file, in case this is being included directly */
132 #include <bsp430/platform.h>
133 
134 #endif /* BSP430_PLATFORM_RF2500T_H */
Entrypoint for platform-specific capabilities.