2020-2021 Sunseeker Telemetry and Lighting System
Board.h
Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
2  * Copyright (c) 2017, Texas Instruments Incorporated
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
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  * --/COPYRIGHT--*/
53 #ifndef __BOARD_H__
54 #define __BOARD_H__
55 
56 #ifdef __MSP430FR4133__
57 
58 #define GPIO_PORT_LED1 GPIO_PORT_P1
59 #define GPIO_PIN_LED1 GPIO_PIN0
60 #define GPIO_PORT_LED2 GPIO_PORT_P4
61 #define GPIO_PIN_LED2 GPIO_PIN0
62 #define GPIO_PORT_S1 GPIO_PORT_P1
63 #define GPIO_PIN_S1 GPIO_PIN2
64 
65 #define GPIO_PORT_ADC7 GPIO_PORT_P1
66 #define GPIO_PIN_ADC7 GPIO_PIN7
67 #define GPIO_FUNCTION_ADC7 GPIO_PRIMARY_MODULE_FUNCTION
68 
69 #define GPIO_PORT_MCLK GPIO_PORT_P1
70 #define GPIO_PIN_MCLK GPIO_PIN4
71 #define GPIO_FUNCTION_MCLK GPIO_PRIMARY_MODULE_FUNCTION
72 #define GPIO_PORT_SMCLK GPIO_PORT_P8
73 #define GPIO_PIN_SMCLK GPIO_PIN0
74 #define GPIO_FUNCTION_SMCLK GPIO_PRIMARY_MODULE_FUNCTION
75 #define GPIO_PORT_ACLK GPIO_PORT_P8
76 #define GPIO_PIN_ACLK GPIO_PIN1
77 #define GPIO_FUNCTION_ACLK GPIO_PRIMARY_MODULE_FUNCTION
78 
79 #define GPIO_PORT_UCA0TXD GPIO_PORT_P1
80 #define GPIO_PIN_UCA0TXD GPIO_PIN0
81 #define GPIO_FUNCTION_UCA0TXD GPIO_PRIMARY_MODULE_FUNCTION
82 #define GPIO_PORT_UCA0RXD GPIO_PORT_P1
83 #define GPIO_PIN_UCA0RXD GPIO_PIN1
84 #define GPIO_FUNCTION_UCA0RXD GPIO_PRIMARY_MODULE_FUNCTION
85 
86 #define GPIO_PORT_UCB0SCL GPIO_PORT_P5
87 #define GPIO_PIN_UCB0SCL GPIO_PIN3
88 #define GPIO_FUNCTION_UCB0SCL GPIO_PRIMARY_MODULE_FUNCTION
89 #define GPIO_PORT_UCB0SDA GPIO_PORT_P5
90 #define GPIO_PIN_UCB0SDA GPIO_PIN2
91 #define GPIO_FUNCTION_UCB0SDA GPIO_PRIMARY_MODULE_FUNCTION
92 
93 #endif // __MSP430FR4133__
94 
95 #ifdef __MSP430FR2311__
96 
97 #define GPIO_PORT_LED1 GPIO_PORT_P1
98 #define GPIO_PIN_LED1 GPIO_PIN0
99 #define GPIO_PORT_LED2 GPIO_PORT_P2
100 #define GPIO_PIN_LED2 GPIO_PIN0
101 #define GPIO_PORT_S1 GPIO_PORT_P1
102 #define GPIO_PIN_S1 GPIO_PIN1
103 
104 #define GPIO_PORT_ADC7 GPIO_PORT_P1
105 #define GPIO_PIN_ADC7 GPIO_PIN7
106 #define GPIO_FUNCTION_ADC7 GPIO_PRIMARY_MODULE_FUNCTION
107 
108 #define GPIO_PORT_MCLK GPIO_PORT_P2
109 #define GPIO_PIN_MCLK GPIO_PIN6
110 #define GPIO_FUNCTION_MCLK GPIO_PRIMARY_MODULE_FUNCTION
111 #define GPIO_PORT_SMCLK GPIO_PORT_P1
112 #define GPIO_PIN_SMCLK GPIO_PIN0
113 #define GPIO_FUNCTION_SMCLK GPIO_SECONDARY_MODULE_FUNCTION
114 #define GPIO_PORT_ACLK GPIO_PORT_P1
115 #define GPIO_PIN_ACLK GPIO_PIN1
116 #define GPIO_FUNCTION_ACLK GPIO_SECONDARY_MODULE_FUNCTION
117 
118 #define GPIO_PORT_UCA0TXD GPIO_PORT_P1
119 #define GPIO_PIN_UCA0TXD GPIO_PIN7
120 #define GPIO_FUNCTION_UCA0TXD GPIO_PRIMARY_MODULE_FUNCTION
121 #define GPIO_PORT_UCA0RXD GPIO_PORT_P1
122 #define GPIO_PIN_UCA0RXD GPIO_PIN6
123 #define GPIO_FUNCTION_UCA0RXD GPIO_PRIMARY_MODULE_FUNCTION
124 
125 #define GPIO_PORT_UCB0SCL GPIO_PORT_P1
126 #define GPIO_PIN_UCB0SCL GPIO_PIN3
127 #define GPIO_FUNCTION_UCB0SCL GPIO_PRIMARY_MODULE_FUNCTION
128 #define GPIO_PORT_UCB0SDA GPIO_PORT_P1
129 #define GPIO_PIN_UCB0SDA GPIO_PIN2
130 #define GPIO_FUNCTION_UCB0SDA GPIO_PRIMARY_MODULE_FUNCTION
131 
132 #endif // __MSP430FR2311__
133 
134 #ifdef __MSP430FR2433__
135 
136 #define GPIO_PORT_LED1 GPIO_PORT_P1
137 #define GPIO_PIN_LED1 GPIO_PIN0
138 #define GPIO_PORT_LED2 GPIO_PORT_P1
139 #define GPIO_PIN_LED2 GPIO_PIN1
140 #define GPIO_PORT_S1 GPIO_PORT_P2
141 #define GPIO_PIN_S1 GPIO_PIN3
142 #define GPIO_PORT_S2 GPIO_PORT_P2
143 #define GPIO_PIN_S2 GPIO_PIN7
144 
145 #define GPIO_PORT_ADC7 GPIO_PORT_P1
146 #define GPIO_PIN_ADC7 GPIO_PIN7
147 #define GPIO_FUNCTION_ADC7 GPIO_PRIMARY_MODULE_FUNCTION
148 
149 #define GPIO_PORT_MCLK GPIO_PORT_P1
150 #define GPIO_PIN_MCLK GPIO_PIN3
151 #define GPIO_FUNCTION_MCLK GPIO_SECONDARY_MODULE_FUNCTION
152 #define GPIO_PORT_SMCLK GPIO_PORT_P1
153 #define GPIO_PIN_SMCLK GPIO_PIN7
154 #define GPIO_FUNCTION_SMCLK GPIO_SECONDARY_MODULE_FUNCTION
155 #define GPIO_PORT_ACLK GPIO_PORT_P2
156 #define GPIO_PIN_ACLK GPIO_PIN2
157 #define GPIO_FUNCTION_ACLK GPIO_SECONDARY_MODULE_FUNCTION
158 
159 #define GPIO_PORT_UCA0TXD GPIO_PORT_P1
160 #define GPIO_PIN_UCA0TXD GPIO_PIN4
161 #define GPIO_FUNCTION_UCA0TXD GPIO_PRIMARY_MODULE_FUNCTION
162 #define GPIO_PORT_UCA0RXD GPIO_PORT_P1
163 #define GPIO_PIN_UCA0RXD GPIO_PIN5
164 #define GPIO_FUNCTION_UCA0RXD GPIO_PRIMARY_MODULE_FUNCTION
165 
166 #define GPIO_PORT_UCB0SCL GPIO_PORT_P1
167 #define GPIO_PIN_UCB0SCL GPIO_PIN3
168 #define GPIO_FUNCTION_UCB0SCL GPIO_PRIMARY_MODULE_FUNCTION
169 #define GPIO_PORT_UCB0SDA GPIO_PORT_P1
170 #define GPIO_PIN_UCB0SDA GPIO_PIN2
171 #define GPIO_FUNCTION_UCB0SDA GPIO_PRIMARY_MODULE_FUNCTION
172 
173 #endif // __MSP430FR2433__
174 
175 #ifdef __MSP430FR2355__
176 
177 #define GPIO_PORT_LED1 GPIO_PORT_P1
178 #define GPIO_PIN_LED1 GPIO_PIN0
179 #define GPIO_PORT_LED2 GPIO_PORT_P6
180 #define GPIO_PIN_LED2 GPIO_PIN6
181 #define GPIO_PORT_S1 GPIO_PORT_P4
182 #define GPIO_PIN_S1 GPIO_PIN1
183 #define GPIO_PORT_S2 GPIO_PORT_P2
184 #define GPIO_PIN_S2 GPIO_PIN3
185 
186 #define GPIO_PORT_ADC7 GPIO_PORT_P1
187 #define GPIO_PIN_ADC7 GPIO_PIN7
188 #define GPIO_FUNCTION_ADC7 GPIO_TERNARY_MODULE_FUNCTION
189 
190 #define GPIO_PORT_XIN GPIO_PORT_P2
191 #define GPIO_PIN_XIN GPIO_PIN_P7
192 #define GPIO_FUNCTION_XIN GPIO_SECONDARY_MODULE_FUNCTION
193 #define GPIO_PORT_XOUT GPIO_PORT_P2
194 #define GPIO_PIN_XOUT GPIO_PIN_P6
195 #define GPIO_FUNCTION_XOUT GPIO_SECONDARY_MODULE_FUNCTION
196 
197 #define GPIO_PORT_MCLK GPIO_PORT_P3
198 #define GPIO_PIN_MCLK GPIO_PIN0
199 #define GPIO_FUNCTION_MCLK GPIO_PRIMARY_MODULE_FUNCTION
200 #define GPIO_PORT_SMCLK GPIO_PORT_P3
201 #define GPIO_PIN_SMCLK GPIO_PIN4
202 #define GPIO_FUNCTION_SMCLK GPIO_PRIMARY_MODULE_FUNCTION
203 #define GPIO_PORT_ACLK GPIO_PORT_P1
204 #define GPIO_PIN_ACLK GPIO_PIN1
205 #define GPIO_FUNCTION_ACLK GPIO_SECONDARY_MODULE_FUNCTION
206 
207 #define GPIO_PORT_UCA0TXD GPIO_PORT_P1
208 #define GPIO_PIN_UCA0TXD GPIO_PIN7
209 #define GPIO_FUNCTION_UCA0TXD GPIO_PRIMARY_MODULE_FUNCTION
210 #define GPIO_PORT_UCA0RXD GPIO_PORT_P1
211 #define GPIO_PIN_UCA0RXD GPIO_PIN6
212 #define GPIO_FUNCTION_UCA0RXD GPIO_PRIMARY_MODULE_FUNCTION
213 
214 #define GPIO_PORT_UCB0SCL GPIO_PORT_P1
215 #define GPIO_PIN_UCB0SCL GPIO_PIN3
216 #define GPIO_FUNCTION_UCB0SCL GPIO_PRIMARY_MODULE_FUNCTION
217 #define GPIO_PORT_UCB0SDA GPIO_PORT_P1
218 #define GPIO_PIN_UCB0SDA GPIO_PIN2
219 #define GPIO_FUNCTION_UCB0SDA GPIO_PRIMARY_MODULE_FUNCTION
220 
221 #define GPIO_PORT_SACOA0O GPIO_PORT_P1
222 #define GPIO_PIN_SACOA0O GPIO_PIN1
223 #define GPIO_FUNCTION_SACOA0O GPIO_TERNARY_MODULE_FUNCTION
224 #define GPIO_PORT_SACOA0N GPIO_PORT_P1
225 #define GPIO_PIN_SACOA0N GPIO_PIN2
226 #define GPIO_FUNCTION_SACOA0N GPIO_TERNARY_MODULE_FUNCTION
227 #define GPIO_PORT_SACOA0P GPIO_PORT_P1
228 #define GPIO_PIN_SACOA0P GPIO_PIN3
229 #define GPIO_FUNCTION_SACOA0P GPIO_TERNARY_MODULE_FUNCTION
230 
231 #define GPIO_PORT_SACOA2O GPIO_PORT_P3
232 #define GPIO_PIN_SACOA2O GPIO_PIN1
233 #define GPIO_FUNCTION_SACOA2O GPIO_TERNARY_MODULE_FUNCTION
234 #define GPIO_PORT_SACOA2N GPIO_PORT_P3
235 #define GPIO_PIN_SACOA2N GPIO_PIN2
236 #define GPIO_FUNCTION_SACOA2N GPIO_TERNARY_MODULE_FUNCTION
237 #define GPIO_PORT_SACOA2P GPIO_PORT_P3
238 #define GPIO_PIN_SACOA2P GPIO_PIN3
239 #define GPIO_FUNCTION_SACOA2P GPIO_TERNARY_MODULE_FUNCTION
240 
241 #define GPIO_PORT_COMP0O GPIO_PORT_P2
242 #define GPIO_PIN_COMP0O GPIO_PIN0
243 #define GPIO_FUNCTION_COMP0O GPIO_SECONDARY_MODULE_FUNCTION
244 
245 #endif // __MSP430FR2355__
246 
247 #endif // __BOARD_H__
248