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_EXP430FG4618_BSP430_CONFIG_H
40 #define BSP430_PLATFORM_EXP430FG4618_BSP430_CONFIG_H
41 
44 /* Use native USCI for genericized serial port unless told not to */
45 #ifndef configBSP430_SERIAL_USE_USCI
46 #define configBSP430_SERIAL_USE_USCI 1
47 #endif /* configBSP430_SERIAL_USE_USCI */
48 
49 /* What to use as a console */
50 #if (configBSP430_CONSOLE - 0)
51 #ifndef BSP430_CONSOLE_SERIAL_PERIPH_CPPID
52 #define BSP430_CONSOLE_SERIAL_PERIPH_CPPID BSP430_PERIPH_CPPID_USCI_A0
53 #endif /* BSP430_CONSOLE_SERIAL_PERIPH_CPPID */
54 #endif /* configBSP430_CONSOLE */
55 
56 /* How to use ACLK as a capture/compare input source */
57 /* Settings for TB0: T0B6 ccis=1 ; clk P1.4 ; cc0 P2.1 ; cc1 P2.2 */
58 #if (configBSP430_TIMER_CCACLK - 0)
59 #ifndef BSP430_TIMER_CCACLK_PERIPH_CPPID
60 #define BSP430_TIMER_CCACLK_PERIPH_CPPID BSP430_PERIPH_CPPID_TB0
61 #endif /* BSP430_TIMER_CCACLK_PERIPH_CPPID */
62 #ifndef BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID
63 #define BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
64 #endif /* BSP430_TIMER_CCACLK_CLK_PORT_PERIPH_CPPID */
65 #ifndef BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID
66 #define BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
67 #endif /* BSP430_TIMER_CCACLK_CC0_PORT_PERIPH_CPPID */
68 #ifndef BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID
69 #define BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT2
70 #endif /* BSP430_TIMER_CCACLK_CC1_PORT_PERIPH_CPPID */
71 #endif /* configBSP430_TIMER_CCACLK */
72 
73 /* Enable buttons as requested */
74 #if (configBSP430_PLATFORM_BUTTON0 - 0) || (configBSP430_PLATFORM_BUTTON1 - 0)
75 #if !defined(configBSP430_HAL_PORT1)
76 #define configBSP430_HAL_PORT1 1
77 #else /* configBSP430_HAL_PORT1 */
78 #if (configBSP430_PLATFORM_BUTTON0 - 0) && ! defined(configBSP430_HPL_PORT1)
79 #define configBSP430_HPL_PORT1 1
80 #endif /* BUTTON0 */
81 #if (configBSP430_PLATFORM_BUTTON1 - 0) && ! defined(configBSP430_HPL_PORT1)
82 #define configBSP430_HPL_PORT1 1
83 #endif /* BUTTON1 */
84 #endif /* configBSP430_HAL_PORT1 */
85 #endif /* configBSP430_PLATFORM_BUTTON[01] */
86 
87 /* !BSP430! insert=rfem_config platform=exp430fg4618 mcu=msp430fg4618 */
88 /* BEGIN AUTOMATICALLY GENERATED CODE---DO NOT MODIFY [rfem_config] */
89 #if (configBSP430_RFEM - 0)
90 #define BSP430_RFEM_RF1P3_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
91 #define BSP430_RFEM_RF1P5_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
92 #define BSP430_RFEM_RF1P6_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
93 #define BSP430_RFEM_RF1P8_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
94 #define BSP430_RFEM_RF1P10_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
95 #define BSP430_RFEM_RF1P10_TIMER_PERIPH_CPPID BSP430_PERIPH_CPPID_TA0
96 #define BSP430_RFEM_RF1P12_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT1
97 #define BSP430_RFEM_RF1P14_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT4
98 #define BSP430_RFEM_RF1P16_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT4
99 #define BSP430_RFEM_RF1P18_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT4
100 #define BSP430_RFEM_RF1P20_PORT_PERIPH_CPPID BSP430_PERIPH_CPPID_PORT4
101 #endif /* configBSP430_RFEM */
102 /* END AUTOMATICALLY GENERATED CODE [rfem_config] */
103 /* !BSP430! end=rfem_config */
104 
107 #endif /* BSP430_PLATFORM_EXP430FG4618_BSP430_CONFIG_H */