MSP430UltrasonicLibrary  02_20_00_15
USS_Lib_HAL.h
Go to the documentation of this file.
1 /* --COPYRIGHT--,TI
2  *MSP Source and Object Code Software License Agreement
3  *
4  *
5  **IMPORTANT - PLEASE CAREFULLY READ THE FOLLOWING LICENSE AGREEMENT, WHICH IS LEGALLY BINDING. AFTER YOU READ IT, YOU WILL BE ASKED WHETHER YOU ACCEPT AND AGREE TO ITS TERMS. DO NOT CLICK "I ACCEPT" UNLESS: (1) YOU WILL USE THE LICENSED MATERIALS FOR YOUR OWN BENEFIT AND PERSONALLY ACCEPT, AGREE TO AND INTEND TO BE BOUND BY THESE TERMS; OR (2) YOU ARE AUTHORIZED TO, AND INTEND TO BE BOUND BY, THESE TERMS ON BEHALF OF YOUR COMPANY.
6  *
7  *
8  **Important - Read carefully: This Source and Object Code Software License Agreement ("Agreement") is a legal agreement between you and Texas Instruments Incorporated ("TI"). In this Agreement "you" means you personally if you will exercise the rights granted for your own benefit, but it means your company (or you on behalf of your company) if you will exercise the rights granted for your company's benefit. The "Licensed Materials" subject to this Agreement include the software programs and any associated electronic documentation (in each case, in whole or in part) that accompany this Agreement, are set forth in the applicable software manifest and you access "on-line", as well as any updates or upgrades to such software programs or documentation, if any, provided to you at TI's sole discretion. The Licensed Materials are specifically designed and licensed for use solely and exclusively with MSP microcontroller devices manufactured by or for TI ("TI Devices"). By installing, copying or otherwise using the Licensed Materials you agree to abide by the provisions set forth herein. This Agreement is displayed for you to read prior to using the Licensed Materials. If you choose not to accept or agree with these provisions, do not download or install the Licensed Materials.
9  *
10  **Note Regarding Possible Access to Other Licensed Materials: The Licensed Materials may be bundled with software and associated electronic documentation, if any, licensed under terms other than the terms of this Agreement (in whole or in part, "Other Licensed Materials"), including, for example Open Source Software and/or TI-owned or third party Proprietary Software licensed under such other terms. "Open Source Software" means any software licensed under terms requiring that (A) other software ("Proprietary Software") incorporated, combined or distributed with such software or developed using such software: (i) be disclosed or distributed in source code form; or (ii) otherwise be licensed on terms inconsistent with the terms of this Agreement, including but not limited to permitting use of the Proprietary Software on or with devices other than TI Devices, or (B) require the owner of Proprietary Software to license any of its patents to users of the Open Source Software and/or Proprietary Software incorporated, combined or distributed with such Open Source Software or developed using such Open Source Software.
11  *
12  **If by accepting this Agreement, you gain access to Other Licensed Materials, they will be listed in the applicable software manifest. Your use of the Other Licensed Materials is subject to the applicable other licensing terms acknowledgements and disclaimers as specified in the applicable software manifest and/or identified or included with the Other Licensed Materials in the software bundle. For clarification, this Agreement does not limit your rights under, or grant you rights that supersede, the terms of any applicable Other Licensed Materials license agreement. If any of the Other Licensed Materials is Open Source Software that has been provided to you in object code only under terms that obligate TI to provide to you or show you where you can access the source code versions of such Open Source Software, TI will provide to you, or show you where you can access, such source code if you contact TI at Texas Instruments Incorporated, 12500 TI Boulevard, Mail Station 8638, Dallas, Texas 75243, Attention: Contracts Manager, Embedded Processing. In the event you choose not to accept or agree with the terms in any applicable Other Licensed Materials license agreement, you must terminate this Agreement.
13  *
14  **1. License Grant and Use Restrictions.
15  *
16  **a. Licensed Materials License Grant. Subject to the terms of this Agreement, TI hereby grants to you a limited, non-transferable, non-exclusive, non-assignable, non-sublicensable, fully paid-up and royalty-free license to:
17  *
18  * i. Limited Source Code License: make copies, prepare derivative works, display internally and use internally the Licensed Materials provided to you in source code for the sole purpose of developing object and executable versions of such Licensed Materials, or any derivative thereof, that execute solely and exclusively on TI Devices, for end use in Licensee Products, and maintaining and supporting such Licensed Materials, or any derivative thereof, and Licensee Products. For purposes of this Agreement, "Licensee Product" means a product that consists of both hardware, including one or more TI Devices, and software components, including only executable versions of the Licensed Materials that execute solely and exclusively on such TI Devices.
19  *
20  * ii. Object Code Evaluation, Testing and Use License: make copies, display internally, distribute internally and use internally the Licensed Materials in object code for the sole purposes of evaluating and testing the Licensed Materials and designing and developing Licensee Products, and maintaining and supporting the Licensee Products;
21  *
22  * iii. Demonstration License: demonstrate to third parties the Licensed Materials executing solely and exclusively on TI Devices as they are used in Licensee Products, provided that such Licensed Materials are demonstrated in object or executable versions only and
23  *
24  * iv. Production and Distribution License: make, use, import, export and otherwise distribute the Licensed Materials as part of a Licensee Product, provided that such Licensee Products include only embedded executable copies of such Licensed Materials that execute solely and exclusively on TI Devices.
25  *
26  * b. Contractors. The licenses granted to you hereunder shall include your on-site and off-site contractors (either an individual or entity), while such contractors are performing work for or providing services to you, provided that such contractors have executed work-for-hire agreements with you containing applicable terms and conditions consistent with the terms and conditions set forth in this Agreement and provided further that you shall be liable to TI for any breach by your contractors of this Agreement to the same extent as you would be if you had breached the Agreement yourself.
27  *
28  * c. No Other License. Nothing in this Agreement shall be construed as a license to any intellectual property rights of TI other than those rights embodied in the Licensed Materials provided to you by TI. EXCEPT AS PROVIDED HEREIN, NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY OTHER TI INTELLECTUAL PROPERTY RIGHTS IS GRANTED HEREIN.
29  *
30  * d. Covenant not to Sue. During the term of this Agreement, you agree not to assert a claim against TI or its licensees that the Licensed Materials infringe your intellectual property rights.
31  *
32  * e. Restrictions. You shall maintain the source code versions of the Licensed Materials under password control protection and shall not disclose such source code versions of the Licensed Materials, to any person other than your employees and contractors whose job performance requires access. You shall not use the Licensed Materials with a processing device other than a TI Device, and you agree that any such unauthorized use of the Licensed Materials is a material breach of this Agreement. You shall not use the Licensed Materials for the purpose of analyzing or proving infringement of any of your patents by either TI or TI's customers. Except as expressly provided in this Agreement, you shall not copy, publish, disclose, display, provide, transfer or make available the Licensed Materials to any third party and you shall not sublicense, transfer, or assign the Licensed Materials or your rights under this Agreement to any third party. You shall not mortgage, pledge or encumber the Licensed Materials in any way. You may use the Licensed Materials with Open Source Software or with software developed using Open Source Software tools provided you do not incorporate, combine or distribute the Licensed Materials in a manner that subjects the Licensed Materials to any license obligations or any other intellectual property related terms of any license governing such Open Source Software.
33  *
34  * f. Termination. This Agreement is effective on the date the Licensed Materials are delivered to you together with this Agreement and will remain in full force and effect until terminated. You may terminate this Agreement at any time by written notice to TI. Without prejudice to any other rights, if you fail to comply with the terms of this Agreement or you are acquired, TI may terminate your right to use the Licensed Materials upon written notice to you. Upon termination of this Agreement, you will destroy any and all copies of the Licensed Materials in your possession, custody or control and provide to TI a written statement signed by your authorized representative certifying such destruction. Except for Sections 1(a), 1(b) and 1(d), all provisions of this Agreement shall survive termination of this Agreement.
35  *
36  **2. Licensed Materials Ownership. The Licensed Materials are licensed, not sold to you, and can only be used in accordance with the terms of this Agreement. Subject to the licenses granted to you pursuant to this Agreement, TI and its licensors own and shall continue to own all right, title and interest in and to the Licensed Materials, including all copies thereof. You agree that all fixes, modifications and improvements to the Licensed Materials conceived of or made by TI that are based, either in whole or in part, on your feedback, suggestions or recommendations are the exclusive property of TI and all right, title and interest in and to such fixes, modifications or improvements to the Licensed Materials will vest solely in TI. Moreover, you acknowledge and agree that when your independently developed software or hardware components are combined, in whole or in part, with the Licensed Materials, your right to use the combined work that includes the Licensed Materials remains subject to the terms and conditions of this Agreement.
37  *
38  **3. Intellectual Property Rights.
39  *
40  * a. The Licensed Materials contain copyrighted material, trade secrets and other proprietary information of TI and its licensors and are protected by copyright laws, international copyright treaties, and trade secret laws, as well as other intellectual property laws. To protect TI's and its licensors' rights in the Licensed Materials, you agree, except as specifically permitted by statute by a provision that cannot be waived by contract, not to "unlock", decompile, reverse engineer, disassemble or otherwise translate to a human-perceivable form any portions of the Licensed Materials provided to you in object code format only, nor permit any person or entity to do so. You shall not remove, alter, cover, or obscure any confidentiality, trade secret, trade mark, patent, copyright or other proprietary notice or other identifying marks or designs from any component of the Licensed Materials and you shall reproduce and include in all copies of the Licensed Materials the copyright notice(s) and proprietary legend(s) of TI and its licensors as they appear in the Licensed Materials. TI reserves all rights not specifically granted under this Agreement.
41  *
42  * b. Certain Licensed Materials may be based on industry recognized standards or software programs published by industry recognized standards bodies and certain third parties may claim to own patents, copyrights, and other intellectual property rights that cover implementation of those standards. You acknowledge and agree that this Agreement does not convey a license to any such third party patents, copyrights, and other intellectual property rights and that you are solely responsible for any patent, copyright, or other intellectual property right claim that relates to your use or distribution of the Licensed Materials or your use or distribution of your products that include or incorporate the Licensed Materials. Moreover, you acknowledge that you are responsible for any fees or royalties that may be payable to any third party based on such third party's interests in the Licensed Materials or any intellectual property rights that cover implementation of any industry recognized standard, any software program published by any industry recognized standards bodies or any other proprietary technology.
43  *
44  **4. Confidential Information. You acknowledge and agree that the Licensed Materials contain trade secrets and other confidential information of TI and its licensors. You agree to use the Licensed Materials solely within the scope of the licenses set forth herein, to maintain the Licensed Materials in strict confidence, to use at least the same procedures and degree of care that you use to prevent disclosure of your own confidential information of like importance but in no instance less than reasonable care, and to prevent disclosure of the Licensed Materials to any third party, except as may be necessary and required in connection with your rights and obligations hereunder; provided, however, that you may not provide the Licensed Materials to any business organization or group within your company or to customers or contractors that design or manufacture semiconductors unless TI gives written consent. You agree to obtain executed confidentiality agreements with your employees and contractors having access to the Licensed Materials and to diligently take steps to enforce such agreements in this respect. TI may disclose your contact information to TI's licensors.
45  *
46  **5. Warranties and Limitations. THE LICENSED MATERIALS ARE PROVIDED "AS IS". FURTHERMORE, YOU ACKNOWLEDGE AND AGREE THAT THE LICENSED MATERIALS HAVE NOT BEEN TESTED OR CERTIFIED BY ANY GOVERNMENT AGENCY OR INDUSTRY REGULATORY ORGANIZATION OR ANY OTHER THIRD PARTY ORGANIZATION. YOU AGREE THAT PRIOR TO USING, INCORPORATING OR DISTRIBUTING THE LICENSED MATERIALS IN OR WITH ANY COMMERCIAL PRODUCT THAT YOU WILL THOROUGHLY TEST THE PRODUCT AND THE FUNCTIONALITY OF THE LICENSED MATERIALS IN OR WITH THAT PRODUCT AND BE SOLELY RESPONSIBLE FOR ANY PROBLEMS OR FAILURES.
47  *
48  **TI AND ITS LICENSORS MAKE NO WARRANTY OR REPRESENTATION, EITHER EXPRESS, IMPLIED OR STATUTORY, REGARDING THE LICENSED MATERIALS, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT OF ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADE SECRETS OR OTHER INTELLECTUAL PROPERTY RIGHTS. YOU AGREE TO USE YOUR INDEPENDENT JUDGMENT IN DEVELOPING YOUR PRODUCTS. NOTHING CONTAINED IN THIS AGREEMENT WILL BE CONSTRUED AS A WARRANTY OR REPRESENTATION BY TI TO MAINTAIN PRODUCTION OF ANY TI SEMICONDUCTOR DEVICE OR OTHER HARDWARE OR SOFTWARE WITH WHICH THE LICENSED MATERIALS MAY BE USED.
49  *
50  **IN NO EVENT SHALL TI OR ITS LICENSORS, BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED, ON ANY THEORY OF LIABILITY, IN CONNECTION WITH OR ARISING OUT OF THIS AGREEMENT OR THE USE OF THE LICENSED MATERIALS REGARDLESS OF WHETHER TI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. EXCLUDED DAMAGES INCLUDE, BUT ARE NOT LIMITED TO, COST OF REMOVAL OR REINSTALLATION, OUTSIDE COMPUTER TIME, LABOR COSTS, LOSS OF DATA, LOSS OF GOODWILL, LOSS OF PROFITS, LOSS OF SAVINGS, OR LOSS OF USE OR INTERRUPTION OF BUSINESS. IN NO EVENT WILL TI'S OR ITS LICENSORS' AGGREGATE LIABILITY UNDER THIS AGREEMENT OR ARISING OUT OF YOUR USE OF THE LICENSED MATERIALS EXCEED FIVE HUNDRED U.S. DOLLARS (US$500).
51  *
52  * Because some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages or limitation on how long an implied warranty lasts, the above limitations or exclusions may not apply to you.
53  *
54  **6. Indemnification Disclaimer. YOU ACKNOWLEDGE AND AGREE THAT TI SHALL NOT BE LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY YOU AGAINST ANY THIRD PARTY INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON YOUR MANUFACTURE, USE, OR DISTRIBUTION OF THE LICENSED MATERIALS OR YOUR MANUFACTURE, USE, OFFER FOR SALE, SALE, IMPORTATION OR DISTRIBUTION OF YOUR PRODUCTS THAT INCLUDE OR INCORPORATE THE LICENSED MATERIALS.
55  *
56  **7. No Technical Support. TI and its licensors are under no obligation to install, maintain or support the Licensed Materials.
57  *
58  **8. Notices. All notices to TI hereunder shall be delivered to Texas Instruments Incorporated, 12500 TI Boulevard, Mail Station 8638, Dallas, Texas 75243, Attention: Contracts Manager - Embedded Processing, with a copy to Texas Instruments Incorporated, 13588 N. Central Expressway, Mail Station 3999, Dallas, Texas 75243, Attention: Law Department - Embedded Processing. All notices shall be deemed served when received by TI.
59  *
60  **9. Export Control. The Licensed Materials are subject to export control under the U.S. Commerce Department's Export Administration Regulations ("EAR"). Unless prior authorization is obtained from the U.S. Commerce Department, neither you nor your subsidiaries shall export, re-export, or release, directly or indirectly (including, without limitation, by permitting the Licensed Materials to be downloaded), any technology, software, or software source code, received from TI, or export, directly or indirectly, any direct product of such technology, software, or software source code, to any person, destination or country to which the export, re-export, or release of the technology, software, or software source code, or direct product is prohibited by the EAR. You represent and warrant that you (i) are not located in, or under the control of, a national or resident of Cuba, Iran, North Korea, Sudan and Syria or any other country subject to a U.S. goods embargo; (ii) are not on the U.S. Treasury Department's List of Specially Designated Nationals or the U.S. Commerce Department's Denied Persons List or Entity List; and (iii) will not use the Licensed Materials or transfer the Licensed Materials for use in any military, nuclear, chemical or biological weapons, or missile technology end-uses. Any software export classification made by TI shall not be construed as a representation or warranty regarding the proper export classification for such software or whether an export license or other documentation is required for the exportation of such software.
61  *
62  **10. Governing Law and Severability; Waiver. This Agreement will be governed by and interpreted in accordance with the laws of the State of Texas, without reference to conflict of laws principles. If for any reason a court of competent jurisdiction finds any provision of the Agreement to be unenforceable, that provision will be enforced to the maximum extent possible to effectuate the intent of the parties, and the remainder of the Agreement shall continue in full force and effect. This Agreement shall not be governed by the United Nations Convention on Contracts for the International Sale of Goods, or by the Uniform Computer Information Transactions Act (UCITA). The parties agree that non-exclusive jurisdiction for any dispute arising out of or relating to this Agreement lies within the courts located in the State of Texas. Notwithstanding the foregoing, any judgment may be enforced in any United States or foreign court, and either party may seek injunctive relief in any United States or foreign court. Failure by TI to enforce any provision of this Agreement shall not be deemed a waiver of future enforcement of that or any other provision in this Agreement or any other agreement that may be in place between the parties.
63  *
64  **11. PRC Provisions. If you are located in the People's Republic of China ("PRC") or if the Licensed Materials will be sent to the PRC, the following provisions shall apply:
65  *
66  * a. Registration Requirements. You shall be solely responsible for performing all acts and obtaining all approvals that may be required in connection with this Agreement by the government of the PRC, including but not limited to registering pursuant to, and otherwise complying with, the PRC Measures on the Administration of Software Products, Management Regulations on Technology Import-Export, and Technology Import and Export Contract Registration Management Rules. Upon receipt of such approvals from the government authorities, you shall forward evidence of all such approvals to TI for its records. In the event that you fail to obtain any such approval or registration, you shall be solely responsible for any and all losses, damages or costs resulting therefrom, and shall indemnify TI for all such losses, damages or costs.
67  *
68  **b. Governing Language. This Agreement is written and executed in the English language and shall be authoritative and controlling, whether or not translated into a language other than English to comply with law or for reference purposes. If a translation of this Agreement is required for any purpose, including but not limited to registration of the Agreement pursuant to any governmental laws, regulations or rules, you shall be solely responsible for creating such translation.
69  *
70  **12. Contingencies. TI shall not be in breach of this Agreement and shall not be liable for any non-performance or delay in performance if such non-performance or delay is due to a force majeure event or other circumstances beyond TI's reasonable control.
71  *
72  **13. Entire Agreement. This is the entire agreement between you and TI and this Agreement supersedes any prior agreement between the parties related to the subject matter of this Agreement. Notwithstanding the foregoing, any signed and effective software license agreement relating to the subject matter hereof and stating expressly that such agreement shall control regardless of any subsequent click-wrap, shrink-wrap or web-wrap, shall supersede the terms of this Agreement. No amendment or modification of this Agreement will be effective unless in writing and signed by a duly authorized representative of TI. You hereby warrant and represent that you have obtained all authorizations and other applicable consents required empowering you to enter into this Agreement.
73  *
74  *
75  *
76  * --/COPYRIGHT--*/
77 
78 #ifndef USS_HAL_USS_LIB_HAL_H_
79 #define USS_HAL_USS_LIB_HAL_H_
80 
81 #include <msp430.h>
82 #include "ussSwLib.h"
83 
84 
89 {
93 
94 
95 #if ((__EVM430_ID__ == 0x43) && (defined(__AFE_EXT_3v3__) || defined(__AFE_EXT_5v0__)))
96 #define USSSWLIB_ENABLE_EXTERNAL_CIRCUITRY_CONTROL true
97 #else
98 #define USSSWLIB_ENABLE_EXTERNAL_CIRCUITRY_CONTROL false
99 #endif
100 
101 #define ENABLE_USS_LIB_BENCHMARK false
102 
103 #define USSSWLIB_TIMER_BASE_ADDRESS (TIMER_A2_BASE)
104 
105 
106 #if (USSSWLIB_ENABLE_EXTERNAL_CIRCUITRY_CONTROL == true)
107 #if ((__EVM430_ID__ == 0x43) && (defined(__AFE_EXT_3v3__) || defined(__AFE_EXT_5v0__)))
108 /******************************************************************************
109  * External Circuitry Control signals
110  ******************************************************************************/
111 #define USSSWLIB_HAL_RXEN_TIMER_BASE_ADDRESS (TIMER_A0_BASE)
112 
113 #if(USSSWLIB_HAL_RXEN_TIMER_BASE_ADDRESS == TIMER_A0_BASE)
114 // Defines for RxEn control lines
115 // RxEn -> P6.7
116 #define USSSWLIB_HAL_AFE_RXEN_PORT P6OUT
117 #define USSSWLIB_HAL_AFE_RXEN_PORT_DIR P6DIR
118 #define USSSWLIB_HAL_AFE_RXEN_PIN BIT7
119 #else
120 #error "Define RxEn GPIO configurations"
121 // Defines for RxEn control lines
122 // RxEn -> Px.y
123 #define USSSWLIB_HAL_AFE_RXEN_PORT PxOUT
124 #define USSSWLIB_HAL_AFE_RXEN_PORT_DIR PxDIR
125 #define USSSWLIB_HAL_AFE_RXEN_PORT_SEL0 PxSEL0
126 #define USSSWLIB_HAL_AFE_RXEN_PORT_SEL1 PxSEL1
127 #define USSSWLIB_HAL_AFE_RXEN_PIN BITy
128 #endif
129 
130 // Defines for RxSel1 and RxSel2 control lines
131 // RxSel1 -> P3.6
132 // RxSel2 -> P3.7
133 #define USSSWLIB_HAL_AFE_RX_SELx_PORT P3OUT
134 #define USSSWLIB_HAL_AFE_RX_SELx_PORT_DIR P3DIR
135 #define USSSWLIB_HAL_AFE_RX_SEL1_PIN BIT6
136 #define USSSWLIB_HAL_AFE_RX_SEL2_PIN BIT7
137 
138 // Defines for RxPwr control lines
139 // RxPwr -> P2.2
140 #define USSSWLIB_HAL_AFE_RXPWR_PORT P2OUT
141 #define USSSWLIB_HAL_AFE_RXPWR_PORT_DIR P2DIR
142 #define USSSWLIB_HAL_AFE_RXPWR_PIN BIT2
143 
144 #if (__EVM430_VER__ == 0x20)
145 // Defines for TxPwr control lines
146 // TxPwr -> P1.0
147 #define USSSWLIB_HAL_AFE_TXPWR_PORT P1OUT
148 #define USSSWLIB_HAL_AFE_TXPWR_PORT_DIR P1DIR
149 #define USSSWLIB_HAL_AFE_TXPWR_PIN BIT0
150 
151 #if defined(__AFE_EXT_5v0__)
152 // Defines for Tx5VEn control line
153 // Tx5VEn -> P1.1
154 #define USSSWLIB_HAL_AFE_TX5VEN_PORT P1OUT
155 #define USSSWLIB_HAL_AFE_TX5VEN_PORT_DIR P1DIR
156 #define USSSWLIB_HAL_AFE_TX5VEN_PIN BIT1
157 
158 #warning "Please confirm jumpers JP1 and JP2 are properly configured before \
159  using EVM in 5V mode. "
160 #endif
161 
162 #endif
163 
164 #if ENABLE_USS_LIB_BENCHMARK
165 #warning "Benchmarking has been enabled. Make sure Benchmark pin doesn't\
166  conflict with board configuration"
167 #define USSSWLIB_HAL_BENCHMARK_PORT P1OUT
168 #define USSSWLIB_HAL_BENCHMARK_PORT_DIR P1DIR
169 #define USSSWLIB_HAL_BENCHMARK_PIN BIT5
170 #endif
171 #else
172 #error "USSLib HAL external circuitry control not supported or defined for EVM configuration"
173 #endif // (__EVM430_ID__ == 0x43) && (defined(__AFE_EXT_3v3__) || defined(__AFE_EXT_5v0__)))
174 
175 #if(USSSWLIB_HAL_RXEN_TIMER_BASE_ADDRESS == USSSWLIB_TIMER_BASE_ADDRESS)
176 #error "USSSWLIB_HAL_RXEN_TIMER_BASE_ADDRESS cannot be the same base address\
177 as USSSWLIB_TIMER_BASE_ADDRESS"
178 #endif
179 
180 #if (USSSWLIB_HAL_RXEN_TIMER_BASE_ADDRESS == TIMER_A0_BASE)
181 #define USSLIB_HAL_TIMER_RXEN_CCR0_VECTOR (TIMER0_A0_VECTOR)
182 #define USSLIB_HAL_TIMER_RXEN_CCR1_VECTOR (TIMER0_A1_VECTOR)
183 #elif (USSSWLIB_HAL_RXEN_TIMER_BASE_ADDRESS==TIMER_A1_BASE)
184 #define USSLIB_HAL_TIMER_RXEN_CCR0_VECTOR (TIMER1_A0_VECTOR)
185 #define USSLIB_HAL_TIMER_RXEN_CCR1_VECTOR (TIMER1_A1_VECTOR)
186 #elif (USSSWLIB_HAL_RXEN_TIMER_BASE_ADDRESS==TIMER_A2_BASE)
187 #define USSLIB_HAL_TIMER_RXEN_CCR0_VECTOR (TIMER2_A0_VECTOR)
188 #define USSLIB_HAL_TIMER_RXEN_CCR1_VECTOR (TIMER2_A1_VECTOR)
189 #elif (USSSWLIB_HAL_RXEN_TIMER_BASE_ADDRESS==TIMER_A3_BASE)
190 #define USSLIB_HAL_TIMER_RXEN_CCR0_VECTOR (TIMER3_A0_VECTOR)
191 #define USSLIB_HAL_TIMER_RXEN_CCR1_VECTOR (TIMER3_A1_VECTOR)
192 #elif (USSSWLIB_HAL_RXEN_TIMER_BASE_ADDRESS==TIMER_A4_BASE)
193 #define USSLIB_HAL_TIMER_RXEN_CCR0_VECTOR (TIMER4_A0_VECTOR)
194 #define USSLIB_HAL_TIMER_RXEN_CCR1_VECTOR (TIMER4_A1_VECTOR)
195 #else
196 #error INVALID_TIMER_SELECTION
197 #endif
198 
199 #endif // (USSSWLIB_ENABLE_EXTERNAL_CIRCUITRY_CONTROL == true)
200 
201 #if(USSSWLIB_ENABLE_EXTERNAL_CIRCUITRY_CONTROL == true)
202 #if (__EVM430_ID__ == 0x47)
203 #error "USSLib HAL external circuitry control not supported or defined for EVM configuration"
204 #endif
205 #endif // USSSWLIB_ENABLE_EXTERNAL_CIRCUITRY_CONTROL
206 
207 
208 
209 
210 //******************************************************************************
211 // Defines LEA_START_ADDRESS for MSP430FR6047 and MSP430FR60430 device variant
212 // For MSP430FR6047 device variants LEA START address is 0x2C00
213 // For MSP430FR6043 device variants LEA START address is 0x4000
214 //
215 // Please refer the device specific datasheet for more details regarding
216 // the device memory organization
217 //
218 //******************************************************************************
219 #if defined (__MSP430FR6043__) || defined (__MSP430FR60431__) || \
220  defined (__MSP430FR6041__) || defined (__MSP430FR50431__) || \
221  defined (__MSP430FR50431__) || defined (__MSP430FR5043__) || \
222  defined (__MSP430FR5041__)
223 #define USS_HAL_LEA_START_ADDRESS (0x4000)
224 #elif defined (__MSP430FR6035__) || defined (__MSP430FR6037__) || \
225  defined (__MSP430FR60371__) || defined (__MSP430FR6045__) || \
226  defined (__MSP430FR6047__) || defined (__MSP430FR60471__)
227 #define USS_HAL_LEA_START_ADDRESS (0x2C00)
228 #else
229 #error "Device not supported"
230 #endif
231 
232 //******************************************************************************
233 // Defines LEA_START_ADDRESS for MSP430FR6047 device variant
234 // For MSP430FR604x device variants LEA START address is 0x2C00
235 //
236 // Please refer the device specific datasheet for more details regarding
237 // the device memory organization
238 //
239 //******************************************************************************
240 // Defines LEA_START_ADDRESS for MSP430FR6047 device variant
241 // For MSP430FR604x device variants LEA START address is 0x2C00
242 //
243 // Please refer the device specific datasheet for more details regarding
244 // the device memory organization
245 //
246 //******************************************************************************
247 #if defined (__MSP430FR6035__) || defined (__MSP430FR6037__) || \
248  defined (__MSP430FR60371__) || defined (__MSP430FR6045__) || \
249  defined (__MSP430FR6047__) || defined (__MSP430FR60471__)
250 #define USS_HAL_LEA_START_ADDRESS (0x2C00)
251 #endif
252 
253 
254 
255 
256 
257 #if (USSSWLIB_TIMER_BASE_ADDRESS==TIMER_A0_BASE)
258 #define USSLIB_HAL_TIMER_CCR0_VECTOR (TIMER0_A0_VECTOR)
259 #define USSLIB_HAL_TIMER_CCR1_VECTOR (TIMER0_A1_VECTOR)
260 #elif (USSSWLIB_TIMER_BASE_ADDRESS==TIMER_A1_BASE)
261 #define USSLIB_HAL_TIMER_CCR0_VECTOR (TIMER1_A0_VECTOR)
262 #define USSLIB_HAL_TIMER_CCR1_VECTOR (TIMER1_A1_VECTOR)
263 #elif (USSSWLIB_TIMER_BASE_ADDRESS==TIMER_A2_BASE)
264 #define USSLIB_HAL_TIMER_CCR0_VECTOR (TIMER2_A0_VECTOR)
265 #define USSLIB_HAL_TIMER_CCR1_VECTOR (TIMER2_A1_VECTOR)
266 #elif (USSSWLIB_TIMER_BASE_ADDRESS==TIMER_A3_BASE)
267 #define USSLIB_HAL_TIMER_CCR0_VECTOR (TIMER3_A0_VECTOR)
268 #define USSLIB_HAL_TIMER_CCR1_VECTOR (TIMER3_A1_VECTOR)
269 #elif (USSSWLIB_TIMER_BASE_ADDRESS==TIMER_A4_BASE)
270 #define USSLIB_HAL_TIMER_CCR0_VECTOR (TIMER4_A0_VECTOR)
271 #define USSLIB_HAL_TIMER_CCR1_VECTOR (TIMER4_A1_VECTOR)
272 #else
273 #error INVALID_TIMER_SELECTION
274 #endif
275 
276 
277 #if defined(__TI_COMPILER_VERSION__)
278 #define _PRAGMA(x) _Pragma (#x)
279 #define USS_HAL_LEA_DATA(var,align) _PRAGMA(DATA_SECTION(var,".leaRAM"))\
280  _PRAGMA(DATA_ALIGN(var,(align)))
281 
282 #define USS_TONE_CONFIG_DATA(var) _PRAGMA(DATA_SECTION(var,".ram_thrill"))
283 
284 #elif defined(__IAR_SYSTEMS_ICC__)
285 #define _PRAGMA(x) _Pragma (#x)
286 #define USS_HAL_LEA_DATA(var,align) _PRAGMA(location="LEARAM")\
287  _PRAGMA(data_alignment=align)
288 
289 #define USS_TONE_CONFIG_DATA(var) _PRAGMA(location="RAM_THRILL")
290 
291 #elif defined(__GNUC__)
292 #define USS_HAL_LEA_DATA(var,align) __attribute__((section(".leaRAM")))\
293  __attribute__((aligned(align)))
294 
295 #define USS_TONE_CONFIG_DATA(var) __attribute__((section("ram_thrill")))
296 #else
297 #define USS_HAL_LEA_DATA(var,align)
298 #endif
299 
300 extern volatile uint16_t USS_LEA_IFG;
301 
304 extern void (*USSSWLIB_SAPH_DATAERR_callback)(void);
307 extern void (*USSSWLIB_SAPH_TMFTO_callback)(void);
310 extern void (*USSSWLIB_SAPH_SEQDN_callback)(void);
313 extern void (*USSSWLIB_SAPH_PNGDN_callback)(void);
316 extern void (*USSSWLIB_UUPS_PREQIG_callback)(void);
319 extern void (*USSSWLIB_UUPS_PTMOUT_callback)(void);
322 extern void (*USSSWLIB_UUPS_STPBYDB_callback)(void);
325 extern void (*USSSWLIB_HSPLL_PLLunlock_callback)(void);
328 extern void (*USSSWLIB_SDHS_OVF_callback)(void);
331 extern void (*USSSWLIB_SDHS_ACQDONE_callback)(void);
334 extern void (*USSSWLIB_SDHS_SSTRG_callback)(void);
337 extern void (*USSSWLIB_SDHS_DTRDY_callback)(void);
340 extern void (*USSSWLIB_SDHS_WINHI_callback)(void);
343 extern void (*USSSWLIB_SDHS_WINLO_callback)(void);
344 
345 
346 #if(USSSWLIB_ENABLE_EXTERNAL_CIRCUITRY_CONTROL == true)
347 extern void USSLIB_HAL_initGPIO(void);
350 
354 
357 extern void USSLIB_HAL_configureRxEnTimer(uint16_t ASQTimerCounts,
358  uint16_t RxEnTimerCounts);
359 
362 extern void USSLIB_HAL_startRxEnTimer(void);
363 
365 extern void USSLIB_HAL_configGPIOAfterCapture(void);
366 
367 #endif
368 
369 #endif /* USS_HAL_USS_LIB_HAL_H_ */
370 
void USSLIB_HAL_configureRxEnTimer(uint16_t ASQTimerCounts, uint16_t RxEnTimerCounts)
function to configure Timer used to control RxEn AFE pin state
Definition: USS_Lib_HAL.h:90
void(* USSSWLIB_SDHS_ACQDONE_callback)(void)
Contains function callback pointer for USS_SDHS_OVINLVL.
Definition: USS_Lib_HAL.c:137
void(* USSSWLIB_SDHS_WINHI_callback)(void)
Contains function callback pointer for USS_SDHS_WINHI.
Definition: USS_Lib_HAL.c:149
void(* USSSWLIB_UUPS_PREQIG_callback)(void)
Contains function callback pointer for USS UUPS PREQIG.
Definition: USS_Lib_HAL.c:117
void USSLIB_HAL_startRxEnTimer(void)
function to start Timer used to control RxEn AFE pin state
enum _USSLIB_HAL_capture_mode_ USSLIB_HAL_capture_mode
Selects the desired power mode while USS capture is done, API will remain in this mode until capture ...
volatile uint16_t USS_LEA_IFG
Definition: USS_Lib_HAL.c:487
void(* USSSWLIB_SDHS_WINLO_callback)(void)
Contains function callback pointer for USS_SDHS_WINLO.
Definition: USS_Lib_HAL.c:153
void(* USSSWLIB_SAPH_TMFTO_callback)(void)
Contains function callback pointer for USS SAPH TMFTO.
Definition: USS_Lib_HAL.c:105
Contains all USS SW Library enums, structs, macros, function and global variables definitions...
void USSLIB_HAL_configGPIOAfterCapture(void)
function to configure GPIOs after acquisition
void(* USSSWLIB_SDHS_SSTRG_callback)(void)
Contains function callback pointer for USS_SDHS_SSTRG.
Definition: USS_Lib_HAL.c:141
void(* USSSWLIB_UUPS_PTMOUT_callback)(void)
Contains function callback pointer for USS UUPS_PTMOUT.
Definition: USS_Lib_HAL.c:121
void USSLIB_HAL_initGPIO(void)
function to initialize GPIOs used by USS Library
void(* USSSWLIB_SAPH_SEQDN_callback)(void)
Contains function callback pointer for USS SAPH SEQDN.
Definition: USS_Lib_HAL.c:109
void(* USSSWLIB_HSPLL_PLLunlock_callback)(void)
Contains function callback pointer for USS HSPLL_UNLOCK.
Definition: USS_Lib_HAL.c:129
void(* USSSWLIB_SAPH_PNGDN_callback)(void)
Contains function callback pointer for USS SAPH PNGDN.
Definition: USS_Lib_HAL.c:113
void(* USSSWLIB_UUPS_STPBYDB_callback)(void)
Contains function callback pointer for USS UUPS_STPBYDB.
Definition: USS_Lib_HAL.c:125
void(* USSSWLIB_SDHS_OVF_callback)(void)
Contains function callback pointer for USS_SDHS_OVF.
Definition: USS_Lib_HAL.c:133
void(* USSSWLIB_SDHS_DTRDY_callback)(void)
Contains function callback pointer for USS_SDHS_DTRDY.
Definition: USS_Lib_HAL.c:145
void(* USSSWLIB_SAPH_DATAERR_callback)(void)
Contains function callback pointer for USS SAPH DATAERR.
Definition: USS_Lib_HAL.c:101
_USSLIB_HAL_capture_mode_
Selects the desired power mode while USS capture is done, API will remain in this mode until capture ...
Definition: USS_Lib_HAL.h:88
Definition: USS_Lib_HAL.h:91
void USSLIB_HAL_configGPIOForCapture(USSLIB_HAL_capture_mode mode)
function to configure capture gpios
© Copyright 1995-2018, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale