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 
32 #ifndef BSP430_PLATFORM_EXP430FG4618_PLATFORM_H
33 #define BSP430_PLATFORM_EXP430FG4618_PLATFORM_H
34 
54 #define BSP430_PLATFORM_EXP430FG4618 1
55 
58 /* Available button definitions */
59 #define BSP430_PLATFORM_BUTTON0_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
60 #define BSP430_PLATFORM_BUTTON0_PORT_BIT BIT0
61 #define BSP430_PLATFORM_BUTTON1_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
62 #define BSP430_PLATFORM_BUTTON1_PORT_BIT BIT2
63 
64 /* Standard LED colors */
65 #define BSP430_LED_GREEN 0
66 #define BSP430_LED_YELLOW 1
67 #define BSP430_LED_RED 3
68 
69 /* How to use ACLK as a capture/compare input source */
70 /* Settings for TB0: T0B6 ccis=1 ; clk P1.4 ; cc0 P2.1 ; cc1 P2.2 */
71 #ifndef BSP430_TIMER_CCACLK_ACLK_CCIDX
72 /* NB: Check against BSP430_TIMER_CCACLK_PERIPH_CPPID in bsp430_config.h */
73 #define BSP430_TIMER_CCACLK_ACLK_CCIDX 6
74 #endif /* BSP430_TIMER_CCACLK_ACLK_CCIDX */
75 #ifndef BSP430_TIMER_CCACLK_ACLK_CCIS
76 /* NB: Check against BSP430_TIMER_CCACLK_PERIPH_CPPID in bsp430_config.h */
77 #define BSP430_TIMER_CCACLK_ACLK_CCIS CCIS_1
78 #endif /* BSP430_TIMER_CCACLK_ACLK_CCIS */
79 #ifndef BSP430_TIMER_CCACLK_CLK_PORT_BIT
80 /* NB: Check against BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID in bsp430_config.h */
81 #define BSP430_TIMER_CCACLK_CLK_PORT_BIT BIT4
82 #endif /* BSP430_TIMER_CCACLK_CLK_PORT_BIT */
83 #ifndef BSP430_TIMER_CCACLK_CC0_PORT_BIT
84 /* NB: Check against BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID in bsp430_config.h */
85 #define BSP430_TIMER_CCACLK_CC0_PORT_BIT BIT1
86 #endif /* BSP430_TIMER_CCACLK_CC0_PORT_BIT */
87 #ifndef BSP430_TIMER_CCACLK_CC1_PORT_BIT
88 /* NB: Check against BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID in bsp430_config.h */
89 #define BSP430_TIMER_CCACLK_CC1_PORT_BIT BIT2
90 #endif /* BSP430_TIMER_CCACLK_CC1_PORT_BIT */
91 
92 /* !BSP430! insert=rfem_platform platform=exp430fg4618 mcu=msp430fg4618 */
93 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [rfem_platform] */
94 #if (configBSP430_RFEM - 0)
95 #define BSP430_RFEM 1
96 #endif /* configBSP430_RFEM */
97 #if (BSP430_RFEM - 0)
98 #define BSP430_RFEM_RF1P3_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
99 #define BSP430_RFEM_RF1P3_PORT_BIT BIT5
100 #define BSP430_RFEM_RF1P5_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
101 #define BSP430_RFEM_RF1P5_PORT_BIT BIT4
102 #define BSP430_RFEM_RF1P6_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
103 #define BSP430_RFEM_RF1P6_PORT_BIT BIT6
104 #define BSP430_RFEM_RF1P8_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
105 #define BSP430_RFEM_RF1P8_PORT_BIT BIT7
106 #define BSP430_RFEM_RF1P10_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
107 #define BSP430_RFEM_RF1P10_PORT_BIT BIT2
108 #define BSP430_RFEM_RF1P10_TIMER_PERIPH_HANDLE BSP430_PERIPH_TA0
109 #define BSP430_RFEM_RF1P10_TIMER_CCIDX 1
110 #define BSP430_RFEM_RF1P10_TIMER_CCIS CCIS_0
111 #define BSP430_RFEM_RF1P12_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
112 #define BSP430_RFEM_RF1P12_PORT_BIT BIT3
113 #define BSP430_RFEM_RF1P14_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT4
114 #define BSP430_RFEM_RF1P14_PORT_BIT BIT2
115 #define BSP430_RFEM_RF1P16_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT4
116 #define BSP430_RFEM_RF1P16_PORT_BIT BIT5
117 #define BSP430_RFEM_RF1P18_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT4
118 #define BSP430_RFEM_RF1P18_PORT_BIT BIT3
119 #define BSP430_RFEM_RF1P20_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT4
120 #define BSP430_RFEM_RF1P20_PORT_BIT BIT4
121 #endif /* BSP430_RFEM */
122 /* END AUTOMATICALLY GENERATED CODE [rfem_platform] */
123 /* !BSP430! end=rfem_platform */
124 
127 /* Include generic file, in case this is being included directly */
128 #include <bsp430/platform.h>
129 
130 #endif /* BSP430_PLATFORM_EXP430FG4618_H */
Entrypoint for platform-specific capabilities.