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 
41 #ifndef BSP430_PLATFORM_WOLVERINE_PLATFORM_H
42 #define BSP430_PLATFORM_WOLVERINE_PLATFORM_H
43 
46 #define BSP430_PLATFORM_WOLVERINE 1
47 
50 /* SW2 on P1.3. Not necessarily populated. When not populated, can
51  * sometimes be faked by shorting the south pad of R14 to the north
52  * pad of SW2, but result may leave button pressed. */
53 #define BSP430_PLATFORM_BUTTON0_PORT_PERIPH_HANDLE BSP430_PERIPH_PORT1
54 #define BSP430_PLATFORM_BUTTON0_PORT_BIT BIT3
55 
56 /* One LED on P1.0. Unpopulated LEDs on P1.1 and P1.2. */
57 #define BSP430_LED_GREEN 0
58 #define BSP430_LED_RED 1
59 #define BSP430_LED_GREEN1 2
60 
61 /* How to use ACLK as a capture/compare input source */
62 /* Settings for TA1: T1A2 ccis=1 ; clk P1.1 ; cc0 P1.7 ; cc1 P1.2 */
63 #ifndef BSP430_TIMER_CCACLK_ACLK_CCIDX
64 /* NB: Check against BSP430_TIMER_CCACLK_PERIPH_CPPID in bsp430_config.h */
65 #define BSP430_TIMER_CCACLK_ACLK_CCIDX 2
66 #endif /* BSP430_TIMER_CCACLK_ACLK_CCIDX */
67 #ifndef BSP430_TIMER_CCACLK_ACLK_CCIS
68 /* NB: Check against BSP430_TIMER_CCACLK_PERIPH_CPPID in bsp430_config.h */
69 #define BSP430_TIMER_CCACLK_ACLK_CCIS CCIS_1
70 #endif /* BSP430_TIMER_CCACLK_ACLK_CCIS */
71 #ifndef BSP430_TIMER_CCACLK_CLK_PORT_BIT
72 /* NB: Check against BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID in bsp430_config.h */
73 #define BSP430_TIMER_CCACLK_CLK_PORT_BIT BIT1
74 #endif /* BSP430_TIMER_CCACLK_CLK_PORT_BIT */
75 #ifndef BSP430_TIMER_CCACLK_CC0_PORT_BIT
76 /* NB: Check against BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID in bsp430_config.h */
77 #define BSP430_TIMER_CCACLK_CC0_PORT_BIT BIT7
78 #endif /* BSP430_TIMER_CCACLK_CC0_PORT_BIT */
79 #ifndef BSP430_TIMER_CCACLK_CC1_PORT_BIT
80 /* NB: Check against BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID in bsp430_config.h */
81 #define BSP430_TIMER_CCACLK_CC1_PORT_BIT BIT2
82 #endif /* BSP430_TIMER_CCACLK_CC1_PORT_BIT */
83 
86 /* Include generic file, in case this is being included directly */
87 #include <bsp430/platform.h>
88 
89 #endif /* BSP430_PLATFORM_WOLVERINE_H */
Entrypoint for platform-specific capabilities.