MSP430 DriverLib for MSP430FR2xx_4xx Devices  2.91.13.01
tia.h
1 //*****************************************************************************
2 //
3 // tia.h - Driver for the TIA Module.
4 //
5 //*****************************************************************************
6 
7 #ifndef __MSP430WARE_TIA_H__
8 #define __MSP430WARE_TIA_H__
9 
10 #include "inc/hw_memmap.h"
11 
12 #ifdef __MSP430_HAS_TRIx__
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 positiveInput parameter
28 // for functions: TIA_selectPositiveInput().
29 //
30 //*****************************************************************************
31 #define TIA_POSITIVE_INPUT_EXTERNAL_SOURCE TRIPSEL_0
32 #define TIA_POSITIVE_INPUT_DEVICE_SPECIFIC_1 TRIPSEL_1
33 #define TIA_POSITIVE_INPUT_DEVICE_SPECIFIC_2 TRIPSEL_2
34 #define TIA_POSITIVE_INPUT_DEVICE_SPECIFIC_3 TRIPSEL_3
35 
36 //*****************************************************************************
37 //
38 // The following are values that can be passed to the powerMode parameter for
39 // functions: TIA_selectPowerMode().
40 //
41 //*****************************************************************************
42 #define TIA_HIGH_SPEED_HIGH_POWER 0x0
43 #define TIA_LOW_SPEED_LOW_POWER TRIPM
44 
45 //*****************************************************************************
46 //
47 // Prototypes for the APIs.
48 //
49 //*****************************************************************************
50 
51 //*****************************************************************************
52 //
53 //! \brief Selects TIA positive input
54 //!
55 //! This function selects TIA positive input.
56 //!
57 //! \param baseAddress is the base address of the TIA module.
58 //! \param positiveInput selects positive input.
59 //! Valid values are:
60 //! - \b TIA_POSITIVE_INPUT_EXTERNAL_SOURCE [Default]
61 //! - \b TIA_POSITIVE_INPUT_DEVICE_SPECIFIC_1
62 //! - \b TIA_POSITIVE_INPUT_DEVICE_SPECIFIC_2
63 //! - \b TIA_POSITIVE_INPUT_DEVICE_SPECIFIC_3
64 //! \n Modified bits are \b TRIPSEL of \b TRICTL register.
65 //!
66 //! \return None
67 //
68 //*****************************************************************************
69 extern void TIA_selectPositiveInput(uint16_t baseAddress,
70  uint16_t positiveInput);
71 
72 //*****************************************************************************
73 //
74 //! \brief Selects TIA power mode
75 //!
76 //! This function selects TIA power mode.
77 //!
78 //! \param baseAddress is the base address of the TIA module.
79 //! \param powerMode selects TIA power mode.
80 //! Valid values are:
81 //! - \b TIA_HIGH_SPEED_HIGH_POWER [Default]
82 //! - \b TIA_LOW_SPEED_LOW_POWER
83 //! \n Modified bits are \b TRIPM of \b TRICTL register.
84 //!
85 //! \return None
86 //
87 //*****************************************************************************
88 extern void TIA_selectPowerMode(uint16_t baseAddress,
89  uint16_t powerMode);
90 
91 //*****************************************************************************
92 //
93 //! \brief Enables TIA module
94 //!
95 //! This function enables TIA module.
96 //!
97 //! \param baseAddress is the base address of the TIA module.
98 //!
99 //! \return None
100 //
101 //*****************************************************************************
102 extern void TIA_enable(uint16_t baseAddress);
103 
104 //*****************************************************************************
105 //
106 //! \brief Disables TIA module
107 //!
108 //! This function disables TIA module.
109 //!
110 //! \param baseAddress is the base address of the TIA module.
111 //!
112 //! \return None
113 //
114 //*****************************************************************************
115 extern void TIA_disable(uint16_t baseAddress);
116 
117 //*****************************************************************************
118 //
119 // The following are deprecated APIs.
120 //
121 //*****************************************************************************
122 #define TRI_selectPositiveInput TIA_selectPositiveInput
123 #define TRI_selectPowerMode TIA_selectPowerMode
124 #define TRI_enable TIA_enable
125 #define TRI_disable TIA_disable
126 #define TRI_POSITIVE_INPUT_EXTERNAL_SOURCE TIA_POSITIVE_INPUT_EXTERNAL_SOURCE
127 #define TRI_POSITIVE_INPUT_DEVICE_SPECIFIC_1 \
128  TIA_POSITIVE_INPUT_DEVICE_SPECIFIC_1
129 #define TRI_POSITIVE_INPUT_DEVICE_SPECIFIC_2 \
130  TIA_POSITIVE_INPUT_DEVICE_SPECIFIC_2
131 #define TRI_POSITIVE_INPUT_DEVICE_SPECIFIC_3 \
132  TIA_POSITIVE_INPUT_DEVICE_SPECIFIC_3
133 #define TRI_HIGH_SPEED_HIGH_POWER TIA_HIGH_SPEED_HIGH_POWER
134 #define TRI_LOW_SPEED_LOW_POWER TIA_LOW_SPEED_LOW_POWER
135 #define TIA0_BASE TRI0_BASE
136 
137 //*****************************************************************************
138 //
139 // Mark the end of the C bindings section for C++ compilers.
140 //
141 //*****************************************************************************
142 #ifdef __cplusplus
143 }
144 #endif
145 
146 #endif
147 #endif // __MSP430WARE_TIA_H__
void TIA_disable(uint16_t baseAddress)
Disables TIA module.
Definition: tia.c:40
void TIA_selectPositiveInput(uint16_t baseAddress, uint16_t positiveInput)
Selects TIA positive input.
Definition: tia.c:21
void TIA_enable(uint16_t baseAddress)
Enables TIA module.
Definition: tia.c:35
void TIA_selectPowerMode(uint16_t baseAddress, uint16_t powerMode)
Selects TIA power mode.
Definition: tia.c:29

Copyright 2020, Texas Instruments Incorporated