| RTOS_MSPM0 1.1 ECE445M starter code

LaunchPad.h
Go to the documentation of this file.
1
119 #ifndef __LAUNCHPAD_H__
120 #define __LAUNCHPAD_H__
121 #include <stdint.h>
122
126 #define RED1 1
130 #define BLUE (1<<22)
134 #define RED (1<<26)
138 #define GREEN (1<<27)
142 #define S1 (1<<18)
146 #define S2 (1<<21)
147
163 void LaunchPad_Init(void);
164
165
173 uint32_t LaunchPad_InS1(void);
174
175
183 uint32_t LaunchPad_InS2(void);
184
194 void LaunchPad_LED1(uint32_t led);
195
196
203 void LaunchPad_LED1on(void);
204
205
212 void LaunchPad_LED1off(void);
213
225 void LaunchPad_LED(uint32_t led);
226
227
234 void LaunchPad_LEDwhite(void);
235
236
243 void LaunchPad_LEDoff(void);
244
248 // Mode2 Mode3 Mode4 Mode5 Mode6 Mode7 Mode8 Mode9
249 #define PA0INDEX 0 // UART0_TX I2C0_SDA TIMA0_C0 TIMA_FAL1 TIMG8_C1 FCC_IN
250 #define PA1INDEX 1 // UART0_RX I2C0_SCL TIMA0_C1 TIMA_FAL2 TIMG8_IDX TIMG8_C0
251 #define PA2INDEX 6 // TIMG8_C1 SPI0_CS0 TIMG7_C1 SPI1_CS0
252 #define PA3INDEX 7 // TIMG8_C0 SPI0_CS1 UART2_CTS TIMA0_C2 COMP1_OUT TIMG7_C0 TIMA0_C1 I2C1_SDA
253 #define PA4INDEX 8 // TIMG8_C1 SPI0_POCI UART2_RTS TIMA0_C3 LFCLK_IN TIMG7_C1 TIMA0_C1N I2C1_SCL
254 #define PA5INDEX 9 // TIMG8_C0 SPI0_PICO TIMA_FAL1 TIMG0_C0 TIMG6_C0 FCC_IN
255 #define PA6INDEX 10 // TTIMG8_C1 SPI0_SCK TIMA_FAL0 TIMG0_C1 HFCLK_IN TIMG6_C1 TIMA0_C2N
256 #define PA7INDEX 13 // COMP0_OUT CLK_OUT TIMG8_C0 TIMA0_C2 TIMG8_IDX TIMG7_C1 TIMA0_C1
257 #define PA8INDEX 18 // UART1_TX SPI0_CS0 UART0_RTS TIMA0_C0 TIMA1_C0N
258 #define PA9INDEX 19 // UART1_RX SPI0_PICO UART0_CTS TIMA0_C1 RTC_OUT TIMA0_C0N TIMA1_C1N CLK_OUT
259 #define PA10INDEX 20 // UART0_TX SPI0_POCI I2C0_SDA TIMA1_C0 TIMG12_C0 TIMA0_C2 I2C1_SDA CLK_OUT
260 #define PA11INDEX 21 // UART0_RX SPI0_SCK I2C0_SCL TIMA1_C1 COMP0_OUT TIMA0_C2N I2C1_SCL
261 #define PA12INDEX 33 // UART3_CTS SPI0_SCK TIMG0_C0 CAN_TX TIMA0_C3 FCC_IN
262 #define PA13INDEX 34 // UART3_RTS SPI0_POCI UART3_RX TIMG0_C1 CAN_RX TIMA0_C3N
263 #define PA14INDEX 35 // UART0_CTS SPI0_PICO UART3_TX TIMG12_C0 CLK_OUT
264 #define PA15INDEX 36 // UART0_RTS SPI1_CS2 I2C1_SCL TIMA1_C0 TIMG8_IDX TIMA1_C0N TIMA0_C2
265 #define PA16INDEX 37 // COMP2_OUT SPI1_POCI I2C1_SDA TIMA1_C1 TIMA1_C1N TIMA0_C2N FCC_IN
266 #define PA17INDEX 38 // UART1_TX SPI1_SCK I2C1_SCL TIMA0_C3 TIMG7_C0 TIMA1_C0
267 #define PA18INDEX 39 // UART1_RX SPI1_PICO I2C1_SDA TIMA0_C3N TIMG7_C1 TIMA1_C1
268 #define PA19INDEX 40 // SWDIO
269 #define PA20INDEX 41 // SWCLK
270 #define PA21INDEX 45 // UART2_TX TIMG8_C0 UART1_CTS TIMA0_C0 TIMG6_C0
271 #define PA22INDEX 46 // UART2_RX TIMG8_C1 UART1_RTS TIMA0_C1 CLK_OUT TIMA0_C0N TIMG6_C1
272 #define PA23INDEX 52 // UART2_TX SPI0_CS3 TIMA0_C3 TIMG0_C0 UART3_CTS TIMG7_C0 TIMG8_C0
273 #define PA24INDEX 53 // UART2_RX SPI0_CS2 TIMA0_C3N TIMG0_C1 UART3_RTS TIMG7_C1 TIMA1_C1
274 #define PA25INDEX 54 // UART3_RX SPI1_CS3 TIMG12_C1 TIMA0_C3 TIMA0_C1N
275 #define PA26INDEX 58 // UART3_TX SPI1_CS0 TIMG8_C0 TIMA_FAL0 CAN_TX TIMG7_C0
276 #define PA27INDEX 59 // RTC_OUT SPI1_CS1 TIMG8_C1 TIMA_FAL2 CAN_RX TIMG7_C1
277 #define PA28INDEX 2 // UART0_TX I2C0_SDA TIMA0_C3 TIMA_FAL0 TIMG7_C0 TIMA1_C0
278 #define PA29INDEX 3 // I2C1_SCL UART2_RTS TIMG8_C0 TIMG6_C0
279 #define PA30INDEX 4 // I2C1_SDA UART2_CTS TIMG8_C1 TIMG6_C1
280 #define PA31INDEX 5 // UART0_RX I2C0_SCL TIMA0_C3N TIMG12_C1 CLK_OUT TIMG7_C1 TIMA1_C1
281 #define PB0INDEX 11 // UART0_TX SPI1_CS2 TIMA1_C0 TIMA0_C2
282 #define PB1INDEX 12 // UART0_RX SPI1_CS3 TIMA1_C1 TIMA0_C2N
283 #define PB2INDEX 14 // UART3_TX UART2_CTS I2C1_SCL TIMA0_C3 UART1_CTS TIMG6_C0 TIMA1_C0
284 #define PB3INDEX 15 // UART3_RX UART2_RTS I2C1_SDA TIMA0_C3N UART1_RTS TIMG6_C1 TIMA1_C1
285 #define PB4INDEX 16 // UART1_TX UART3_CTS TIMA1_C0 TIMA0_C2 TIMA1_C0N
286 #define PB5INDEX 17 // UART1_RX UART3_RTS TIMA1_C1 TIMA0_C2N TIMA1_C1N
287 #define PB6INDEX 22 // UART1_TX SPI1_CS0 SPI0_CS1 TIMG8_C0 UART2_CTS TIMG6_C0 TIMA1_C0N
288 #define PB7INDEX 23 // UART1_RX SPI1_POCI SPI0_CS2 TIMG8_C1 UART2_RTS TIMG6_C1 TIMA1_C1N
289 #define PB8INDEX 24 // UART1_CTS SPI1_PICO TIMA0_C0 COMP1_OUT
290 #define PB9INDEX 25 // UART1_RTS SPI1_SCK TIMA0_C1 TIMA0_C0N
291 #define PB10INDEX 26 // TIMG0_C0 TIMG8_C0 COMP1_OUT TIMG6_C0
292 #define PB11INDEX 27 // TIMG0_C1 TIMG8_C1 CLK_OUT TIMG6_C1
293 #define PB12INDEX 28 // UART3_TX TIMA0_C2 TIMA_FAL1 TIMA0_C1
294 #define PB13INDEX 29 // UART3_RX TIMA0_C3 TIMG12_C0 TIMA0_C1N
295 #define PB14INDEX 30 // SPI1_CS3 SPI1_POCI SPI0_CS3 TIMG12_C1 TIMG8_IDX TIMA0_C0
296 #define PB15INDEX 31 // UART2_TX SPI1_PICO UART3_CTS TIMG8_C0 TIMG7_C0
297 #define PB16INDEX 32 // UART2_RX SPI1_SCK UART3_RTS TIMG8_C1 TIMG7_C1
298 #define PB17INDEX 42 // UART2_TX SPI0_PICO SPI1_CS1 TIMA1_C0 TIMA0_C2
299 #define PB18INDEX 43 // UART2_RX SPI0_SCK SPI1_CS2 TIMA1_C1 TIMA0_C2N
300 #define PB19INDEX 44 // COMP2_OUT SPI0_POCI TIMG8_C1 UART0_CTS TIMG7_C1
301 #define PB20INDEX 47 // SPI0_CS2 SPI1_CS0 TIMA0_C2 TIMG12_C0 TIMA_FAL1 TIMA0_C1 TIMA1_C1N
302 #define PB21INDEX 48 // SPI1_POCI TIMG8_C0
303 #define PB22INDEX 49 // SPI1_PICO TIMG8_C1
304 #define PB23INDEX 50 // SPI1_SCK COMP0_OUT TIMA_FAL0
305 #define PB24INDEX 51 // SPI0_CS3 SPI0_CS1 TIMA0_C3 TIMG12_C1 TIMA0_C1N TIMA1_C0N
306 #define PB25INDEX 55 // UART0_CTS SPI0_CS0 TIMA_FAL2
307 #define PB26INDEX 56 // UART0_RTS SPI0_CS1 TIMA0_C3 TIMG6_C0 TIMA1_C0
308 #define PB27INDEX 57 // COMP2_OUT SPI1_CS1 TIMA0_C3N TIMG6_C1 TIMA1_C1
309
310
311
312 #endif // __LAUNCHPAD_H__
313
LaunchPad_InS1
uint32_t LaunchPad_InS1(void)
Input S1.
LaunchPad_LEDoff
void LaunchPad_LEDoff(void)
Turn off LED.
LaunchPad_LED1off
void LaunchPad_LED1off(void)
Turn off LED1.
LaunchPad_InS2
uint32_t LaunchPad_InS2(void)
Input S2.
LaunchPad_LEDwhite
void LaunchPad_LEDwhite(void)
Make LED white.
LaunchPad_LED
void LaunchPad_LED(uint32_t led)
Output to LED.
LaunchPad_LED1on
void LaunchPad_LED1on(void)
Turn on LED1.
LaunchPad_Init
void LaunchPad_Init(void)
Initialize LaunchPad.
LaunchPad_LED1
void LaunchPad_LED1(uint32_t led)
Output to LED1.