comparison gsm-fw/include/condat/cl_imei.h @ 662:a712c95b60c1

gsm-fw/include/condat: import of TI's g23m/condat/com/include custom.h, pwr.h and rtc.h taken from TCS211 version, the others are the versions from LoCosto
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 28 Sep 2014 01:14:48 +0000
parents
children 643379e7e141
comparison
equal deleted inserted replaced
661:c36fe9d1da7e 662:a712c95b60c1
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : COMLIB
4 | Modul : cl_imei
5 +-----------------------------------------------------------------------------
6 | Copyright 2002 Texas Instruments Berlin, AG
7 | All rights reserved.
8 |
9 | This file is confidential and a trade secret of Texas
10 | Instruments Berlin, AG
11 | The receipt of or possession of this file does not convey
12 | any rights to reproduce or disclose its contents or to
13 | manufacture, use, or sell anything it may describe, in
14 | whole, or in part, without the specific written consent of
15 | Texas Instruments Berlin, AG.
16 +-----------------------------------------------------------------------------
17 | Purpose : Definitions of global types used by common library functions
18 | and the prototypes of those functions.
19 +-----------------------------------------------------------------------------
20 */
21 /*
22 * Version 1.0
23 */
24
25 /**********************************************************************************/
26
27 #ifndef CL_IMEI_H
28 #define CL_IMEI_H
29
30 /**********************************************************************************/
31
32 /*
33 * Compiler switches
34 */
35
36 /* Chipset Type Value Value name
37 * Gemini/Pole Star 0 _ge
38 * Hercules 2 _he
39 * Ulysse 3 _ul
40 * Samson 4 _sa
41 * Ulysse G1 13MHz 5 _g1_13
42 * Ulysse G1 26MHz 6 _g1_26
43 * Calypso C05 (rev. A) 7 _cal
44 * Calypso C05 (rev. B) 8 _calb
45 * Ulysse C035 9 _ul35
46 * Calypso C035 10 _cal35
47 * Calypso C035 Lite 11 _lite
48 * Calypso+ 12 _cplus
49 */
50 /******************************************************************************
51 * DIE ID and Platform settings
52 *****************************************************************************/
53 /* DIE ID register
54 #define MEM_DEV_ID0 0xFFFEF000
55 #define MEM_DEV_ID1 0xFFFEF002
56 */
57 /* For D-Sample: $CHIPSET = 7 or 8 (=10 for D-sample AMR). */
58
59 #ifdef _SIMULATION_
60 #undef FF_PROTECTED_IMEI
61 #endif
62
63 #ifdef FF_PROTECTED_IMEI
64 #ifdef CL_IMEI_CALYPSO_PLATFORM
65 #define CL_IMEI_DIE_ID_REG (MEM_DEV_ID0 | 0xF010) //+ 0xFFFEF010 for Calypso
66 #endif
67 #if !defined (CL_IMEI_CALYPSO_PLUS_PLATFORM) && !defined (CL_IMEI_CALYPSO_PLATFORM)
68 #define CL_IMEI_OTHER_PLATFORM
69 #endif
70 #endif /* FF_PROTECTED_IMEI */
71
72 /* DIE ID SIZE is 4 words (16 bits)long */
73 #define CL_IMEI_SIZE 8
74 #define CL_IMEI_ISDID_SIZE 16
75 #define CL_IMEI_DIE_ID_SIZE 4
76
77 /* Return values */
78 #define CL_IMEI_OK 0
79 #define CL_IMEI_ERROR -1
80 #define CL_IMEI_INVALID_DIE_ID -2
81 #define CL_IMEI_READ_IMEI_FAILED -3
82
83 /* Possible values for imeiType */
84 #define CL_IMEI_GET_SECURE_IMEI 0
85 #define CL_IMEI_GET_STORED_IMEI 1
86 #define CL_IMEI_CONTROL_IMEI 2
87
88 /*
89 +------------------------------------------------------------------------------
90 | Function : cl_get_imeisv
91 +------------------------------------------------------------------------------
92 | Description : Common IMEI getter function
93 |
94 | Parameters : imeiBufSize - size of buffer where to store IMEI, min 8 BYTEs
95 | *imeiBufPtr - pointer to buffer where to store the IMEI
96 | imeiType - indicates, if the IMEI should be read from
97 | FFS/Secure ROM (value=CL_IMEI_GET_SECURE_IMEI) or
98 | if the already read and stored IMEI (if available)
99 | should be delivered (value=CL_IMEI_GET_STORED_IMEI)
100 | The second option should be used only by ACI or
101 | BMI to show the IMEISV on mobile's display or
102 | in terminal window, e.g. if user calls *#06#.
103 | For IMEI Control reason (user by ACI), the value
104 | has to be CL_IMEI_CONTROL_IMEI
105 | Return : OK - 0
106 | ERROR - negative values
107 +------------------------------------------------------------------------------
108 */
109 extern BYTE cl_get_imeisv(USHORT imeiBufSize, UBYTE *imeiBufPtr, UBYTE imeiType);
110
111 /**********************************************************************************/
112
113
114 #endif /* CL_IMEI_H */