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_EM430_BSP430_CONFIG_H
40 #define BSP430_PLATFORM_EM430_BSP430_CONFIG_H
41 
43 #ifndef configBSP430_PERIPH_XT2
44 #define configBSP430_PERIPH_XT2 1
45 #endif /* configBSP430_PERIPH_XT2 */
46 
49 /* Use native USCI5 for genericized serial port unless told not to */
50 #ifndef configBSP430_SERIAL_USE_USCI5
51 #define configBSP430_SERIAL_USE_USCI5 1
52 #endif /* configBSP430_SERIAL_USE_USCI5 */
53 
54 /* Enable buttons as requested */
55 #if ((configBSP430_PLATFORM_BUTTON0 - 0) \
56  || (configBSP430_PLATFORM_BUTTON1 - 0))
57 #if !defined(configBSP430_HAL_PORT1)
58 #define configBSP430_HAL_PORT1 1
59 #else /* configBSP430_HAL_PORT1 */
60 #if ! defined(configBSP430_HPL_PORT1)
61 #define configBSP430_HPL_PORT1 1
62 #endif /* BUTTON[01] */
63 #endif /* configBSP430_HAL_PORT1 */
64 #endif /* configBSP430_PLATFORM_BUTTON[01] */
65 #if ((configBSP430_PLATFORM_BUTTON2 - 0) \
66  || (configBSP430_PLATFORM_BUTTON3 - 0))
67 #if !defined(configBSP430_HAL_PORT2)
68 #define configBSP430_HAL_PORT2 1
69 #else /* configBSP430_HAL_PORT2 */
70 #if ! defined(configBSP430_HPL_PORT2)
71 #define configBSP430_HPL_PORT2 1
72 #endif /* BUTTON[23] */
73 #endif /* configBSP430_HAL_PORT2 */
74 #endif /* configBSP430_PLATFORM_BUTTON[23] */
75 
76 /* What to use as a console */
77 #if (configBSP430_CONSOLE - 0)
78 #ifndef BSP430_CONSOLE_SERIAL_PERIPH_CPPID
79 #define BSP430_CONSOLE_SERIAL_PERIPH_CPPID BSP430_PERIPH_CPPID_USCI5_A0
80 #endif /* BSP430_CONSOLE_SERIAL_PERIPH_CPPID */
81 #endif /* configBSP430_CONSOLE */
82 
83 /* How to use ACLK as a capture/compare input source */
84 /* Settings for TA1: T1A2 ccis=1 ; clk P2.0 ; cc0 P2.1 ; cc1 P2.2 */
85 #if (configBSP430_TIMER_CCACLK - 0)
86 #ifndef BSP430_TIMER_CCACLK_PERIPH_CPPID
87 #define BSP430_TIMER_CCACLK_PERIPH_CPPID BSP430_PERIPH_CPPID_TA1
88 #endif /* BSP430_TIMER_CCACLK_PERIPH_CPPID */
89 #ifndef BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID
90 #define BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
91 #endif /* BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID */
92 #ifndef BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID
93 #define BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
94 #endif /* BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID */
95 #ifndef BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID
96 #define BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
97 #endif /* BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID */
98 #endif /* configBSP430_TIMER_CCACLK */
99 
102 #endif /* BSP430_PLATFORM_EM430_BSP430_CONFIG_H */