1 /****************************************************************************** 2 * Filename: hw_chip_def.h 3 * Revised: 2015-05-12 17:41:19 +0200 (Tue, 12 May 2015) 4 * Revision: 43491 5 * 6 * Description: Defines for device properties. 7 * 8 * Copyright (c) 2015, 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 config_api 42 //! @{ 43 // 44 //***************************************************************************** 45 46 #ifndef __HW_CHIP_DEF_H__ 47 #define __HW_CHIP_DEF_H__ 48 49 //***************************************************************************** 50 // 51 // If building with a C++ compiler, make all of the definitions in this header 52 // have a C binding. 53 // 54 //***************************************************************************** 55 #ifdef __cplusplus 56 extern "C" 57 { 58 #endif 59 60 //***************************************************************************** 61 // 62 // Define CC_CHIP_ID code used in the following macros defined at the bottom: 63 // CC_GET_CHIP_FAMILY/DEVICE/PACKAGE/HWREV 64 // 65 //***************************************************************************** 66 /* CC2620F128 */ 67 #if defined(CC2620F128RGZ_R20) || defined(CC2620F128RGZ_R21) 68 #define CC_CHIP_ID 0x26200720 69 #elif defined(CC2620F128RHB_R20) || defined(CC2620F128RHB_R21) 70 #define CC_CHIP_ID 0x26200520 71 #elif defined(CC2620F128RSM_R20) || defined(CC2620F128RSM_R21) 72 #define CC_CHIP_ID 0x26200420 73 #elif defined(CC2620F128_R20) || defined(CC2620F128_R21) 74 #define CC_CHIP_ID 0x26200020 75 #elif defined(CC2620F128RGZ_R22) || defined(CC2620F128RGZ) 76 #define CC_CHIP_ID 0x26200722 77 #elif defined(CC2620F128RHB_R22) || defined(CC2620F128RHB) 78 #define CC_CHIP_ID 0x26200522 79 #elif defined(CC2620F128RSM_R22) || defined(CC2620F128RSM) 80 #define CC_CHIP_ID 0x26200422 81 #elif defined(CC2620F128_R22) || defined(CC2620F128) 82 #define CC_CHIP_ID 0x26200022 83 /* CC2630F128 */ 84 #elif defined(CC2630F128RGZ_R20) || defined(CC2630F128RGZ_R21) 85 #define CC_CHIP_ID 0x26300720 86 #elif defined(CC2630F128RHB_R20) || defined(CC2630F128RHB_R21) 87 #define CC_CHIP_ID 0x26300520 88 #elif defined(CC2630F128RSM_R20) || defined(CC2630F128RSM_R21) 89 #define CC_CHIP_ID 0x26300420 90 #elif defined(CC2630F128_R20) || defined(CC2630F128_R21) 91 #define CC_CHIP_ID 0x26300020 92 #elif defined(CC2630F128RGZ_R22) || defined(CC2630F128RGZ) 93 #define CC_CHIP_ID 0x26300722 94 #elif defined(CC2630F128RHB_R22) || defined(CC2630F128RHB) 95 #define CC_CHIP_ID 0x26300522 96 #elif defined(CC2630F128RSM_R22) || defined(CC2630F128RSM) 97 #define CC_CHIP_ID 0x26300422 98 #elif defined(CC2630F128_R22) || defined(CC2630F128) 99 #define CC_CHIP_ID 0x26300022 100 /* CC2640F128 */ 101 #elif defined(CC2640F128RGZ_R20) || defined(CC2640F128RGZ_R21) 102 #define CC_CHIP_ID 0x26400720 103 #elif defined(CC2640F128RHB_R20) || defined(CC2640F128RHB_R21) 104 #define CC_CHIP_ID 0x26400520 105 #elif defined(CC2640F128RSM_R20) || defined(CC2640F128RSM_R21) 106 #define CC_CHIP_ID 0x26400420 107 #elif defined(CC2640F128_R20) || defined(CC2640F128_R21) 108 #define CC_CHIP_ID 0x26400020 109 #elif defined(CC2640F128RGZ_R22) || defined(CC2640F128RGZ) 110 #define CC_CHIP_ID 0x26400722 111 #elif defined(CC2640F128RHB_R22) || defined(CC2640F128RHB) 112 #define CC_CHIP_ID 0x26400522 113 #elif defined(CC2640F128RSM_R22) || defined(CC2640F128RSM) 114 #define CC_CHIP_ID 0x26400422 115 #elif defined(CC2640F128_R22) || defined(CC2640F128) 116 #define CC_CHIP_ID 0x26400022 117 /* CC2650F128 */ 118 #elif defined(CC2650F128RGZ_R20) || defined(CC2650F128RGZ_R21) 119 #define CC_CHIP_ID 0x26500720 120 #elif defined(CC2650F128RHB_R20) || defined(CC2650F128RHB_R21) 121 #define CC_CHIP_ID 0x26500520 122 #elif defined(CC2650F128RSM_R20) || defined(CC2650F128RSM_R21) 123 #define CC_CHIP_ID 0x26500420 124 #elif defined(CC2650F128_R20) || defined(CC2650F128_R21) 125 #define CC_CHIP_ID 0x26500020 126 #elif defined(CC2650F128RGZ_R22) || defined(CC2650F128RGZ) 127 #define CC_CHIP_ID 0x26500722 128 #elif defined(CC2650F128RHB_R22) || defined(CC2650F128RHB) 129 #define CC_CHIP_ID 0x26500522 130 #elif defined(CC2650F128RSM_R22) || defined(CC2650F128RSM) 131 #define CC_CHIP_ID 0x26500422 132 #elif defined(CC2650F128_R22) || defined(CC2650F128) 133 #define CC_CHIP_ID 0x26500022 134 /* CC2650L128 (OTP) */ 135 #elif defined(CC2650L128) 136 #define CC_CHIP_ID 0x26501710 137 /* CC1310F128 */ 138 #elif defined(CC1310F128RGZ_R20) || defined(CC1310F128RGZ) 139 #define CC_CHIP_ID 0x13100720 140 #elif defined(CC1310F128RHB_R20) || defined(CC1310F128RHB) 141 #define CC_CHIP_ID 0x13100520 142 #elif defined(CC1310F128RSM_R20) || defined(CC1310F128RSM) 143 #define CC_CHIP_ID 0x13100420 144 #elif defined(CC1310F128_R20) || defined(CC1310F128) 145 #define CC_CHIP_ID 0x13100020 146 /* CC1350F128 */ 147 #elif defined(CC1350F128RGZ_R20) || defined(CC1350F128RGZ) 148 #define CC_CHIP_ID 0x13500720 149 #elif defined(CC1350F128RHB_R20) || defined(CC1350F128RHB) 150 #define CC_CHIP_ID 0x13500520 151 #elif defined(CC1350F128RSM_R20) || defined(CC1350F128RSM) 152 #define CC_CHIP_ID 0x13500420 153 #elif defined(CC1350F128_R20) || defined(CC1350F128) 154 #define CC_CHIP_ID 0x13500020 155 #endif 156 157 #define CC_GET_CHIP_FAMILY 0x13 158 #define CC_GET_CHIP_OPTION 0x0 159 #define CC_GET_CHIP_HWREV 0x20 160 161 #ifdef CC_CHIP_ID 162 /* Define chip package only if specified */ 163 #if (CC_CHIP_ID & 0x00000F00) != 0 164 #define CC_GET_CHIP_PACKAGE (((CC_CHIP_ID) & 0x00000F00) >> 8) 165 #endif 166 167 /* Define chip device */ 168 #define CC_GET_CHIP_DEVICE (((CC_CHIP_ID) & 0xFFFF0000) >> 16) 169 170 /* The chip family, option and package shall match the DriverLib release */ 171 #if (CC_GET_CHIP_FAMILY != ((CC_CHIP_ID & 0xFF000000) >> 24)) 172 #error "Specified chip family does not match DriverLib release" 173 #endif 174 #if (CC_GET_CHIP_OPTION != ((CC_CHIP_ID & 0x0000F000) >> 12)) 175 #error "Specified chip option (OTP) does not match DriverLib release" 176 #endif 177 #if (CC_GET_CHIP_HWREV != ((CC_CHIP_ID & 0x000000FF) >> 0)) 178 #error "Specified chip hardware revision does not match DriverLib release" 179 #endif 180 #endif 181 182 //***************************************************************************** 183 // 184 // Mark the end of the C bindings section for C++ compilers. 185 // 186 //***************************************************************************** 187 #ifdef __cplusplus 188 } 189 #endif 190 191 #endif // __HW_CHIP_DEF_H__ 192 193 //***************************************************************************** 194 // 195 //! Close the Doxygen group. 196 //! @} 197 // 198 //***************************************************************************** 199