1 /******************************************************************************
2 *  Filename:       chipinfo.h
3 *  Revised:        2020-10-22 14:03:07 +0200 (Thu, 22 Oct 2020)
4 *  Revision:       59146
5 *
6 *  Description:    Collection of functions returning chip information.
7 *
8 *  Copyright (c) 2015 - 2020, Texas Instruments Incorporated
9 *  All rights reserved.
10 *
11 *  Redistribution and use in source and binary forms, with or without
12 *  modification, are permitted provided that the following conditions are met:
13 *
14 *  1) Redistributions of source code must retain the above copyright notice,
15 *     this list of conditions and the following disclaimer.
16 *
17 *  2) Redistributions in binary form must reproduce the above copyright notice,
18 *     this list of conditions and the following disclaimer in the documentation
19 *     and/or other materials provided with the distribution.
20 *
21 *  3) Neither the name of the ORGANIZATION nor the names of its contributors may
22 *     be used to endorse or promote products derived from this software without
23 *     specific prior written permission.
24 *
25 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
29 *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 *  POSSIBILITY OF SUCH DAMAGE.
36 *
37 ******************************************************************************/
38 
39 //*****************************************************************************
40 //
41 //! \addtogroup system_control_group
42 //! @{
43 //! \addtogroup ChipInfo
44 //! @{
45 //
46 //*****************************************************************************
47 
48 #ifndef __CHIP_INFO_H__
49 #define __CHIP_INFO_H__
50 
51 //*****************************************************************************
52 //
53 // If building with a C++ compiler, make all of the definitions in this header
54 // have a C binding.
55 //
56 //*****************************************************************************
57 #ifdef __cplusplus
58 extern "C"
59 {
60 #endif
61 
62 #include <stdint.h>
63 #include <stdbool.h>
64 #include "../inc/hw_types.h"
65 #include "../inc/hw_memmap.h"
66 #include "../inc/hw_fcfg1.h"
67 
68 //*****************************************************************************
69 //
70 // Support for DriverLib in ROM:
71 // This section renames all functions that are not "static inline", so that
72 // calling these functions will default to implementation in flash. At the end
73 // of this file a second renaming will change the defaults to implementation in
74 // ROM for available functions.
75 //
76 // To force use of the implementation in flash, e.g. for debugging:
77 // - Globally: Define DRIVERLIB_NOROM at project level
78 // - Per function: Use prefix "NOROM_" when calling the function
79 //
80 //*****************************************************************************
81 #if !defined(DOXYGEN)
82     #define ChipInfo_GetSupportedProtocol_BV NOROM_ChipInfo_GetSupportedProtocol_BV
83     #define ChipInfo_GetPackageType         NOROM_ChipInfo_GetPackageType
84     #define ChipInfo_GetChipType            NOROM_ChipInfo_GetChipType
85     #define ChipInfo_GetChipFamily          NOROM_ChipInfo_GetChipFamily
86     #define ChipInfo_GetHwRevision          NOROM_ChipInfo_GetHwRevision
87     #define ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated NOROM_ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated
88 #endif
89 
90 //*****************************************************************************
91 //
92 //! \brief Enumeration identifying the protocols supported.
93 //!
94 //! \note
95 //! This is a bit vector enumeration that indicates supported protocols.
96 //! E.g: 0x06 means that the chip supports both BLE and IEEE 802.15.4
97 //
98 //*****************************************************************************
99 typedef enum {
100    PROTOCOL_Unknown          = 0   , //!< None of the known protocols are supported.
101    PROTOCOLBIT_BLE           = 0x02, //!< Bit[1] set, indicates that Bluetooth Low Energy is supported.
102    PROTOCOLBIT_IEEE_802_15_4 = 0x04, //!< Bit[2] set, indicates that IEEE 802.15.4 is supported.
103    PROTOCOLBIT_Proprietary   = 0x08  //!< Bit[3] set, indicates that proprietary protocols are supported.
104 } ProtocolBitVector_t;
105 
106 //*****************************************************************************
107 //
108 //! \brief Returns bit vector showing supported protocols.
109 //!
110 //! \return
111 //! Returns \ref ProtocolBitVector_t which is a bit vector indicating supported protocols.
112 //
113 //*****************************************************************************
114 extern ProtocolBitVector_t ChipInfo_GetSupportedProtocol_BV( void );
115 
116 //*****************************************************************************
117 //
118 //! \brief Returns true if the chip supports the BLE protocol.
119 //!
120 //! \return
121 //! Returns \c true if supporting the BLE protocol, \c false otherwise.
122 //
123 //*****************************************************************************
124 __STATIC_INLINE bool
ChipInfo_SupportsBLE(void)125 ChipInfo_SupportsBLE( void )
126 {
127    return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_BLE ) != 0 );
128 }
129 
130 //*****************************************************************************
131 //
132 //! \brief Returns true if the chip supports the IEEE 802.15.4 protocol.
133 //!
134 //! \return
135 //! Returns \c true if supporting the IEEE 802.15.4 protocol, \c false otherwise.
136 //
137 //*****************************************************************************
138 __STATIC_INLINE bool
ChipInfo_SupportsIEEE_802_15_4(void)139 ChipInfo_SupportsIEEE_802_15_4( void )
140 {
141    return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_IEEE_802_15_4 ) != 0 );
142 }
143 
144 //*****************************************************************************
145 //
146 //! \brief Returns true if the chip supports proprietary protocols.
147 //!
148 //! \return
149 //! Returns \c true if supporting proprietary protocols, \c false otherwise.
150 //
151 //*****************************************************************************
152 __STATIC_INLINE bool
ChipInfo_SupportsPROPRIETARY(void)153 ChipInfo_SupportsPROPRIETARY( void )
154 {
155    return (( ChipInfo_GetSupportedProtocol_BV() & PROTOCOLBIT_Proprietary ) != 0 );
156 }
157 
158 //*****************************************************************************
159 //
160 //! \brief Package type enumeration
161 //!
162 //! \note
163 //! Packages available for a specific device are shown in the device datasheet.
164 //
165 //*****************************************************************************
166 typedef enum {
167    PACKAGE_Unknown   = -1, //!< -1 means that current package type is unknown.
168    PACKAGE_4x4       =  0, //!<  0 means that this is a 4x4 mm QFN (RHB) package.
169    PACKAGE_5x5       =  1, //!<  1 means that this is a 5x5 mm package.
170    PACKAGE_7x7       =  2, //!<  2 means that this is a 7x7 mm QFN (RGZ) package.
171    PACKAGE_WAFER     =  3, //!<  3 means that this is a wafer sale package (naked die).
172    PACKAGE_WCSP      =  4, //!<  4 means that this is a 2.7x2.7 mm WCSP (YFV).
173    PACKAGE_7x7_Q1    =  5, //!<  5 means that this is a 7x7 mm QFN package with Wettable Flanks.
174    PACKAGE_7x7_SIP   =  6  //!<  6 means that this is a 7x7 mm SiP module (Sytem in Package).
175 } PackageType_t;
176 
177 //*****************************************************************************
178 //
179 //! \brief Returns package type.
180 //!
181 //! \return
182 //! Returns \ref PackageType_t
183 //
184 //*****************************************************************************
185 extern PackageType_t ChipInfo_GetPackageType( void );
186 
187 //*****************************************************************************
188 //
189 //! \brief Returns true if this is a 4x4mm chip.
190 //!
191 //! \return
192 //! Returns \c true if this is a 4x4mm chip, \c false otherwise.
193 //
194 //*****************************************************************************
195 __STATIC_INLINE bool
ChipInfo_PackageTypeIs4x4(void)196 ChipInfo_PackageTypeIs4x4( void )
197 {
198    return ( ChipInfo_GetPackageType() == PACKAGE_4x4 );
199 }
200 
201 //*****************************************************************************
202 //
203 //! \brief Returns true if this is a 5x5mm chip.
204 //!
205 //! \return
206 //! Returns \c true if this is a 5x5mm chip, \c false otherwise.
207 //
208 //*****************************************************************************
209 __STATIC_INLINE bool
ChipInfo_PackageTypeIs5x5(void)210 ChipInfo_PackageTypeIs5x5( void )
211 {
212    return ( ChipInfo_GetPackageType() == PACKAGE_5x5 );
213 }
214 
215 //*****************************************************************************
216 //
217 //! \brief Returns true if this is a 7x7mm chip.
218 //!
219 //! \return
220 //! Returns \c true if this is a 7x7mm chip, \c false otherwise.
221 //
222 //*****************************************************************************
223 __STATIC_INLINE bool
ChipInfo_PackageTypeIs7x7(void)224 ChipInfo_PackageTypeIs7x7( void )
225 {
226    return ( ChipInfo_GetPackageType() == PACKAGE_7x7 );
227 }
228 
229 //*****************************************************************************
230 //
231 //! \brief Returns true if this is a wafer sale chip (naked die).
232 //!
233 //! \return
234 //! Returns \c true if this is a wafer sale chip, \c false otherwise.
235 //
236 //*****************************************************************************
237 __STATIC_INLINE bool
ChipInfo_PackageTypeIsWAFER(void)238 ChipInfo_PackageTypeIsWAFER( void )
239 {
240    return ( ChipInfo_GetPackageType() == PACKAGE_WAFER );
241 }
242 
243 //*****************************************************************************
244 //
245 //! \brief Returns true if this is a WCSP chip (flip chip).
246 //!
247 //! \return
248 //! Returns \c true if this is a WCSP chip, \c false otherwise.
249 //
250 //*****************************************************************************
251 __STATIC_INLINE bool
ChipInfo_PackageTypeIsWCSP(void)252 ChipInfo_PackageTypeIsWCSP( void )
253 {
254    return ( ChipInfo_GetPackageType() == PACKAGE_WCSP );
255 }
256 
257 //*****************************************************************************
258 //
259 //! \brief Returns true if this is a 7x7 Q1 chip.
260 //!
261 //! \return
262 //! Returns \c true if this is a 7x7 Q1 chip, \c false otherwise.
263 //
264 //*****************************************************************************
265 __STATIC_INLINE bool
ChipInfo_PackageTypeIs7x7Q1(void)266 ChipInfo_PackageTypeIs7x7Q1( void )
267 {
268    return ( ChipInfo_GetPackageType() == PACKAGE_7x7_Q1 );
269 }
270 
271 //*****************************************************************************
272 //
273 //! \brief Returns the internal chip HW revision code.
274 //!
275 //! \return
276 //! Returns the internal chip HW revision code (in range 0-15)
277 //*****************************************************************************
278 __STATIC_INLINE uint32_t
ChipInfo_GetDeviceIdHwRevCode(void)279 ChipInfo_GetDeviceIdHwRevCode( void )
280 {
281    // Returns HwRevCode = FCFG1_O_ICEPICK_DEVICE_ID[31:28]
282    return ( HWREG( FCFG1_BASE + FCFG1_O_ICEPICK_DEVICE_ID ) >> 28 );
283 }
284 
285 //*****************************************************************************
286 //
287 //! \brief Returns minor hardware revision number
288 //!
289 //! The minor revision number is set to 0 for the first market released chip
290 //! and thereafter incremented by 1 for each minor hardware change.
291 //!
292 //! \return
293 //! Returns the minor hardware revision number (in range 0-127)
294 //
295 //*****************************************************************************
296 __STATIC_INLINE uint32_t
ChipInfo_GetMinorHwRev(void)297 ChipInfo_GetMinorHwRev( void )
298 {
299    uint32_t minorRev = (( HWREG( FCFG1_BASE + FCFG1_O_MISC_CONF_1 ) &
300                              FCFG1_MISC_CONF_1_DEVICE_MINOR_REV_M ) >>
301                              FCFG1_MISC_CONF_1_DEVICE_MINOR_REV_S ) ;
302 
303    if ( minorRev >= 0x80 ) {
304       minorRev = 0;
305    }
306 
307    return( minorRev );
308 }
309 
310 //*****************************************************************************
311 //
312 //! \brief Returns the 32 bits USER_ID field
313 //!
314 //! How to decode the USER_ID filed is described in the Technical Reference Manual (TRM)
315 //!
316 //! \return
317 //! Returns the 32 bits USER_ID field
318 //
319 //*****************************************************************************
320 __STATIC_INLINE uint32_t
ChipInfo_GetUserId(void)321 ChipInfo_GetUserId( void )
322 {
323    return ( HWREG( FCFG1_BASE + FCFG1_O_USER_ID ));
324 }
325 
326 //*****************************************************************************
327 //
328 //! \brief Chip type enumeration
329 //
330 //*****************************************************************************
331 typedef enum {
332    CHIP_TYPE_Unknown       = -1,    //!< -1 means that the chip type is unknown.
333    CHIP_TYPE_CC1310        =  0,    //!<  0 means that this is a CC1310 chip.
334    CHIP_TYPE_CC1350        =  1,    //!<  1 means that this is a CC1350 chip.
335    CHIP_TYPE_CC2620        =  2,    //!<  2 means that this is a CC2620 chip.
336    CHIP_TYPE_CC2630        =  3,    //!<  3 means that this is a CC2630 chip.
337    CHIP_TYPE_CC2640        =  4,    //!<  4 means that this is a CC2640 chip.
338    CHIP_TYPE_CC2650        =  5,    //!<  5 means that this is a CC2650 chip.
339    CHIP_TYPE_CUSTOM_0      =  6,    //!<  6 means that this is a CUSTOM_0 chip.
340    CHIP_TYPE_CUSTOM_1      =  7,    //!<  7 means that this is a CUSTOM_1 chip.
341    CHIP_TYPE_CC2640R2      =  8,    //!<  8 means that this is a CC2640R2 chip.
342    CHIP_TYPE_CC2642        =  9,    //!<  9 means that this is a CC2642 chip.
343    CHIP_TYPE_unused        =  10,   //!< 10 unused value
344    CHIP_TYPE_CC2652        =  11,   //!< 11 means that this is a CC2652 chip.
345    CHIP_TYPE_CC1312        =  12,   //!< 12 means that this is a CC1312 chip.
346    CHIP_TYPE_CC1352        =  13,   //!< 13 means that this is a CC1352 chip.
347    CHIP_TYPE_CC1352P       =  14,   //!< 14 means that this is a CC1352P chip.
348    CHIP_TYPE_CC2652P       =  15,   //!< 15 means that this is a CC2652P chip.
349    CHIP_TYPE_CC2652RB      =  16,   //!< 16 means that this is a CC2652RB chip.
350    CHIP_TYPE_CC2652PB      =  17,   //!< 17 means that this is a CC2652PB chip.
351    CHIP_TYPE_CC1312R7      =  23,   //!< 23 means that this is a CC1312R7 chip.
352    CHIP_TYPE_unused1       =  24,   //!< 24 unused value
353    CHIP_TYPE_CC1352R7      =  25,   //!< 25 means that this is a CC1352R7 chip.
354    CHIP_TYPE_CC1352P7      =  26,   //!< 26 means that this is a CC1352P7 chip.
355    CHIP_TYPE_CC2652R7      =  27,   //!< 27 means that this is a CC2652R7 chip.
356    CHIP_TYPE_CC2652P7      =  28,   //!< 28 means that this is a CC2652P7 chip.
357 } ChipType_t;
358 
359 //*****************************************************************************
360 //
361 //! \brief Returns chip type.
362 //!
363 //! \return
364 //! Returns \ref ChipType_t
365 //
366 //*****************************************************************************
367 extern ChipType_t ChipInfo_GetChipType( void );
368 
369 //*****************************************************************************
370 //
371 //! \brief Chip family enumeration
372 //
373 //*****************************************************************************
374 typedef enum {
375    FAMILY_Unknown           = -1, //!< -1 means that the chip's family member is unknown.
376    FAMILY_CC26x0            =  0, //!<  0 means that the chip is a CC26x0 family member.
377    FAMILY_CC13x0            =  1, //!<  1 means that the chip is a CC13x0 family member.
378    FAMILY_CC13x1_CC26x1     =  2, //!<  2 means that the chip is a CC13x1, CC26x1 family member.
379    FAMILY_CC26x0R2          =  3, //!<  3 means that the chip is a CC26x0R2 family (new ROM contents).
380    FAMILY_CC13x2_CC26x2     =  4, //!<  4 means that the chip is a CC13x2, CC26x2 family member.
381    FAMILY_CC13x2x7_CC26x2x7 =  5, //!<  5 means that the chip is a CC13x2x7, CC26x2x7 family member.
382 } ChipFamily_t;
383 
384 //*****************************************************************************
385 //
386 //! \brief Returns chip family member.
387 //!
388 //! \return
389 //! Returns \ref ChipFamily_t
390 //
391 //*****************************************************************************
392 extern ChipFamily_t ChipInfo_GetChipFamily( void );
393 
394 //*****************************************************************************
395 //
396 // Options for the define THIS_DRIVERLIB_BUILD
397 //
398 //*****************************************************************************
399 #define DRIVERLIB_BUILD_CC26X0            0 //!< 0 is the driverlib build ID for the cc26x0 driverlib.
400 #define DRIVERLIB_BUILD_CC13X0            1 //!< 1 is the driverlib build ID for the cc13x0 driverlib.
401 #define DRIVERLIB_BUILD_CC13X1_CC26X1     2 //!< 2 is the driverlib build ID for the cc13x1_cc26x1 driverlib.
402 #define DRIVERLIB_BUILD_CC26X0R2          3 //!< 3 is the driverlib build ID for the cc26x0r2 driverlib.
403 #define DRIVERLIB_BUILD_CC13X2_CC26X2     4 //!< 4 is the driverlib build ID for the cc13x2_cc26x2 driverlib.
404 #define DRIVERLIB_BUILD_CC13X2X7_CC26X2X7 5 //!< 5 is the driverlib build ID for the cc13x2x7_cc26x2x7 driverlib.
405 
406 //*****************************************************************************
407 //
408 //! \brief Define THIS_DRIVERLIB_BUILD, identifying current driverlib build ID.
409 //!
410 //! This driverlib build identifier can be useful for compile time checking/optimization (supporting C preprocessor expressions).
411 //
412 //*****************************************************************************
413 #define THIS_DRIVERLIB_BUILD   DRIVERLIB_BUILD_CC13X2_CC26X2
414 
415 //*****************************************************************************
416 //
417 //! \brief Returns true if this chip is member of the CC13x0 family.
418 //!
419 //! \return
420 //! Returns \c true if this chip is member of the CC13x0 family, \c false otherwise.
421 //
422 //*****************************************************************************
423 __STATIC_INLINE bool
ChipInfo_ChipFamilyIs_CC13x0(void)424 ChipInfo_ChipFamilyIs_CC13x0( void )
425 {
426    return ( ChipInfo_GetChipFamily() == FAMILY_CC13x0 );
427 }
428 
429 //*****************************************************************************
430 //
431 //! \brief Returns true if this chip is member of the CC26x0 family.
432 //!
433 //! \return
434 //! Returns \c true if this chip is member of the CC26x0 family, \c false otherwise.
435 //
436 //*****************************************************************************
437 __STATIC_INLINE bool
ChipInfo_ChipFamilyIs_CC26x0(void)438 ChipInfo_ChipFamilyIs_CC26x0( void )
439 {
440    return ( ChipInfo_GetChipFamily() == FAMILY_CC26x0 );
441 }
442 
443 //*****************************************************************************
444 //
445 //! \brief Returns true if this chip is member of the CC26x0R2 family.
446 //!
447 //! \return
448 //! Returns \c true if this chip is member of the CC26x0R2 family, \c false otherwise.
449 //
450 //*****************************************************************************
451 __STATIC_INLINE bool
ChipInfo_ChipFamilyIs_CC26x0R2(void)452 ChipInfo_ChipFamilyIs_CC26x0R2( void )
453 {
454    return ( ChipInfo_GetChipFamily() == FAMILY_CC26x0R2 );
455 }
456 
457 //*****************************************************************************
458 //
459 //! \brief Returns true if this chip is member of the CC13x1, CC26x1 family.
460 //!
461 //! \return
462 //! Returns \c true if this chip is member of the CC13x1, CC26x1 family, \c false otherwise.
463 //
464 //*****************************************************************************
465 __STATIC_INLINE bool
ChipInfo_ChipFamilyIs_CC13x1_CC26x1(void)466 ChipInfo_ChipFamilyIs_CC13x1_CC26x1( void )
467 {
468    return ( ChipInfo_GetChipFamily() == FAMILY_CC13x1_CC26x1 );
469 }
470 
471 //*****************************************************************************
472 //
473 //! \brief Returns true if this chip is member of the CC13x2, CC26x2 family.
474 //!
475 //! \return
476 //! Returns \c true if this chip is member of the CC13x2, CC26x2 family, \c false otherwise.
477 //
478 //*****************************************************************************
479 __STATIC_INLINE bool
ChipInfo_ChipFamilyIs_CC13x2_CC26x2(void)480 ChipInfo_ChipFamilyIs_CC13x2_CC26x2( void )
481 {
482    return ( ChipInfo_GetChipFamily() == FAMILY_CC13x2_CC26x2 );
483 }
484 
485 //*****************************************************************************
486 //
487 //! \brief Returns true if this chip is member of the CC13x2x7, CC26x2x7 family.
488 //!
489 //! \return
490 //! Returns \c true if this chip is member of the CC13x2x7, CC26x2x7 family, \c false otherwise.
491 //
492 //*****************************************************************************
493 __STATIC_INLINE bool
ChipInfo_ChipFamilyIs_CC13x2x7_CC26x2x7(void)494 ChipInfo_ChipFamilyIs_CC13x2x7_CC26x2x7( void )
495 {
496    return ( ChipInfo_GetChipFamily() == FAMILY_CC13x2x7_CC26x2x7 );
497 }
498 
499 //*****************************************************************************
500 //
501 //! \brief HW revision enumeration.
502 //
503 //*****************************************************************************
504 typedef enum {
505    HWREV_Unknown     = -1, //!< -1 means that the chip's HW revision is unknown.
506    HWREV_1_0         = 10, //!< 10 means that the chip's HW revision is 1.0
507    HWREV_1_1         = 11, //!< 11 means that the chip's HW revision is 1.1
508    HWREV_2_0         = 20, //!< 20 means that the chip's HW revision is 2.0
509    HWREV_2_1         = 21, //!< 21 means that the chip's HW revision is 2.1
510    HWREV_2_2         = 22, //!< 22 means that the chip's HW revision is 2.2
511    HWREV_2_3         = 23, //!< 23 means that the chip's HW revision is 2.3
512    HWREV_2_4         = 24, //!< 24 means that the chip's HW revision is 2.4
513    HWREV_3_0         = 30  //!< 30 means that the chip's HW revision is 3.0
514 } HwRevision_t;
515 
516 //*****************************************************************************
517 //
518 //! \brief Returns chip HW revision.
519 //!
520 //! \return
521 //! Returns \ref HwRevision_t
522 //
523 //*****************************************************************************
524 extern HwRevision_t ChipInfo_GetHwRevision( void );
525 
526 //*****************************************************************************
527 //
528 //! \brief Returns true if HW revision for this chip is 1.0.
529 //!
530 //! \return
531 //! Returns \c true if HW revision for this chip is 1.0, \c false otherwise.
532 //
533 //*****************************************************************************
534 __STATIC_INLINE bool
ChipInfo_HwRevisionIs_1_0(void)535 ChipInfo_HwRevisionIs_1_0( void )
536 {
537    return ( ChipInfo_GetHwRevision() == HWREV_1_0 );
538 }
539 
540 //*****************************************************************************
541 //
542 //! \brief Returns true if HW revision for this chip is 2.0.
543 //!
544 //! \return
545 //! Returns \c true if HW revision for this chip is 2.0, \c false otherwise.
546 //
547 //*****************************************************************************
548 __STATIC_INLINE bool
ChipInfo_HwRevisionIs_2_0(void)549 ChipInfo_HwRevisionIs_2_0( void )
550 {
551    return ( ChipInfo_GetHwRevision() == HWREV_2_0 );
552 }
553 
554 //*****************************************************************************
555 //
556 //! \brief Returns true if HW revision for this chip is 2.0 or greater.
557 //!
558 //! \return
559 //! Returns \c true if HW revision for this chip is 2.0 or greater, \c false otherwise.
560 //
561 //*****************************************************************************
562 __STATIC_INLINE bool
ChipInfo_HwRevisionIs_GTEQ_2_0(void)563 ChipInfo_HwRevisionIs_GTEQ_2_0( void )
564 {
565    return ( ChipInfo_GetHwRevision() >= HWREV_2_0 );
566 }
567 
568 //*****************************************************************************
569 //
570 //! \brief Returns true if HW revision for this chip is 2.1.
571 //!
572 //! \return
573 //! Returns \c true if HW revision for this chip is 2.1, \c false otherwise.
574 //
575 //*****************************************************************************
576 __STATIC_INLINE bool
ChipInfo_HwRevisionIs_2_1(void)577 ChipInfo_HwRevisionIs_2_1( void )
578 {
579    return ( ChipInfo_GetHwRevision() == HWREV_2_1 );
580 }
581 
582 //*****************************************************************************
583 //
584 //! \brief Returns true if HW revision for this chip is 2.1 or greater.
585 //!
586 //! \return
587 //! Returns \c true if HW revision for this chip is 2.1 or greater, \c false otherwise.
588 //
589 //*****************************************************************************
590 __STATIC_INLINE bool
ChipInfo_HwRevisionIs_GTEQ_2_1(void)591 ChipInfo_HwRevisionIs_GTEQ_2_1( void )
592 {
593    return ( ChipInfo_GetHwRevision() >= HWREV_2_1 );
594 }
595 
596 //*****************************************************************************
597 //
598 //! \brief Returns true if HW revision for this chip is 2.2.
599 //!
600 //! \return
601 //! Returns \c true if HW revision for this chip is 2.2, \c false otherwise.
602 //
603 //*****************************************************************************
604 __STATIC_INLINE bool
ChipInfo_HwRevisionIs_2_2(void)605 ChipInfo_HwRevisionIs_2_2( void )
606 {
607    return ( ChipInfo_GetHwRevision() == HWREV_2_2 );
608 }
609 
610 //*****************************************************************************
611 //
612 //! \brief Returns true if HW revision for this chip is 2.2 or greater.
613 //!
614 //! \return
615 //! Returns \c true if HW revision for this chip is 2.2 or greater, \c false otherwise.
616 //
617 //*****************************************************************************
618 __STATIC_INLINE bool
ChipInfo_HwRevisionIs_GTEQ_2_2(void)619 ChipInfo_HwRevisionIs_GTEQ_2_2( void )
620 {
621    return ( ChipInfo_GetHwRevision() >= HWREV_2_2 );
622 }
623 
624 //*****************************************************************************
625 //
626 //! \brief Returns true if HW revision for this chip is 2.3 or greater.
627 //!
628 //! \return
629 //! Returns \c true if HW revision for this chip is 2.3 or greater, \c false otherwise.
630 //
631 //*****************************************************************************
632 __STATIC_INLINE bool
ChipInfo_HwRevisionIs_GTEQ_2_3(void)633 ChipInfo_HwRevisionIs_GTEQ_2_3( void )
634 {
635    return ( ChipInfo_GetHwRevision() >= HWREV_2_3 );
636 }
637 
638 //*****************************************************************************
639 //
640 //! \brief Returns true if HW revision for this chip is 2.4 or greater.
641 //!
642 //! \return
643 //! Returns \c true if HW revision for this chip is 2.4 or greater, \c false otherwise.
644 //
645 //*****************************************************************************
646 __STATIC_INLINE bool
ChipInfo_HwRevisionIs_GTEQ_2_4(void)647 ChipInfo_HwRevisionIs_GTEQ_2_4( void )
648 {
649    return ( ChipInfo_GetHwRevision() >= HWREV_2_4 );
650 }
651 
652 //*****************************************************************************
653 //
654 //! \brief Verifies that current chip is CC13x2 or CC26x2 PG2.0 or later and never returns if violated.
655 //!
656 //! \return None
657 //
658 //*****************************************************************************
659 extern void ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated( void );
660 
661 //*****************************************************************************
662 //
663 // Support for DriverLib in ROM:
664 // Redirect to implementation in ROM when available.
665 //
666 //*****************************************************************************
667 #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
668     #include "../driverlib/rom.h"
669     #ifdef ROM_ChipInfo_GetSupportedProtocol_BV
670         #undef  ChipInfo_GetSupportedProtocol_BV
671         #define ChipInfo_GetSupportedProtocol_BV ROM_ChipInfo_GetSupportedProtocol_BV
672     #endif
673     #ifdef ROM_ChipInfo_GetPackageType
674         #undef  ChipInfo_GetPackageType
675         #define ChipInfo_GetPackageType         ROM_ChipInfo_GetPackageType
676     #endif
677     #ifdef ROM_ChipInfo_GetChipType
678         #undef  ChipInfo_GetChipType
679         #define ChipInfo_GetChipType            ROM_ChipInfo_GetChipType
680     #endif
681     #ifdef ROM_ChipInfo_GetChipFamily
682         #undef  ChipInfo_GetChipFamily
683         #define ChipInfo_GetChipFamily          ROM_ChipInfo_GetChipFamily
684     #endif
685     #ifdef ROM_ChipInfo_GetHwRevision
686         #undef  ChipInfo_GetHwRevision
687         #define ChipInfo_GetHwRevision          ROM_ChipInfo_GetHwRevision
688     #endif
689     #ifdef ROM_ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated
690         #undef  ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated
691         #define ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated ROM_ThisLibraryIsFor_CC13x2_CC26x2_HwRev20AndLater_HaltIfViolated
692     #endif
693 #endif
694 
695 //*****************************************************************************
696 //
697 // Mark the end of the C bindings section for C++ compilers.
698 //
699 //*****************************************************************************
700 #ifdef __cplusplus
701 }
702 #endif
703 
704 #endif // __CHIP_INFO_H__
705 
706 //*****************************************************************************
707 //
708 //! Close the Doxygen group.
709 //! @}
710 //! @}
711 //
712 //*****************************************************************************
713