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_EXP430F5438_BSP430_CONFIG_H
40 #define BSP430_PLATFORM_EXP430F5438_BSP430_CONFIG_H
41 
44 /* Use native USCI5 for genericized serial port unless told not to */
45 #ifndef configBSP430_SERIAL_USE_USCI5
46 #define configBSP430_SERIAL_USE_USCI5 1
47 #endif /* configBSP430_SERIAL_USE_USCI5 */
48 
49 /* Enable buttons as requested */
50 #if (configBSP430_PLATFORM_BUTTON0 - 0) || (configBSP430_PLATFORM_BUTTON1 - 0)
51 #if !defined(configBSP430_HAL_PORT2)
52 #define configBSP430_HAL_PORT2 1
53 #else /* configBSP430_HAL_PORT2 */
54 #if (configBSP430_PLATFORM_BUTTON0 - 0) && ! defined(configBSP430_HPL_PORT2)
55 #define configBSP430_HPL_PORT2 1
56 #endif /* BUTTON0 */
57 #if (configBSP430_PLATFORM_BUTTON1 - 0) && ! defined(configBSP430_HPL_PORT2)
58 #define configBSP430_HPL_PORT2 1
59 #endif /* BUTTON1 */
60 #endif /* configBSP430_HAL_PORT2 */
61 #endif /* configBSP430_PLATFORM_BUTTON[01] */
62 
63 /* What to use as a console */
64 #if (configBSP430_CONSOLE - 0)
65 #ifndef BSP430_CONSOLE_SERIAL_PERIPH_CPPID
66 #define BSP430_CONSOLE_SERIAL_PERIPH_CPPID BSP430_PERIPH_CPPID_USCI5_A1
67 #endif /* BSP430_CONSOLE_SERIAL_PERIPH_CPPID */
68 #endif /* configBSP430_CONSOLE */
69 
70 /* How to use ACLK as a capture/compare input source */
71 /* Settings for TB0: T0B6 ccis=1 ; clk P4.7 ; cc0 P4.0 ; cc1 P4.1 */
72 #if (configBSP430_TIMER_CCACLK - 0)
73 #ifndef BSP430_TIMER_CCACLK_PERIPH_CPPID
74 #define BSP430_TIMER_CCACLK_PERIPH_CPPID BSP430_PERIPH_CPPID_TB0
75 #endif /* BSP430_TIMER_CCACLK_PERIPH_CPPID */
76 #ifndef BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID
77 #define BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT4
78 #endif /* BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID */
79 #ifndef BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID
80 #define BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT4
81 #endif /* BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID */
82 #ifndef BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID
83 #define BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT4
84 #endif /* BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID */
85 #endif /* configBSP430_TIMER_CCACLK */
86 
87 /* !BSP430! insert=rfem_config platform=exp430f5438 mcu=msp430f5438a */
88 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [rfem_config] */
89 #if (configBSP430_RFEM - 0)
90 #define BSP430_RFEM_SERIAL_PERIPH_CPPID BSP430_PERIPH_CPPID_USCI5_B0
91 #define configBSP430_SERIAL_ENABLE_SPI 1
92 #define configBSP430_HAL_USCI5_B0 1
93 #define BSP430_RFEM_RF1P3_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
94 #define BSP430_RFEM_RF1P3_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
95 #define BSP430_RFEM_RF1P5_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
96 #define BSP430_RFEM_RF1P5_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
97 #define BSP430_RFEM_RF1P6_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
98 #define BSP430_RFEM_RF1P6_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
99 #define BSP430_RFEM_RF1P7_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
100 #define BSP430_RFEM_RF1P7_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
101 #define BSP430_RFEM_RF1P8_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
102 #define BSP430_RFEM_RF1P9_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
103 #define BSP430_RFEM_RF1P10_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
104 #define BSP430_RFEM_RF1P12_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
105 #define BSP430_RFEM_RF1P12_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
106 #define BSP430_RFEM_RF1P14_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
107 #define BSP430_RFEM_RF1P16_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
108 #define BSP430_RFEM_RF1P18_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
109 #define BSP430_RFEM_RF1P20_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
110 #define BSP430_RFEM_RF2P15_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
111 #define BSP430_RFEM_RF2P15_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
112 #define BSP430_RFEM_RF2P18_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT8
113 #define BSP430_RFEM_RF2P18_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
114 #define BSP430_RFEM_RF2P19_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT8
115 #define BSP430_RFEM_RF2P19_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
116 #define BSP430_RFEM_RF3P3_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT11
117 #define BSP430_RFEM_RF3P4_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
118 #define BSP430_RFEM_RF3P4_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
119 #define BSP430_RFEM_RF3P5_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT9
120 #define BSP430_RFEM_RF3P6_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
121 #define BSP430_RFEM_RF3P6_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
122 #define BSP430_RFEM_RF3P7_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT9
123 #define BSP430_RFEM_RF3P8_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
124 #define BSP430_RFEM_RF3P8_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
125 #define BSP430_RFEM_RF3P9_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT8
126 #define BSP430_RFEM_RF3P9_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
127 #define BSP430_RFEM_RF3P10_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
128 #define BSP430_RFEM_RF3P11_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT8
129 #define BSP430_RFEM_RF3P11_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
130 #define BSP430_RFEM_RF3P13_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
131 #define BSP430_RFEM_RF3P14_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
132 #define BSP430_RFEM_RF3P14_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
133 #define BSP430_RFEM_RF3P15_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
134 #define BSP430_RFEM_RF3P16_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
135 #define BSP430_RFEM_RF3P17_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
136 #define BSP430_RFEM_RF3P18_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT3
137 #endif /* configBSP430_RFEM */
138 /* END AUTOMATICALLY GENERATED CODE [rfem_config] */
139 /* !BSP430! end=rfem_config */
140 
141 #if (configBSP430_UTILITY_U8GLIB - 0) && (! defined(configBSP430_PLATFORM_EXP430F5438_LCD))
142 #define configBSP430_PLATFORM_EXP430F5438_LCD 1
143 #endif /* U8GLIB */
144 
145 #if (configBSP430_PLATFORM_EXP430F5438_LCD - 0)
146 /* LCD uses USCI_B2 */
147 #define configBSP430_SERIAL_ENABLE_SPI 1
148 #define configBSP430_HAL_USCI5_B2 1
149 /* CSn (P9.6) and RSTn (P9.7) */
150 #ifndef configBSP430_HPL_PORT9
151 #define configBSP430_HPL_PORT9 1
152 #endif /* configBSP430_HPL_PORT9 */
153 /* Backlight on P8.3 (TA0.3) */
154 #ifndef configBSP430_HPL_PORT8
155 #define configBSP430_HPL_PORT8 1
156 #endif /* configBSP430_HPL_PORT8 */
157 #endif /* configBSP430_PLATFORM_EXP430F5438_LCD */
158 
161 #endif /* BSP430_PLATFORM_EXP430F5438_BSP430_CONFIG_H */