2020-2021 Sunseeker Telemetry and Lighting System
wdt_a.h
Go to the documentation of this file.
1 //*****************************************************************************
2 //
3 // wdt_a.h - Driver for the WDT_A Module.
4 //
5 //*****************************************************************************
6 
7 #ifndef __MSP430WARE_WDT_A_H__
8 #define __MSP430WARE_WDT_A_H__
9 
10 #include "inc/hw_memmap.h"
11 
12 #ifdef __MSP430_HAS_WDT_A__
13 
14 //*****************************************************************************
15 //
16 // If building with a C++ compiler, make all of the definitions in this header
17 // have a C binding.
18 //
19 //*****************************************************************************
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif
24 
25 //*****************************************************************************
26 //
27 // The following are values that can be passed to the clockSelect parameter for
28 // functions: WDT_A_initWatchdogTimer(), and WDT_A_initIntervalTimer().
29 //
30 //*****************************************************************************
31 #define WDT_A_CLOCKSOURCE_SMCLK (WDTSSEL_0)
32 #define WDT_A_CLOCKSOURCE_ACLK (WDTSSEL_1)
33 #define WDT_A_CLOCKSOURCE_VLOCLK (WDTSSEL_2)
34 #define WDT_A_CLOCKSOURCE_XCLK (WDTSSEL_3)
35 
36 //*****************************************************************************
37 //
38 // The following are values that can be passed to the clockDivider parameter
39 // for functions: WDT_A_initWatchdogTimer(), and WDT_A_initIntervalTimer().
40 //
41 //*****************************************************************************
42 #define WDT_A_CLOCKDIVIDER_2G (WDTIS_0)
43 #define WDT_A_CLOCKDIVIDER_128M (WDTIS_1)
44 #define WDT_A_CLOCKDIVIDER_8192K (WDTIS_2)
45 #define WDT_A_CLOCKDIVIDER_512K (WDTIS_3)
46 #define WDT_A_CLOCKDIVIDER_32K (WDTIS_4)
47 #define WDT_A_CLOCKDIVIDER_8192 (WDTIS_5)
48 #define WDT_A_CLOCKDIVIDER_512 (WDTIS_6)
49 #define WDT_A_CLOCKDIVIDER_64 (WDTIS_7)
50 
51 //*****************************************************************************
52 //
53 // Prototypes for the APIs.
54 //
55 //*****************************************************************************
56 
57 //*****************************************************************************
58 //
67 //
68 //*****************************************************************************
69 extern void WDT_A_hold(uint16_t baseAddress);
70 
71 //*****************************************************************************
72 //
81 //
82 //*****************************************************************************
83 extern void WDT_A_start(uint16_t baseAddress);
84 
85 //*****************************************************************************
86 //
94 //
95 //*****************************************************************************
96 extern void WDT_A_resetTimer(uint16_t baseAddress);
97 
98 //*****************************************************************************
99 //
128 //
129 //*****************************************************************************
130 extern void WDT_A_initWatchdogTimer(uint16_t baseAddress,
131  uint8_t clockSelect,
132  uint8_t clockDivider);
133 
134 //*****************************************************************************
135 //
163 //
164 //*****************************************************************************
165 extern void WDT_A_initIntervalTimer(uint16_t baseAddress,
166  uint8_t clockSelect,
167  uint8_t clockDivider);
168 
169 //*****************************************************************************
170 //
171 // Mark the end of the C bindings section for C++ compilers.
172 //
173 //*****************************************************************************
174 #ifdef __cplusplus
175 }
176 #endif
177 
178 #endif
179 #endif // __MSP430WARE_WDT_A_H__