FreeCalypso > hg > fc-magnetite
changeset 18:c8bd5a927942
src/condat3: import of "condat" tree from TCS3.2, pruned
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/inc/gprs.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,64 @@ +/* ++----------------------------------------------------------------------------- +| Project : +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Contains common definitions for the GPRS Protocol Stack. ++----------------------------------------------------------------------------- +*/ + +#ifndef GPRS_H +#define GPRS_H + +/* + * The names of the GPRS entities + */ + +#define ACI_NAME "MMI" /* according to custom.h */ +#define PPP_NAME "PPP" +#define UART_NAME "UART" +#define PSI_NAME "PSI" +#define SNDCP_NAME "SND" +#define SM_NAME "SM" +#define GMM_NAME "GMM" +#define GSMS_NAME "SMS" +#define SMS_NAME "SMS" /* according to custom.h */ +#define MM_NAME "MM" +#define LLC_NAME "LLC" +#define GRR_NAME "GRR" +#define GRLC_NAME "GRLC" +#define CCI_NAME "CCI" +#define L1_NAME "L1" +#define RR_NAME "RR" +#define PL_NAME "PL" /* according to custom.h */ +#define SIM_NAME "SIM" /* according to custom.h */ +#define TIL_NAME "PL" +#define UPM_NAME "UPM" +#define GDD_DIO_NAME "GDDI" +#define APP_NAME "APP" + +#ifndef _TARGET_ + #define CLT_NAME "CLT" /* Used only during Simulation testing*/ +#endif /*!_TARGET_*/ + +/* + * TRACE_PRIMITVE is no more necessary when using NEW_FRAME. + * Remove it sometime. + */ + +#undef TRACE_PRIMITIVE +#define TRACE_PRIMITIVE(s) /* s */ + + +#endif /* !GPRS_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/inc/macdef.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,117 @@ +/* ++----------------------------------------------------------------------------- +| Project : +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Contains macros for the unified implementation of the +| Protocol Stack ++----------------------------------------------------------------------------- +*/ + +#ifndef MACDEF_H +#define MACDEF_H + +/* + * Get/Set state for one incarnation. Init state has to be called first. + */ +#undef GET_STATE +#undef SET_STATE + +#ifdef TRACE_STATE + #define INIT_STATE(P,S) ENTITY_DATA->P name = SERVICE_NAME_##P; \ + ENTITY_DATA->P state = S; \ + ENTITY_DATA->P state_name = #S; + + #define SET_STATE(P,S) {ENTITY_DATA->P state = S; \ + vsi_o_ttrace (VSI_CALLER \ + TC_STATE, \ + #P ":%s -> " #S, \ + ENTITY_DATA->P state_name ); \ + ENTITY_DATA->P state_name = #S;} + + #define GET_STATE(P) (vsi_o_ttrace (VSI_CALLER \ + TC_STATE, \ + #P ":%s", ENTITY_DATA->P state_name ), \ + ENTITY_DATA->P state) + +#else + #define INIT_STATE(P,S) {ENTITY_DATA->P state = S;} + #define SET_STATE(P,S) {ENTITY_DATA->P state = S;} + #define GET_STATE(P) (ENTITY_DATA->P state) +#endif /* TRACE_STATE */ + + +/* + * MFREE_DESC() is used to free the given descriptor, along with all following + * descriptors. + * + * Parameters: d -- "pointer" to the descriptor, either of type T_desc *, or + * an ULONG + */ +#define MFREE_DESC(d) { T_desc *desc = (T_desc *)d; \ + T_desc *next_desc; \ + while (desc NEQ NULL) \ + { \ + next_desc = (T_desc *)desc->next; \ + MFREE (desc); \ + desc = next_desc; \ + } \ + } + + +/* + * PFREE_DESC() is used to free the given primitive, along with all + * descriptors in the descriptor list of the primitive. + * + * Parameters: p -- pointer to the primitive containing a descriptor list + * (if it is an ULONG, it has to be casted to the pointer + * because the type cannot be determined by the macro!) + */ +#define PFREE_DESC(p) { MFREE_DESC ((p)->desc_list.first); \ + PFREE ((p)); \ + } + + +/* + * MFREE_DESC() is used to free the given descriptor, along with all following + * descriptors. + * + * Parameters: d -- "pointer" to the descriptor, either of type T_desc *, or + * an ULONG + */ +#define MFREE_DESC2(d) { T_desc2 *desc2 = (T_desc2 *)d; \ + T_desc2 *next_desc2; \ + while (desc2 NEQ NULL) \ + { \ + next_desc2 = (T_desc2 *)desc2->next; \ + MFREE (desc2); \ + desc2 = next_desc2; \ + } \ + } + + +/* + * PFREE_DESC() is used to free the given primitive, along with all + * descriptors in the descriptor list of the primitive. + * + * Parameters: p -- pointer to the primitive containing a descriptor list + * (if it is an ULONG, it has to be casted to the pointer + * because the type cannot be determined by the macro!) + */ +#define PFREE_DESC2(p) { MFREE_DESC2 ((p)->desc_list2.first); \ + PFREE ((p)); \ + } + + +#endif /* !MACDEF_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/audio.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,273 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM (6301) +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Types definitions for the audio driver +| . ++----------------------------------------------------------------------------- + +******************************************************************************** + $History: audio.h + + xpradipg - LOCOST-SPR-33914: 25 Aug 2005 + Description: MO to the Agilent resets the target + Solution: The enum value was assigned in one of the array which was not + propogated to another, due to buzzer removal there was a mismatch + the enum value assignment is guarded by a compiler flag + + xpradipg - GSM-ENH-32494 : 23 June 2005 + Description: Support for various audio profiles + Solution: The support for audio device's carkit/headset/loudspeaker/handheld. + The audio device is enabled as per the user actions. + +******************************************************************************** + + +| Apr 04, 2005 REF: ENH 30063 xdeepadh +| Description: Buzzer removal activity for Locosto MMI +| Fix:All the Buzzer related calls are under the compilation flag FF_BUZZER. +| The GSM tones which were playing in the buzzer are now routed to the speaker(Audio). ++----------------------------------------------------------------------------- +*/ +#ifdef FF_MMI_AUDIO_PROFILE +#include "rv/rv_general.h" +#include "audio/audio_api.h" +#endif +#ifndef AUDIO_H +#define AUDIO_H + +/* + * Signal Types + */ +#define AUDIO_SIGTYPE_SOUNDDEND 0 + +/* + * Return Values + */ +#define AUDIO_FCT_NOTSUPPORTED 20 + +/* + * Audio Devices + */ +#define AUDIO_SPEAKER 1 +#define AUDIO_MICROPHONE 2 +#define AUDIO_BUZZER 3 + +/* + * Audio Status + */ +/*#define NO_TONE 0 already defined in audio.h in L1 */ +#define BUZZER_ON 1 +#define BUZZER_SILENT 2 +#define TONE_ON 3 +#define TONE_SILENT 4 + +/* + * Mute Status + */ +#define AUDIO_MUTING_ON 0 +#define AUDIO_MUTING_OFF 1 + +/* + * Minimum and Maximum Volumes + */ +#define AUDIO_MIN_VOLUME 0 +#define AUDIO_MAX_VOLUME 255 +#define AUDIO_MIN_BUZ_VOLUME 0 +#define AUDIO_MAX_BUZ_VOLUME 255 +#define AUDIO_MIN_MIC_VOLUME 75 +#define AUDIO_MAX_MIC_VOLUME 75 + +//xpradipg - 32494 +#ifdef FF_MMI_AUDIO_PROFILE +#define CALLBACK_HEADSET 0 +#define CALLBACK_CARKIT 1 +#define MAX_EXT_AUD_DEVICE 2 +#endif + +enum AUDIO_SOUND_IDS +{ + AUDIO_MEL_LOW_BAT, + AUDIO_MEL_SMS_ALRT, + AUDIO_MEL_SWITCH_OFF, + AUDIO_MEL_AUTO_REDIAL, + AUDIO_MEL_KEY_BEEP, + AUDIO_MEL_ERROR_TONE, + AUDIO_MEL_USSD_TONE, + AUDIO_MEL_DIARY_TONE, + AUDIO_MEL_CB_TONE, + AUDIO_MEL_SVC_TONE, + AUDIO_MEL_MAN_PLMN_TONE, + AUDIO_MEL_CONNECT_CHARGER, + AUDIO_MEL_LOW_CREDIT, + AUDIO_MEL_ALARM_TONE, + + AUDIO_MEL_TUNES, + AUDIO_PLAY_SINGLE_NOTE = 0xFF +}; + +//Apr 04, 2005 REF: ENH 30063 xdeepadh +//Tone ids for Buzzer +//When the buzzer is not available, the ringing tones will be played with midiringer. +enum AUDIO_TONES_IDS +{ +#ifndef FF_MMI_NO_BUZZER + TONES_RING_0, + TONES_RING_1, + TONES_RING_2, + TONES_RING_3, + TONES_RING_4, + TONES_RING_5, + TONES_RING_6, + TONES_RING_7, + TONES_RING_8, + TONES_RING_9, + TONES_RING_10, + TONES_RING_11, + TONES_RING_12, + TONES_RING_13, + TONES_RING_14, + TONES_RING_15, +#endif + TONES_ERROR, + TONES_BUSY, + TONES_CONGEST, + TONES_DROPPED, + TONES_ACK, + TONES_CW, + TONES_DTMF_0, + TONES_DTMF_1, + TONES_DTMF_2, + TONES_DTMF_3, + TONES_DTMF_4, + TONES_DTMF_5, + TONES_DTMF_6, + TONES_DTMF_7, + TONES_DTMF_8, + TONES_DTMF_9, + TONES_DTMF_A, + TONES_DTMF_B, + TONES_DTMF_C, + TONES_DTMF_D, + TONES_DTMF_STAR, + TONES_DTMF_HASH, +//xpradipg - LOCOST-SPR-33914: 25 Aug 2005 +#ifndef FF_MMI_NO_BUZZER + TONES_KEYBEEP = 0x26, +#else + TONES_KEYBEEP, +#endif + TONES_RINGING_TONE, /* SPR#2340 - DS - Added */ + TONES_LAST_TONE_ID +}; + +/* + * internal data structures + */ +typedef struct +{ + USHORT command_1; + USHORT command_2; + USHORT length; +} T_DESCR; + +typedef struct +{ + UBYTE status; + UBYTE call_tone; + UBYTE type; + T_DESCR * descr; + UBYTE volume; + UBYTE style; + USHORT descr_index; +} T_ACT_TONE; + +/* + * Status Type + */ +typedef struct audio_Status_Type +{ + UBYTE min_volume; + UBYTE max_volume; +} audio_Status_Type; + +enum AUDIO_PLAY_STYLES +{ + AUDIO_PLAY_CRESCENDO = 0xff, + AUDIO_PLAY_INFINITE = 0, + AUDIO_PLAY_ONCE = 1 +}; + +/* + * TTY definitions + */ +typedef enum +{ + TTY_OFF = 0, + TTY_VCO, + TTY_HCO, + TTY_ALL +} T_TTY_CMD; + +#if defined (NEW_FRAME) +/* + * to achieve backward compatibility with older definitions + */ +#define drv_SignalCB_Type T_DRV_CB_FUNC +#define drv_SignalID_Type T_DRV_SIGNAL +#define T_VSI_THANDLE USHORT +#endif +/* + * Prototypes + */ + +// xpradipg - GSM-ENH-32494 : 23 June 2005 +#ifdef FF_MMI_AUDIO_PROFILE +EXTERN UBYTE audio_Init(T_ACCESSORY_CALLBACK *audioConfig); +EXTERN void audio_set_path(int audioDevice,int stereo); +#else +EXTERN UBYTE audio_Init (drv_SignalCB_Type in_SignalCBPtr); +#endif +EXTERN void audio_Exit (void); +EXTERN UBYTE audio_SetMute (UBYTE in_DeviceID, + UBYTE in_Mode); +EXTERN UBYTE audio_GetMute (UBYTE in_DeviceID, + UBYTE * out_Mode); +EXTERN UBYTE audio_GetSoundImage (UBYTE in_SoundID, + void * out_SoundImagePtr); +EXTERN UBYTE audio_SetAmplf (UBYTE in_DeviceID, + UBYTE in_Amplf); +EXTERN UBYTE audio_GetAmplf (UBYTE in_DeviceID, + UBYTE * out_Amplf); +EXTERN UBYTE audio_GetStatus (UBYTE in_DeviceID, + audio_Status_Type * out_StatusPtr); +EXTERN UBYTE audio_PlaySoundID (UBYTE in_DeviceID, + UBYTE in_SoundID, + BYTE in_RelVolume, + UBYTE in_Repeats); +EXTERN UBYTE audio_PlaySoundbyImage (UBYTE in_DeviceID, + void * in_SoundImagePtr, + BYTE in_RelVolume, + UBYTE in_Repeats); +EXTERN UBYTE audio_StopSoundbyID (UBYTE in_DeviceID, + UBYTE in_SoundID); +EXTERN UBYTE audio_StopSoundbyImage (UBYTE in_DeviceID, + void * in_SoundImagePtr); +EXTERN UBYTE audio_SetSignal (drv_SignalID_Type * in_SignalIDPtr); +EXTERN UBYTE audio_ResetSignal (drv_SignalID_Type * in_SignalIDPtr); +GLOBAL void audio_timeout (T_VSI_THANDLE handle); +EXTERN void audio_set_tty (T_TTY_CMD tty); +EXTERN void audio_dyn_set_tty (T_TTY_CMD tty); +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/cl_des.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,58 @@ +/* ++----------------------------------------------------------------------------- +| Project : COMLIB +| Modul : cl_des.h ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Definitions of global types used by common library functions +| and the prototypes of those functions. ++----------------------------------------------------------------------------- +*/ +/* + * Version 1.0 + */ + +/**********************************************************************************/ + +#ifndef CL_DES_H +#define CL_DES_H + +/**********************************************************************************/ + +#define CL_DES_BUFFER_SIZE 8 +#define CL_DES_KEY_SIZE 8 +#define CL_DES_ENCRYPTION 1 +#define CL_DES_DECRYPTION 2 + +#if defined(CL_IMEI_CALYPSO_PLATFORM) && defined(FF_PROTECTED_IMEI) + +/* ++------------------------------------------------------------------------------ +| Function : cl_des ++------------------------------------------------------------------------------ +| Description : The function performs DES encrypting or decrypting +| +| Parameters : inMsgPtr : pointer to input message M. The length of message +| has to be min. 8 bytes e.g. M = 0123456789abcdef +| desKeyPtr : pointer to DES key. Length has to be 8 bytes +| outMsgPtr : output encrypted/decrypted message. The length is 8 b. +| code : CL_DES_ENCRYPTION, CL_DES_DECRYPTION ++------------------------------------------------------------------------------ +*/ +EXTERN void cl_des(UBYTE *inMsgPtr, UBYTE *desKeyPtr, UBYTE *outMsgPtr, UBYTE code); + + +/**********************************************************************************/ + +#endif +#endif /* CL_DES_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/cl_imei.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,114 @@ +/* ++----------------------------------------------------------------------------- +| Project : COMLIB +| Modul : cl_imei ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Definitions of global types used by common library functions +| and the prototypes of those functions. ++----------------------------------------------------------------------------- +*/ +/* + * Version 1.0 + */ + +/**********************************************************************************/ + +#ifndef CL_IMEI_H +#define CL_IMEI_H + +/**********************************************************************************/ + +/* + * Compiler switches + */ + + /* Chipset Type Value Value name + * Gemini/Pole Star 0 _ge + * Hercules 2 _he + * Ulysse 3 _ul + * Samson 4 _sa + * Ulysse G1 13MHz 5 _g1_13 + * Ulysse G1 26MHz 6 _g1_26 + * Calypso C05 (rev. A) 7 _cal + * Calypso C05 (rev. B) 8 _calb + * Ulysse C035 9 _ul35 + * Calypso C035 10 _cal35 + * Calypso C035 Lite 11 _lite + * Calypso+ 12 _cplus + */ +/****************************************************************************** + * DIE ID and Platform settings + *****************************************************************************/ +/* DIE ID register + #define MEM_DEV_ID0 0xFFFEF000 + #define MEM_DEV_ID1 0xFFFEF002 +*/ +/* For D-Sample: $CHIPSET = 7 or 8 (=10 for D-sample AMR). */ + +#ifdef _SIMULATION_ +#undef FF_PROTECTED_IMEI +#endif + +#ifdef FF_PROTECTED_IMEI +#ifdef CL_IMEI_CALYPSO_PLATFORM +#define CL_IMEI_DIE_ID_REG (MEM_DEV_ID0 | 0xF010) //+ 0xFFFEF010 for Calypso +#endif +#if !defined (CL_IMEI_CALYPSO_PLUS_PLATFORM) && !defined (CL_IMEI_CALYPSO_PLATFORM) +#define CL_IMEI_OTHER_PLATFORM +#endif +#endif /* FF_PROTECTED_IMEI */ + +/* DIE ID SIZE is 4 words (16 bits)long */ +#define CL_IMEI_SIZE 8 +#define CL_IMEI_ISDID_SIZE 16 +#define CL_IMEI_DIE_ID_SIZE 4 + +/* Return values */ +#define CL_IMEI_OK 0 +#define CL_IMEI_ERROR -1 +#define CL_IMEI_INVALID_DIE_ID -2 +#define CL_IMEI_READ_IMEI_FAILED -3 + +/* Possible values for imeiType */ +#define CL_IMEI_GET_SECURE_IMEI 0 +#define CL_IMEI_GET_STORED_IMEI 1 +#define CL_IMEI_CONTROL_IMEI 2 + +/* ++------------------------------------------------------------------------------ +| Function : cl_get_imeisv ++------------------------------------------------------------------------------ +| Description : Common IMEI getter function +| +| Parameters : imeiBufSize - size of buffer where to store IMEI, min 8 BYTEs +| *imeiBufPtr - pointer to buffer where to store the IMEI +| imeiType - indicates, if the IMEI should be read from +| FFS/Secure ROM (value=CL_IMEI_GET_SECURE_IMEI) or +| if the already read and stored IMEI (if available) +| should be delivered (value=CL_IMEI_GET_STORED_IMEI) +| The second option should be used only by ACI or +| BMI to show the IMEISV on mobile's display or +| in terminal window, e.g. if user calls *#06#. +| For IMEI Control reason (user by ACI), the value +| has to be CL_IMEI_CONTROL_IMEI +| Return : OK - 0 +| ERROR - negative values ++------------------------------------------------------------------------------ +*/ +extern BYTE cl_get_imeisv(USHORT imeiBufSize, UBYTE *imeiBufPtr, UBYTE imeiType); + +/**********************************************************************************/ + + +#endif /* CL_IMEI_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/cl_list.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,88 @@ +/* ++----------------------------------------------------------------------------- +| Project : COMLIB +| Modul : RR/PL ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Definitions of global types used by List Processing functions +| and the prototypes of those functions: RR/PL layer. ++----------------------------------------------------------------------------- +*/ + +#ifndef CL_LIST_H +#define CL_LIST_H + +/*==== CONST ================================================================*/ + +#define BITOFFSET_LIST 1024 + +#define MAX_BYTES_900 16 +#define MAX_BYTES_EGSM 23 +#define MAX_BYTES_1800 47 +#define MAX_BYTES_1900 38 +#define MAX_BYTES_DUAL 63 +#define MAX_BYTES_850 16 +#define MAX_BYTES_DUAL_EGSM 70 +#define MAX_BYTES_DUAL_US 54 + +#define SET_CHANNEL_BIT 0 +#define RESET_CHANNEL_BIT 1 +#define GET_CHANNEL_BIT 2 +#define CHECK_CHANNEL 3 + + +#define T_LIST_MAX_SIZE 128 /* 1024/8 = 128 */ +typedef struct +{ + UBYTE channels [T_LIST_MAX_SIZE]; +} T_LIST; + + + +/*==== MACROS ================================================================*/ + +#define srv_set_channel(list,ch) scr_channel_bit(list,ch,SET_CHANNEL_BIT) +#define srv_unset_channel(list,ch) scr_channel_bit(list,ch,RESET_CHANNEL_BIT) +#define srv_get_channel(list,ch) scr_channel_bit(list,ch,GET_CHANNEL_BIT) + +/*==== VARS =================================================================*/ + +/*==== TYPES =================================================================*/ + +/*==== FUNCTIONS ============================================================*/ + +EXTERN UBYTE scr_channel_bit (T_LIST *list, + int channel, + int mode); +EXTERN int srv_create_list (T_LIST *list, + USHORT *channel_array, + USHORT size, + UBYTE zero_at_start, + USHORT start_index); +EXTERN void srv_clear_list (T_LIST *list); +EXTERN void srv_copy_list (T_LIST *target_list, + T_LIST *source_list, + UBYTE size); +EXTERN UBYTE srv_compare_list (T_LIST *list1, + T_LIST *list2); +EXTERN void srv_merge_list (T_LIST *target_list, + T_LIST *list); +EXTERN void srv_unmask_list (T_LIST *target,T_LIST *source); +EXTERN void srv_trace_freq_in_list (T_LIST *list); +EXTERN U8 srv_get_region_from_std (U8 std); +EXTERN U16 srv_count_list (T_LIST *list); +extern BOOL srv_is_list_set (T_LIST *list); + +#endif /* #ifndef CL_LIST_H */ + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/cl_md5.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,46 @@ +/* ++----------------------------------------------------------------------------- +| Project : COMLIB +| Modul : cl_md5 ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Definitions of global types used by common library functions +| and the prototypes of those functions. ++----------------------------------------------------------------------------- +*/ +/* + * Version 1.0 + */ + +/**********************************************************************************/ + +#ifndef CL_MD5_H +#define CL_MD5_H + +/**********************************************************************************/ + +/* MD5 context. */ +typedef struct { + UINT state[4]; /* state (ABCD) */ + UINT count[2]; /* number of bits, modulo 2^64 (lsb first) */ + unsigned char buffer[64]; /* input buffer */ +} MD5_CTX; + +/**********************************************************************************/ + +EXTERN void cl_md5 (UBYTE *input, UINT len, UBYTE *digest); +#ifdef _SIMULATION_ +EXTERN void cl_md5TestSuite (void); +#endif + +#endif /* CL_RIBU_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/cl_ribu.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,71 @@ +/* ++----------------------------------------------------------------------------- +| Project : COMLIB +| Modul : cl_ribu ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Definitions of global types used by common library functions +| and the prototypes of those functions. ++----------------------------------------------------------------------------- +*/ +/* + * Version 1.0 + */ + +/**********************************************************************************/ + +#ifndef CL_RIBU_H +#define CL_RIBU_H + +/**********************************************************************************/ + +typedef struct +{ + U8 ri; /* ring buffer read index */ + U8 wi; /* ring buffer write index */ + U8 depth; /* ring buffer depth */ + U8 filled; /* ring buffer filled flag */ +} T_RIBU; + +typedef struct +{ + U8 type; + U8 status; + U8 len; /* buffer length */ + U8 *buf; /* buffer start address */ +} T_FD; /* frame descriptor */ + +typedef struct +{ + T_RIBU idx; + T_FD **pFDv; /* frame descriptor vector */ +} T_RIBU_FD; + +/**********************************************************************************/ + +EXTERN void cl_ribu_create(T_RIBU_FD **ribu, const U8 buflen, const U8 depth); +EXTERN void cl_ribu_release(T_RIBU_FD **ribu); + +EXTERN void cl_ribu_put(const T_FD fd, T_RIBU_FD *ribu); +EXTERN T_FD *cl_ribu_get(T_RIBU_FD *ribu); +EXTERN T_FD *cl_ribu_get_new_frame_desc(T_RIBU_FD *ribu); + +EXTERN void cl_ribu_init(T_RIBU *ribu, const U8 depth); +EXTERN U8 cl_ribu_read_index(T_RIBU *ribu); +EXTERN U8 cl_ribu_write_index(T_RIBU *ribu); +EXTERN BOOL cl_ribu_data_avail(const T_RIBU_FD *ribu); + +EXTERN void cl_set_frame_desc(T_FRAME_DESC *frame_desc, U8 *A0, U16 L0, U8 *A1, U16 L1); +EXTERN void cl_set_frame_desc_0(T_FRAME_DESC *frame_desc, U8 *A0, U16 L0); + +#endif /* CL_RIBU_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/cl_rlcmac.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,84 @@ +/* ++----------------------------------------------------------------------------- +| Project : COMLIB +| Modul : RLCMAC ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Definitions of global types used by common library functions +| and the prototypes of those functions: RLC/MAC layer. ++----------------------------------------------------------------------------- +*/ + +#ifndef CL_RLCMAC_H +#define CL_RLCMAC_H + +/*==== CONST ================================================================*/ +/* + * Start defintions from entity RR + */ + +/* + ****************************************************************************** + * The following declarations shall be identical with the corresponding + * declarations located in RR. + ****************************************************************************** + */ + +EXTERN UBYTE rr_csf_get_radio_access_capability( T_ra_cap *ra_cap ); +EXTERN void RX_SetRxQual ( UBYTE new_rx_qual ); + +/* + ****************************************************************************** + * The above declarations shall be identical with the corresponding + * declarations located in RR. + ****************************************************************************** + */ + +/* + * End defintions from entity RR + */ + +/* + * Used for tracing purposes, see also function cl_rlcmac_get_msg_name + */ + +#define RLC_MAC_MAX_LEN_CHANNEL_REQ 2 + +#define D_MSG_TYPE_CRC_ERROR_c 0xFD +#define D_MSG_TYPE_2ND_SEGMENT_c 0xFE +#define D_MSG_TYPE_UNKNOWN_c 0xFF + +#define U_MSG_TYPE_CHANNEL_REQ_c 0xFE +#define U_MSG_TYPE_UNKNOWN_c 0xFF + +typedef enum /* T_RLC_MAC_ROUTE */ +{ + RLC_MAC_ROUTE_UL, + RLC_MAC_ROUTE_DL +} T_RLC_MAC_ROUTE; + +/*==== VARS =================================================================*/ + +/*==== TYPES =================================================================*/ + +/*==== FUNCTIONS ============================================================*/ + +#if !defined (NTRACE) + +EXTERN char* cl_rlcmac_get_msg_name ( UBYTE msg_type, + T_RLC_MAC_ROUTE route ); + +#endif /* #if !defined (NTRACE) */ + +#endif /* #ifndef CL_RLCMAC_H */ +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/cl_shrd.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,113 @@ +/* ++----------------------------------------------------------------------------- +| Project : COMLIB +| Modul : cl_shrd ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Definitions of global types used by common library functions +| and the prototypes of those functions. ++----------------------------------------------------------------------------- +*/ +/* + * Version 1.0 + */ + +/**********************************************************************************/ +#ifndef CL_SHRD_H +#define CL_SHRD_H + +#ifdef TI_PS_FF_AT_P_CMD_CTREG +#define MAX_CTREG_TAB_LEN 25 +#endif /* TI_PS_FF_AT_P_CMD_CTREG */ + +/* ME STATUS for Timing advance structure */ +#define ME_STATUS_IDLE 0 +#define ME_STATUS_NOT_IDLE 1 + + +/*====STRUCTURE DEFINITION=========================================*/ + +typedef struct +{ + UBYTE service_mode; + U16 lac; + U8 mcc [3]; + U8 mnc [3]; + USHORT cell_id; +}T_LOC_INFO; + +typedef struct +{ + UBYTE me_status; + UBYTE tm_adv; +}T_TIM_ADV; + +#ifdef TI_PS_FF_AT_P_CMD_CTREG +typedef enum +{ + MODE_NotPresent = 0, + TREG_READ_MODE, + TREG_WRITE_MODE +}T_TREG_MODE; + +typedef enum +{ + MODE_TIME_NotPresent = 0, + NOSERVICE_MODE_TIME, + LIMSERVICE_MODE_TIME +}T_TREG_TABLE; + +typedef struct +{ + T_TREG_MODE mode; + T_TREG_TABLE tab_id; + UBYTE tab_val[25]; +}T_TREG; +#endif /* TI_PS_FF_AT_P_CMD_CTREG */ + +typedef struct +{ + T_LOC_INFO location_info; + T_TIM_ADV timing_advance; +#ifdef TI_PS_FF_AT_P_CMD_CTREG + UBYTE no_serv_mod_time[25]; + UBYTE lim_serv_mod_time[25]; +#endif /* TI_PS_FF_AT_P_CMD_CTREG */ +}T_SHRD_DATA; + +EXTERN T_SHRD_DATA *shared_data; + +#ifdef TI_PS_FF_AT_P_CMD_CTREG +EXTERN const UBYTE no_service_mode_time[25]; +EXTERN const UBYTE lim_service_mode_time[25]; +#endif /* TI_PS_FF_AT_P_CMD_CTREG */ + +/*=================================================================*/ + +/*====FUNCTION PROTOTYPE===========================================*/ + +EXTERN void cl_shrd_init (T_HANDLE handle); +EXTERN void cl_shrd_exit (void); +EXTERN BOOL cl_shrd_get_loc (T_LOC_INFO *loc_info); +EXTERN void cl_shrd_set_loc (T_LOC_INFO *loc_info); +EXTERN BOOL cl_shrd_get_tim_adv(T_TIM_ADV *tim_adv); +EXTERN void cl_shrd_set_tim_adv(T_TIM_ADV *tim_adv); + +#ifdef TI_PS_FF_AT_P_CMD_CTREG +EXTERN BOOL cl_shrd_set_treg_val(T_TREG *treg); +EXTERN BOOL cl_shrd_get_treg_val(T_TREG *treg); +EXTERN BOOL cl_shrd_get_treg (UBYTE tab_id, UBYTE offset, UBYTE *tab_val); +#endif /* TI_PS_FF_AT_P_CMD_CTREG */ + +/*=================================================================*/ +#endif /* CL_SHRD_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/custom.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,592 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM-PS (6147) +| Modul : CUSTOM ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Custom dependent definitions +| +| Use this header for definitions to integrate the +| protocol stack in your target system ! ++----------------------------------------------------------------------------- +*/ + +#ifndef CUSTOM_H +#define CUSTOM_H + +/* + * OPTION_MULTITHREAD + * + * Description : For Operationg systems where the entire protocol + * stack is linked as an process and the entitys are + * started as threads, this option must be set. In + * this case all the pei_ functions of one entity + * were prefixed by the entity name like cc_pei... + * + * Options: #define OPTION_MULTITHREAD + * Multithread application + * #undef OPTION_MULTITHREAD + * No multithread application. + * Each entity is linked seperatly. + * + */ +/* +#undef OPTION_MULTITHREAD must be passed as compile switch +*/ +/*==== ENTITY DEPENDENT CONFIGURATION PARAMETER ===================*/ + +#ifndef __PFRAME_C__ /* do not include the entity specific custom + header if we compile the frame */ + +#ifdef ENTITY_CST +#include "cst/cus_cst.h" +#endif + +#if defined (ENTITY_SMI) || defined (ENTITY_MFW) || defined (ENTITY_ACI) || defined (ENTITY_MMI) +#include "cus_aci.h" +#endif + +#ifdef ENTITY_PAN +#endif + +#ifdef ENTITY_DL +#include "cus_dl.h" +#endif + +#ifdef ENTITY_RR +#include "cus_rr.h" +#endif + +#ifdef ENTITY_MM +#include "cus_mm.h" +#endif + +#ifdef ENTITY_CC +#include "cus_cc.h" +#endif + +#ifdef ENTITY_SS +#include "cus_ss.h" +#endif + +#ifdef ENTITY_ESIM +#include "cus_esim.h" +#endif + +#ifdef ENTITY_SMS +#include "cus_sms.h" +#endif + +#ifdef ENTITY_PL + #ifdef ALR + #include "cus_alr.h" + #else + #include "cus_til.h" + #endif +#endif + +#ifdef ENTITY_L1 +#include "cus_l1.h" +#endif + +#ifdef ENTITY_SIM +#include "cus_sim.h" +#endif + +#ifdef ENTITY_L2R +#include "cus_l2r.h" +#endif + +#ifdef ENTITY_RLP +#include "cus_rlp.h" +#endif + +#ifdef ENTITY_T30 +#include "cus_t30.h" +#endif + +#ifdef ENTITY_FAD +#include "cus_fad.h" +#endif + +#ifdef ENTITY_RA +#include "cus_ra.h" +#endif + +#ifdef ENTITY_WAP +#ifdef FF_GPF_TCPIP +#include "cus_wapmic.h" +#endif +#ifdef CO_UDP_IP +#include "cus_wap.h" +#endif +#endif + +#ifdef ENTITY_UDP +#include "cus_udp.h" +#endif + +#ifdef ENTITY_IP +#include "cus_ip.h" +#endif + +#ifdef ENTITY_TCP +#include "cus_tcp.h" +#endif + +#endif + +/*==== ENTITY NAMES ===============================================*/ +/* + * The names are used as identifier for the communication resource + */ + +#define NULL_NAME "NULL" +#define L1_NAME "L1" +#define PL_NAME "PL" +#define DL_NAME "DL" +#define RR_NAME "RR" +#define MM_NAME "MM" +#define CC_NAME "CC" +#define SS_NAME "SS" +#define ESIM_NAME "ESIM" +#define SMS_NAME "SMS" +#define SIM_NAME "SIM" +#define PAN_NAME "PAN" +#define DMYA_NAME "DMYA" +#define DMYB_NAME "DMYB" +#define CST_NAME "CST" +#define GRR_NAME "GRR" + +#define ACI_NAME "MMI" +#define AAA_NAME "AAA" +#define RIV_NAME "RIV" + +#define L2R_NAME "L2R" +#define TRA_NAME L2R_NAME /* TRA running in L2R task */ +#define RLP_NAME "RLP" +#define T30_NAME "T30" +#define FAD_NAME "FAD" +#define RA_NAME "RA" +#define WAP_NAME "WAP" +#define UDP_NAME "UDP" +#define IP_NAME "IP" +#define PPP_NAME "PPP" +#define UART_NAME "UART" +#define PSI_NAME "PSI" +#define DTI_NAME "DTI" +#define TAP_NAME "TAP" +#define BTI_NAME "BTI" /* BTI is not an entity, but the name is used to identify BTI */ +#define LC_NAME "LC" + + +#ifndef _TARGET_ + #define CLT_NAME "CLT" /* Used only during Simulation testing*/ +#endif /*!_TARGET_*/ + +#define RRLP_NAME "RRLP" + + +#ifdef FF_TRACE_OVER_MTST +#define MTST_NAME "MTST" +#endif /* FF_TRACE_OVER_MTST */ + +#ifdef GPRS +#define GMM_NAME "GMM" +#define GRR_NAME "GRR" +#define GRLC_NAME "GRLC" +#define PKTIO_NAME "PKT" +#define GPL_NAME "GRR" +#endif /* #ifdef GPRS */ + +#define DCM_NAME "MMI" +#define TCPIP_NAME "TCP" + +#define APP_NAME "APP" +#define GDD_DIO_NAME "GDDI" + +#ifndef NEW_FRAME +/*==== STATIC CONFIGURATION =======================================*/ +/* + * TRACE_FKT + * + * Description : A trace string is send to the environment when a + * function is called. + * + * Options: #define TRACE_FKT configuration is active + * #undef TRACE_FKT configuration is not active + * #define TC_FUNC <n> used trace class + * + * Function Traces only under Windows and for MMI + */ + +/* + * It is nearly impossible to debug ACI/MFW/SMI without function traces + */ +#if defined(WIN32) OR defined(ENTITY_MFW) OR defined(ENTITY_ACI) OR defined(ENTITY_SMI) +#define TRACE_FKT +#define TC_FUNC 1 +#else +#undef TRACE_FKT +#endif + +/* + * TRACE_EVE + * + * Description : A trace string is given to the environment when + * an event has happened, for example start of cell + * selection. + * + * Options: #define TRACE_EVE configuration is active + * #undef TRACE_EVE configuration is not active + * #define TC_EVENT <n> used trace class + */ + +#if !defined (NTRACE) +#define TRACE_EVE +#define TC_EVENT 2 +#else +#undef TRACE_EVE +#endif + +/* + * TRACE_ERR + * + * valid for : Mobile and Base Station + * + * Description : A trace string is given to the environment when + * an error has occured, for example parameter error + * by dynamic configuration. + * + * Options: #define TRACE_ERR configuration is active + * #undef TRACE_ERR configuration is not active + * #define TC_ERROR <n> used trace class + */ + +#if !defined (NTRACE) +#define TRACE_ERR +#define TC_ERROR 3 +#else +#undef TRACE_ERR +#endif + +/* + * TRACE_PRIM + * + * Description : A trace string is send to the environment when a + * primitive is received or send. + * + * Options: #define TRACE_PRIM configuration is active + * #undef TRACE_PRIM configuration is not active + * #define TC_PRIM <n> used trace class + */ + +#if !defined (NTRACE) +#define TRACE_PRIM +#define TC_PRIM 4 +#else +#undef TRACE_PRIM +#endif + +/* + * TRACE_STATE + * + * Description : A trace string is send to the environment when a + * state variable is changed or retrieved. + * + * Options: #define TRACE_STATE configuration is active + * #undef TRACE_STATE configuration is not active + * #define TC_STATE <n> used trace class + */ + +#if !defined (NTRACE) +#define TRACE_STATE +#define TC_STATE 8 +#else +#undef TRACE_STATE +#endif + +#endif /* NEW_FRAME */ + +/* + * SIM Application Toolkit + * + * Description : Depending of the general activation of SIM application + * Toolkit, specific parts can be activated + * + * Options: #define SAT_CBM_DNL_SUPPORT Cell Broadcast Data + * Download shall be supported + * #define SAT_SMS_DNL_SUPPORT SMS Data Download shall + * be supported + * #define SAT_CALL_CTRL_SUPPORT Call Control by SIM shall + * be supported + * #define SAT_CALL_REQ_SUPPORT Setup Call and Send SS/USSD + * shall be supported + */ + +#ifdef SIM_TOOLKIT +#define SAT_CBM_DNL_SUPPORT +#define SAT_SMS_DNL_SUPPORT +#define SAT_CALL_CTRL_SUPPORT +#define SAT_CALL_REQ_SUPPORT +#endif + +/* + * Engineering Mode + * + * Description : The configuration enables feature flag for engineering mode under WIN32. + * + * Options: #define FF_EM_MODE engineering mode is supported + * + */ + +//#if defined (WIN32) +//#define FF_EM_MODE +//#endif + +/* + * OPTION_REF + * + * Description : There are two ways defined to communicate + * between protocol stack entities. Either by + * copying buffers or by exchanging buffer + * addresses. This options defines which + * way is used. + * + * Options: #define OPTION_REF communication is + * carried out by + * exchanging buffer addresses + * #undef OPTION_REF communication is + * carried out by + * copying buffers + */ + +#define OPTION_REF + +/* + * OPTION_LENGTH + * + * Description : If the communication is carried out by + * exchanging buffer addresses it is not + * necessary to calculate the length of + * the buffer. This option suppresses + * the calculation of the size parameter + * of the sending communication buffer. + * + * Options: #undef OPTION_LENGTH size parameter is set + * to zero. + * #define OPTION_LENGTH size parameter is set + * to buffer size + */ + +#define OPTION_LENGTH + +/* + * OPTION_SET_CONFIG_ONLY + * + * Description : The pei_config () function is used + * to set and/or to read dynamic configuration. + * The possibility to read a dynamic configuration + * is switched off by this configuration. + * + * Options: #define OPTION_SET_CONFIG_ONLY + * It is not possible to read + * a dynamic configuration + * #undef OPTION_SET_CONFIG_ONLY + * It is possible to read + * a dynamic configuration + */ + +#define OPTION_SET_CONFIG_ONLY + +/* + * OPTION_GSM_ONLY + * + * Description : If the environment ensures that only GSM + * primitives are forwarded to the protocol + * stack entity this option suppresses the + * use of the vsi_c_primitive() function. + * + * Options: #define OPTION_GSM_ONLY + * The environment sends + * only GSM primitives + * #undef OPTION_GSM_ONLY + * The environment sends + * GSM and SYSTEM primitives + */ + +#undef OPTION_GSM_ONLY + +/* + * OPTION_TIMEOUT_SYNC + * + * Description : If the environment ensures that the + * pei_primitive and pei_timeout function + * not called at the same time this option + * suppresses the use of the vsi_c_awake() + * function. The timeout-handling is started + * directly by the pei_timeout() function. + * + * Options: #define OPTION_TIMOUT_SYNC + * direct timeout-handling + * #undef OPTION_TIMEOUT_SYNC + * indirect timeout-handling + * by using vsi_c_awake () + */ + +#undef OPTION_TIMEOUT_SYNC + +/* + * OPTION_SIGNAL + * + * Description : The options defines whether signal processing + * in the entity is possible or not. + * + * Options: #define OPTION_SIGNAL + * Signal processing is possible + * #undef OPTION_SIGNAL + * Signal processing is not possible + * + */ + +#define OPTION_SIGNAL + +/* + * OPTION_TIMER + * + * Description : The options defines whether timer values are + * changeable by dynamic configuration or not. + * + * Options: #define OPTION_TIMER + * Timer values are changeable + * #undef OPTION_TIMER + * Timer values are not + * changeable + */ + +#if !defined (NCONFIG) +#define OPTION_TIMER +#else +#undef OPTION_TIMER +#endif + +/* + * OPTION_RELATIVE + * + * Description : If the compiler for the target system + * uses relative addressing it is possible + * that the offset at run-time must be + * added to some jump tables containing only + * the offset at compile-time. + * + * Options: #define OPTION_RELATIVE + * add run-time offset + * #undef OPTION_RELATIVE + * don't add run-time offset + */ + +#undef OPTION_RELATIVE + +/* + * OPTION_MULTI_INSTANCE + * MAX_INSTANCES + * + * + * Description : The option is used if multiple instances are + * used. The routing information is stored in the + * header (T_ROUTE route). The routing information + * consists of instance number (inst_no), + * channel number (chan_no) and timeslot number + * (ts_no). The upper layer uses instance number + * for routing, at the interface to physical layer + * the channel and timeslot number are used. The + * constant MAX_INSTANCES defines the maximum of + * instances. + * + * Options: #define OPTION_MULTI_INSTANCE + * use multi instances + * #undef OPTION_MULTI_INSTANCE + * only one instance + */ + +#undef OPTION_MULTI_INSTANCE +#define MAX_INSTANCES 1 + +/*==== TYPES ======================================================*/ +/* + * T_PRIM_HEADER + * + * Description : This type definition defines the custom specific + * part of a primitive. All primitives have the + * general format: header followed by data. The + * header of a primitive is changeable according to + * the requirements of the target system. + * Hints: Only the operation code opc as a USHORT value must + * be present. For multi-instance protocol stacks + * the routing information must be include in the + * header (T_ROUTE route). + */ + +#ifdef OPTION_MULTI_INSTANCES + +typedef struct +{ + USHORT inst_no; + USHORT chan_no; + UBYTE ts_no; +} T_ROUTE; + +#endif + +#if !defined (T_PRIM_HEADER_DEFINED) + +#define T_PRIM_HEADER_DEFINED + +#ifdef _TMS470 + +typedef struct +{ + USHORT opc; /* equal to int SignalCode */ + USHORT opc2; + USHORT len; + USHORT idx; + T_sdu *sdu; + UBYTE * Sender; /* not used */ + UBYTE * SigP; /* Pointer to data area */ +} T_PRIM_HEADER; + +#else + +typedef struct +{ + UBYTE ps; + UBYTE fill; + UBYTE snd; + UBYTE rcv; + ULONG timestamp; + USHORT len; + USHORT idx; + T_sdu *sdu; + USHORT lng; +#ifdef OPTION_MULTI_INSTANCES + T_ROUTE route; +#endif + USHORT opc; + USHORT opc2; +} T_PRIM_HEADER; + +#endif + +#endif /* T_PRIM_HEADER_DEFINED */ + +#endif /* CUSTOM_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/dspl.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,337 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM (6103) +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Types definitions for the display driver +| . ++----------------------------------------------------------------------------- + History: + Sept 15, 2005 REF: LOCOSTO-ENH-34257 - xpradipg + Description: Locosto: MIgration to New LCD APIs + Solution: Migrated to New APIs by replacing the old driver APIs with + corresponding New LCD APIs ++----------------------------------------------------------------------------- +*/ +#ifndef DSPL_H +#define DSPL_H +#include "font_bitmaps.h" + +//Sept 15, 2005 REF: LOCOSTO-ENH-34257 - xpradipg +//The file is included for the definition of T_RV_RET + + +/* + * Device Capabilities data Type + */ +typedef struct dspl_DevCaps +{ + UBYTE DisplayType; + USHORT Width; + USHORT Height; +} dspl_DevCaps; + +/* + * Display Types + */ +#define DSPL_TYPE_CHARACTER 0 +#define DSPL_TYPE_GRAPHIC 1 +#define DSPL_TYPE_COLOR 2 + +/* + * Character Types + */ + +#define DSPL_TYPE_ASCII 1 +#define DSPL_TYPE_UNICODE 2 +#define DSPL_TYPE_ASCII_12_6 3 + + +/* + * Display Text Attributes + */ +#define DSPL_TXTATTR_NORMAL 0x00 +#define DSPL_TXTATTR_INVERS 0x01 +#define DSPL_TXTATTR_UNICODE 0x02 +#define DSPL_TXTATTR_CURRENT_MODE 0x04 /*Represents the string in the current display mode,unicode or ASCII*/ +#define DSPL_TXTATTR_SIGNED_COORDS 0x08 /*SH - if this is set, coordinates can have negative numbers*/ +#define DSPL_TXTATTR_HLIGHT 0x10 /*Same as 'inverse' on B+W - diff colour highlight on colour display */ + +/* + * Cursor Types + */ +#define DSPL_FBOX_CURSOR_TYPE 1 +#define DSPL_OBOX_CURSOR_TYPE 2 +#define DSPL_TLIN_CURSOR_TYPE 3 +#define DSPL_BLIN_CURSOR_TYPE 4 + +#define DSPL_SLOWFLASH_MODE 1 +#define DSPL_FASTFLASH_MODE 2 +#define DSPL_STATIC_MODE 3 + +#define DSPL_CURSOR_VISIBLE 1 +#define DSPL_CURSOR_INVISIBLE 0 +/* + * Raster Operations + */ +#define DSPL_BMPINVERT 1 +#define DSPL_BMPAND 2 +#define DSPL_BMPCOPY 4 +#define DSPL_BMPERASE 8 +#define DSPL_BMPPAINT 16 + + +/*mc, SPR 1319 moved definitions to header*/ +#define TXT_STYLE_NORMAL (0) +#define TXT_STYLE_INVERT (1) +#define TXT_STYLE_HIGHLIGHT (2) +#define TXT_STYLE_BORDER (3) +#define TXT_STYLE_SHADOW1 (4) +#define TXT_STYLE_SHADOW2 (5) +#define TXT_STYLE_2PIXEL_BORDER (6) +#define TXT_STYLE_3PIXEL_BORDER (7) +#define TXT_STYLE_4PIXEL_BORDER (8) +#define TXT_STYLE_MASK (0x00FF) +#define TXT_STYLE_WIDECHAR (0x0100) +#define TXT_STYLE_HIGHCHAR (0x0200) +#define TXT_STYLE_UNICODE (0x0400) + +/*mc end*/ + +/* + * Return Values + */ +#define DSPL_FCT_NOTSUPPORTED 1 + +#if defined (NEW_FRAME) +/* + * to achieve backward compatibility with older definitions + */ +#define drv_SignalCB_Type T_DRV_CB_FUNC +#define drv_SignalID_Type T_DRV_SIGNAL +#define T_VSI_THANDLE USHORT +#endif + +/* + * Prototypes + */ + +EXTERN UBYTE dspl_Init (void); +EXTERN void dspl_Exit (void); +EXTERN UBYTE dspl_Clear (USHORT in_X1, + USHORT in_Y1, + USHORT in_X2, + USHORT in_Y2); +EXTERN UBYTE dspl_ClearAll (void); +EXTERN UBYTE dspl_unfocusDisplay (void); + +EXTERN UBYTE dspl_Enable (UBYTE in_Enable); +EXTERN void dspl_GetDeviceCaps (dspl_DevCaps * out_DeviceCapsPtr); +EXTERN void dspl_SetDeviceCaps (dspl_DevCaps * in_DeviceCapsPtr); +EXTERN UBYTE dspl_GetIconImage (UBYTE in_Icon, + USHORT in_Size, + UBYTE * out_IconImagePtr); +EXTERN UBYTE dspl_SetCursor (UBYTE in_CursorType, + UBYTE in_CursorMode); +EXTERN UBYTE dspl_SetCursorPos (USHORT in_X, + USHORT in_Y, + USHORT in_SizeX, + USHORT in_SizeY);//GW 05/09/01 +EXTERN UBYTE dspl_ShowCursor (UBYTE in_Show); +EXTERN UBYTE dspl_SetBkgColor (UBYTE in_Color); +EXTERN UBYTE dspl_SetFrgColor (UBYTE in_Color); +EXTERN UBYTE dspl_DrawIcon (UBYTE in_IconID, + USHORT in_X, + USHORT in_Y); +EXTERN UBYTE dspl_DrawLine (USHORT in_X1, + USHORT in_Y1, + USHORT in_X2, + USHORT in_Y2); +EXTERN UBYTE dspl_DrawRect (USHORT in_X1, + USHORT in_Y1, + USHORT in_X2, + USHORT in_Y2); +EXTERN UBYTE dspl_roundRect (int px, + int py, + int sx, + int sy, + int border); +EXTERN UBYTE dspl_roundRectFill (int px, + int py, + int sx, + int sy, + int border); +EXTERN UBYTE dspl_DrawFilledRect (USHORT in_X1, + USHORT in_Y1, + USHORT in_X2, + USHORT in_Y2); +EXTERN UBYTE dspl_DrawFilledBgdRect (USHORT in_X1, + USHORT in_Y1, + USHORT in_X2, + USHORT in_Y2); +EXTERN UBYTE dspl_DrawFilledColRect (USHORT in_X1, + USHORT in_Y1, + USHORT in_X2, + USHORT in_Y2, + U32 Col); + +EXTERN UBYTE dspl_Ellipse (USHORT in_X1, + USHORT in_Y1, + USHORT in_X2, + USHORT in_Y2); +EXTERN UBYTE dspl_BitBlt (USHORT in_X, + USHORT in_Y, + USHORT in_Width, + USHORT in_Height, + USHORT in_Index, + void * in_BmpPtr, + USHORT in_Rop); +EXTERN UBYTE dspl_BitBlt2(short in_X, + short in_Y, + USHORT in_Width, + USHORT in_Height, + void * in_BmpPtr, + USHORT in_index, + int bmpFormat); + +void fastCopyBitmap(int startX, int startY, // start position of bitmap + int bmpSx, int bmpSy, //size of bitmap + char* srcBitmap, + int posX, int posY, // start of area to be copied into + int sx, int sy, // size of area to be copied into + U32 bgd_col, int bmptype); + +EXTERN UBYTE dspl_SelectFontbyID (UBYTE in_Font); +EXTERN UBYTE dspl_SelectFontbyImage (UBYTE * in_FontPtr); +EXTERN UBYTE dspl_GetFontImage (UBYTE in_Font, + USHORT in_Size, + UBYTE * out_FontPtr); +EXTERN UBYTE dspl_GetFontHeight (void); +EXTERN USHORT dspl_GetTextExtent (char * in_Text, + USHORT in_Length); +EXTERN USHORT dspl_GetMaxTextLen (char * in_Text, + USHORT in_HSize); +EXTERN UBYTE dspl_TextOut_Cmode (USHORT in_X, + USHORT in_Y, + UBYTE in_Attrib, + char * in_Text); +EXTERN UBYTE dspl_TextOut (USHORT in_X, + USHORT in_Y, + UBYTE in_Attrib, + char * in_Text); +EXTERN void dspl_ScrText (int x, int y, char *txt, int style); + +EXTERN UBYTE dspl_SetWorkShadow (UBYTE * in_ShadowPtr); +EXTERN UBYTE dspl_SetDisplayShadow (UBYTE * in_ShadowPtr); + +EXTERN UBYTE dspl_str_length(char * str); + +EXTERN void dspl_set_char_type(UBYTE char_type); +EXTERN UBYTE dspl_get_char_type(void); + +int dspl_getDisplayType( void ); + +GLOBAL USHORT dspl_GetNcharToFit (char * in_Text, USHORT pixelWidth);/*SPR 1541*/ + +//Functions to allow us to set-up the border around text. +int dspl_setBorderWidth(int borderSize); +int dspl_getBorderWidth(void); +//Condat UK Resources functions + +EXTERN UBYTE dspl_Prompt (USHORT x, USHORT y, UBYTE in_Attrib, int StringID); + +//GW Added new prototypes for setting and getting foreground and background colours +//NB Existing (unsupported) procedures cannot be used as these have colour defined as 256 colour not 32bit +EXTERN U32 dspl_SetBgdColour (U32 inColour); +EXTERN U32 dspl_GetBgdColour (void); +EXTERN U32 dspl_SetFgdColour (U32 inColour); +EXTERN U32 dspl_GetFgdColour (void); +GLOBAL void dspl_RestoreColour (void); +GLOBAL void dspl_InitColour (void); + +//Select a colour to contrast with another colour -used when the foreground and background colours are the same +int dspl_GetContrastColour( int ipCol); + +//Window types when displaying a bitmap +enum { + DSPL_WIN_NORMAL = 0, + DSPL_WIN_CENTRE, + DSPL_WIN_CLIP, + DSPL_WIN_CENTRE_CLIP, + DSPL_WIN_TILE, + DSPL_WIN_LAST +}; +//Draw win - create window with display area as specified +EXTERN UBYTE dspl_DrawWin ( USHORT in_PX, USHORT in_PY, + USHORT in_SX, USHORT in_SY, + int format, t_font_bitmap* bmp ); + +//Functions to allow us to limit where things are drawn - text/bitmaps outside the window are not drawn +GLOBAL UBYTE dspl_SetWindow(USHORT in_X1, + USHORT in_Y1, + USHORT in_X2, + USHORT in_Y2); +GLOBAL UBYTE dspl_GetWindow(USHORT* x1,USHORT* y1,USHORT* x2,USHORT* y2 ); +GLOBAL UBYTE dspl_ResetWindow( void ); //reset to full screen + + +//GW Added (temp) +typedef enum { + BMP_FORMAT_BW_PACKED = 0x00, + BMP_FORMAT_BW_UNPACKED = 0x01,/*MC, SPR1319*/ + BMP_FORMAT_256_COLOUR = 0x02, + BMP_FORMAT_32BIT_COLOUR = 0x03, + BMP_FORMAT_16BIT_LCD_COLOUR = 0x04, /* GW matches current LCD data format */ + BMP_FORMAT_16BIT_LCD_COMPRESSED_COLOUR = 0x05, /* GW matches future LCD data format */ + BMP_FORMAT_BW_2x4 = 0x0080, /* GW display bitmap scaled 2x width and 4x height */ + BMP_FORMAT_END + +} BMP_FORMAT_ENUM; + +#define SHOWBITMAP_NORMAL 0x0000 +#define SHOWBITMAP_INVERT 0x0001 +#define SHOWBITMAP_NORMAL_MASK 0x0001 +#define SHOWBITMAP_SCALE_2x4 0x0080 + +//Enumerated type for display (for MFW layout) +enum { + DSPL_BW = 0, + DSPL_COLOUR = 1, + DSPL_END +}; + +//Sept 15, 2005 REF: LOCOSTO-ENH-34257 - xpradipg +enum +{ + DSPL_ACCESS_ENABLE = 0, + DSPL_ACCESS_DISABLE , + DSPL_ACCESS_QUERY +}; + +#ifdef _SIMULATION_ +EXTERN void scrMobUpdate (void); +#endif +#ifdef FF_SSL_ADAPTATION +void dspl_set_to_mixed_mode(void); +void dspl_set_to_mmi_mode(void); +#endif + + +//xpradipg : New LCD API Migration +//New function added to control the refresh of the LCD, the earlier implement +//-ion of the global variable is moved inside this function and also adopted +//for the new LCD API migration +EXTERN int dspl_control(int state); + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/dti.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,453 @@ +/* ++----------------------------------------------------------------------------- +| Project : DTILIB +| Modul : DTI ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Definitions for the Data Transmission Interface, DTI. +| Includefile for every entity using DTILIB. ++----------------------------------------------------------------------------- +*/ +/* + * Version 1.6 + */ + +/**********************************************************************************/ + +/* NOTE: + * there is a MACRO definition for "interface" in objbase.h + * which says + * #define interface struct + * and thus would collide with the name "interface" + * as a quick fix, all "interface" have been changed to "interfac" + * in the dtilib project. This should not affect any external files + */ + +/**********************************************************************************/ + +#ifndef DTI_H +#define DTI_H + +/**********************************************************************************/ + +#if defined (DTI2) +/* + * Use SAP DTI2.DOC + */ +#include "P_DTI2.h" +#else +/* + * Make this code compatible to SAP dti.doc. + */ +#include "P_DTI.h" + +#define T_DTI2_DATA_IND T_DTI_DATA_IND +#define T_DTI2_DATA_REQ T_DTI_DATA_REQ +#define T_DTI2_READY_IND T_DTI_READY_IND +#define T_DTI2_GETDATA_REQ T_DTI_GETDATA_REQ +#define T_DTI2_DATA_TEST_REQ T_DTI_DATA_TEST_REQ +#define T_DTI2_DATA_TEST_IND T_DTI_DATA_TEST_IND + +/* + * By use the SAP DTI.DOC and the DTI2.DOC there could be double + * defines. So an undef is used. + */ + +#ifdef DTI2_DATA_IND + #undef DTI2_DATA_IND +#endif +#ifdef DTI2_DATA_REQ + #undef DTI2_DATA_REQ +#endif +#ifdef DTI2_READY_IND + #undef DTI2_READY_IND +#endif +#ifdef DTI2_GETDATA_REQ + #undef DTI2_GETDATA_REQ +#endif +#ifdef DTI2_DATA_TEST_REQ + #undef DTI2_DATA_TEST_REQ +#endif +#ifdef DTI2_DATA_TEST_IND + #undef DTI2_DATA_TEST_IND +#endif + +/* + * For calling the primitives over the macros. + */ +#define DTI2_DATA_IND DTI_DATA_IND +#define DTI2_DATA_REQ DTI_DATA_REQ +#define DTI2_READY_IND DTI_READY_IND +#define DTI2_GETDATA_REQ DTI_GETDATA_REQ +#define DTI2_DATA_TEST_REQ DTI_DATA_TEST_REQ +#define DTI2_DATA_TEST_IND DTI_DATA_TEST_IND + +/* + * Version related to DTI SAP 1. + */ + +#define T_desc2 T_desc +#define T_desc_list2 T_desc_list +#define desc_list2 desc_list + +#endif + +/********************************************************************************** + * Externally visible dtilib defines + **********************************************************************************/ +/* + * Reason parameter for the callback function + */ +#define DTI_NO_SIGNAL 0 /* No signal shall be sended */ +#define DTI_REASON_CONNECTION_OPENED 1 /* DTI connection opened or reseted */ +#define DTI_REASON_CONNECTION_CLOSED 2 /* DTI connection closed */ +#define DTI_REASON_DATA_RECEIVED 3 /* UL Data primitive received */ +#define DTI_REASON_TX_BUFFER_FULL 4 /* DTI send-queue full */ +#define DTI_REASON_TX_BUFFER_READY 5 /* DTI DTI send-queue no longer full */ + +/* + * Connection states + */ +#define DTI_CLOSED 0 /* DTI connection is not established */ +#define DTI_SETUP 1 /* Waiting for connection_opened signal from DTILIB */ +#define DTI_IDLE 2 /* DTI connection is opened */ + +/* + * dti_open - direction parameter + * + * to lower layer: send request primitives (_REQ / _CNF) + * to higher layer: send indications (_IND / _RES) + * null link: do not send anything + */ +#define DTI_CHANNEL_TO_HIGHER_LAYER 0x00 +#define DTI_CHANNEL_TO_LOWER_LAYER 0x01 +#define DTI_NULL_LINK 0x02 /* null link (null device) */ + +/* + * dti_open - link_options parameter + * + * the 0 is legacy from previous versions - upon reception of this value + * the queue-length parameter has to be used to find out about desired + * behaviour for the send queue + * #define FLOW_CNTRL_ENABLED 0 -- Flow control enabled + */ +#define DTI_FLOW_CNTRL_DISABLED 1 /* Flow control entirely disabled */ +/* + * Modes for handling of the send queue + * + * Queue is not used + */ +#define DTI_QUEUE_UNUSED 2 +/* + * Queue without size limitation + */ +#define DTI_QUEUE_UNBOUNDED 3 +/* + * Notify entity when queue is full, + * afterwards discard oldest piece of data upon arrival of new data packets + */ +#define DTI_QUEUE_RM_FIFO 4 +/* + * Notify entity when queue is full, + * afterwards discard newly arriving data packets + */ +#define DTI_QUEUE_RM_LIFO 5 +/* + * Notify entity when queue is full but keep all buffered data + */ +#define DTI_QUEUE_WATERMARK 6 + +/* + * dti_init - entity_options (flags!) + */ +#define DTI_DEFAULT_OPTIONS 0x0 +#define DTI_NO_TRACE (1<<0) + +/* + * Some parameter which are used for initialization. + */ +#define D_NO_DATA_BASE NULL +#define D_NO_INSTANCE 0xFF +#define D_NO_INTERFACE 0xFF +#define D_NO_CHANNEL_NR 0xFF + +/********************************************************************************** + * Obsolete dtilib defines + * + * NOTE: use of these defines is STRONGLY DISCOURAGED since their functionality + * is no longer needed and they will be removed some time in the future + * + **********************************************************************************/ + +/* + * NOTE: this is _obsolete_ and maintained only for compatibility reasons!! + * (see link_options parameter) + */ +#define DTI_QUEUE_DISABLED 0 /* Queue not used */ +#define DTI_QUEUE_UNLIMITED 255 /* Queue without limitations in size */ + +/* + * Home and neighbor entity. + * NOTE: this is _obsolete_ and maintained only for compatibility reasons!! + * instead use the defines + * DTI_CHANNEL_TO_HIGHER_LAYER and + * DTI_CHANNEL_TO_LOWER_LAYER + */ +#define HOME TRUE /* Indicate the entity or instance which send dti_connect_req */ +#define NEIGHBOR FALSE /* Indicate the entity or instance which send dti_connect_ind */ + +/* + * Type of the link + */ + +#define ENTITY_LINK 0x01 /* normal link with an entity */ +#define NULL_LINK 0x02 /* null link (null device) */ +#define RIVIERA_BT_LINK 0x03 /* link to BT riviera entity */ +#define RIVIERA_ATP_LINK 0x04 /* link to RNET riviera entity */ + +/* + * Communication type + * NOTE: this is _obsolete_ and maintained only for compatibility reasons!! + * (see link_options parameter) + */ +#define FLOW_CNTRL_ENABLED 0 /* Flow control enabled */ +#define FLOW_CNTRL_DISABLED 1 /* Flow control disabled */ + +/* + * Connection states + * NOTE: this is _obsolete_ and maintained only for compatibility reasons!! + * these states should be defined in the entities or the prefixec versiones + * above should be used + */ +#define CLOSED 0 /* DTI connection is not established */ +#define SETUP 1 /* Waiting for connection_opened signal from DTILIB */ +#define IDLE 2 /* DTI connection is opened */ + +/* + * Entity states for sending + * NOTE: this is _obsolete_ and maintained only for compatibility reasons!! + * these states should be defined in the entity itself + * to ensure proper prefixing + */ +#define TX_IDLE 3 /* The entity must not send data primitives (initial state) */ +#define TX_READY 4 /* The entity can send data primitives */ + +/* + * Entity states for receiving + * NOTE: this is _obsolete_ and maintained only for compatibility reasons!! + * these states should be defined in the entity itself + * to ensure proper prefixing + */ +#define RX_IDLE 5 /* Data reception stopped (initial state) */ +#define RX_READY 6 /* Ready to receive data */ + +#define ENTITY_NAME_LEN 0x6 + +#define MAX_ATP_LINKS 0x4 /* max. number of links towards the RIV/ATP environment, + set by AAA*/ +/* + * Value constants for capability + */ +#define DTI_CPBLTY_NO 0x0 /* used as initial value = no capabilities */ +#define DTI_CPBLTY_CMD 0x1 /* AT cmd capability */ +#define DTI_CPBLTY_PKT 0x2 /* packet capability */ +#define DTI_CPBLTY_SER 0x4 /* serial capability */ + +/********************************************************************************** + * typedefs + **********************************************************************************/ + +/* + * Data Base for each entity. + */ + +typedef struct +{ + T_HANDLE handle; /* GPF task handle */ + U8 max_links; /* Number of links in the link list + - started from the pointer first_link */ + U32 entity_options; /* user specified entity_options */ + void ((*sig_callback) /* Callback function */ + (U8 instance, /* Instance of the entity */ + U8 interfac, /* Interface of the entity */ + U8 channel, /* Channel */ + U8 reason, /* Reason for the callback */ + T_DTI2_DATA_IND *dti_data_ind)); /* Data primitive ul */ +#ifdef FF_TCP_IP + char* own_name; /* name of the own entity, held by AAA */ + U16 entity_id_p; /* entity id within ATP, the same for all + entities and AAA */ +#endif + U32 first_link; /* Pointer to link table */ +} DTI_DATA_BASE; + +typedef DTI_DATA_BASE * DTI_HANDLE; /* For calling the data base */ + + +/* + * Link Table, parameter for each DTI connection. + * For detail information - please see the MSC DTILIB.DOC + */ +typedef struct +{ + U32 link_id; /* Identity for the link communication */ + U8 direction; /* Direction for the link communication */ + U32 version; /* DTI Version */ + U8 instance; /* Instance of the entity */ + U8 interfac; /* Selected interface */ + U8 channel; /* Channel number */ + U32 link_options; /* type of flow control, queueing, .. */ + T_HANDLE link_handle; /* Handle for the communication channel */ + U8 queue_size; /* DTI queue size */ + U8 queue_len; /* length of the queue */ + T_DTI2_DATA_IND *dti_data_ind; /* DTI data primitive */ + U8 connect_state; /* State for connect */ + U8 rx_state; /* State for receive */ + U8 tx_state; /* State for send */ + U32 next_link; /* Pointer to next DTI_LINK struct, last */ + /* linkpointer = NULL */ + U8 link_type; /* indicate Riviera, NULL or GPF link */ +#ifdef FF_TCP_IP + U16 ul_next_atp_data; /* data to be got from ATP */ + U8 atp_tx_state; /* flow state of ATP */ + U8 dti_id; /* ACI identity for the link */ + DTI_DATA_BASE* entity_db; /* pointer back to home database */ + UINT16 port_nb; /* port number, if linked towards RIV */ +#endif + +} DTI_LINK; + +/********************************************************************************** + * Prototypes for DTILIB + **********************************************************************************/ + +EXTERN DTI_HANDLE dti_init( + U8 maximum_links, + T_HANDLE handle, + U32 entity_options, + void (sig_callback( + U8 instance, + U8 interfac, + U8 channel, + U8 reason, + T_DTI2_DATA_IND *dti_data_ind + ) ) + ); + +EXTERN void dti_deinit( DTI_HANDLE hDTI); + +EXTERN BOOL dti_open( + DTI_HANDLE hDTI, + U8 instance, + U8 interfac, + U8 channel, + U8 queue_size, + U8 direction, + U32 link_options, + U32 version, + U8 *neighbor_entity, + U32 link_id + ); + +EXTERN BOOL dti_resolve_link_id( + DTI_HANDLE hDTI, + U8 instance, + U8 interfac, + U8 channel, + U32 *link_id + ); + +EXTERN void dti_close( + DTI_HANDLE hDTI, + U8 instance, + U8 interfac, + U8 channel, + BOOL flush + ); + +EXTERN void dti_start( DTI_HANDLE hDTI, U8 instance, U8 interfac, U8 channel); + +EXTERN void dti_stop( DTI_HANDLE hDTI, U8 instance, U8 interfac, U8 channel); + +EXTERN void dti_send_data( + DTI_HANDLE hDTI, + U8 instance, + U8 interfac, + U8 channel, + T_DTI2_DATA_IND *dti_data_ind + ); + +EXTERN void mfree_desc(DTI_HANDLE hDTI, T_desc_list2 * desc_list2); + +EXTERN BOOL dti_tx_buffer_status( + DTI_HANDLE hDTI, + U8 instance, + U8 interfac, + U8 channel, + U8 *queue_len + ); + +/********************************************************************************** + * Functions in ip_kerp.c + **********************************************************************************/ + +#if defined (DTI2) +EXTERN GLOBAL void dti_dti_connect_req (DTI_HANDLE hDTI, + T_DTI2_CONNECT_REQ *dti_connect_req); + +EXTERN GLOBAL void dti_dti_disconnect_req (DTI_HANDLE hDTI, + T_DTI2_DISCONNECT_REQ *dti_disconnect_req); + +EXTERN GLOBAL void dti_dti_disconnect_ind (DTI_HANDLE hDTI, + T_DTI2_DISCONNECT_IND *dti_disconnect_ind); + +EXTERN GLOBAL void dti_dti_connect_cnf (DTI_HANDLE hDTI, + T_DTI2_CONNECT_CNF *dti_connect_cnf); + +EXTERN GLOBAL void dti_dti_connect_res (DTI_HANDLE hDTI, + T_DTI2_CONNECT_RES *dti_connect_res); + +EXTERN GLOBAL void dti_dti_connect_ind (DTI_HANDLE hDTI, + T_DTI2_CONNECT_IND *dti_connect_ind); +#endif + +EXTERN GLOBAL void dti_dti_ready_ind (DTI_HANDLE hDTI, + T_DTI2_READY_IND *dti_ready_ind); + +EXTERN GLOBAL void dti_dti_data_req (DTI_HANDLE hDTI, + T_DTI2_DATA_REQ *dti_data_req); + +EXTERN GLOBAL void dti_dti_getdata_req (DTI_HANDLE hDTI, + T_DTI2_GETDATA_REQ *dti_getdata_req); + +EXTERN GLOBAL void dti_dti_data_ind (DTI_HANDLE hDTI, + T_DTI2_DATA_IND *dti_data_ind); + +/********************************************************************************** + * Test functions used in the windows operating system. + **********************************************************************************/ + +#if defined (_SIMULATION_) +EXTERN void dti_dti_data_test_ind (DTI_HANDLE hDTI, + T_DTI2_DATA_TEST_IND *dti_data_test_ind); + +EXTERN void dti_dti_data_test_req (DTI_HANDLE hDTI, + T_DTI2_DATA_TEST_REQ *dti_data_test_req); + +EXTERN BOOL dti_make_new_desc (DTI_HANDLE hDTI, + T_desc2 **p_desc_new, + U16 malloc_len, + BOOL buff_init_0); + +#endif /* _SIMULATION_ */ +#endif /* DTI_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/em.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,487 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM (6301) +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Types definitions for the engineering mode driver +| . ++----------------------------------------------------------------------------- +*/ + +#ifndef EM_H +#define EM_H + + +/* + * Return Values + */ +#define EM_INVALID_CLASS 10 +#define EM_INVALID_SUBCLASS 11 +#define EM_INVALID_TYPE 12 +#define EM_INVALID_ACCESS 13 +#define EM_NO_MORE_DATA 14 +#define EM_DATA_NOT_AVAIL 15 + +#define MAX_EM_LENGTH 80 + +/* + * Data Types + */ +typedef struct +{ + UBYTE em_class; + UBYTE em_subclass; + UBYTE em_type; + UBYTE em_length; + UBYTE em_parameter [MAX_EM_LENGTH]; +} em_data_type; + +/* + * EM classes + */ + +#define EM_CLASS_EVENT_TRACE 1 +#define EM_CLASS_COUNTER 2 +#define EM_CLASS_INFRA_DATA 3 +#define EM_CLASS_MS_DATA 4 + +/* + * EM Subclasses Event Tracing / Counter + */ +#define EM_SUBCLASS_LAYER_1 1 +#define EM_SUBCLASS_DL 2 +#define EM_SUBCLASS_RR 3 +#define EM_SUBCLASS_MM 4 +#define EM_SUBCLASS_CC 5 +#define EM_SUBCLASS_SS 6 +#define EM_SUBCLASS_SMS 7 +#define EM_SUBCLASS_SIM 8 + + +/* + * EM Subclasses Infrastructure data + */ +#define EM_SUBCLASS_SC_INFO 9 +#define EM_SUBCLASS_NC_INFO 10 +#define EM_SUBCLASS_LUP_AND_PAG 12 +#define EM_SUBCLASS_PLMN_PARA 13 +#define EM_SUBCLASS_CIPH_HOP_DTX 14 + +/* + * EM Subclasses Mobile Data + */ +#define EM_SUBCLASS_POWER 15 +#define EM_SUBCLASS_IDENTITY 16 +#define EM_SUBCLASS_VERSION 17 + +/* + * EM types + */ + +typedef struct +{ + USHORT arfcn; /* channel number */ + SHORT c1; /* C1 Path Loss Criterion */ + SHORT c2; /* C2 Reselection Criterion */ + UBYTE rxlev; /* fieldstrength */ + UBYTE bsic; /* BSIC */ + UBYTE mcc[3]; /* Mobile Country Code */ + UBYTE mnc[3]; /* Mobile Network Code */ + USHORT lac; /* Location Area Code */ + USHORT cell_id; /* cell identifier */ + UBYTE cba; /* Cell barred access */ + UBYTE cbq; /* Cell barred qualify */ + UBYTE til_state; /* State of cell in TIL/ALR */ + UBYTE sync_cnt; /* Pending L1 cells sync */ + UBYTE bcch_cnt; /* Pending L1 cells bcch read */ + UBYTE rxlev_f; /* RSSI full in dedicated mode */ + UBYTE rxlev_s; /* RSSI sub in dedicated mode */ + UBYTE rxqual_f; /* Qual full in dedicated mode */ + UBYTE rxqual_s; /* Qual sub in dedicated mode */ +} T_EM_NC_DATA; + + +/* + * internal prototypes for em driver + */ +EXTERN void em_trace_single (UBYTE class, UBYTE subclass, UBYTE type); +EXTERN void em_trace_ubyte (UBYTE class, UBYTE subclass, UBYTE type, UBYTE value); +EXTERN void em_trace_ushort (UBYTE class, UBYTE subclass, UBYTE type, USHORT value); +EXTERN void em_trace_array (UBYTE class, UBYTE subclass, UBYTE type, UBYTE * value, UBYTE len); + +EXTERN UBYTE * em_get_sys_info (UBYTE sys_info_type); +EXTERN UBYTE em_get_nc_data (T_EM_NC_DATA * em_nc_data, UBYTE index); +EXTERN UBYTE em_get_network_meas (UBYTE * chan_list); +EXTERN UBYTE em_get_bcch_chan_list (em_data_type * out_em_data); +/* + * Access Functions + */ +#if defined (EM_TRACE) + +#define EM_EV_L1_TRACE(a) em_trace_single(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_LAYER_1,a); +#define EM_EV_L1_TRACE_UBYTE(a,b) em_trace_ubyte(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_LAYER_1,a,b); +#define EM_EV_L1_TRACE_USHORT(a,b) em_trace_ushort(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_LAYER_1,a,b); +#define EM_EV_L1_TRACE_ARRAY(a,b,c) em_trace_array(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_LAYER_1,a,b,c); + +#define EM_EV_DL_TRACE(a) em_trace_single(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_DL,a); +#define EM_EV_DL_TRACE_UBYTE(a,b) em_trace_ubyte(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_DL,a,b); +#define EM_EV_DL_TRACE_USHORT(a,b) em_trace_ushort(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_DL,a,b); +#define EM_EV_DL_TRACE_ARRAY(a,b,c) em_trace_array(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_DL,a,b,c); + +#define EM_EV_RR_TRACE(a) em_trace_single(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_RR,a); +#define EM_EV_RR_TRACE_UBYTE(a,b) em_trace_ubyte(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_RR,a,b); +#define EM_EV_RR_TRACE_USHORT(a,b) em_trace_ushort(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_RR,a,b); +#define EM_EV_RR_TRACE_ARRAY(a,b,c) em_trace_array(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_RR,a,b,c); + +#define EM_EV_MM_TRACE(a) em_trace_single(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_MM,a); +#define EM_EV_MM_TRACE_UBYTE(a,b) em_trace_ubyte(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_MM,a,b); +#define EM_EV_MM_TRACE_USHORT(a,b) em_trace_ushort(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_MM,a,b); +#define EM_EV_MM_TRACE_ARRAY(a,b,c) em_trace_array(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_MM,a,b,c); + +#else + +#define EM_EV_L1_TRACE(a) +#define EM_EV_L1_TRACE_UBYTE(a,b) +#define EM_EV_L1_TRACE_USHORT(a,b) +#define EM_EV_L1_TRACE_ARRAY(a,b,c) + +#define EM_EV_DL_TRACE(a) +#define EM_EV_DL_TRACE_UBYTE(a,b) +#define EM_EV_DL_TRACE_USHORT(a,b) +#define EM_EV_DL_TRACE_ARRAY(a,b,c) + +#define EM_EV_RR_TRACE(a) +#define EM_EV_RR_TRACE_UBYTE(a,b) +#define EM_EV_RR_TRACE_USHORT(a,b) +#define EM_EV_RR_TRACE_ARRAY(a,b,c) + +#define EM_EV_MM_TRACE(a) +#define EM_EV_MM_TRACE_UBYTE(a,b) +#define EM_EV_MM_TRACE_USHORT(a,b) +#define EM_EV_MM_TRACE_ARRAY(a,b,c) + +#endif + +/* + * Event trace, layer 1 + */ +#define EM_EV_L1_POWER_MEAS_REQ 1 +#define EM_EV_L1_RX_MEAS_REQ 2 +#define EM_EV_L1_RX_MEAS_CNF 3 +#define EM_EV_L1_POWER_MEAS_CNF 4 +#define EM_EV_L1_BSIC_REQ 5 +#define EM_EV_L1_BSIC_AVAIL 6 +#define EM_EV_L1_BSIC_NOT_AVAIL 7 +#define EM_EV_L1_BCCH_READ_ERR 8 +#define EM_EV_L1_CONFIG_CLASSMARK 9 +#define EM_EV_L1_CONFIG_IDLE_MODE 10 +#define EM_EV_L1_CONFIG_CBCH 11 +#define EM_EV_L1_CONFIG_NCELL 12 +#define EM_EV_L1_CHANGE_EXT_PAG 13 +#define EM_EV_L1_CHANGE_REORG_PAG 14 +#define EM_EV_L1_CHANGE_NORM_PAG 15 +#define EM_EV_L1_CHANGE_IDLE_BCCH 16 +#define EM_EV_L1_DOWNLINK_ERROR 17 +#define EM_EV_L1_PAGING_DETECTED 18 +#define EM_EV_L1_READ_NCELL_BSIC 19 +#define EM_EV_L1_NCELL_BSIC_AVAIL 20 +#define EM_EV_L1_NCELL_BSIC_NO_AVAIL 21 +#define EM_EV_L1_READ_NCELL_SB 22 +#define EM_EV_L1_NCELL_SB_AVAIL 23 +#define EM_EV_L1_NCELL_SB_NO_AVAIL 24 +#define EM_EV_L1_READ_NCELL_BCCH 25 +#define EM_EV_L1_NCELL_BCCH_AVAIL 26 +#define EM_EV_L1_NCELL_BCCH_NO_AVAIL 27 +#define EM_EV_L1_CONFIG_CELL_RESEL 28 +#define EM_EV_L1_START_CON_EST 29 +#define EM_EV_L1_CONFIG_IMM_ASS 30 +#define EM_EV_L1_STOP_CON_EST 31 +#define EM_EV_L1_CONFIG_CHN_ASS 32 +#define EM_EV_L1_CONFIG_ASYNC_HO 33 +#define EM_EV_L1_CONFIG_SYNC_HO 34 +#define EM_EV_L1_CONFIG_PRE_HO 35 +#define EM_EV_L1_CONFIG_PSEUDO_HO 36 +#define EM_EV_L1_CONFIG_FREQ_REDEF 37 +#define EM_EV_L1_CONFIG_CHN_MODIFY 38 +#define EM_EV_L1_CONFIG_CIPH_SET 39 +#define EM_EV_L1_START_CBCH_READ 40 +#define EM_EV_L1_RECEIVE_CBCH 41 +#define EM_EV_L1_CBCH_MSG_COMPLETE 42 +#define EM_EV_L1_STOP_CBCH_READ 43 +#define EM_EV_L1_RECEIVE_NULL 44 +#define EM_EV_L1_RECEIVE_SCHEDULE 45 +#define EM_EV_L1_CONFIG_TCH_LOOP 46 +#define EM_EV_L1_CONFIG_DAT 47 +#define EM_EV_L1_DEACTIVATE 48 + +/* + * Event trace, data link layer + */ +#define EM_EV_DL_SDCCH_EST_PASSED 1 +#define EM_EV_DL_SDCCH_EST_FAILED 2 +#define EM_EV_DL_FACCH_EST_PASSED 3 +#define EM_EV_DL_FACCH_EST_FAILED 4 +#define EM_EV_DL_SDCCH_3_EST_PASSED 5 +#define EM_EV_DL_SDCCH_3_EST_FAILED 6 +#define EM_EV_DL_SACCH_3_EST_PASSED 7 +#define EM_EV_DL_SACCH_3_EST_FAILED 8 +#define EM_EV_DL_SDCCH_REL 9 +#define EM_EV_DL_FACCH_REL 10 +#define EM_EV_DL_SDCCH_3_REL 11 +#define EM_EV_DL_FACCH_3_REL 12 +#define EM_EV_DL_SDCCH_SUSPEND 13 +#define EM_EV_DL_FACCH_SUSPEND 14 +#define EM_EV_DL_SDCCH_MINOR_ERR 15 +#define EM_EV_DL_FACCH_MINOR_ERR 16 +#define EM_EV_DL_SDCCH_3_MINOR_ERR 17 +#define EM_EV_DL_SACCH_3_MINOR_ERR 18 +#define EM_EV_DL_SDCCH_MAJOR_ERR 19 +#define EM_EV_DL_FACCH_MAJOR_ERR 20 +#define EM_EV_DL_SDCCH_3_MAJOR_ERR 21 +#define EM_EV_DL_SACCH_3_MAJOR_ERR 22 + + +/* + * Event trace, radio resource management + */ +#define EM_EV_RR_SRCH_LIM_STARTED 1 +#define EM_EV_RR_SRCH_LIM_PASSED 2 +#define EM_EV_RR_SRCH_LIM_FAILED 3 +#define EM_EV_RR_SRCH_FULL_START_MM 4 +#define EM_EV_RR_SRCH_FULL_START_RR 5 +#define EM_EV_RR_SRCH_FULL_PASSED 6 +#define EM_EV_RR_SRCH_FULL_FAILED 7 +#define EM_EV_RR_SRCH_HPLMN_START_RR 8 +#define EM_EV_RR_SRCH_HPLMN_PASSED 9 +#define EM_EV_RR_SRCH_HPLMN_FAILED 10 +#define EM_EV_RR_SRCH_PLMN_START 11 +#define EM_EV_RR_SRCH_PLMN_FINISHED 12 +#define EM_EV_RR_IDLE_NO_SERVICE 13 +#define EM_EV_RR_IDLE_LIM_SERVICE 14 +#define EM_EV_RR_IDLE_FULL_SERVICE 15 +#define EM_EV_RR_CELL_RESEL_START 16 +#define EM_EV_RR_CELL_RESEL_END 17 +#define EM_EV_RR_PAGING_DETECTED 18 +#define EM_EV_RR_DOWNLINK_FAILURE 19 +#define EM_EV_RR_CHANNEL_REQUEST 20 +#define EM_EV_RR_IMM_ASS 21 +#define EM_EV_RR_IMM_ASS_EXT 22 +#define EM_EV_RR_IMM_ASS_REJ 23 +#define EM_EV_RR_L2_CON_EST 24 +#define EM_EV_RR_EARLY_CLASS_SEND 25 +#define EM_EV_RR_CLASS_INTERROGATION 26 +#define EM_EV_RR_ASS 27 +#define EM_EV_RR_ASS_FAIL_REJ 28 +#define EM_EV_RR_ASS_FAIL_REC 29 +#define EM_EV_RR_ASS_FAIL_LOSS 30 +#define EM_EV_RR_ASS_COMPLETE 31 +#define EM_EV_RR_HO_ASYNC 32 +#define EM_EV_RR_HO_SYNC 33 +#define EM_EV_RR_HO_PRE_SYNC 34 +#define EM_EV_RR_HO_PSEUDO_SYNC 35 +#define EM_EV_RR_HO_FAIL_REJ 36 +#define EM_EV_RR_HO_FAIL_REC 37 +#define EM_EV_RR_HO_FAIL_LOSS 38 +#define EM_EV_RR_HO_COMPLETE 39 +#define EM_EV_RR_FREQ_REDEF 40 +#define EM_EV_RR_CIPH_SET 41 +#define EM_EV_RR_CHAN_MOD_START 42 +#define EM_EV_RR_CHAN_MOD_END 43 +#define EM_EV_RR_CHAN_RELEASE 44 +#define EM_EV_RR_RADIO_LINK_FAIL 45 +#define EM_EV_RR_LAYER_2_LOSS 46 +#define EM_EV_RR_STATUS_RECEIVED 47 +#define EM_EV_RR_STATUS_SEND 48 +#define EM_EV_RR_TCH_LOOP 49 +#define EM_EV_RR_TEST_INTERFACE 50 +#define EM_EV_RR_DEACTIVATION 51 + +/* + * Event trace, mobility management + */ +#define EM_EV_MM_SIM_INSERT 1 +#define EM_EV_MM_SIM_REMOVE 2 +#define EM_EV_MM_SET_PLMN_MODE 3 +#define EM_EV_MM_START_REG_LIM 4 +#define EM_EV_MM_START_REG_FULL 5 +#define EM_EV_MM_START_PLMN_AVAIL 6 +#define EM_EV_MM_CS_NO_SERVICE 7 +#define EM_EV_MM_CS_LIM_SERVICE 8 +#define EM_EV_MM_CS_FULL_SERVICE 9 +#define EM_EV_MM_CR_NO_SERVICE 10 +#define EM_EV_MM_CR_LIM_SERVICE 11 +#define EM_EV_MM_CR_FULL_SERVICE 12 +#define EM_EV_MM_RESULT_PLMN_LIST 13 +#define EM_EV_MM_IMSI_ATT_STARTED 14 +#define EM_EV_MM_RR_CON_ESTABLISHED 15 +#define EM_EV_MM_RR_CON_FAILED 16 +#define EM_EV_MM_LOC_UPD_ACCEPT 17 +#define EM_EV_MM_NORM_LUP_STARTED 18 +#define EM_EV_MM_PERI_LUP_STARTED 19 +#define EM_EV_MM_TMSI_REALLOC_START 20 +#define EM_EV_MM_TMSI_REALLOC_CMP 21 +#define EM_EV_MM_LOC_UPD_REJECT 22 +#define EM_EV_MM_IMSI_DETACH 23 +#define EM_EV_MM_ID_REQUEST 24 +#define EM_EV_MM_ID_RESPONSE 25 +#define EM_EV_MM_AUTH_REQUEST 26 +#define EM_EV_MM_AUTH_RESPONSE 27 +#define EM_EV_MM_AUTH_REJECT 28 +#define EM_EV_MM_CM_SERV_REQ_CC 29 +#define EM_EV_MM_CM_SERV_REQ_SS_SMS 30 +#define EM_EV_MM_CM_SERV_ACC_CIPH 31 +#define EM_EV_MM_CM_SERV_ACC_CMD 32 +#define EM_EV_MM_CM_SERV_REJECT 33 + +/* + * Infrastructure Data - Serving Cell Information + */ +#define EM_IN_SC_BCCH_ARFCN 1 +#define EM_IN_SC_C1 2 +#define EM_IN_SC_RX 3 +#define EM_IN_SC_BSIC 4 +#define EM_IN_SC_DLT 5 +#define EM_IN_SC_TX_POWER 6 +#define EM_IN_SC_TS 7 +#define EM_IN_SC_DEDI_ARFCN 8 +#define EM_IN_SC_DEDI_RX_FULL 9 +#define EM_IN_SC_DEDI_RX_SUB 10 +#define EM_IN_SC_DEDI_RLT 11 +#define EM_IN_SC_DEDI_TA 12 +#define EM_IN_SC_DEDI_QUAL_FULL 13 +#define EM_IN_SC_DEDI_QUAL_SUB 14 +#define EM_IN_SC_NMR_RAW 15 +#define EM_IN_SC_BCCH_LIST_RAW 16 +#define EM_IN_SC_C2 17 +#define EM_IN_SC_LAC 18 +#define EM_IN_SC_BA 19 +#define EM_IN_SC_BQ 20 +#define EM_IN_SC_TIL_STATE 21 + +/* + * Infrastructure Data - Neighbour Cell Information + */ +#define EM_IN_NC_NO_OF_NCELLS 1 +#define EM_IN_NC_BCCH_1 2 +#define EM_IN_NC_BCCH_2 3 +#define EM_IN_NC_BCCH_3 4 +#define EM_IN_NC_BCCH_4 5 +#define EM_IN_NC_BCCH_5 6 +#define EM_IN_NC_BCCH_6 7 +#define EM_IN_NC_RX_1 8 +#define EM_IN_NC_RX_2 9 +#define EM_IN_NC_RX_3 10 +#define EM_IN_NC_RX_4 11 +#define EM_IN_NC_RX_5 12 +#define EM_IN_NC_RX_6 13 +#define EM_IN_NC_C1_1 14 +#define EM_IN_NC_C1_2 15 +#define EM_IN_NC_C1_3 16 +#define EM_IN_NC_C1_4 17 +#define EM_IN_NC_C1_5 18 +#define EM_IN_NC_C1_6 19 +#define EM_IN_NC_BSIC_1 20 +#define EM_IN_NC_BSIC_2 21 +#define EM_IN_NC_BSIC_3 22 +#define EM_IN_NC_BSIC_4 23 +#define EM_IN_NC_BSIC_5 24 +#define EM_IN_NC_BSIC_6 25 +#define EM_IN_NC_CID_1 26 +#define EM_IN_NC_CID_2 27 +#define EM_IN_NC_CID_3 28 +#define EM_IN_NC_CID_4 29 +#define EM_IN_NC_CID_5 30 +#define EM_IN_NC_CID_6 31 +#define EM_IN_NC_FN_OFFSET_1 32 +#define EM_IN_NC_FN_OFFSET_2 33 +#define EM_IN_NC_FN_OFFSET_3 34 +#define EM_IN_NC_FN_OFFSET_4 35 +#define EM_IN_NC_FN_OFFSET_5 36 +#define EM_IN_NC_FN_OFFSET_6 37 +#define EM_IN_NC_TA_OFFSET_1 38 +#define EM_IN_NC_TA_OFFSET_2 39 +#define EM_IN_NC_TA_OFFSET_3 40 +#define EM_IN_NC_TA_OFFSET_4 41 +#define EM_IN_NC_TA_OFFSET_5 42 +#define EM_IN_NC_TA_OFFSET_6 43 +#define EM_IN_NC_C2_1 44 +#define EM_IN_NC_C2_2 45 +#define EM_IN_NC_C2_3 46 +#define EM_IN_NC_C2_4 47 +#define EM_IN_NC_C2_5 48 +#define EM_IN_NC_C2_6 49 +#define EM_IN_NC_LAC_1 50 +#define EM_IN_NC_LAC_2 51 +#define EM_IN_NC_LAC_3 52 +#define EM_IN_NC_LAC_4 53 +#define EM_IN_NC_LAC_5 54 +#define EM_IN_NC_LAC_6 55 +#define EM_IN_NC_BA_1 56 +#define EM_IN_NC_BA_2 57 +#define EM_IN_NC_BA_3 58 +#define EM_IN_NC_BA_4 59 +#define EM_IN_NC_BA_5 60 +#define EM_IN_NC_BA_6 61 +#define EM_IN_NC_BQ_1 62 +#define EM_IN_NC_BQ_2 63 +#define EM_IN_NC_BQ_3 64 +#define EM_IN_NC_BQ_4 65 +#define EM_IN_NC_BQ_5 66 +#define EM_IN_NC_BQ_6 67 +#define EM_IN_NC_TIL_STATE_1 68 +#define EM_IN_NC_TIL_STATE_2 69 +#define EM_IN_NC_TIL_STATE_3 70 +#define EM_IN_NC_TIL_STATE_4 71 +#define EM_IN_NC_TIL_STATE_5 72 +#define EM_IN_NC_TIL_STATE_6 73 +#define EM_IN_NC_TIL_SYNC_CNT 74 +#define EM_IN_NC_TIL_BCCH_CNT 75 + +/* + * Infrastructure Data - Location and Paging Parameter + */ +#define EM_IN_LP_BS_PA_MFRMS 1 +#define EM_IN_LP_T3212 2 +#define EM_IN_LP_MCC 3 +#define EM_IN_LP_MNC 4 +#define EM_IN_LP_LAC 5 +#define EM_IN_LP_TMSI 6 +#define EM_IN_LP_LAC_RAW 7 +#define EM_IN_LP_CI_RAW 8 + +#if defined (NEW_FRAME) +/* + * to achieve backward compatibility with older definitions + */ +#define drv_SignalCB_Type T_DRV_CB_FUNC +#define drv_SignalID_Type T_DRV_SIGNAL +#define T_VSI_THANDLE USHORT +#endif + +/* + * Prototypes + */ +#ifndef FF_EM_MODE +EXTERN UBYTE em_Init (void); +EXTERN void em_Exit (void); +#endif /* FF_EM_MODE */ +EXTERN UBYTE em_Read_Parameter (UBYTE em_class, + UBYTE em_subclass, + UBYTE em_type, + em_data_type * out_em_data); +EXTERN UBYTE em_Enable_Post_Mortem (void); +EXTERN UBYTE em_Disable_Post_Mortem (void); +EXTERN UBYTE em_Read_Post_Mortem (em_data_type * out_em_data); + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/ffs_coat.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,218 @@ +/* ++----------------------------------------------------------------------------- +| Modul : ffs_coat ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Encapsulate the FFS API. ++----------------------------------------------------------------------------- +*/ + +#ifndef FFS_COAT_H +#define FFS_COAT_H + +#if defined(_TMS470) +#define FFS_COAT_ENABLED +#endif /* _TMS470 */ + +#undef FFS_COAT_ENABLED + +#if defined(FFS_COAT_ENABLED) +#ifdef TI_PS_HCOMM_CHANGE +#define FFS_open(path,flags) _FFS_open(path,flags,_hCommMMI,__FILE__,__LINE__) +#define FFS_write(fd,p,size) _FFS_write(fd,p,size,_hCommMMI,__FILE__,__LINE__) +#define FFS_read(fd,p,size) _FFS_read(fd,p,size,_hCommMMI,__FILE__,__LINE__) +#define FFS_seek(fd,off,whence) _FFS_seek(fd,off,whence,_hCommMMI,__FILE__,__LINE__) +#define FFS_opendir(path,dir) _FFS_opendir(path,dir,_hCommMMI,__FILE__,__LINE__) +#define FFS_readdir(dir,p,size) _FFS_readdir(dir,p,size,_hCommMMI,__FILE__,__LINE__) +#define FFS_readlink(path,p,size) _FFS_readlink(path,p,size,_hCommMMI,__FILE__,__LINE__) +#define FFS_file_read(path,p,size) _FFS_file_read(path,p,size,_hCommMMI,__FILE__,__LINE__) +#define FFS_fread(path,p,size) _FFS_fread(path,p,size,_hCommMMI,__FILE__,__LINE__) + +/* FFS functions which return a value EFFS_OK if OK */ +#define FFS_preformat(magic) _FFS_preformat(magic,_hCommMMI,__FILE__,__LINE__) +#define FFS_format(name,magic) _FFS_format(name,magic,_hCommMMI,__FILE__,__LINE__) +#define FFS_close(fd) _FFS_close(fd,_hCommMMI,__FILE__,__LINE__) +#define FFS_truncate(path,length) _FFS_truncate(path,length,_hCommMMI,__FILE__,__LINE__) +#define FFS_ftruncate(fd,length) _FFS_ftruncate(fd,length,_hCommMMI,__FILE__,__LINE__) +#define FFS_fdatasync(fd) _FFS_fdatasync(fd,_hCommMMI,__FILE__,__LINE__) +#define FFS_stat(name,stat) _FFS_stat(name,stat,_hCommMMI,__FILE__,__LINE__) +#define FFS_fstat(fd,stat) _FFS_fstat(fd,stat,_hCommMMI,__FILE__,__LINE__) +#define FFS_lstat(name,stat) _FFS_lstat(name,stat,_hCommMMI,__FILE__,__LINE__) +#define FFS_linkstat(name,stat) _FFS_linkstat(name,stat,_hCommMMI,__FILE__,__LINE__) +#define FFS_xlstat(name,stat) _FFS_xlstat(name,stat,_hCommMMI,__FILE__,__LINE__) +#define FFS_remove(name) _FFS_remove(name,_hCommMMI,__FILE__,__LINE__) +#define FFS_mkdir(path) _FFS_mkdir(path,_hCommMMI,__FILE__,__LINE__) +#define FFS_symlink(name,path) _FFS_symlink(name,path,_hCommMMI,__FILE__,__LINE__) +#define FFS_rename(oldname,newname) _FFS_rename(oldname,newname,_hCommMMI,__FILE__,__LINE__) +#define FFS_file_write(name,addr,size,flags) _FFS_file_write(name,addr,size,flags,_hCommMMI,__FILE__,__LINE__) +#define FFS_fcreate(path,p,size) _FFS_fcreate(path,p,size,_hCommMMI,__FILE__,__LINE__) +#define FFS_fupdate(name,addr,size) _FFS_fupdate(name,addr,size,_hCommMMI,__FILE__,__LINE__) +#define FFS_fwrite(path,p,size) _FFS_fwrite(path,p,size,_hCommMMI,__FILE__,__LINE__) +#define FFS_fcontrol(path,type,param) _FFS_fcontrol(path,type,param,_hCommMMI,__FILE__,__LINE__) +#define FFS_query(query,p) _FFS_query(query,p,_hCommMMI,__FILE__,__LINE__) +/* FFS functions whose positive return value has a meaning */ +#else +#define FFS_open(path,flags) _FFS_open(path,flags,hCommMMI,__FILE__,__LINE__) +#define FFS_write(fd,p,size) _FFS_write(fd,p,size,hCommMMI,__FILE__,__LINE__) +#define FFS_read(fd,p,size) _FFS_read(fd,p,size,hCommMMI,__FILE__,__LINE__) +#define FFS_seek(fd,off,whence) _FFS_seek(fd,off,whence,hCommMMI,__FILE__,__LINE__) +#define FFS_opendir(path,dir) _FFS_opendir(path,dir,hCommMMI,__FILE__,__LINE__) +#define FFS_readdir(dir,p,size) _FFS_readdir(dir,p,size,hCommMMI,__FILE__,__LINE__) +#define FFS_readlink(path,p,size) _FFS_readlink(path,p,size,hCommMMI,__FILE__,__LINE__) +#define FFS_file_read(path,p,size) _FFS_file_read(path,p,size,hCommMMI,__FILE__,__LINE__) +#define FFS_fread(path,p,size) _FFS_fread(path,p,size,hCommMMI,__FILE__,__LINE__) + +/* FFS functions which return a value EFFS_OK if OK */ +#define FFS_preformat(magic) _FFS_preformat(magic,hCommMMI,__FILE__,__LINE__) +#define FFS_format(name,magic) _FFS_format(name,magic,hCommMMI,__FILE__,__LINE__) +#define FFS_close(fd) _FFS_close(fd,hCommMMI,__FILE__,__LINE__) +#define FFS_truncate(path,length) _FFS_truncate(path,length,hCommMMI,__FILE__,__LINE__) +#define FFS_ftruncate(fd,length) _FFS_ftruncate(fd,length,hCommMMI,__FILE__,__LINE__) +#define FFS_fdatasync(fd) _FFS_fdatasync(fd,hCommMMI,__FILE__,__LINE__) +#define FFS_stat(name,stat) _FFS_stat(name,stat,hCommMMI,__FILE__,__LINE__) +#define FFS_fstat(fd,stat) _FFS_fstat(fd,stat,hCommMMI,__FILE__,__LINE__) +#define FFS_lstat(name,stat) _FFS_lstat(name,stat,hCommMMI,__FILE__,__LINE__) +#define FFS_linkstat(name,stat) _FFS_linkstat(name,stat,hCommMMI,__FILE__,__LINE__) +#define FFS_xlstat(name,stat) _FFS_xlstat(name,stat,hCommMMI,__FILE__,__LINE__) +#define FFS_remove(name) _FFS_remove(name,hCommMMI,__FILE__,__LINE__) +#define FFS_mkdir(path) _FFS_mkdir(path,hCommMMI,__FILE__,__LINE__) +#define FFS_symlink(name,path) _FFS_symlink(name,path,hCommMMI,__FILE__,__LINE__) +#define FFS_rename(oldname,newname) _FFS_rename(oldname,newname,hCommMMI,__FILE__,__LINE__) +#define FFS_file_write(name,addr,size,flags) _FFS_file_write(name,addr,size,flags,hCommMMI,__FILE__,__LINE__) +#define FFS_fcreate(path,p,size) _FFS_fcreate(path,p,size,hCommMMI,__FILE__,__LINE__) +#define FFS_fupdate(name,addr,size) _FFS_fupdate(name,addr,size,hCommMMI,__FILE__,__LINE__) +#define FFS_fwrite(path,p,size) _FFS_fwrite(path,p,size,hCommMMI,__FILE__,__LINE__) +#define FFS_fcontrol(path,type,param) _FFS_fcontrol(path,type,param,hCommMMI,__FILE__,__LINE__) +#define FFS_query(query,p) _FFS_query(query,p,hCommMMI,__FILE__,__LINE__) +#endif +/* prototypes */ +T_FFS_FD _FFS_open(const char *name, T_FFS_OPEN_FLAGS option, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_SIZE _FFS_write(T_FFS_FD fdi, void *src, T_FFS_SIZE amount, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_SIZE _FFS_read(T_FFS_FD fdi, void *src, T_FFS_SIZE size, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_SIZE _FFS_seek(T_FFS_FD fdi, T_FFS_SIZE offset, T_FFS_WHENCE whence, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_SIZE _FFS_opendir(const char *name, T_FFS_DIR *dir, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_SIZE _FFS_readdir (T_FFS_DIR *dir, char *name, T_FFS_SIZE size, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_SIZE _FFS_readlink(const char *name, char *addr, T_FFS_SIZE size, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_SIZE _FFS_file_read(const char *name, void *addr, T_FFS_SIZE size, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_SIZE _FFS_fread(const char *name, void *addr, T_FFS_SIZE size, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_preformat(UINT16 magic, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_format(const char *name, UINT16 magic, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_close(T_FFS_FD fdi, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_truncate(const char *path, T_FFS_OFFSET length, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_ftruncate(T_FFS_FD fdi, T_FFS_OFFSET length, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_fdatasync(T_FFS_FD fdi, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_stat(const char *name, T_FFS_STAT *stat, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_fstat(T_FFS_FD fdi, T_FFS_STAT *stat, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_lstat(const char *name, T_FFS_STAT *stat, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_xlstat(const char *name, T_FFS_XSTAT *stat, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_linkstat(const char *name, T_FFS_STAT *stat, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_remove(const char *name, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_mkdir(const char *name, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_symlink(const char *name, const char *actualpath, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_rename(const char *oldname, const char *newname, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_file_write(const char *name, void *addr, T_FFS_SIZE size, + T_FFS_OPEN_FLAGS flags, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_fcreate(const char *name, void *addr, T_FFS_SIZE size, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_fupdate(const char *name, void *addr, T_FFS_SIZE size, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_fwrite(const char *name, void *addr, T_FFS_SIZE size, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_fcontrol(const char *pathname, INT8 action, int param, + T_HANDLE hMMI, const char * const file, int line); +T_FFS_RET _FFS_query(INT8 query, void *p, + T_HANDLE hMMI, const char * const file, int line); +#else /* FFS_COAT_ENABLED */ +/* FFS functions whose positive return value has a meaning */ +#define FFS_open(path,flags) ffs_open(path,flags) +#define FFS_write(fd,p,size) ffs_write(fd,p,size) +#define FFS_read(fd,p,size) ffs_read(fd,p,size) +#define FFS_seek(fd,off,whence) ffs_seek(fd,off,whence) +#define FFS_opendir(path,dir) ffs_opendir(path,dir) +#define FFS_readdir(dir,p,size) ffs_readdir(dir,p,size) +#define FFS_readlink(path,p,size) ffs_readlink(path,p,size) +#define FFS_file_read(path,p,size) ffs_file_read(path,p,size) +#define FFS_fread(path,p,size) ffs_fread(path,p,size) + +/* FFS functions which return a value EFFS_OK if OK */ +#define FFS_preformat(magic) ffs_preformat(magic) +#define FFS_format(name,magic) ffs_format(name,magic) +#define FFS_close(fd) ffs_close(fd) +#define FFS_truncate(path,length) ffs_truncate(path,length) +#define FFS_ftruncate(fd,length) ffs_ftruncate(fd,length) +#define FFS_fdatasync(fd) ffs_fdatasync(fd) +#define FFS_stat(name,stat) ffs_stat(name,stat) +#define FFS_fstat(fd,stat) ffs_fstat(fd,stat) +#define FFS_lstat(name,stat) ffs_lstat(name,stat) +#define FFS_linkstat(name,stat) ffs_linkstat(name,stat) +#define FFS_xlstat(name,stat) ffs_xlstat(name,stat) +#define FFS_remove(name) ffs_remove(name) +#define FFS_mkdir(path) ffs_mkdir(path) +#define FFS_symlink(name,path) ffs_symlink(name,path) +#define FFS_rename(oldname,newname) ffs_rename(oldname,newname) +#define FFS_file_write(name,addr,size,flags) ffs_file_write(name,addr,size,flags) +#define FFS_fcreate(path,p,size) ffs_fcreate(path,p,size) +#define FFS_fupdate(name,addr,size) ffs_fupdate(name,addr,size) +#define FFS_fwrite(path,p,size) ffs_fwrite(path,p,size) +#define FFS_fcontrol(path,type,param) ffs_fcontrol(path,type,param) +#define FFS_query(query,p) ffs_query(query,p) +#endif /* FFS_COAT_ENABLED */ + +#define FFS_Check(fct) _FFS_StateCheck(fct,hMMI,__FILE__,__LINE__) + +GLOBAL T_FFS_RET _FFS_StateCheck (const char * const fct, + T_HANDLE hMMI, const char * const file, int line); + +#if !defined(SYST_TRACE) +#if defined(NEW_FRAME) +#define SYST_TRACE(a) vsi_o_ttrace(0, 0xFFFF,a) +#define SYST 0, 0xffff +#define SYST_TRACE_P(a) vsi_o_ttrace a +#else +#define SYST_TRACE(a) vsi_o_trace("", 0xFFFF,a) +#define SYST "", 0xffff +#define SYST_TRACE_P(a) vsi_o_trace a +#endif +/* + * use it as showed next line... + * SYST_TRACE_P((SYST, "e.g. two parameter: %d %d", p1, p2)); + */ +#endif /* !SYST_TRACE */ + +#endif /* !FFS_COAT_H */ +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/font_bitmaps.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,62 @@ +/* ++----------------------------------------------------------------------------- +| Project : +| Modul : display ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : ++----------------------------------------------------------------------------- +*/ +#ifndef FONT_BITMAPS_H +#define FONT_BITMAPS_H + + +typedef struct{ + +USHORT code; +UBYTE format; +UBYTE height; +UBYTE width; +UBYTE bitmapSize; +char* bitmap; +}t_font_bitmap; + +enum { + /*---------------------------USE VALUES BETWEEN -1 TO 254------------------------------*/ + NO_FONT=-1, +//Currently we only support this font for smaller displays +#ifndef LSCREEN + DEFAULT_8x6=0, +#endif +//We need only support this font on larger displays +#ifdef LSCREEN + CHANTICLE_PROP15 = 1, +#if 0 //Using Arial-type may be problematic - disable + ARIAL_PROP15 = 2, +#endif + +#endif + LAST_FONT + /*---------------------------USE VALUES BETWEEN -1 TO 254-------------------------------*/ +}; + + +t_font_bitmap* get_bitmap(USHORT selected_code); +USHORT font_setFont(USHORT font); +USHORT font_getFont(void); +USHORT font_getCharWidth(USHORT selected_code); +void font_initFont( int defaultFont ); +/* SPR#1983 - SH - Get list of all ascii font widths in array */ +void font_getAllAsciiWidths(UBYTE *width); + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/gsm.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,598 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM-PS (6147) +| Modul : GSM ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Definition of global constants, types, and macros +| for the GSM Protocol Stack ++----------------------------------------------------------------------------- +*/ + +#ifndef GSM_H +#define GSM_H + +#ifndef CCONST_CDG +#include "mconst.cdg" /* MAX_BITSTREAM_LEN */ +#endif /* CCONST_CDG */ +#ifndef PCONST_CDG +#include "pconst.cdg" /* MAX_PSTRUCT_LEN */ +#endif /* PCONST_CDG */ + +/*==== CONSTANTS ==================================================*/ + +#define MAX_2_PRM 1 +#define MAX_4_PRM 3 +#define MAX_8_PRM 7 +#define MAX_16_PRM 15 +#define MAX_32_PRM 31 + +#define PRM_MASK 0x00FF /* protocol primitive mask*/ +#define OPC_MASK 0xFF00 /* entity mask */ +#define SYS_MASK 0x8000 /* system primitive mask */ + +#define SYS_CONFIG_REQ 0xF000 + +#define L3_CODING_OFFSET 32 /* coding offset in bits */ + +/* + * Not Present Value + */ + +#define NOT_PRESENT_8BIT 0xFF +#define NOT_PRESENT_CHAR (CHAR)0xFF +#define NOT_PRESENT_16BIT 0xFFFF +#define NOT_PRESENT_32BIT 0xFFFFFFFFL +#define INVALID_ADDRESS 0xFFFFFFFFL +#define SET_NOT_PRESENT(A) ((A) = ((sizeof ((A)) EQ 1)\ + ? NOT_PRESENT_8BIT\ + : (sizeof ((A)) EQ 2)\ + ? NOT_PRESENT_16BIT\ + : NOT_PRESENT_32BIT)) + +#define IS_PRESENT(A) ((A) NEQ ((sizeof ((A)) EQ 1)\ + ? NOT_PRESENT_8BIT\ + : (sizeof ((A)) EQ 2)\ + ? NOT_PRESENT_16BIT\ + : NOT_PRESENT_32BIT)) /* VK 09-12-96 */ + +#ifndef NEW_FRAME +/* + * Static Configurations + */ + +#ifndef TC_FUNC +#define TC_FUNC 1 +#endif + +#ifdef TRACE_FKT +#define TRACE_FUNCTION(a) vsi_o_trace(VSI_CALLER TC_FUNC,a); +#else +// China change HM 6.07.00, one of this commented out +#define TRACE_FUNCTION(a) +//#define TRACE_FUNCTION(a) vsi_o_mtrace(a); +#endif + +#ifndef TC_EVE +#define TC_EVE 2 +#endif + +#ifdef TRACE_EVE +#define TRACE_EVENT(a) vsi_o_trace(VSI_CALLER TC_EVENT,a); +#else +#define TRACE_EVENT(a) +#endif + +#ifndef TC_ERROR +#define TC_ERROR 4 +#endif +#ifdef TRACE_ERR +#define TRACE_ERROR(a) vsi_o_trace(VSI_CALLER TC_ERROR,a); +#else +#define TRACE_ERROR(a) +#endif + +#ifndef TC_PRIM +#define TC_PRIM 8 +#endif + +#ifdef TRACE_PRIM +#define TRACE_PRIMITIVE(a) vsi_o_trace(VSI_CALLER TC_PRIM,a); +#else +#define TRACE_PRIMITIVE(a) +#endif + +#ifndef TC_SYSTEM +#define TC_SYSTEM 16 +#endif + + /* + * Assert wrapper + */ + +#if defined NDEBUG + #define TRACE_ASSERT(e) ((void)0) +#else + #ifdef SHARED_VSI + #define TRACE_ASSERT(e) if ( !(e) ) vsi_o_assert("",#e,__FILE__,__LINE__) + #else + #define TRACE_ASSERT(e) if ( !(e) ) vsi_o_assert(#e,__FILE__,__LINE__) + #endif +#endif + +#ifdef assert + #undef assert +#endif + #define assert TRACE_ASSERT + +#endif /* NEW_FRAME */ + +/* + * Memory Management(I) + */ + +#ifdef OPTION_REF +#define FREE_BUFFER(p) vsi_c_free(VSI_CALLER (void **)&p) +/*lint -e773 Expression-like macro not parenthesized*/ +#define NEW_BUFFER(p,s) T_PRIM *p = vsi_c_new(VSI_CALLER (T_VSI_CSIZE)((s)+sizeof(T_PRIM_HEADER))) +/*lint +e773*/ +#else +#define FREE_BUFFER(p) +#define NEW_BUFFER(p,s) UBYTE buf_##p [(s)+sizeof(T_PRIM_HEADER)]; T_PRIM *p=(T_PRIM*)p1 +#endif + +#if !defined (_TMS470) +#define Sprintf sprintf +#else +int sprintf( char *buffer, const char *format, ... ); +#endif + +#ifndef NEW_FRAME + +#ifdef _TMS470 + #define SET_PRIM_OPCODE(P,O) P->custom.opc = O; P->custom.opc2 = 0 +#else + #define SET_PRIM_OPCODE(P,O) P->custom.opc = O +#endif + +#ifdef OPTION_LENGTH + #define SEND_PRIM(E,P,O,T) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, sizeof(T_PRIM_HEADER) + sizeof (T)) + #define SEND_PRIM_0(E,P,O) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, sizeof(T_PRIM_HEADER)) + #define SEND_PRIM_SDU(E,P,O,T,L) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, (T_VSI_CSIZE) (sizeof(T_PRIM_HEADER) + sizeof (T) + (L) - SDU_TRAIL)) +#else + #define SEND_PRIM(E,P,O,T) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, sizeof(T_PRIM_HEADER) + sizeof (T)) + #define SEND_PRIM_0(E,P,O) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, sizeof(T_PRIM_HEADER)) + #define SEND_PRIM_SDU(E,P,O,T,L) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, (T_VSI_CSIZE) (sizeof(T_PRIM_HEADER) + sizeof (T) + (L) - SDU_TRAIL)) +#endif + +#endif /* NEW_FRAME */ +/* + * declares a pointer variable (D) of the type T + * and initialize it with the startaddress of the data part + * of the primitive P + */ +#ifndef ALLOC_CHECK + #if defined (_TMS470) AND defined (NWARN) + #define PRIM_ACCESS(P,S) &P->data + #else + #define PRIM_ACCESS(P,S) P->data + #endif +#else + #define PRIM_ACCESS(P,S) vsi_c_access(VSI_CALLER P,S) +#endif +/*lint -e773 Expression-like macro not parenthesized*/ +#define PRIM_CAST(P,D,T) T *D = (T *) PRIM_ACCESS (P, sizeof (T)) +/*lint +e773*/ +/* + * declares a pointer variable (D) of the type T and + * initialize it with the start address of the global declared + * buffer _decodedMsg[] wich contains the decoded message + * structure before encoding or after decoding the message + * with CCD. + */ +/*lint -e773 Expression-like macro not parenthesized*/ +#define MSG_CAST(D,T) T *D = (T *) _decodedMsg +/*lint +e773*/ +/* + * Memory Management(II) + */ + +#ifndef NEW_FRAME + +#if defined (_TMS470) AND defined (NWARN) +#define P2D(P) (&(P)->data) +#else +#define P2D(P) ((P)->data) +#endif +#define D2P(D) ((T_PRIM*)((T_PRIM_HEADER*)(D)-1)) + +#ifdef ALLOC_CHECK +#define P2D_AC(P,T) PRIM_ACCESS(P,sizeof(T)) +#else +#define P2D_AC(P,T) P2D(P) +#endif + +#define PRIM_TO_DATA P2D +#define DATA_TO_PRIM D2P + +#define P_OPC(P) (P)->custom.opc +#define P_OPC2(P) (P)->custom.opc2 +#define P_LEN(P) (P)->custom.len +#define P_TID(P) (P)->custom.tid +#define P_SDU(P) (P)->custom.sdu + +#define D_OPC(D) P_OPC(D2P(D)) +#define D_OPC2(D) P_OPC2(D2P(D)) +#define D_LEN(D) P_LEN(D2P(D)) +#define D_TID(D) P_TID(D2P(D)) +#define D_SDU(D) P_SDU(D2P(D)) + +#define D_SDU_LEN(D) D_SDU(D)->l_buf +#define D_SDU_OFF(D) D_SDU(D)->o_buf + +#define BITS_PER_BYTE 8 +#define BYTELEN(BITLEN) ((BITLEN)<=0?0:((((BITLEN)-1)/BITS_PER_BYTE)+1)) + +#define PRIM_SIZE(D) (sizeof(T_PRIM_HEADER)+sizeof(*(D))) +#define PRIM_SIZE_SDU(D) (PRIM_SIZE(D)+BYTELEN((D)->sdu.o_buf+(D)->sdu.l_buf)) + +#define PSIZE(D) (D_LEN(D)+((D_SDU(D)==0)?0:(BYTELEN(D_SDU_LEN(D)+D_SDU_OFF(D))-SDU_TRAIL))) + +#define SIZ(T) (sizeof(T_PRIM_HEADER)+sizeof(T)) + +#define SIZ_SDU(T,M) (SIZ(T)+BYTELEN((M)+ENCODE_OFFSET)-SDU_TRAIL) + +#define P_ALL(T) (T_PRIM *) vsi_c_new(VSI_CALLER (T_VSI_CSIZE)SIZ(T) ) +#define P_ALL_SDU(T,M) (T_PRIM *) vsi_c_new(VSI_CALLER (T_VSI_CSIZE)SIZ_SDU(T,M)) + +#endif /* NEW_FRAME */ + +#define OFFSETOF(P,C) ((char*)&(P->C) - (char*)P) + +#ifdef NTRACE + #define xxxNotify(A,B,C,D,E) +#else + #define xxxNotify(A,B,C,D,E) /* not used yet */ +#endif + + +#define ACT_PALLOC 0x01 +#define ACT_PALLOC_SDU 0x02 +#define ACT_PALLOC_MSG 0x03 +#define ACT_PREUSE 0x04 +#define ACT_PREUSE_SDU 0x05 +#define ACT_PREUSE_MSG 0x06 +#define ACT_PFREE 0x07 +#define ACT_PSEND 0x08 +#define ACT_PSTORE 0x09 +#define ACT_PRETRIEVE 0x0A +#define ACT_PACCESS 0x0B +#define ACT_PPASS 0x0C +#define ACT_PCAST 0x0D + +/*** memory alloction ***/ + + +#ifndef NEW_FRAME + +#define PSENDX PSEND + +#define PALLOC(D,T) T_##T *D = (T_##T*)P2D(P_ALL(T_##T));\ + D_OPC(D) = (T);\ + D_OPC2(D) = 0;\ + D_LEN(D) = SIZ(T_##T);\ + D_SDU(D) = 0;\ + xxxNotify(ACT_PALLOC,VSI_CALLER,__FILE__,__LINE__,D2P(D)) + +#define PALLOC_MSG(D,T,M) T_##T *D = (T_##T*)P2D(P_ALL_SDU(T_##T,BSIZE_##M));\ + D_OPC(D) = (T);\ + D_OPC2(D) = 0;\ + D_LEN(D) = SIZ(T_##T);\ + D_SDU(D) = &((D)->sdu);\ + D_SDU_LEN(D) = (BSIZE_##M);\ + D_SDU_OFF(D) = ENCODE_OFFSET;\ + xxxNotify(ACT_PALLOC_MSG,VSI_CALLER,__FILE__,__LINE__,D2P(D)) + +#define PALLOC_SDU(D,T,N) T_##T *D = (T_##T*)P2D(P_ALL_SDU(T_##T,N));\ + D_OPC(D) = (T);\ + D_OPC2(D) = 0;\ + D_LEN(D) = SIZ(T_##T);\ + D_SDU(D) = &((D)->sdu);\ + D_SDU_LEN(D) = (N);\ + D_SDU_OFF(D) = ENCODE_OFFSET;\ + xxxNotify(ACT_PALLOC_SDU,VSI_CALLER,__FILE__,__LINE__,D2P(D)) + +#define PREUSE(D0,D,T) T_##T *D = (T_##T*)P2D_AC(D2P(D0),T);\ + D_OPC(D) = (T);\ + D_OPC2(D) = 0;\ + D_LEN(D) = SIZ(T_##T);\ + D_SDU(D) = 0;\ + xxxNotify(ACT_REUSE,VSI_CALLER,__FILE__,__LINE__,D2P(D)) + +#define PREUSE_MSG(D,T,M) T_##T *D = (T_##T*)P2D_AC(D2P(D0),T);\ + D_OPC(D) = (T);\ + D_OPC2(D) = 0;\ + D_LEN(D) = SIZ(T_##T);\ + D_SDU(D) = &((D)->sdu);\ + D_SDU_LEN(D) = (BSIZE_##M);\ + D_SDU_OFF(D) = ENCODE_OFFSET;\ + xxxNotify(ACT_PREUSE_MSG,VSI_CALLER,__FILE__,__LINE__,D2P(D)) + +#define PREUSE_SDU(D,T,N) T_##T *D = (T_##T*)P2D_AC(D2P(D0),T);\ + USHORT BSIZE_##N;\ + D_OPC(D) = (T);\ + D_OPC2(D) = 0;\ + D_LEN(D) = SIZ(T_##T);\ + D_SDU(D) = &((D)->sdu);\ + D_SDU_LEN(D) = (N);\ + D_SDU_OFF(D) = ENCODE_OFFSET;\ + xxxNotify(ACT_PREUSE_SDU,VSI_CALLER,__FILE__,__LINE__,D2P(D)) + +#define PFREE(D) { void *z=(void*)D2P(D);\ + vsi_c_free(VSI_CALLER (void **)&z);\ + xxxNotify(ACT_PFREE,VSI_CALLER,__FILE__,__LINE__,D2P(D)); } + +#define PSEND(E,D) PTRACE_OUT(D_OPC(D));\ + vsi_c_send (VSI_CALLER hComm##E, D2P(D), (T_VSI_CSIZE) PSIZE(D));\ + xxxNotify(ACT_PSEND,VSI_CALLER,__FILE__,__LINE__,D2P(D)) + +#define PPASS(D0,D,T) T_##T *D = (T_##T*)P2D_AC(D2P(D0),T);\ + D_OPC(D) = (T);\ + xxxNotify(ACT_PPASS,VSI_CALLER,__FILE__,__LINE__,D2P(D)) + +#define PACCESS(D) xxxNotify(ACT_PACCESS,VSI_CALLER,__FILE__,__LINE__,D2P(D)) + + +#endif /* NEW_FRAME */ + +/* + * to achieve backward compatibility + */ + +#if defined (NEW_FRAME) +#ifdef TI_PS_HCOMM_CHANGE +#define PSENDX(A,B) PSEND(_hComm##A,B) +#define _hCommACI hCommACI +#else +#define PSENDX(A,B) PSEND(hComm##A,B) +#endif +#else +#define PSENDX PSEND +#endif + + + +#define PRETRIEVE /* NOT DEFINED YET */ + + +#define MCAST(D,T) MSG_CAST(D,T_##T) +#define PCAST(P,D,T) T_##T *D = (T_##T*)P2D_AC(P,T);\ + P_OPC(P)=T;\ + xxxNotify(ACT_PCAST,VSI_CALLER,__FILE__,__LINE__,D2P(D)) + +#define PCOPY(DEST,SOURCE) memcpy(DEST,SOURCE,PSIZE(SOURCE)-sizeof(T_PRIM_HEADER)) + +/*** trace primitive, trace state ***/ + +#ifndef NEW_FRAME + +#ifdef NTRACE + + #define SET_STATE(PROCESS,STATE) ENTITY_DATA->state[PROCESS] = STATE + #define GET_STATE(PROCESS) ENTITY_DATA->state[PROCESS] + + #define PTRACE_IN(OPC) + #define PTRACE_OUT(OPC) + +#else + + #define SET_STATE(PROCESS,STATE)\ + ENTITY_DATA->state[PROCESS] =\ + vsi_o_strace (VSI_CALLER\ + PROCESS_NAME[PROCESS],\ + PROCESS##_NAME [ ENTITY_DATA->state[PROCESS] ],\ + PROCESS##_NAME [ STATE ],\ + STATE ) + + #define GET_STATE(PROCESS)\ + vsi_o_strace (VSI_CALLER\ + PROCESS_NAME[PROCESS],\ + PROCESS##_NAME [ ENTITY_DATA->state[PROCESS] ],\ + NULL ,\ + ENTITY_DATA->state[PROCESS] ) + + #define PTRACE_IN(OPC) vsi_o_ptrace (VSI_CALLER OPC, 0) + #define PTRACE_OUT(OPC) vsi_o_ptrace (VSI_CALLER OPC, 1) + +#endif + +#endif /* NEW_FRAME */ +/* + * Timer, Jump Table, Configuration + */ + +#ifdef OPTION_TIMER +#define TSTART(i,h,v) tim_start_timer(i,h,v) +#else +#define TSTART(i,h,v) TIMER_START(VSI_CALLER h,v) +#endif + +#ifdef OPTION_RELATIVE +#define JUMP(a) (a+offset) +#else +#define JUMP(a) (a) +#endif + +#ifdef OPTION_SET_CONFIG_ONLY +#define GET_CONFIG(s,i) +#else +#define GET_CONFIG(s,i) pei_get_config(s,i) +#endif + +/* Cause Concept (begin) */ +/* + * For a definition of the cause concept please refer to document number + * 8443.711, named in February 2002 "cause_concept.doc" + */ + +/* definitions for calling the macros */ +/* DefinedBy bit */ +#define DEFBY_STD 0 +#define DEFBY_CONDAT 1 +/* OriginatingSide bit */ +#define ORIGSIDE_NET 0 +#define ORIGSIDE_MS 1 +/* + * note that OriginatingEntity definitions are in the SAP GSMCOM, which is a + * central (pseudo) SAP and the definitions are referenced in the using + * "real" SAPs, like e.g. MNSS SAP for the originating entity SS + */ + +/* need to decide whether to mask ORIGIN_ENTITY (max. 6 bits) in the following macro */ +#define CAUSE_MAKE(DEFINED_BY, ORIGIN_SIDE, ORIGIN_ENTITY, CAUSE_VALUE) \ + (USHORT)(((CAUSE_VALUE) & 0x00FF) |\ + ((DEFINED_BY) << 15) |\ + ((ORIGIN_SIDE) << 14) |\ + ((ORIGIN_ENTITY) << 8)) + +/* Get the cause value without the originating entity */ +#define GET_CAUSE_VALUE(cause) (UBYTE)((cause) & 0xFF) + +/* Get the entity originating the cause */ +#define GET_CAUSE_ORIGIN_ENTITY(cause) (UBYTE)(((cause) >> 8) & 0x3F) + +/* Get the DefinedBy bit */ +#define GET_CAUSE_DEFBY(cause) (UBYTE)((cause) >> 15) + +/* Get the OriginatingSide bit */ +#define GET_CAUSE_ORIGSIDE(cause) (UBYTE)(((cause) >> 14) & 0x01) + +/* Determine if a cause is invalid */ +#define IS_CAUSE_INVALID(cause) (((cause) & 0x80FF) EQ 0x80FF) + +/* Cause Concept (end) */ + + +/*==== TYPES ======================================================*/ +#if defined (_TMS470) && defined (NWARN) +typedef struct +{ + UBYTE x [MAX_PSTRUCT_LEN + + ( + L3_CODING_OFFSET + + MAX_BITSTREAM_LEN + ) / 8 + 1 + ]; +} T_PARAMETER; + +typedef struct +{ + T_PRIM_HEADER custom; + T_PARAMETER data; +} T_PRIM; +#else +typedef struct +{ + T_PRIM_HEADER custom; + UBYTE data [MAX_PSTRUCT_LEN + + ( + L3_CODING_OFFSET + + MAX_BITSTREAM_LEN + ) / 8 + 1 + ]; +} T_PRIM; +#endif + +/*==== EXPORT =====================================================*/ + + + +/* + * Multithreading + */ + + + +#ifdef OPTION_MULTITHREAD + #if defined (ENTITY_CST) + #define _ENTITY_PREFIXED(N) cst_##N + #elif defined (ENTITY_ACI) + #define _ENTITY_PREFIXED(N) aci_##N + #elif defined (ENTITY_MFW) + #define _ENTITY_PREFIXED(N) aci_##N + #elif defined (ENTITY_MMI) + #define _ENTITY_PREFIXED(N) aci_##N + #elif defined (ENTITY_SMI) + #define _ENTITY_PREFIXED(N) aci_##N + #elif defined (ENTITY_SIM) + #define _ENTITY_PREFIXED(N) sim_##N + #elif defined (ENTITY_PL) + #define _ENTITY_PREFIXED(N) pl_##N + #elif defined (ENTITY_L1) + #define _ENTITY_PREFIXED(N) l1_##N + #elif defined (ENTITY_CC) + #define _ENTITY_PREFIXED(N) cc_##N + #elif defined (ENTITY_SS) + #define _ENTITY_PREFIXED(N) ss_##N + #elif defined (ENTITY_ESIM) + #define _ENTITY_PREFIXED(N) esim_##N + #elif defined (ENTITY_SMS) + #define _ENTITY_PREFIXED(N) sms_##N + #elif defined (ENTITY_MM) + #define _ENTITY_PREFIXED(N) mm_##N + #elif defined (ENTITY_RR) + #define _ENTITY_PREFIXED(N) rr_##N + #elif defined (ENTITY_DL) + #define _ENTITY_PREFIXED(N) dl_##N + #elif defined (ENTITY_L2R) + #define _ENTITY_PREFIXED(N) l2r_##N + #elif defined (ENTITY_TRA) + #define _ENTITY_PREFIXED(N) tra_##N + #elif defined (ENTITY_RLP) + #define _ENTITY_PREFIXED(N) rlp_##N + #elif defined (ENTITY_T30) + #define _ENTITY_PREFIXED(N) t30_##N + #elif defined (ENTITY_FAD) + #define _ENTITY_PREFIXED(N) fad_##N + #elif defined (ENTITY_RA) + #define _ENTITY_PREFIXED(N) ra_##N + #elif defined (ENTITY_WAP) + #define _ENTITY_PREFIXED(N) wap_##N + #elif defined (ENTITY_UDP) + #define _ENTITY_PREFIXED(N) udp_##N + #elif defined (ENTITY_IP) + #define _ENTITY_PREFIXED(N) ip_##N + #elif defined (ENTITY_RRLP) + #define _ENTITY_PREFIXED(N) rrlp_##N + #elif defined (ENTITY_PPP) + #define _ENTITY_PREFIXED(N) ppp_##N + #elif defined (ENTITY_BTI) + #define _ENTITY_PREFIXED(N) bti_##N + #elif defined (ENTITY_L1) + #ifdef NEW_FRAME + #include "ofe.h" + #endif + #elif defined (ENTITY_TAP) + #define _ENTITY_PREFIXED(N) tap_##N + #elif defined (ENTITY_PCO) + #define _ENTITY_PREFIXED(N) pco_##N + #elif defined (ENTITY_PAN) + #define _ENTITY_PREFIXED(N) pan_##N + #elif defined (ENTITY_TST) + #define _ENTITY_PREFIXED(N) tst_##N + #elif defined (ENTITY_APP) + #define _ENTITY_PREFIXED(N) app_##N + #endif +#endif + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/kbd.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,100 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM (6301) +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Types definitions for the keybord driver +| . ++----------------------------------------------------------------------------- +*/ + +#ifndef KBD_H +#define KBD_H + +/* + * typematic rates (character per second) + */ +#define KBD_TYPERATE_NONE 0 +#define KBD_TYPERATE_6 1 +#define KBD_TYPERATE_8 2 +#define KBD_TYPERATE_10 3 +#define KBD_TYPERATE_12 4 +#define KBD_TYPERATE_15 5 +#define KBD_TYPERATE_20 6 +#define KBD_TYPERATE_24 7 +#define KBD_TYPERATE_30 8 + +/* + * type delay (in milliseconds) + */ +#define KBD_TYPEDELAY_250 1 +#define KBD_TYPEDELAY_500 2 +#define KBD_TYPEDELAY_750 3 +#define KBD_TYPEDELAY_1000 4 + +/* + * Keyboard operations + */ +#define KBD_KEYDOWN 1 +#define KBD_KEYUP 2 +#define KBD_KEYREPEAT 3 + +/* + * Keyboard signals + */ +#define KBD_SIGTYPE_STATUSCHG 1 + +/* + * Driver Control Block + */ +typedef struct kbd_DCB_Type +{ + USHORT TypematicRate; + USHORT TypematicDelay; +} kbd_DCB_Type; + +#if defined (NEW_FRAME) +/* + * to achieve backward compatibility with older definitions + */ +#define drv_SignalCB_Type T_DRV_CB_FUNC +#define drv_SignalID_Type T_DRV_SIGNAL +#define T_VSI_THANDLE USHORT +#endif + +/* Marcus: Issue 811: 05:09/2002: Start */ +/* + * Number of elements in the keypad arrays + */ +#define NUM_KPD_KEYS 32 +/* + * External data + */ +extern const UBYTE kbd_map [NUM_KPD_KEYS]; +extern const UBYTE simkbd_map [NUM_KPD_KEYS]; +extern char * const config_map [NUM_KPD_KEYS]; +/* Marcus: Issue 811: 05:09/2002: End */ + +/* + * Prototypes + */ +EXTERN UBYTE kbd_Init (drv_SignalCB_Type in_SignalCBPtr); +EXTERN void kbd_Exit (void); +EXTERN UBYTE kbd_SetConfig (kbd_DCB_Type * in_DCBPtr); +EXTERN UBYTE kbd_GetConfig (kbd_DCB_Type * out_DCBPtr); +EXTERN UBYTE kbd_SetSignal (drv_SignalID_Type * in_SignalIDPtr); +EXTERN UBYTE kbd_ResetSignal (drv_SignalID_Type * in_SignalIDPtr); +EXTERN ULONG kbd_GetStatus (void); + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/light.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,64 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM (6301) +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Types definitions for the light emitting driver +| . ++----------------------------------------------------------------------------- +*/ + +#ifndef LIGHT_H +#define LIGHT_H + +/* + * devices + */ +#define LIGHT_DEVICE_BACKLIGHT 0 +#define LIGHT_DEVICE_INSERVICELED 1 + +/* + * device status + */ +#define LIGHT_STATUS_OFF 0 +#define LIGHT_STATUS_ON 1 +#define LIGHT_STATUS_DIMMED 2 +#define LIGHT_STATUS_INTERMEDIATE 3 +#define LIGHT_STATUS_BRIGHT 4 + +#define LIGHT_STATUS_GREEN 5 +#define LIGHT_STATUS_ORANGE 6 +#define LIGHT_STATUS_RED 7 + +#if defined (NEW_FRAME) +/* + * to achieve backward compatibility with older definitions + */ +#define drv_SignalCB_Type T_DRV_CB_FUNC +#define drv_SignalID_Type T_DRV_SIGNAL +#define T_VSI_THANDLE USHORT +#endif +/* + * Prototypes + */ +EXTERN UBYTE light_Init (void); +EXTERN void light_Exit (void); +EXTERN UBYTE light_SetStatus (UBYTE in_DeviceID, UBYTE in_NewStatus); +EXTERN UBYTE light_GetStatus (UBYTE in_DeviceID, UBYTE * in_StatusPtr); + +void light_setBacklightOn( void ); +void light_setBacklightIdle( void ); +void light_setBacklightOff( void ); + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/message.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,128 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM-PS (6147) +| Modul : MESSAGE ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Message Definitions, depending on entity ++----------------------------------------------------------------------------- +*/ + +#ifndef MESSAGE_H +#define MESSAGE_H + +/* + * Definitions for Message Types + */ +#include "mconst.cdg" + +/* + * Define the messages depending on the entity + */ + +#ifdef ENTITY_RR + +#define ADD_BSIZE 8 /* additional 8 bits (Skip Indicator/PD) */ +#include "m_rr.h" +#if defined (REL99) && defined (TI_PS_FF_EMR) +#include "m_rr_short_pd.h" +#endif + +#endif + +#ifdef ENTITY_RRLP + +#include "m_rrlp_asn1_msg.h" + +#endif + +#ifdef ENTITY_MM + +#include "m_mm.h" + +#endif + +#ifdef ENTITY_CC + +#include "m_cc.h" + +#endif + +#ifdef ENTITY_SS + +#include "m_ss.h" + +#endif + +#ifdef ENTITY_SMS + +#include "m_sms.h" + +#endif + +#ifdef ENTITY_T30 + +#include "m_t30.h" + +#endif + +#if defined (ENTITY_SMI) || defined (ENTITY_MFW) || defined (ENTITY_ACI) || defined (ENTITY_CST) + +#include "m_fac.h" +#include "m_sat.h" +#include "m_cc.val" +#include "m_sms.h" + +#endif + + + +#ifdef ENTITY_SIM + +#include "m_sat.h" + +#endif /* ENTITY_SIM */ + + +#ifdef ENTITY_GRR + +#include "m_grr.h" +#include "m_rr.h" + +#endif + + +#ifdef ENTITY_GRLC + +#include "m_grlc.h" +#include "m_rr.h" + +#endif + +#ifdef ENTITY_GMM + +#include "m_gmm.h" +#include "m_tst.h" + +#endif + +#ifdef ENTITY_SM + +#include "m_sm.h" + +#endif + + + +#endif +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/pcm.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,1627 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM-MFW +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Types definitions for the permanent memory configuration. ++----------------------------------------------------------------------------- +*/ +/******************************************************************************** + $History: pcm.h + + Jun 14, 2005 REF: MMI-FIX-30439 x0018858 + Description: The homezone/cityzone tags were not being displayed properly. + Solution: Modified to save the tags properly in caches and also made the + appropriate modifications to update the same properly during mobility. + +********************************************************************************/ + +#ifndef PCM_H +#define PCM_H + +/******************************************************************** + * + * Parameters written in flash memory + * + ********************************************************************/ + +#define PCM_SERIAL_CONFIG (0) + +/******************************************************************** + * + * Access functions to bit fields + * + ********************************************************************/ + +#ifndef __BF_FUNCCALL__ +#define FldGet(f,n) ((((ULONG)f)&((ULONG)n##m))>>n##s) +#define FldSet(f,n,v) ((((ULONG)f)&(~((ULONG)n##m)))|(((ULONG)v)<<n##s)) +#else +ULONG FldGet (ULONG f, ULONG m, int s) +{ return ((f&m)>>s); } +ULONG FldSet (ULONG f, ULONG m, int s, ULONG v) +{ return ((f&(~m))|((v<<s)&m)); } +#endif + +/******************************************************************** + * + * Field Identitifer + * + ********************************************************************/ + +#define EF_MSCAP_ID "MSCAP" /* Mobile Capabilities */ +#define EF_IMEI_ID "IMEI" /* Int. Mobile Equipment Id */ +#define EF_IMSI_ID "IMSI" /* Int. Mobile Subscriber Id */ +#define EF_SMS_ID "SMS" /* Short Messages */ +#define EF_CLASS2_ID "CLASS2" /* MS Classmark 2 */ +#define EF_CLASS3_ID "CLASS3" /* MS Classmark 3 (old def.)*/ +#define EF_RFCAP_ID "RFCAP" /* RF Capabilities */ +#define EF_MSSUP_ID "MSSUP" /* Mobile Setup */ +#define EF_MSSET_ID "MSSET" /* Mobile Setting */ +// Jun 14, 2005 REF: MMI-FIX-30439 x0018858 +#define EF_HZCACHE_ID "HZCACHE" /* Homezone cache */ +#define EF_LDN_ID "LDN" /* Last Dialed Numbers */ +#define EF_LRN_ID "LRN" /* Last Received Numbers */ +#define EF_LMN_ID "LMN" /* Last Missed Numbers */ +#define EF_UPN_ID "UPN" /* User Personal Numbers */ +#define EF_MBN_ID "MBN" /* Mailbox Numbers */ +#define EF_VMN_ID "VMN" /* Voice Mail Number */ +#define EF_CLNG_ID "CLNG" /* Current LAnguage */ +#define EF_CTIM_ID "CTIM" /* Call Timer */ +#define EF_CCNT_ID "CCNT" /* Call Counter */ +#define EF_ECC_ID "ECC" /* Emergency Call Codes */ +#define EF_ORG_ID "ORG" /* Organizer and Alarm */ +#define EF_CCP_ID "CCP" /* Caps and Config Params */ +#define EF_EXT1_ID "EXT1" /* Extension 1 */ +#define EF_SIMLCK_ID "SIMLCK" /* SIM Lock */ +#define EF_SIMLCKEXT_ID "SIMLCKEXT" /* SIM Lock Extended */ +#define EF_MAIN_ID "MAIN" /* Maintenance */ +#define EF_SFK_ID "SFK" /* Special Function Key */ +#define EF_FAULT_ID "FAULT" /* Fault Conditions */ +#define EF_DEBUG_ID "DEBUG" /* Debug Information */ +#define EF_POWER_ID "POWER" /* Power Management */ +#define EF_KEYB_ID "KEYB" /* Keyboard Mapping */ +#define EF_RADIO_ID "RADIO" /* Radio Parameter */ +#define EF_CGMI_ID "CGMI" /* Manufacturer */ +#define EF_INF0_ID "INF0" /* Manufacturer 1 */ +#define EF_CGMM_ID "CGMM" /* Model */ +#define EF_CGMR_ID "CGMR" /* Revision */ +#define EF_CGSN_ID "CGSN" /* Product Serial Number */ +#define EF_SMSPRFL_ID "SMSPRFL" /* SMS Profile */ +#define EF_PLMN_ID "PLMN" /* PLMN Identifier */ +#define EF_BCCHINFO_ID "BCCHINF" /* BCCH Information */ +#define EF_ALS_ID "ALS" /* alternate line service */ +#define EF_LOCGPRS_ID "LOCGPRS" /* Location Inf. (GPRS) */ +#define EF_KCGPRS_ID "KCGPRS" /* Ciphering Key (GPRS) */ +#define EF_IMSIGPRS_ID "IMSIGPRS" /* IMSI check for GPRS */ + +/******************************************************************** + * + * Return Values + * + ********************************************************************/ + +#define drv_Return_Type UBYTE + +#define PCM_OK 0 +#define PCM_INITIALIZED 1 +#define PCM_INVALID_FILE 2 +#define PCM_INVALID_SIZE 3 +#define PCM_INVALID_CKSM 4 +#define PCM_INVALID_RECORD 5 +#define PCM_NVRAM_ACCS_FAIL 6 +#define PCM_ERASE_ERROR 7 +#define PCM_WRITE_ERROR 8 +/* + * Field Info Structure + */ +typedef struct pcm_FileInfo_Type +{ + UBYTE * FileLocation; + USHORT FileSize; + UBYTE Version; +} pcm_FileInfo_Type; + + +/******************************************************************** + * + * Field MOBILE CAPABILITIES + * + ********************************************************************/ + +typedef struct pcm_EFmscap_Type /* Mobile Capabilities */ +{ + UBYTE chnMode; /* channel modes */ + UBYTE datCap1; /* data capabilities */ + UBYTE datCap2; /* data capabilities */ + UBYTE featLst1; /* feature list */ + UBYTE featLst2; /* feature list */ + UBYTE featLst3; /* feature list */ +} EF_MSCAP; + +#define SIZE_EF_MSCAP 6 +#define NR_EF_MSCAP 1 + +/* + * chnMode bits + * + * Octet 8 7 6 5 4 3 2 1 + * L1 Tm afs ahs spV3 efrV2 hr spV1 + */ +#define spchSupV1 0x00000001,0 /* speech support (vers. 1) */ +#define spchSupV1m 0x00000001 +#define spchSupV1s 0 +#define hrSup 0x00000002,1 /* HR support */ +#define hrSupm 0x00000002 +#define hrSups 1 +#define HR_EFRSup 0x00000006,1 /* HR and EFR support */ +#define HR_EFRSupm 0x00000006 +#define HR_EFRSups 1 +#define EFRSupV2 0x00000004,2 /* enhanced FR support (v2) */ +#define EFRSupV2m 0x00000004 +#define EFRSupV2s 2 +#define EFRSupV3 0x00000008,3 /* speech support (vers 3) */ +#define EFRSupV3m 0x00000008 +#define EFRSupV3s 3 +#define VocSup 0x0000000F,0 /* vocoder support */ +#define VocSupm 0x0000000F +#define VocSups 0 +#define AHS 0x00000010,4 /* adaptive multirate half rate speech */ +#define AHSm 0x00000010 +#define AHSs 4 +#define AFS 0x00000020,5 /* adaptive multirate full rate speech */ +#define AFSm 0x00000020 +#define AFSs 5 +#define TestMobile 0x00000040,6 /* Test Mobile */ +#define TestMobilem 0x00000040 +#define TestMobiles 6 +#define L1Ver 0x00000080,7 /* Layer 1 Version */ +#define L1Verm 0x00000080 +#define L1Vers 7 + +/* + * datCap bits + */ +#define datSup 0x00000001,0 /* Data support */ +#define datSupm 0x00000001 +#define datSups 0 +#define RLPSup 0x00000002,1 /* RLP data (NT Async) */ +#define RLPSupm 0x00000002 +#define RLPSups 1 +#define AsySup 0x00000004,2 /* T Async data support */ +#define AsySupm 0x00000004 +#define AsySups 2 +#define NTSynSup 0x00000008,3 /* NT Sync data support */ +#define NTSynSupm 0x00000008 +#define NTSynSups 3 +#define TSynSup 0x00000010,4 /* NT Sync data support */ +#define TSynSupm 0x00000010 +#define TSynSups 4 +#define NTFaxSup 0x00000020,5 /* NT Fax support */ +#define NTFaxSupm 0x00000020 +#define NTFaxSups 5 +#define TFaxSup 0x00000040,6 /* T Fax support */ +#define TFaxSupm 0x00000040 +#define TFaxSups 6 +#define Dr14_4Sup 0x00000080,7 /* Data rate 14.4 support */ +#define Dr14_4Supm 0x00000080 +#define Dr14_4Sups 7 + +/* + * datCap2 bits + */ +#define NTPackSup 0x00000001,0 /* NT Packet Service */ +#define NTPackSupm 0x00000001 +#define NTPackSups 0 +#define TPackSup 0x00000002,1 /* T Packet Service */ +#define TPackSupm 0x00000002 +#define TPackSups 1 +#define NTPadSup 0x00000004,2 /* NT PAD Access Service */ +#define NTPadSupm 0x00000004 +#define NTPadSups 2 +#define TPadSup 0x00000008,3 /* T PAD Access Service */ +#define TPadSupm 0x00000008 +#define TPadSups 3 +#define NAltSrvSup 0x00000010,4 /* No Alternate Services */ +#define NAltSrvSupm 0x00000010 +#define NAltSrvSups 4 +#define DHRSup 0x00000080,7 /* Data Halfrate support */ +#define DHRSupm 0x00000080 +#define DHRSups 7 + +/******************************************************************** + * + * Field IMEI + * + ********************************************************************/ + +typedef struct pcm_EFimei_Type /* International ME Id */ +{ + UBYTE tac1; + UBYTE tac2; + UBYTE tac3; + UBYTE fac; + UBYTE snr1; + UBYTE snr2; + UBYTE snr3; + UBYTE svn; +} EF_IMEI; + +#define SIZE_EF_IMEI 8 +#define NR_EF_IMEI 1 + +/******************************************************************** + * + * Field IMSI + * + ********************************************************************/ + +typedef struct pcm_EFimsi_Type /* International Subscriber Id */ +{ + UBYTE len; + UBYTE IMSI[8]; +} EF_IMSI; + +#define SIZE_EF_IMSI 9 +#define NR_EF_IMSI 1 + +/******************************************************************** + * + * Field SHORT MESSAGE SERVICES + * + ********************************************************************/ + +typedef struct pcm_EFsms_Type /* Short Messages */ +{ + UBYTE stat; + UBYTE rmd[175]; +} EF_SMS; + +#define SIZE_EF_SMS 176 +#ifdef _SIMULATION_ +#define NR_EF_SMS 3 +#else +#define NR_EF_SMS 1 +#endif + +/******************************************************************** + * + * Field MOBILE STATION CLASSMARK 2 + * + ********************************************************************/ + +typedef struct pcm_EFclass2_Type /* Mobile Station Classmark 2 */ +{ + UBYTE byte1; + UBYTE byte2; + UBYTE byte3; +} EF_CLASS2; + +#define SIZE_EF_CLASS2 3 +#define NR_EF_CLASS2 1 + +/* + * byte1 + */ +#define rfPwrCap 0x00000007,0 /* rf power capability */ +#define rfPwrCapm 0x00000007 +#define rfPwrCaps 0 +#define a51 0x00000008,3 /* rf power capability */ +#define a51m 0x00000008 +#define a51s 3 +#define esInd 0x00000010,4 /* ES indicator */ +#define esIndm 0x00000010 +#define esInds 4 +#define revLev 0x00000060,5 /* revision level */ +#define revLevm 0x00000060 +#define revLevs 5 + +/* + * byte2 + */ +#define freqCap 0x00000001,0 /* frequency capability */ +#define freqCapm 0x00000001 +#define freqCaps 0 +#define vgcsCap 0x00000002,1 /* VGCS notification reception */ +#define vgcsCapm 0x00000002 +#define vgcsCaps 1 +#define vbsCap 0x00000004,2 /* VBS notification reception */ +#define vbsCapm 0x00000004 +#define vbsCaps 2 +#define smCap 0x00000008,3 /* SM capability */ +#define smCapm 0x00000008 +#define smCaps 3 +#define ssScrInd 0x00000030,4 /* SS Screen Indicator */ +#define ssScrIndm 0x00000030 +#define ssScrInds 4 +#define psCap 0x00000040,6 /* PS capability */ +#define psCapm 0x00000040 +#define psCaps 6 + +/* + * byte3 + */ +#define a52 0x00000001,0 /* encryption algorithm A5/2 */ +#define a52m 0x00000001 +#define a52s 0 +#define a53 0x00000002,1 /* encryption algorithm A5/3 */ +#define a53m 0x00000002 +#define a53s 1 +#define cmspCap 0x00000004,2 /* CM service prompt */ +#define cmspCapm 0x00000004 +#define cmspCaps 2 +#define solsaCap 0x00000008,3 /* SoLSA */ +#define solsaCapm 0x00000008 +#define solsaCaps 3 +#define ucs2Cap 0x00000010,4 /* UCS2 treatment */ +#define ucs2Capm 0x00000010 +#define ucs2Caps 4 +#define lcsvaCap 0x00000020,5 /* LCS VA capability */ +#define lcsvaCapm 0x00000020 +#define lcsvaCaps 5 +#define cm3bit 0x00000080,7 /* Classmark 3 available */ +#define cm3bitm 0x00000080 +#define cm3bits 7 + + +/******************************************************************** + * + * Field MOBILE STATION CLASSMARK 3 + * + ********************************************************************/ + +typedef struct pcm_EFclass3_Type /* Mobile Station Classmark 3 */ +{ + UBYTE byte1; + UBYTE byte2; + UBYTE byte3; +}EF_CLASS3; + +#define SIZE_EF_CLASS3 3 +#define NR_EF_CLASS3 1 + +/* + * byte1 + */ +#define a54 0x00000001,0 /* encryption algorithm A5/4 */ +#define a54m 0x00000001 +#define a54s 0 +#define a55 0x00000002,1 /* encryption algorithm A5/5 */ +#define a55m 0x00000002 +#define a55s 1 +#define a56 0x00000004,2 /* encryption algorithm A5/6 */ +#define a56m 0x00000004 +#define a56s 2 +#define a57 0x00000008,3 /* encryption algorithm A5/7 */ +#define a57m 0x00000008 +#define a57s 3 +#define bnd1 0x00000010,4 /* Band 1 */ +#define bnd1m 0x00000010 +#define bnd1s 4 +#define bnd2 0x00000020,5 /* Band 2 */ +#define bnd2m 0x00000020 +#define bnd2s 5 +#define bnd3 0x00000040,6 /* Band 3 */ +#define bnd3m 0x00000040 +#define bnd3s 6 + +/* + * byte2 + */ +#define rfCap1 0x0000000f,0 /* associated RF capability 1 */ +#define rfCap1m 0x0000000f +#define rfCap1s 0 +#define rfCap2 0x000000f0,4 /* associated RF capability 2 */ +#define rfCap2m 0x000000f0 +#define rfCap2s 4 + +/* + * byte2 + */ +#define ExtMeas 0x00000010,4 /* associated RF capability 1 */ +#define ExtMeasm 0x00000010 +#define ExtMeass 4 + +/******************************************************************** + * + * Field RF Capabilities + * + ********************************************************************/ + +typedef struct pcm_EFrfcap_Type +{ + UBYTE setbands; /* set frequency bands */ + UBYTE bands; /* supported frequency bands */ + UBYTE power1; /* power classes of GSM900 and DCS1800 */ + UBYTE power2; /* power classes of PCS1900 and GSM850 */ + UBYTE power3; /* power classes of GSM400 and EGDE */ + UBYTE msGSM; /* GSM multi slot capability and classes */ + UBYTE msEDGE; /* EDGE multi slot capability and classes */ + UBYTE msHSCSD; /* HSCSD multi slot capability and classes */ + UBYTE msGPRS; /* GPRS multi slot capability and classes */ + UBYTE msECSD; /* ECSD multi slot capability and classes */ + UBYTE msEGPRS; /* EGPRS multi slot capability and classes */ + UBYTE capability1; /* divers capabilities and options */ + UBYTE capability2; /* divers capabilities and options */ + UBYTE switchmeasure; /* switching time */ + UBYTE encryption; /* A5/n encryption algorithm availability */ + UBYTE positioning; /* supported positioning methods */ +} EF_RFCAP; + +#define SIZE_EF_RFCAP 16 +#define NR_EF_RFCAP 1 + +/* + * setbands, bands + */ +#define rf_900 0x00000001,0 /* support of GSM 900 */ +#define rf_900m 0x00000001 +#define rf_900s 0 +#define rf_1800 0x00000002,1 /* support of DCS 1800 */ +#define rf_1800m 0x00000002 +#define rf_1800s 1 +#define rf_1900 0x00000004,2 /* support of PCS 1900 */ +#define rf_1900m 0x00000004 +#define rf_1900s 2 +#define rf_EGSM 0x00000008,3 /* support of E-GSM */ +#define rf_EGSMm 0x00000008 +#define rf_EGSMs 3 +#define rf_850 0x00000010,4 /* support of GSM 850 */ +#define rf_850m 0x00000010 +#define rf_850s 4 +#define rf_450 0x00000020,5 /* support of GSM 450 */ +#define rf_450m 0x00000020 +#define rf_450s 5 +#define rf_480 0x00000040,6 /* support of GSM 480 */ +#define rf_480m 0x00000040 +#define rf_480s 6 +#define rf_RGSM 0x00000080,7 /* support of R-GSM */ +#define rf_RGSMm 0x00000080 +#define rf_RGSs 7 + +/* + * power1 + */ +#define rfCap_1800 0x0000000f,0 /* associated RF capability of DCS 1800 */ +#define rfCap_1800m 0x0000000f +#define rfCap_1800s 0 +#define rfCap_900 0x000000f0,4 /* associated RF capability of GSM 900 */ +#define rfCap_900m 0x000000f0 +#define rfCap_900s 4 +/* + * power2 + */ +#define rfCap_850 0x0000000f,0 /* associated RF capability of GSM 850 */ +#define rfCap_850m 0x0000000f +#define rfCap_850s 0 +#define rfCap_1900 0x000000f0,4 /* associated RF capability of PCS 1900 */ +#define rfCap_1900m 0x000000f0 +#define rfCap_1900s 4 +/* + * power3 + */ +#define rfCap_EDGE2 0x00000003,0 /* associated RF capability 2 of EDGE */ +#define rfCap_EDGE2m 0x00000003 +#define rfCap_EDGE2s 0 +#define rfCap_EDGE1 0x0000000c,2 /* associated RF capability 1 of EDGE */ +#define rfCap_EDGE1m 0x0000000c +#define rfCap_EDGE1s 2 +#define rfCap_400 0x000000f0,4 /* associated RF capability of GSM 450,480*/ +#define rfCap_400m 0x000000f0 +#define rfCap_400s 4 +/* + * msGSM, msEDGE, msHSCSD, msGPRS, msECSD, msEGPRS + */ +#define rfCap_DTMSC 0x00000003,0 /* Multi Slot Sub-Class (only msGPRS+msEGPRS) */ +#define rfCap_DTMSCm 0x00000003 +#define rfCap_DTMSCs 0 +#define rfCap_DTM 0x00000004,2 /* Support of DTM (only msGPRS+msEGPRS) */ +#define rfCap_DTMm 0x00000004 +#define rfCap_DTMs 2 +#define rfCap_MSC 0x000000f8,3 /* Multi Slot Class */ +#define rfCap_MSCm 0x000000f8 +#define rfCap_MSCs 3 +/* + * capability1 + */ +#define rfCap_mac 0x00000001,0 /* Dynamic and fixed allocation */ +#define rfCap_macm 0x00000001 +#define rfCap_macs 0 +#define rfCap_mod 0x00000002,1 /* EDGE modulation capability */ +#define rfCap_modm 0x00000002 +#define rfCap_mods 1 +#define rfCap_cmsp 0x00000004,2 /* CM service prompt */ +#define rfCap_cmspm 0x00000004 +#define rfCap_cmsps 2 +#define rfCap_solsa 0x00000008,3 /* SoLSA capability */ +#define rfCap_solsam 0x00000008 +#define rfCap_solsas 3 +#define rfCap_lcsva 0x00000010,4 /* LCS value added location request noti. */ +#define rfCap_lcsvam 0x00000010 +#define rfCap_lcsvas 4 +#define rfCap_ppsms 0x00000020,5 /* MT point to point SMS */ +#define rfCap_ppsmsm 0x00000020 +#define rfCap_ppsmss 5 +#define rfCap_ps 0x00000040,6 /* pseudo synchronization capability */ +#define rfCap_psm 0x00000040 +#define rfCap_pss 6 +#define rfCap_esind 0x00000080,7 /* controlled early class sending */ +#define rfCap_esindm 0x00000080 +#define rfCap_esinds 7 +/* + * capability2 + */ +#define rfCap_ssc 0x00000003,0 /* SS screening indicator */ +#define rfCap_sscm 0x00000003 +#define rfCap_sscs 0 +#define rfCap_usc2 0x00000004,2 /* UCS2 encoded */ +#define rfCap_usc2m 0x00000004 +#define rfCap_usc2s 2 +#define rfCap_vgcs 0x00000008,3 /* VGCS capability */ +#define rfCap_vgcsm 0x00000008 +#define rfCap_vgcss 3 +#define rfCap_vbs 0x00000010,4 /* VBS capability */ +#define rfCap_vbsm 0x00000010 +#define rfCap_vbss 4 +#define rfCap_compact 0x00000020,5 /* COMPACT interference measurement */ +#define rfCap_compactm 0x00000020 +#define rfCap_compacts 5 +#define rfCap_extmeas 0x00000040,6 /* extendend measurement */ +#define rfCap_extmeasm 0x00000040 +#define rfCap_extmeass 6 +#define rfCap_meas 0x00000080,7 /* values about measurement capability */ +#define rfCap_measm 0x00000080 +#define rfCap_meass 7 +/* + * switchmeasure + */ +#define rfCap_smt 0x0000000f,0 /* time switch-power measurement */ +#define rfCap_smtm 0x0000000f +#define rfCap_smts 0 +#define rfCap_smst 0x000000f0,4 /* time switch-power measurement-switch */ +#define rfCap_smstm 0x000000f0 +#define rfCap_smsts 4 +/* + * encryption + */ +#define rfCap_A5_7 0x00000002,1 /* encryption algorithm A5/7 */ +#define rfCap_A5_7m 0x00000002 +#define rfCap_A5_7s 1 +#define rfCap_A5_6 0x00000004,2 /* encryption algorithm A5/6 */ +#define rfCap_A5_6m 0x00000004 +#define rfCap_A5_6s 2 +#define rfCap_A5_5 0x00000008,3 /* encryption algorithm A5/5 */ +#define rfCap_A5_5m 0x00000008 +#define rfCap_A5_5s 3 +#define rfCap_A5_4 0x00000010,4 /* encryption algorithm A5/4 */ +#define rfCap_A5_4m 0x00000010 +#define rfCap_A5_4s 4 +#define rfCap_A5_3 0x00000020,5 /* encryption algorithm A5/3 */ +#define rfCap_A5_3m 0x00000020 +#define rfCap_A5_3s 5 +#define rfCap_A5_2 0x00000040,6 /* encryption algorithm A5/2 */ +#define rfCap_A5_2m 0x00000040 +#define rfCap_A5_2s 6 +#define rfCap_A5_1 0x00000080,7 /* encryption algorithm A5/1 */ +#define rfCap_A5_1m 0x00000080 +#define rfCap_A5_1s 7 +/* + * positioning + */ +#define rfCap_eeda 0x00000002,1 /* EGPRS Extended Dynamic Allocation Capability */ +#define rfCap_eedam 0x00000002 +#define rfCap_eedas 1 +#define rfCap_geda 0x00000004,2 /* GPRS Extended Dynamic Allocation Capability */ +#define rfCap_gedam 0x00000004 +#define rfCap_gedas 2 +#define rfCap_cgps 0x00000008,3 /* conventional GPS */ +#define rfCap_cgpsm 0x00000008 +#define rfCap_cgpss 3 +#define rfCap_bgps 0x00000010,4 /* based GPS */ +#define rfCap_bgpsm 0x00000010 +#define rfCap_bgpss 4 +#define rfCap_agps 0x00000020,5 /* assisted GPS */ +#define rfCap_agpsm 0x00000020 +#define rfCap_agpss 5 +#define rfCap_beotd 0x00000040,6 /* based E-OTD */ +#define rfCap_beotdm 0x00000040 +#define rfCap_beotds 6 +#define rfCap_aeotd 0x00000080,7 /* assisted E-OTD */ +#define rfCap_aeotdm 0x00000080 +#define rfCap_aeotds 7 + + +#ifdef TI_PS_CUSTOM_RFCAP_DEFAULT +EXTERN U8 custom_rfcap_default[SIZE_EF_RFCAP]; +#endif /* TI_PS_CUSTOM_RFCAP_DEFAULT */ + +/******************************************************************** + * + * Field MOBILE SETUP + * + ********************************************************************/ + +typedef struct pcm_EFmssup_Type /* Mobile Setup */ +{ + UBYTE lng1; + UBYTE lng2; + UBYTE lng3; + UBYTE feat1; + UBYTE feat2; +}EF_MSSUP; + +#define SIZE_EF_MSSUP 5 +#define NR_EF_MSSUP 1 + +/* + * lng1 + */ +#define eng 0x00000001,0 /* English */ +#define engm 0x00000001 +#define engs 0 +#define fre 0x00000002,1 /* French */ +#define frem 0x00000002 +#define fres 1 +#define ger 0x00000004,2 /* German */ +#define germ 0x00000004 +#define gers 2 +#define dut 0x00000008,3 /* Dutch */ +#define dutm 0x00000008 +#define duts 3 +#define ita 0x00000010,4 /* Italian */ +#define itam 0x00000010 +#define itas 4 +#define spa 0x00000020,5 /* Spanish */ +#define spam 0x00000020 +#define spas 5 +#define swe 0x00000040,6 /* Swedish */ +#define swem 0x00000040 +#define swes 6 +#define por 0x00000080,7 /* Portuguese */ +#define porm 0x00000080 +#define pors 7 + +/* + * lng2 + */ +#define fin 0x00000001,0 /* Finnish */ +#define finm 0x00000001 +#define fins 0 +#define nor 0x00000002,1 /* Norwegian */ +#define norm 0x00000002 +#define nors 1 +#define gre 0x00000004,2 /* Greek */ +#define grem 0x00000004 +#define gres 2 +#define tur 0x00000008,3 /* Turkish */ +#define turm 0x00000008 +#define turs 3 +#define hun 0x00000010,4 /* Hungarian */ +#define hunm 0x00000010 +#define huns 4 +#define slo 0x00000020,5 /* Slovenian */ +#define slom 0x00000020 +#define slos 5 +#define pol 0x00000040,6 /* Polish */ +#define polm 0x00000040 +#define pols 6 +#define rus 0x00000080,7 /* Russian */ +#define rusm 0x00000080 +#define russ 7 + +/* + * lng3 + */ +#define ind 0x00000001,0 /* Indonesian */ +#define indm 0x00000001 +#define inds 0 +#define cze 0x00000002,1 /* Czech */ +#define czem 0x00000002 +#define czes 1 +#define chi 0x00000004,2 /* Chinese */ +#define chim 0x00000004 +#define chis 2 +#define can 0x00000008,3 /* Cantonese */ +#define canm 0x00000008 +#define cans 3 +#define man 0x00000010,4 /* Mandarin */ +#define manm 0x00000010 +#define mans 4 +#define tai 0x00000020,5 /* Taiwanese */ +#define taim 0x00000020 +#define tais 5 +#define ara 0x00000040,6 /* Arabic */ +#define aram 0x00000040 +#define aras 6 + +/* + * feat + */ +#define AoC 0x00000001,0 /* Advice of Charge */ +#define AoCm 0x00000001 +#define AoCs 0 +#define DTMF 0x00000002,1 /* DTMF */ +#define DTMFm 0x00000002 +#define DTMFs 1 +#define CF 0x00000004,2 /* Call Forwarding */ +#define CFm 0x00000004 +#define CFs 2 +#define CB 0x00000008,3 /* Call Barring */ +#define CBm 0x00000008 +#define CBs 3 +#define USSD 0x00000010,4 /* USSD */ +#define USSDm 0x00000010 +#define USSDs 4 +#define ETC 0x00000020,5 /* ETC */ +#define ETCm 0x00000020 +#define ETCs 5 +#define IRDA 0x00000040,6 /* IRDA */ +#define IRDAm 0x00000040 +#define IRDAs 6 + +/******************************************************************** + * + * Field Current language (CLNG) + * + ********************************************************************/ + +#define SIZE_EF_CLNG_DATA 2 + +typedef struct pcm_EFclng_Type +{ + UBYTE data[SIZE_EF_CLNG_DATA]; /* current language in ME */ +} EF_CLNG; + +#define SIZE_EF_CLNG SIZE_EF_CLNG_DATA +#define NR_EF_CLNG 1 + +/******************************************************************** + * + * Field MOBILE STATION SETTTINGS + * + ********************************************************************/ + +typedef struct pcm_EFmsset_Type /* Mobile Setting */ +{ + UBYTE buzzer1; + UBYTE buzzer2; + UBYTE buzzer3; + UBYTE audio; + UBYTE misc; + UBYTE display; + UBYTE language; + UBYTE recent_ldn_ref; + UBYTE recent_lrn_ref; + UBYTE recent_upn_ref; +} EF_MSSET; + +#define SIZE_EF_MSSET 10 +#define NR_EF_MSSET 1 + +/* + * buzzer 1 + */ +#define calltype 0x00000007,0 /* ringer type incoming calls */ +#define calltypem 0x00000007 +#define calltypes 0 +#define callvol 0x00000038,3 /* ringer volume incoming calls */ +#define callvolm 0x00000038 +#define callvols 3 +#define vib 0x000000c0,6 /* vibrator */ +#define vibm 0x000000c0 +#define vibs 6 + +/* + * buzzer 2 + */ +#define msgtype 0x00000007,0 /* ringer type messages */ +#define msgtypem 0x00000007 +#define msgtypes 0 +#define msgvol 0x00000038,3 /* ringer volume messages */ +#define msgvolm 0x00000038 +#define msgvols 3 + +/* + * buzzer 3 + */ +#define keytone 0x00000003,0 /* key tone mode */ +#define keytonem 0x00000003 +#define keytones 0 +#define batw 0x00000004,2 /* low battery warning */ +#define batwm 0x00000004 +#define batws 2 + +/* + * audio + */ +#define lnamp 0x00000007,0 /* microphone amplification */ +#define lnampm 0x00000007 +#define lnamps 0 +#define outvol 0x00000038,3 /* output volume */ +#define outvolm 0x00000038 +#define outvols 3 +#define ext 0x00000040,6 /* external audio */ +#define extm 0x00000040 +#define exts 6 +#define voicerec 0x00000080,7 /* voice recording */ +#define voicerecm 0x00000080 +#define voicerecs 7 + +/* + * miscellenous + */ +#define pmod 0x00000001,0 /* PLMN selection mode */ +#define pmodm 0x00000001 +#define pmods 0 +#define clir 0x00000002,1 /* CLIR */ +#define clirm 0x00000002 +#define clirs 1 +#define clip 0x00000004,2 /* CLIP */ +#define clipm 0x00000004 +#define clips 2 +#define calinf 0x00000008,3 /* call information display */ +#define calinfm 0x00000008 +#define calinfs 3 +#define redial 0x00000030,4 /* redial mode */ +#define redialm 0x00000030 +#define redials 4 + +/* + * display + */ +#define ctrt 0x00000007,0 /* contrast */ +#define ctrtm 0x00000007 +#define ctrts 0 +#define brgt 0x00000018,3 /* brightness */ +#define brgtm 0x00000018 +#define brgts 3 +#define bckdr 0x000000E0,5 /* duration for back light */ +#define bckdrm 0x000000E0 +#define bckdrs 5 + +// Jun 14, 2005 REF: MMI-FIX-30439 x0018858 +//Begin 30439 +/******************************************************************** + * + * Field Homezone cache + * + ********************************************************************/ + +typedef struct pcm_EFhzcache_Type +{ + UBYTE cid[2]; + UBYTE zone; +} EF_HZCACHE; + +#define SIZE_EF_HZCACHE 3 +#define NR_EF_HZCACHE 5 + +/******************************************************************** + * + * Field LAST MOC NUMBERS - LDN + * + ********************************************************************/ +//end 30439 + +typedef struct pcm_EFldn_Type /* Last Dialed Numbers */ +{ + UBYTE calDrMsb; + UBYTE calDrLsb; + UBYTE year; + UBYTE month; + UBYTE day; + UBYTE hour; + UBYTE minute; + UBYTE second; + UBYTE len; /* length of BCD number */ + UBYTE numTp; + UBYTE dldNum[10]; /* dialed number */ + UBYTE ccp; /* capability/configuration id */ + UBYTE ext1; /* extension1 record identifier */ +} EF_LDN; + +#define SIZE_EF_LDN 22 +#define NR_EF_LDN 1 + +/* + * numTp + */ +#define numTp_npi 0x0000000F,0 /* numbering plan identification */ +#define numTp_npim 0x0000000F +#define numTp_npis 0 +#define numTp_ton 0x00000070,4 /* Type of number */ +#define numTp_tonm 0x00000070 +#define numTp_tons 4 + +/******************************************************************** + * + * Field LAST RECEIVED NUMBERS + * + ********************************************************************/ + +typedef struct pcm_EFlrn_Type /* Last Received Numbers */ +{ + UBYTE calDrMsb; + UBYTE calDrLsb; + UBYTE year; + UBYTE month; + UBYTE day; + UBYTE hour; + UBYTE minute; + UBYTE second; + UBYTE id; + UBYTE len; /* length of BCD number */ + UBYTE numTp; + UBYTE dldNum[10]; /* dialed number */ + UBYTE ccp; /* capability/configuration id */ + UBYTE ext1; /* extension1 record identifier */ +} EF_LRN; + +#define SIZE_EF_LRN 23 +#define NR_EF_LRN 1 + +/******************************************************************** + * + * Field LAST MISSED NUMBERS + * + ********************************************************************/ + +typedef struct pcm_EFlmn_Type /* Last Missed Numbers */ +{ + UBYTE year; + UBYTE month; + UBYTE day; + UBYTE hour; + UBYTE minute; + UBYTE second; + UBYTE id; + UBYTE len; /* length of BCD number */ + UBYTE numTp; + UBYTE dldNum[10]; /* dialed number */ + UBYTE ccp; /* capability/configuration id */ + UBYTE ext1; /* extension1 record identifier */ +} EF_LMN; + +#define SIZE_EF_LMN 21 +#define NR_EF_LMN 1 + +/******************************************************************** + * + * Field USER PERSONAL NUMBERS + * + ********************************************************************/ + +typedef struct pcm_EFupn_Type /* User Personal Numbers */ +{ + UBYTE alphId[10]; + UBYTE len; + UBYTE numTp; /* bitmap same as EF_LDN */ + UBYTE usrNum[10]; + UBYTE ccp; + UBYTE ext1; +} EF_UPN; + +#define SIZE_EF_UPN 24 +#define NR_EF_UPN 1 + +/******************************************************************** + * + * Field MAILBOX NUMBERS + * + ********************************************************************/ + +typedef struct pcm_EFmbn_Type /* Mailbox Numbers */ +{ + UBYTE alphId[10]; + UBYTE len; + UBYTE numTp; /* bitmap same as EF_LDN */ + UBYTE mbNum[10]; +} EF_MBN; + +#define SIZE_EF_MBN 22 +#define NR_EF_MBN 4 + + +/******************************************************************** + * + * Field Voice Mail Number + * + ********************************************************************/ + +/* + * note that with new 04.08 the called party bcd number of the CC + * protocol can have up to 43 octets, 3 are used for other things + * than the BCD coded digits + */ +#define MAX_CALLED_PARTY_BCD_NO_OCTETS 40 +typedef struct pcm_EFvmn_Type /* Voice mail Number */ +{ + UBYTE vmNum[MAX_CALLED_PARTY_BCD_NO_OCTETS + 1]; + /* implementation uses delimiter of 0xFF */ + UBYTE numTp; + +} EF_VMN; + +#define SIZE_EF_VMN (MAX_CALLED_PARTY_BCD_NO_OCTETS + 1 + 1) +#define NR_EF_VMN 1 + + +/******************************************************************** + * + * Field CALL TIMER + * + ********************************************************************/ + +typedef struct pcm_EFctim_Type /* Call Timer */ +{ + UBYTE moVcDrHm[4]; + UBYTE mtVcDrHm[4]; + UBYTE moDtDrHm[4]; + UBYTE mtDtDrHm[4]; + UBYTE moFxDrHm[4]; + UBYTE mtFxDrHm[4]; + UBYTE moVcDrRm[4]; + UBYTE mtVcDrRm[4]; + UBYTE moDtDrRm[4]; + UBYTE mtDtDrRm[4]; + UBYTE moFxDrRm[4]; + UBYTE mtFxDrRm[4]; +} EF_CTIM; + +#define SIZE_EF_CTIM 48 +#define NR_EF_CTIM 1 + +/******************************************************************** + * + * Field CALL COUNTER + * + ********************************************************************/ + +typedef struct pcm_EFccnt_Type /* Call Counter */ +{ + UBYTE total[4]; + UBYTE moVcDrHm[4]; + UBYTE mtVcDrHm[4]; + UBYTE moDtDrHm[4]; + UBYTE mtDtDrHm[4]; + UBYTE moFxDrHm[4]; + UBYTE mtFxDrHm[4]; + UBYTE moVcDrRm[4]; + UBYTE mtVcDrRm[4]; + UBYTE moDtDrRm[4]; + UBYTE mtDtDrRm[4]; + UBYTE moFxDrRm[4]; + UBYTE mtFxDrRm[4]; +} EF_CCNT; + +#define SIZE_EF_CCNT 52 +#define NR_EF_CCNT 1 + +/******************************************************************** + * + * Field EMERGENCY CALL CODES + * + ********************************************************************/ + + +typedef struct pcm_EFecc_Type /* Emergency Call Codes */ +{ + UBYTE ecc1[3]; /* emergency call code */ + UBYTE ecc2[3]; + UBYTE ecc3[3]; + UBYTE ecc4[3]; + UBYTE ecc5[3]; +} EF_ECC; + +#define SIZE_EF_ECC 15 +#define NR_EF_ECC 1 + +/******************************************************************** + * + * Field ORGANIZER AND ALARM + * + ********************************************************************/ + + +typedef struct pcm_EForg_Type /* Organizer and Alarm */ +{ + UBYTE date[6]; /* bitmap same as EF_LDN */ + UBYTE alrm; + UBYTE alphMem[16]; /* alpha memo */ +} EF_ORG; + +#define SIZE_EF_ORG 23 +#define NR_EF_ORG 1 + +/* + * alrm + */ +#define alrm_stat 0x00000001,0 +#define alrm_statm 0x00000001 +#define alrm_stats 0 +#define alrm_type 0x0000000E,1 +#define alrm_typem 0x0000000E +#define alrm_types 1 + +/******************************************************************** + * + * Field CAPABILITY AND CONFIGURATION PARAMETERS + * + ********************************************************************/ + +typedef struct pcm_EFccp_Type /* Capability and Configuration Parameters */ +{ + UBYTE usrRate; /* user rate */ + UBYTE bearServ; /* bearer service */ + UBYTE conElem; /* connection element */ + UBYTE stopBits; /* stop bits */ + UBYTE dataBits; /* data bits */ + UBYTE parity; /* parity */ + UBYTE flowCntrl; /* flow control */ +} EF_CCP; + +#define SIZE_EF_CCP 7 +#define NR_EF_CCP 1 + +/******************************************************************** + * + * Field EXTENSION 1 + * + ********************************************************************/ + +typedef struct pcm_EFext1_Type /* Extension 1 */ +{ + UBYTE recTp; /* record type */ + UBYTE extDat[11]; /* extension data */ + UBYTE id; /* identifier */ +} EF_EXT1; + +#define SIZE_EF_EXT1 13 +#define NR_EF_EXT1 1 + +/******************************************************************** + * + * Field SIM LOCK and Extended SIM LOCK (use alternativly) + * + ********************************************************************/ + +typedef struct pcm_EFsimlck_Type /* SIM Lock */ +{ + UBYTE locks1; /* lock status */ + UBYTE locks2; + UBYTE cnt; /* lock counter */ + UBYTE maxcnt; /* lock counter */ + UBYTE PKey[8]; /* SIM control key */ + UBYTE SPKey[8]; /* SP control key */ + UBYTE NSKey[8]; /* NS control key */ + UBYTE CKey[8]; /* corporate control key */ + UBYTE NKey[8]; /* network control key */ + UBYTE len_imsi; /* bytes of IMSI */ + UBYTE imsi[15]; /* IMSI */ + UBYTE gidl1; /* Group Identifier Level 1 */ + UBYTE gidl2; /* Group Identifier Level 1 */ +} EF_SIMLCK; + +#define SIZE_EF_SIMLCK 62 +#define NR_EF_SIMLCK 1 + +typedef struct pcm_EFsimlckext_Type /* Extended SIM Lock */ +{ + UBYTE locks1; /* lock status */ + UBYTE locks2; + UBYTE cnt; /* lock counter */ + UBYTE maxcnt; /* lock counter */ + UBYTE PKey[8]; /* SIM control key */ + UBYTE SPKey[8]; /* SP control key */ + UBYTE NSKey[8]; /* NS control key */ + UBYTE CKey[8]; /* corporate control key */ + UBYTE NKey[8]; /* network control key */ + UBYTE len_p_imsi; /* bytes of IMSI P-Lock */ + UBYTE p_imsi[15]; /* IMSI P-Lock */ + UBYTE len_sp_imsi; /* bytes of IMSI SP-Lock */ + UBYTE sp_imsi[15]; /* IMSI SP-Lock */ + UBYTE len_ns_imsi; /* bytes of IMSI NS-Lock */ + UBYTE ns_imsi[15]; /* IMSI NS-Lock */ + UBYTE len_c_imsi; /* bytes of IMSI C-Lock */ + UBYTE c_imsi[15]; /* IMSI C-Lock */ + UBYTE len_n_imsi; /* bytes of IMSI N-Lock */ + UBYTE n_imsi[15]; /* IMSI N-Lock */ + UBYTE len_u_imsi; /* bytes of IMSI U-Lock */ + UBYTE u_imsi[15]; /* IMSI U-Lock */ + UBYTE gidl1; /* Group Identifier Level 1 */ + UBYTE gidl2; /* Group Identifier Level 1 */ +} EF_SIMLCKEXT; + +#define SIZE_EF_SIMLCKEXT 142 +#define NR_EF_SIMLCKEXT 1 + +/* + * locks1 + */ +#define plock 0x00000003,0 +#define plockm 0x00000003 +#define plocks 0 +#define nlock 0x0000000C,2 +#define nlockm 0x0000000C +#define nlocks 2 +#define nslock 0x00000030,4 +#define nslockm 0x00000030 +#define nslocks 4 +#define spslock 0x000000C0,6 +#define splockm 0x000000C0 +#define splocks 6 + +/* + * locks2 + */ +#define clock 0x00000003,0 +#define clockm 0x00000003 +#define clocks 0 +#define flock 0x0000000C,2 +#define flockm 0x0000000C +#define flocks 2 +/* +#define reserved1 0x00000030,4 +#define reserved1m 0x00000030 +#define reserved1s 4 +#define reserved2 0x000000C0,6 +#define reserved2m 0x000000C0 +#define reserved2s 6 +*/ + +/******************************************************************** + * + * Field MAINTENANCE INFORMATION + * + ********************************************************************/ + +/* + * T.B.D. + */ +#define SIZE_EF_MAIN 8 +#define NR_EF_MAIN 1 + +/******************************************************************** + * + * Field SPECIAL FUNCTION KEY + * + ********************************************************************/ + +/* + * T.B.D. + */ +#define SIZE_EF_SFK 8 +#define NR_EF_SFK 1 + +/******************************************************************** + * + * Field FAULT CONDITIONS + * + ********************************************************************/ + +/* + * T.B.D. + */ +#define SIZE_EF_FAULT 8 +#define NR_EF_FAULT 1 + +/******************************************************************** + * + * Field DEBUG INFORMATION + * + ********************************************************************/ + +/* + * T.B.D. + */ +#define SIZE_EF_DEBUG 8 +#define NR_EF_DEBUG 1 + +/******************************************************************** + * + * Field POWER MANAGEMENT + * + ********************************************************************/ + +/* + * T.B.D. + */ +#define SIZE_EF_POWER 8 +#define NR_EF_POWER 1 + + /******************************************************************** + * + * Field KEYBOARD MAPPING + * + ********************************************************************/ + +typedef struct pcm_EFkbd_Type /* Keyboard Mapping */ +{ + UBYTE logical_key [32]; /* logical key */ + UBYTE raw_key [32]; /* raw key */ +} EF_KBD; + +#define SIZE_EF_KEYB 64 +#define NR_EF_KEYB 1 + +/******************************************************************** + * + * Field RADIO PARAMETERS + * + ********************************************************************/ + +/* + * T.B.D. + */ +#define SIZE_EF_RADIO 8 +#define NR_EF_RADIO 1 + +/******************************************************************** + * + * Manufacturer + * + ********************************************************************/ + +#define SIZE_EF_CGMI_DATA 20 + +typedef struct pcm_EFcgmi_Type /* Manufacturer */ +{ + UBYTE data[SIZE_EF_CGMI_DATA]; /* Name of Manufacturer */ +} EF_CGMI; + +#define SIZE_EF_CGMI SIZE_EF_CGMI_DATA +#define NR_EF_CGMI 1 + +/******************************************************************** + * + * Identification Information + * + ********************************************************************/ + +#define SIZE_EF_INF0_DATA 20 + +typedef struct pcm_EFinf0_Type +{ + UBYTE data[SIZE_EF_INF0_DATA]; /*Identification Information*/ +} EF_INF0; + +#define SIZE_EF_INF0 SIZE_EF_INF0_DATA +#define NR_EF_INF0 2 + +/******************************************************************** + * + * Model + * + ********************************************************************/ + +#define SIZE_EF_CGMM_DATA 20 + +typedef struct pcm_EFcgmm_Type /* Model */ +{ + UBYTE data[SIZE_EF_CGMM_DATA]; /* Name of Product */ +} EF_CGMM; + +#define SIZE_EF_CGMM SIZE_EF_CGMM_DATA +#define NR_EF_CGMM 1 + +/******************************************************************** + * + * Revision + * + ********************************************************************/ + +#define SIZE_EF_CGMR_DATA 20 + +typedef struct pcm_EFcgmr_Type /* Revision */ +{ + UBYTE data[SIZE_EF_CGMR_DATA]; /* Version of Product */ +} EF_CGMR; + +#define SIZE_EF_CGMR SIZE_EF_CGMR_DATA +#define NR_EF_CGMR 1 + +/******************************************************************** + * + * Product Serial Number + * + ********************************************************************/ + +#define SIZE_EF_CGSN_DATA 20 + +typedef struct pcm_EFcgsn_Type /* Product Serial Number */ +{ + UBYTE data[SIZE_EF_CGSN_DATA]; /* Serial Number of Product */ +} EF_CGSN; + +#define SIZE_EF_CGSN SIZE_EF_CGSN_DATA +#define NR_EF_CGSN 1 + +/******************************************************************** + * + * SMS Profile + * + ********************************************************************/ + +#define SIZE_EF_SMSPRFL_SCA 20 +#define SIZE_EF_SMSPRFL_MIDS 40 +#define SIZE_EF_SMSPRFL_DCSS 20 +#define SIZE_EF_SMSPRFL_VPABS 14 + +#define EF_SMSPRFL_VLD 0x00 +#define EF_SMSPRFL_INVLD 0xFF + +typedef struct pcm_EFsmsprfl_Type /* SMS Profile */ +{ + UBYTE vldFlag; /* Valid Flag */ + UBYTE CSCAsca[SIZE_EF_SMSPRFL_SCA]; /* Service Center Address */ + UBYTE CSCAlenSca; /* Length of Service Center Address */ + UBYTE CSCAton; /* Type of Number */ + UBYTE CSCAnpi; /* Numbering Plan Identification */ + UBYTE CSCBmode; /* Mode */ + UBYTE CSCBmids[SIZE_EF_SMSPRFL_MIDS]; /* Message Identifier */ + UBYTE CSCBdcss[SIZE_EF_SMSPRFL_DCSS]; /* Data Coding Schemes */ + UBYTE CSMPfo; /* First Octet */ + UBYTE CSMPvprel; /* Validity Period Relative */ + UBYTE CSMPvpabs[SIZE_EF_SMSPRFL_VPABS]; /* Validity Period Absolute */ + UBYTE CSMPpid; /* Protocol Identifier */ + UBYTE CSMPdcs; /* Data Coding Scheme */ +} EF_SMSPRFL; + +#define SIZE_EF_SMSPRFL ( SIZE_EF_SMSPRFL_SCA + \ + SIZE_EF_SMSPRFL_MIDS + \ + SIZE_EF_SMSPRFL_DCSS + \ + SIZE_EF_SMSPRFL_VPABS + 9 ) +#define NR_EF_SMSPRFL 2 + +/******************************************************************** + * + * PLMN Identifier + * + ********************************************************************/ + +#define SIZE_EF_PLMN_LONG 20 +#define SIZE_EF_PLMN_SHRT 10 +#define SIZE_EF_PLMN_MCC 2 +#define SIZE_EF_PLMN_MNC 2 + +typedef struct pcm_EFplmn_Type /* PLMN Identifier */ +{ + UBYTE mcc[SIZE_EF_PLMN_MCC]; /* Mobile country code */ + UBYTE mnc[SIZE_EF_PLMN_MNC]; /* Mobile network code */ + UBYTE lngNam[SIZE_EF_PLMN_LONG]; /* Long operator name */ + UBYTE shrtNam[SIZE_EF_PLMN_SHRT]; /* Short operator name */ +} EF_PLMN; + +#define SIZE_EF_PLMN ( SIZE_EF_PLMN_MCC + SIZE_EF_PLMN_MCC + \ + SIZE_EF_PLMN_LONG + SIZE_EF_PLMN_SHRT ) +#define NR_EF_PLMN 2 + +/******************************************************************** + * + * Field BCCH Information + * + ********************************************************************/ + +typedef struct pcm_EFbcchinfo_Type /* BCCH information */ +{ + UBYTE bcch_info[54]; /* content */ +} EF_BCCHINFO; + +#define SIZE_EF_BCCHINFO 54 +#define NR_EF_BCCHINFO 1 + +/******************************************************************** + * + * Field alternate line service + * + ********************************************************************/ + +typedef struct pcm_EFals_Type /* alternate line service */ +{ + UBYTE selLine; + UBYTE statLine; +} EF_ALS; + +#define SIZE_EF_ALS 2 +#define NR_EF_ALS 1 + +/******************************************************************** + * + * Field Location Information (GPRS) + * + ********************************************************************/ + +typedef struct pcm_EFlocgprs_Type /* GPRS Location information */ +{ + UBYTE ptmsi[4]; + UBYTE ptmsi_signature[3]; + UBYTE rai[6]; + UBYTE ra_status; +} EF_LOCGPRS; + +#define SIZE_EF_LOCGPRS sizeof (EF_LOCGPRS) +#define NR_EF_LOCGPRS 1 + +/******************************************************************** + * + * Field Ciphering Key (GPRS) + * + ********************************************************************/ + +typedef struct pcm_EFkcgprs_Type /* GPRS Ciphering key */ +{ + UBYTE kc[8]; + UBYTE cksn; +} EF_KCGPRS; + +#define SIZE_EF_KCGPRS sizeof (EF_KCGPRS) +#define NR_EF_KCGPRS 1 + +/******************************************************************** + * + * Field IMSI (GPRS, only for validation of GPRS related fields) + * + ********************************************************************/ + +typedef struct pcm_EFimsigprs_Type /* International Subscriber Id */ +{ + UBYTE len; + UBYTE IMSI[8]; +} EF_IMSIGPRS; + +#define SIZE_EF_IMSIGPRS sizeof (EF_IMSIGPRS) +#define NR_EF_IMSIGPRS 1 + +/******************************************************************** + * + * Prototypes + * + ********************************************************************/ + +#if defined (NEW_FRAME) +/* + * to achieve backward compatibility with older definitions + */ +#define drv_SignalCB_Type T_DRV_CB_FUNC +#define drv_SignalID_Type T_DRV_SIGNAL +#define T_VSI_THANDLE USHORT +#endif + +EXTERN drv_Return_Type pcm_Init (void); +EXTERN void pcm_Exit (void); +EXTERN drv_Return_Type pcm_ReadFile (UBYTE * in_FileName, + USHORT in_BufferSize, + UBYTE * out_BufferPtr, + UBYTE * out_VersionPtr); +EXTERN drv_Return_Type pcm_GetFileInfo (UBYTE * in_FileName, + pcm_FileInfo_Type * out_FileInfoPtr); +EXTERN drv_Return_Type pcm_ReadRecord (UBYTE * in_FileName, + USHORT in_Record, + USHORT in_BufferSize, + UBYTE * out_BufferPtr, + UBYTE * out_VersionPtr, + USHORT * out_MaxRecordsPtr); +EXTERN drv_Return_Type pcm_WriteFile (UBYTE * in_FileName, + USHORT in_BufferSize, + UBYTE * in_BufferPtr); +EXTERN drv_Return_Type pcm_WriteRecord (UBYTE * in_FileName, + USHORT in_Record, + USHORT in_BufferSize, + UBYTE * in_BufferPtr); +EXTERN drv_Return_Type pcm_Flush (void); + + +#endif + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/prim.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,1773 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM-PS (6147) +| Modul : PRIM ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Primitive Definitions, depending on entity ++----------------------------------------------------------------------------- +*/ + +#ifndef PRIM_H +#define PRIM_H + +/* + * Definitions for Primitive Opcodes + */ + +#ifndef PCONST_CDG +#include "pconst.cdg" +#endif /* PCONST_CDG */ + +/* + * Define the service access points depending on the entity + */ + +#ifdef ENTITY_PL + +#define SAP_PH +#define SAP_DL +#define SAP_MPH +#ifdef ALR + #define SAP_MPHC +#elif defined(FF_GTI) + /* GTI */ + /* do nothing */ +#else + #define SAP_MPH5 +#endif /* ALR, FF_GTI */ +#if defined(GPRS) && defined(ALR) + #define SAP_TB +#endif /* GPRS */ +#define SAP_MMI +#define SAP_MON +#ifdef FF_EM_MODE +#define SAP_EM +#endif /* FF_EM_MODE */ + + +/* added by ppuel on 06/10 */ +#define SAP_CST + +#endif /* ENTITY_PL */ + +#ifdef ENTITY_L1 +#ifdef ALR + #define SAP_MPHC +#elif defined(FF_GTI) + /* GTI */ + /* do nothing */ +#else + #define SAP_MPH5 +#endif /* ALR, FF_GTI */ +#endif /* ENTITY_L1 */ + +#ifdef ENTITY_DL + +#define SAP_MPHC /* for PH_DATA_IND */ +#define SAP_PH +#define SAP_DL +#define SAP_MDL + +#ifdef FF_EM_MODE +#define SAP_EM +#endif /* FF_EM_MODE */ + +#endif /* ENTITY_DL*/ + +#ifdef ENTITY_RR + +#ifdef GPRS +#define SAP_INCLUDES /*Needed for CL*/ +#endif + +#define SAP_DL +#define SAP_RR +#define SAP_MPH +#define SAP_MON +#define SAP_RRRRLP +#define SAP_RRLC +#ifdef GPRS +#define SAP_CL_INLINE +#ifdef _SIMULATION_ +#define SAP_CL +#endif /* _SIMULATION_ */ +#endif + +#ifdef GPRS + #define SAP_RRGRR +#endif /* GPRS */ + +#ifdef FF_EM_MODE +#define SAP_EM +#endif /* FF_EM_MODE */ + +#endif /* ENTITIY_RR */ + +#ifdef ENTITY_LC + +#define SAP_RRLC +#define SAP_RRLP +#define SAP_CSRLC +#define SAP_MNLC + +#endif /* ENTITY_LC */ + +#ifdef ENTITY_RRLP + +#define SAP_RRRRLP +#define SAP_RRLP + +#endif /* ENTITY_RRLP */ + +#ifdef ENTITY_CSR + +#define SAP_CSRLC + +#endif /* ENTITY_CSR */ + +#ifdef ENTITY_MM + +#ifdef GPRS +#define SAP_MMGMM +#else +#define SAP_MMREG +#endif /* GPRS */ +#define SAP_MMCM +#define SAP_MMSS +#define SAP_MMSMS +#define SAP_MDL +#define SAP_RR +#define SAP_SIM + +#ifdef FF_EM_MODE +#define SAP_EM +#endif /* FF_EM_MODE */ + +#endif /* ENTITY_MM */ + +#ifdef ENTITY_CC + +#define SAP_MMCM +#define SAP_MNCC + +#ifdef FF_EM_MODE +#define SAP_EM +#endif /* FF_EM_MODE */ + +#endif /* ENTITY_CC*/ + +#ifdef ENTITY_ESIM +#define SAP_AAA +#define SAP_MMI +#endif /* ENTITY_ESIM */ + +#ifdef ENTITY_SS + +#define SAP_MMSS +#define SAP_MNSS + +#ifdef FF_EM_MODE +#define SAP_EM +#endif /* FF_EM_MODE */ + +#endif /* ENTITY_SS */ + +#ifdef ENTITY_SMS + +#define SAP_MMSMS +#define SAP_MNSMS +#define SAP_SIM + +#ifdef GPRS + #define SAP_LL + #define SAP_GMMSMS +#endif /* GPRS */ + +#ifdef FF_EM_MODE +#define SAP_EM +#endif /* FF_EM_MODE */ + +#endif /* ENTITY_SMS */ + + +#ifdef ENTITY_CST + +/* added by ppuel on 06/10 */ +#define SAP_CST +#ifdef ALR + #define SAP_MPHC +#elif defined(FF_GTI) + /* GTI */ + /* do nothing */ +#else + #define SAP_MPH5 +#endif /* ALR, FF_GTI */ +#define SAP_MNSMS +#define SAP_MMREG +#ifdef GPRS + #define SAP_GMMREG +#endif /*GPRS*/ +#endif /* ENTITY_CST */ + +#ifdef ENTITY_MMI + +#define SAP_MNSS +#define SAP_MNSMS +#define SAP_MNCC +#define SAP_MMREG +#define SAP_MMI +#define SAP_SIM +#ifdef FF_ESIM +#define SAP_AAA /* needed for esim */ +#endif +#ifdef FF_WAP +#define SAP_WAP +#endif /* FF_WAP */ + +#endif /* ENTITY_MMI */ + +#ifdef ENTITY_SMI + +#define SAP_ACI +#define SAP_MNSS +#define SAP_MNSMS +#define SAP_MNCC +#define SAP_MMI +#define SAP_SIM +#define SAP_CST + +#ifdef UART +#define SAP_DTI2 +#define SAP_UART +#endif /* UART */ + +#ifdef FF_PSI +#define SAP_PSI +#endif /* FF_PSI */ + +#ifdef FF_BAT +#define SAP_APP +#endif /* FF_BAT */ + +#if defined FF_EOTD +#define SAP_MNLC +#endif /* FF_EOTD */ + +#ifdef BT_ADAPTER +#define SAP_BTP +#endif /* BT_ADAPTER */ + +#ifdef FAX_AND_DATA +#define SAP_L2R +#define SAP_TRA +#define SAP_RA + +#ifdef FF_FAX +#define SAP_T30 +#endif + +#endif /* FAX_AND_DATA */ + +#ifdef GPRS + #define SAP_INCLUDES /*For new include SAPs from TI DK*/ + #define SAP_GMMREG + #define SAP_SN + #define SAP_SMREG + #define SAP_PPP + #define SAP_DTI + #define SAP_UART + #define SAP_PKT + #define SAP_UPM + +#endif /* GPRS */ + +#ifdef FF_EM_MODE +#define SAP_EM +#endif /* FF_EM_MODE */ + +#define SAP_MMREG + +#if defined (FF_WAP) || defined (FF_SAT_E) +#define SAP_PPP +#endif + +#ifdef CO_UDP_IP +#define SAP_IPA +#define SAP_UDPA +#endif /* CO_UDP_IP */ + +#ifdef FF_WAP +#define SAP_WAP +#endif /* FF_WAP */ + +#ifdef FF_TCP_IP +#define SAP_PPP +#define SAP_AAA +#endif /* FF_TCP_IP */ + +#ifdef FF_GPF_TCPIP +#define SAP_TCPIP +#define SAP_DCM +#endif + +#ifdef FF_WAP +#define SAP_WAP +#endif + +#endif /* ENTITY_SMI */ + +#ifdef ENTITY_MFW + +#define SAP_ACI +#define SAP_MNSS +#define SAP_MNSMS +#define SAP_MNCC +#define SAP_MMI +#define SAP_SIM +#define SAP_CST + +#ifdef UART +#define SAP_DTI2 +#define SAP_UART +#endif /* UART */ + +#ifdef FF_PSI +#define SAP_PSI +#endif /* FF_PSI */ + +#ifdef FF_BAT +#define SAP_APP +#endif /* FF_BAT */ + +#ifdef FAX_AND_DATA +#define SAP_L2R + +#ifdef FF_FAX +#define SAP_T30 +#endif + +#define SAP_RA +#define SAP_TRA +#endif /* FAX_AND_DATA */ + +#ifdef GPRS + #define SAP_INCLUDES /*For new include SAPs from TI DK*/ + #define SAP_GMMREG + #define SAP_SN + #define SAP_SMREG + #define SAP_PPP + #define SAP_DTI + #define SAP_UART + #define SAP_PKT + #define SAP_UPM +#endif /* GPRS */ + +#define SAP_MMREG + +#if defined (FF_WAP) || defined (FF_SAT_E) +#define SAP_PPP +#endif + +#ifdef CO_UDP_IP +#define SAP_IPA +#define SAP_UDPA +#endif /* CO_UDP_IP */ + +#ifdef FF_WAP +#define SAP_WAP +#endif /* FF_WAP */ + +#ifdef FF_EM_MODE +#define SAP_EM +#endif /* FF_EM_MODE */ + +#ifdef FF_TCP_IP +#define SAP_PPP +#define SAP_AAA +#endif /* FF_TCP_IP */ + +#ifdef FF_GPF_TCPIP +#define SAP_TCPIP +#define SAP_DCM +#endif + +#ifdef FF_WAP +#define SAP_WAP +#endif + +#if defined FF_EOTD +#define SAP_MNLC +#endif /* FF_EOTD */ + +#ifdef BT_ADAPTER +#define SAP_BTP +#endif /* BT_ADAPTER */ + +#endif /* ENTITY_MFW */ + + +#ifdef ENTITY_SIM + +#define SAP_SIM +#ifdef CO_UDP_IP +#define SAP_UDP +#endif /* FF_WAP || FF_SAT_E */ + +#ifdef UART +#define SAP_DTI2 +#endif /* UART*/ +#ifdef FF_EM_MODE +#define SAP_EM +#endif /* FF_EM_MODE */ + +#endif /* ENTITY_SIM */ + +#ifdef ENTITY_ACI + +#define SAP_ACI +#define SAP_MNSS +#define SAP_MNSMS +#define SAP_SIM +#define SAP_MNCC +#define SAP_MMI +#define SAP_CST +#ifdef FF_ESIM +#define SAP_AAA /* needed for esim */ +#endif +#ifdef UART +#define SAP_DTI2 +#define SAP_UART +#endif /* UART */ + +#ifdef FF_PSI +#define SAP_PSI +#endif /* FF_PSI */ + +#ifdef FF_BAT +#define SAP_APP +#endif /* FF_BAT */ + +#ifdef FF_EOTD +#define SAP_MNLC +#endif /* FF_EOTD*/ + +#ifdef FAX_AND_DATA +#define SAP_L2R +#define SAP_RA + +#ifdef FF_FAX +#define SAP_T30 +#endif + +#define SAP_TRA +#endif /* FAX_AND_DATA */ + +#ifdef GPRS + #define SAP_INCLUDES /*For new include SAPs from TI DK*/ + #define SAP_GMMREG + #define SAP_SN + #define SAP_SMREG + #define SAP_PPP + #define SAP_DTI + #define SAP_UART + #define SAP_PKT + #define SAP_UPM +#endif /* GPRS */ + +#define SAP_MMREG + +#if defined (FF_WAP) || defined (FF_SAT_E) +#define SAP_PPP +#endif + +#ifdef CO_UDP_IP +#define SAP_IPA +#define SAP_UDPA +#endif /* CO_UDP_IP */ + +#ifdef FF_EM_MODE +#define SAP_EM +#endif /* FF_EM_MODE */ + +#ifdef FF_TCP_IP +#define SAP_PPP +#define SAP_AAA +#endif /* FF_TCP_IP */ + +#ifdef FF_GPF_TCPIP +#define SAP_TCPIP +#define SAP_DCM +#endif + +#ifdef FF_WAP +#define SAP_WAP +#endif + +#endif /* ENTITY_ACI */ + +#ifdef ENTITY_L2R + +#define SAP_L2R +#define SAP_RLP +#define SAP_DTI2 +#define SAP_TRA +#define SAP_RA + +#endif /* ENTITY_L2R */ + +#ifdef ENTITY_RLP + +#define SAP_RLP +#define SAP_RA + +#endif /* ENTITY_RLP */ + +#ifdef ENTITY_T30 + +#define SAP_T30 +#define SAP_DTI2 +#define SAP_FAD + +#endif /* ENTITY_T30 */ + +#ifdef ENTITY_FAD + +#define SAP_FAD +#define SAP_RA + +#endif /* ENTITY_FAD */ + +#ifdef ENTITY_RA + +#define SAP_RA + +#endif /* ENTITY_RA */ + +#ifdef ENTITY_WAP + +#define SAP_WAP + +#ifdef FF_GPF_TCPIP +#define SAP_TCPIP +#define SAP_DCM +#endif + +#ifdef CO_UDP_IP +#define SAP_UDP +#define SAP_UDPA +#endif /* CO_UDP_IP */ + +#define SAP_DTI2 + +#endif /* ENTITY_WAP */ + +#ifdef ENTITY_UDP + +#define SAP_UDP +#define SAP_UDPA +#define SAP_IP +#define SAP_DTI2 + +#endif /* ENTITY_UDP */ + +#ifdef ENTITY_IP + +#define SAP_IP +#define SAP_IPA +#define SAP_DTI2 + +#endif /* ENTITY_IP */ + +#ifdef ENTITY_BTI + +/* removed check if compiling for dialup as it is part of the minimum choice + * kk 010525 + */ +#define SAP_ACI +#define SAP_BTP +#define SAP_DTI2 + +#endif /* ENTITY_BTI */ + + +#ifdef ENTITY_GRR +#define SAP_INCLUDES /*Needed for CL*/ +#define SAP_GMMRR +#define SAP_RRGRR +#define SAP_MPHP +#define SAP_TB +#define SAP_CGRLC +#define SAP_CL_INLINE + +#ifdef _SIMULATION_ +#define SAP_CL +#endif /* _SIMULATION_ */ + + +#ifdef FF_EM_MODE +#define SAP_EM +#endif /* FF_EM_MODE */ + +/* + * The following SAP are not used in GRR, + * but some of the structures defined + * in theses interfaces are used. + */ +#define SAP_MPH + +#endif /* ENTITY_GRR */ + + +#ifdef ENTITY_GRLC + +#define SAP_CGRLC +#define SAP_GRLC +#define SAP_MAC +#define SAP_L1TEST + +#ifdef FF_EM_MODE + #define SAP_EM +#endif /* FF_EM_MODE */ + +#endif /* ENTITY_GRLC */ + +#ifdef ENTITY_LLC + +#define SAP_LLGMM +#define SAP_LL +#define SAP_CCI +#define SAP_GRLC +#define SAP_DTI2 +#endif /* ENTITY_LLC */ + +#ifdef ENTITY_SM + +#define SAP_INCLUDES /*For new include SAPs from TI DK*/ +#define SAP_SMREG +/* #define SAP_SNSM + #define SAP_GMMSM + #define SAP_GMMAA + #define SAP_LL */ +#define SAP_SM +#define SAP_MMPM + +#define SAP_CL_INLINE + +#ifdef _SIMULATION_ +#define SAP_CL +#endif /* _SIMULATION_ */ + +#endif /* ENTITY_SM */ + +/*Newly added entity from TI DK*/ +#ifdef ENTITY_UPM + +#define SAP_INCLUDES /*For new include SAPs from TI DK*/ +#define SAP_SM +#define SAP_SN +#define SAP_MMPM /*For MMPM_SEQUENCE_IND/RES*/ +#define SAP_UPM + +#define SAP_CL_INLINE + +#ifdef _SIMULATION_ +#define SAP_CL +#endif /* _SIMULATION_ */ + +#endif /* ENTITY_UPM */ + + +#ifdef ENTITY_SNDCP + +#define SAP_INCLUDES /*For new include SAPs from TI DK*/ +#define SAP_SN /*SNDCP<->UPM and SNDCP<->ACI*/ +#define SAP_LL +#define SAP_CCI +#define SAP_DTI2 + +#endif /* ENTITY_SNDCP */ + +#ifdef ENTITY_GMM + +#define SAP_INCLUDES /*For new include SAPs from TI DK*/ +#define SAP_GMMAA +#define SAP_GMMREG +#define SAP_GMMRR +#define SAP_MMPM /*Replaced GMMSM with MMPM */ +#define SAP_GMMSMS +#define SAP_SIM +#define SAP_LL +#define SAP_LLGMM +#define SAP_MMGMM +#define SAP_CGRLC + +#define SAP_CL_INLINE + +#ifdef _SIMULATION_ +#define SAP_CL +#endif /* _SIMULATION_ */ + +#ifdef FF_EM_MODE +#define SAP_EM +#endif /* FF_EM_MODE */ + +#endif /* ENTITY_GMM */ + +#ifdef ENTITY_PPP + +#define SAP_PPP +#define SAP_DTI +#ifdef GPRS +#define SAP_UART +#endif +#endif /* ENTITY_PPP */ + +#ifdef ENTITY_UART + +#define SAP_UART +#define SAP_DTI2 + +#endif /* ENTITY_UART */ + +#ifdef ENTITY_PKTIO + +#define SAP_PKT +#define SAP_DTI2 + +#endif /* ENTITY_PKTIO */ + +#ifdef ENTITY_PSI + +#define SAP_PSI +#define SAP_DTI2 +#define SAP_DIO + +#endif /* ENTITY_PSI */ + +#ifdef ENTITY_AAA + +#define SAP_AAA + +#endif /* ENTITY_AAA */ + + +#ifdef ENTITY_TCPIP + +#define SAP_TCPIP +#define SAP_DTI2 + +#endif /* ENTITY_TCPIP */ + + +#ifdef ENTITY_APP + +#ifdef FF_BAT +#define SAP_APP +#endif /* FF_BAT */ + +#ifdef FF_GPF_TCPIP +#define SAP_TCPIP +#define SAP_DCM +#endif + +#endif /* ENTITY_APP */ + +#ifdef _SIMULATION_ + +#ifdef ENTITY_CLT + +#define SAP_INCLUDES /*For new include SAPs from TI DK*/ +#define SAP_CL +#define SAP_CL_INLINE + +#endif /* ENTITY_CLT */ + +#endif /* _SIMULATION_ */ + + +/*The following is needed for target build*/ +#ifdef ENTITY_CLT +#define SAP_INCLUDES +#endif /* ENTITY_CLT */ + +/* + * Define constants and primitive definitions depending on the + * service access points + */ +#ifdef SAP_INCLUDES + +#include "p_8010_137_nas_include.h" +#include "p_8010_153_cause_include.h" +#include "p_8010_152_ps_include.h" + +#endif /* SAP_INCLUDES */ + + +#ifdef SAP_PH + +/* + * Mask for PH Opcodes + */ + +#define PH_DL 0x4100 +#define PH_UL 0x0100 + +#include "p_ph.h" + +#endif /* SAP_PH */ + +#ifdef SAP_MPH + +/* + * Mask for MPH Opcodes + * old values: +#define MPH_DL 0x4200 +#define MPH_UL 0x0200 + * changed to avoid double opcodes in TAP + */ +#define MPH_DL 0x5700 +#define MPH_UL 0x1700 + +#include "p_mph.h" + +#endif /* SAP_MPH */ + +#ifdef SAP_MPH5 + +#include "p_mph5.h" + +#endif /* SAP_MPH5 */ + +#ifdef SAP_MPHC + +/* + * Mask for DL Opcodes + */ + +#define MPHC_DL 0x0000 /* same as MPHC_UL */ +#define MPHC_UL 0x0000 /* same as MPHC_DL */ + +#include "p_mphc.h" + +#endif /* SAP_MPHC */ + +#ifdef SAP_DL + +/* + * Mask for DL Opcodes + */ + +#define DL_DL 0x80004003 +#define DL_UL 0x80000003 + +#include "p_dl.h" + +#endif /* SAP_DL */ + +#ifdef SAP_MDL + +/* + * Mask for MDL Opcodes + */ + +#define MDL_DL 0x80004004 +#define MDL_UL 0x80000004 + +#include "p_mdl.h" + +#endif /* SAP_MDL */ + +#ifdef SAP_SIM + +/* + * Mask for SIM Opcodes + */ + +#define SIM_DL 0x80004005 +#define SIM_UL 0x80000005 + +#include "p_sim.h" + +#ifdef TI_PS_UICC_CHIPSET_15 +#include "p_8010_136_simdrv_sap.h" +#endif + +#endif /* SAP_SIM */ + +#ifdef SAP_RR + +/* + * Mask for RR Opcodes + */ + +#define RR_DL 0x80004006 +#define RR_UL 0x80000006 + +#include "p_rr.h" + +#endif /* SAP_RR */ + +#ifdef SAP_MMCM + +/* + * Mask for MMCM Opcodes + */ + +#define MMCM_DL 0x80004007 +#define MMCM_UL 0x80000007 + +#include "p_mmcm.h" + +#endif /* SAP_MMCM */ + +#ifdef SAP_MMSS + +/* + * Mask for MMSS Opcodes + */ + +#define MMSS_DL 0x80004008 +#define MMSS_UL 0x80000008 + +#include "p_mmss.h" + +#endif /* SAP_MMSS */ + +#ifdef SAP_MMSMS + +/* + * Mask for MMSMS Opcodes + */ + +#define MMSMS_DL 0x80004009 +#define MMSMS_UL 0x80000009 + +#include "p_mmsms.h" + +#endif /* SAP_MMSMS */ + +#ifdef SAP_MMREG + +/* + * Mask for MMREG Opcodes + */ + +#define MMREG_DL 0x8000400A +#define MMREG_UL 0x8000000A + +#include "p_mmreg.h" + +#endif /* SAP_MMREG */ + +#ifdef SAP_MNCC + +/* + * Mask for MNCC Opcodes + */ + +#define MNCC_DL 0x8000400B +#define MNCC_UL 0x8000000B + +#include "p_mncc.h" + +#endif /* SAP_MNCC */ + +#ifdef SAP_MNSS + +/* + * Mask for MNSS Opcodes + */ + +#define MNSS_DL 0x8000400C +#define MNSS_UL 0x8000000C + +#include "p_mnss.h" + +#endif /* SAP_MNSS */ + +#ifdef SAP_MNSMS + +/* + * Mask for MNSMS Opcodes + */ + +#define MNSMS_DL 0x8000400D +#define MNSMS_UL 0x8000000D + +#include "p_mnsms.h" + +#endif /* SAP_MNSMS */ + +#ifdef SAP_MMI + +/* + * Mask for MMI Opcodes + */ + +#define MMI_DL 0x4E00 +#define MMI_UL 0x0E00 + +#include "p_mmi.h" + +#endif /* SAP_MMI */ + +#ifdef SAP_MON + +#include "p_mon.h" + +#endif /* SAP_MON */ + +#ifdef SAP_ACI + +/* + * Mask for ACI Opcodes + */ + +#define ACI_DL 0x5500 +#define ACI_UL 0x1500 + +#include "p_aci.h" + +#endif /* SAP_ACI */ + +#ifdef SAP_L2R + +/* + * Mask for L2R Opcodes + */ + +#define L2R_DL 0x80004012 +#define L2R_UL 0x80000012 + +#include "p_l2r.h" + +#endif /* SAP_L2R */ + + +#ifdef SAP_TRA + +/* + * Mask for TRA Opcodes + */ + +#define TRA_DL 0x80004019 +#define TRA_UL 0x80000019 + +#include "p_tra.h" + +#endif /* SAP_TRA */ + + +#ifdef SAP_RLP + +/* + * Mask for RLP Opcodes + */ + +#define RLP_DL 0x80004011 +#define RLP_UL 0x80000011 + +#include "p_rlp.h" + +#endif /* SAP_RLP */ + +#ifdef SAP_T30 + +/* + * Mask for T30 Opcodes + */ + +#define T30_DL 0x80004014 +#define T30_UL 0x80000014 + +#ifdef FF_FAX +#include "p_t30.h" +#endif + +#endif /* SAP_T30 */ + +#ifdef SAP_FAD + +/* + * Mask for FAD Opcodes + */ + +#define FAD_DL 0x80004013 +#define FAD_UL 0x80000013 + +#ifdef FF_FAX +#include "p_fad.h" +#endif + +#endif /* SAP_FAD */ + +#ifdef SAP_RA + +/* + * Mask for RA Opcodes + */ + +#define RA_DL 0x80004010 +#define RA_UL 0x80000010 + +#include "p_ra.h" + +#endif /* SAP_RA */ + + + +#ifdef SAP_DTI + +/* + * Mask for DTI Opcodes + */ + +#define DTI_DL 0x7700 +#define DTI_UL 0x3700 + +#include "p_dti.h" + +#endif /* SAP_DTI */ + + +#ifdef SAP_WAP + +/* + * Mask for WAPcodes + */ + +#define WAP_DL 0x7D00 +#define WAP_UL 0x3D00 + +#include "p_wap.h" + +#endif /* SAP_WAP */ + + + +#ifdef SAP_UDP + +/* + * Mask for UDP Opcodes + */ + +#define UDP_DL 0x80004046 +#define UDP_UL 0x80000046 + +#include "p_udp.h" + +#endif /* SAP_UDP */ + + + +#ifdef SAP_TCPIP + +/* + * Mask for TCPIP Opcodes + */ + +#define TCPIP_DL 0x80004048 +#define TCPIP_UL 0x80000048 + +#include "p_tcpip.h" + +#endif + + + +#ifdef SAP_UDPA + +/* + * Mask for UDPA Opcodes + */ + +#define UDPA_DL 0x8000403B +#define UDPA_UL 0x8000003B + +#include "p_udpa.h" + +#endif /* SAP_UDPA */ + + + +#ifdef SAP_IP + +/* + * Mask for IP Opcodes + */ + +#define IP_DL 0x7900 +#define IP_UL 0x3900 + +#include "p_ip.h" + +#endif /* SAP_IP */ + + + +#ifdef SAP_IPA + +/* + * Mask for IPA Opcodes + */ +#define IPA_DL 0x8000403C +#define IPA_UL 0x8000003C + +#include "p_ipa.h" + +#endif /* SAP_IPA */ + + + +#ifdef SAP_PPP + +/* + * Mask for PPP Opcodes + */ + +#define PPP_DL 0x7500 +#define PPP_UL 0x3500 + +#include "p_ppp.h" + +#endif /* SAP_PPP */ + + + +#ifdef SAP_CST + +/* + * Mask for CST Opcodes + */ +#define CST_DL 0x5600 +#define CST_UL 0x1600 + +#include "p_cst.h" + +#endif /* SAP_CST */ + +#ifdef SAP_TB + +/* + * Mask for TB Opcodes + */ + +#define TB_DL 0x5800 +#define TB_UL 0x1800 + +#include "p_tb.h" + +#endif /* SAP_TB */ + +#ifdef SAP_MPHP + +/* + * Mask for MPHP Opcodes + */ + +#define MPHP_DL 0x0200 +#define MPHP_UL 0x0200 + +#include "p_mphp.h" + +#endif /* SAP_MPHP */ + +#ifdef SAP_CGRLC + +/* + * Mask for CGRLC Opcodes + */ + +#define CGRLC_DL 0x80014098 +#define CGRLC_UL 0x80000098 + +#include "p_cgrlc.h" + +#endif /* SAP_CGRLC */ + +#ifdef SAP_CL_INLINE +#include "p_cl.val" +#include "cl_inline.h" + +#endif /* SAP_CL_INLINE */ + + +#ifdef SAP_MAC + +/* + * Mask for MAC Opcodes + */ + +#define MAC_DL 0x7200 +#define MAC_UL 0x3200 + +#include "p_mac.h" + +#endif /* SAP_MAC */ + +#ifdef SAP_L1TEST + +/* + * Mask for L1TEST Opcodes + */ + +#define L1TEST_DL 0x8000409B +#define L1TEST_UL 0x8000009B + +#include "p_l1test.h" + +#endif /* SAP_L1TEST */ + +#ifdef SAP_RRGRR + +/* + * Mask for RRGRR Opcodes + */ + +#define RRGRR_DL 0x6d00 +#define RRGRR_UL 0x2d00 + +#include "p_rrgrr.h" + +#endif /* SAP_RRGRR */ + +#ifdef SAP_LLGMM + +/* + * Mask for LLGMM Opcodes + */ + +#define LLGMM_DL 0x6100 +#define LLGMM_UL 0x2100 + +#include "p_llgmm.h" + +#endif /* SAP_LLGMM */ + +#ifdef SAP_LL + +/* + * Mask for LL Opcodes + */ + +#define LL_DL 0x6200 +#define LL_UL 0x2200 + +#include "p_ll.h" + +#endif /* SAP_LL */ + + +#ifdef SAP_SNSM +/* + * Mask for SNSM Opcodes + */ +#define SNSM_DL 0x6700 +#define SNSM_UL 0x2700 +#include "p_snsm.h" + +#endif /* SAP_SNSM */ + +#ifdef SAP_SN +/* + * Mask for SN Opcodes + */ +#define SN_DL 0x8000409E +#define SN_UL 0x8000009E + +#include "p_8010_135_sn_sap.h" +#endif /*#ifdef SAP_SN*/ + + +#ifdef SAP_SMREG + +/* + * Mask for SMREG Opcodes + */ + +#define SMREG_DL 0x6600 +#define SMREG_UL 0x2600 + +#include "p_8010_142_smreg_sap.h" + +#endif /* SAP_SMREG */ + +#ifdef SAP_SM +/* + * Mask for SM Opcodes + */ +#define SM_DL 0x80004090 +#define SM_UL 0x80000090 + +#include "p_8010_128_sm_sap.h" + +#endif /*#ifdef SAP_SN*/ + + +#ifdef SAP_UPM +/* + * Mask for UPM Opcodes + */ +#define UPM_DL 0x8000409D +#define UPM_UL 0x8000009D + +#include "p_8010_157_upm_sap.h" + +#endif /*#ifdef SAP_UPM*/ + + + +#ifdef SAP_GRLC + +/* + * Mask for GRLC Opcodes + */ + +#define GRLC_DL 0x80004097 +#define GRLC_UL 0x80000097 + +#include "p_grlc.h" + +#endif /* SAP_GRLC */ + +#ifdef SAP_GMMAA + +/* + * Mask for GMMAA Opcodes + */ + +#define GMMAA_DL 0x6500 +#define GMMAA_UL 0x2500 + +#include "p_gmmaa.h" + +#endif /* SAP_GMMAA */ + +#ifdef SAP_GMMREG + +/* + * Mask for GMMREG Opcodes + */ + +#define GMMREG_DL 0x7300 +#define GMMREG_UL 0x3300 + +#include "p_gmmreg.h" + +#endif /* SAP_GMMREG */ + +#ifdef SAP_GMMRR + +/* + * Mask for GMMRR Opcodes + */ + +#define GMMRR_DL 0x5f00 +#define GMMRR_UL 0x1f00 + +#include "p_gmmrr.h" + +#endif /* SAP_GMMRR */ + +#ifdef SAP_GMMSM + +/* + * Mask for GMMSM Opcodes + */ + +#define GMMSM_DL 0x6400 +#define GMMSM_UL 0x2400 + +#include "p_gmmsm.h" + +#endif /* SAP_GMMSM */ + +#ifdef SAP_MMPM +/* + * Mask for MMPM Opcodes + * GMMRABM, GMMSM, GMMSMS, PMMSMS SAPs replaced by MMPM SAP + */ +#define MMPM_DL 0x80004096 +#define MMPM_UL 0x80000096 + +#include "p_8010_134_mmpm_sap.h" + +#endif /*#ifdef SAP_MMPM*/ + +#ifdef SAP_GMMSMS + +/* + * Mask for GMMSMS Opcodes + */ + +#define GMMSMS_DL 0x6300 +#define GMMSMS_UL 0x2300 + +#include "p_gmmsms.h" + +#endif /* SAP_GMMSMS */ + + +#ifdef SAP_GSIM + +/* + * Mask for GMMSIM Opcodes + */ + +#define GSIM_DL 0x6900 +#define GSIM_UL 0x2900 + +#include "p_gsim.h" + +#endif /* SAP_GSIM */ + +#ifdef SAP_MMGMM + +/* + * Mask for MMGMM Opcodes + */ + +#define MMGMM_DL 0x6e00 +#define MMGMM_UL 0x2e00 + +#include "p_mmgmm.h" + +#endif /* SAP_MMGMM */ + +#ifdef SAP_BTP + +/* + * Mask for BTP Opcodes + */ + +#define BTP_G 0x7a00 +#define BTP_B 0x3a00 + +#include "p_btp.h" + +#endif /* SAP_BTP */ + +#ifdef SAP_PPP + +/* + * Mask for PPP Opcodes + */ + +#define PPP_DL 0x7500 +#define PPP_UL 0x3500 + +#include "p_ppp.h" + +#endif /* SAP_PPP */ + +#ifdef SAP_UART + +/* + * Mask for UART Opcodes + */ + +#define UART_DL 0x7400 +#define UART_UL 0x3400 + +#include "p_uart.h" + +#endif /* SAP_UART */ + +#ifdef SAP_CCI + +/* + * Mask for CCI Opcodes + */ + +#define CCI_DL 0x7600 +#define CCI_UL 0x3600 + +#include "p_cci.h" + +#endif /* SAP_CCI */ + +#ifdef SAP_DTI2 + +/* + * Mask for DTI Opcodes + */ + +#define DTI2_DL 0x7700 +#define DTI2_UL 0x3700 + +#include "p_dti2.h" + +#endif /* SAP_DTI2 */ + +#ifdef SAP_PKT + +/* + * Mask for PKT opcodes + */ + +#define PKT_DL 0x80004045 +#define PKT_UL 0x80000045 + +#include "p_pkt.h" + +#endif /* SAP_PKT */ +#ifdef SAP_EM + +/* + * Mask for EM Opcodes + */ + +#define EM_Dl 0x7E00 +#define EM_Ul 0x3E00 + +#include "p_em.h" + +#endif /* SAP_EM */ + + + +#ifdef SAP_RRLC + +/* + * Mask for RREOTD Opcodes + */ + +#define RRLC_DL 0x80004040 +#define RRLC_UL 0x80000040 + +#include "p_rrlc.h" + +#endif /* SAP_RRLC */ + +#ifdef SAP_RRRRLP + +/* + * Mask for RRRRLP Opcodes + */ + +#define RRRRLP_DL 0x80004041 +#define RRRRLP_UL 0x80000041 + +#include "p_rrrrlp.h" + +#endif /* SAP_RRRRLP */ + +#ifdef SAP_RRLP + +/* + * Mask for RRLP Opcodes + */ + +#define RRLP_DL 0x80004042 +#define RRLP_UL 0x80000042 + +#include "p_rrlp.h" + +#endif /* SAP_RRLP */ + +#ifdef SAP_CSRLC + +/* + * Mask for CSRLC Opcodes + */ + +#define CSRLC_DL 0x80004043 +#define CSRLC_UL 0x80000043 + +//#include "p_csrlc.h" + +#endif /* SAP_CSRLC */ + +#ifdef SAP_MNLC + +/* + * Mask for MNLC Opcodes + */ + +#define MNLC_DL 0x80004044 +#define MNLC_UL 0x80000044 + +#include "p_mnlc.h" + +#endif /* SAP_MNLC */ + + +#ifdef SAP_AAA + +/* + * Mask for AAA Opcodes + */ +#define AAA_DL 0x80004047 +#define AAA_UL 0x80000047 + +#include "p_aaa.h" + +#endif /* SAP_AAA */ + +/* +* Mask for DCM Opcodes +*/ +#ifdef SAP_DCM + +#define DCM_DL 0x8000401C +#define DCM_UL 0x8000001C + +#include "p_dcm.h" + +#endif /* SAP_DCM */ +#ifdef SAP_PSI + +/* + * Mask for PSI Opcodes + */ +#define PSI_DL 0x8000401D +#define PSI_UL 0x8000001D + +#include "p_psi.h" +#include "DIO_inline.h" +#endif /* SAP_PSI */ + +#ifdef _SIMULATION_ + +#ifdef SAP_CL + +/* + * Mask for CL Opcodes + */ + +#define CL_DL 0x8000409C +#define CL_UL 0x8000009C + +#include "p_cl.h" + +#endif /* SAP_CL */ + +#endif /* _SIMULATION_ */ + +#ifdef SAP_APP + +/* + * Mask for APP Opcodes + */ +#define APP_DL 0x8000401E +#define APP_UL 0x8000001E + +#include "p_app.h" +#endif /* SAP_APP */ + +#ifdef FF_BAT +#include "p_bat.h" +#endif /* FF_BAT */ + +#endif /* PRIM_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/pwr.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,116 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM (6301) +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Types definitions for the power driver +| . ++----------------------------------------------------------------------------- +$History: Pwr.h + Dec 05, 2006 REF:OMAPS00106691 a0393213(R.Prabakar) + Description:compiler error is arising in simulation build since timer.h is not included in simulation build + Solution :flag off timer.h and its dependencies in gdi + + Oct 30,2006 ER:OMAPS00091029 x0039928(sumanth) + Bootup time measurement + + Apr 17, 2006 REF: ER OMAPS00075178 x0pleela + Description: When the charger connect to phone(i-sample), the charger driver works, but the MMI and App don't work + Solution: Defined macros for charging events + +*/ + +#ifndef PWR_H +#define PWR_H + +#ifndef _SIMULATION_ +#include "timer.h" /*OMAPS00091029 x0039928(sumanth)*/ +#endif + +/* + * Power signals + */ +#define PWR_SIGTYPE_EXTPOWER 1 +#define PWR_SIGTYPE_CHARGER 2 +#define PWR_SIGTYPE_BATLEVEL 3 + +/* + * Power Status + */ +#define PWR_BATTERY_ON 0 // use battery power //x0pleela 10 Apr, 2006 ER: OMAPS00075178 +#define PWR_EXTPOWER_ON 1 +#define PWR_CHARGER_ON 6 //x0pleela 11 Apr, 2006 changed the value from 2 to 6 + +//x0pleela 10 Apr, 2006 ER: OMAPS00075178 +#define PWR_CHARGER_BEGIN 2 // charger begin +#define PWR_CHARGER_STOP 3 // charger end +#define PWR_CHARGER_PLUG 4 // charger plug +#define PWR_CHARGER_UNPLUG 5 // charger unplug + +/* + * Status Type + */ +typedef struct pwr_Status_Type +{ + UBYTE Status; + UBYTE BatteryLevel; + UBYTE ChargeLevel; +} pwr_Status_Type; + +/* + * Driver Control Block + */ +typedef struct pwr_DCB_Type +{ + UBYTE RangeMin; + UBYTE RangeMax; + UBYTE Steps; +} pwr_DCB_Type; + +/*OMAPS00091029 x0039928(sumanth)*/ +#ifndef _SIMULATION_ +typedef enum BootTimeEvent +{ + EPreBoot=0, + EAppInit, + EModemBoot, + ENetworkSync +} BootTimeEvent; +#endif + +#if defined (NEW_FRAME) +/* + * to achieve backward compatibility with older definitions + */ +#define drv_SignalCB_Type T_DRV_CB_FUNC +#define drv_SignalID_Type T_DRV_SIGNAL +#define T_VSI_THANDLE USHORT +#endif +/* + * Prototypes + */ +EXTERN UBYTE pwr_Init (drv_SignalCB_Type in_SignalCBPtr); +EXTERN void pwr_Exit (void); +EXTERN UBYTE pwr_SetSignal (drv_SignalID_Type * in_SignalIDPtr); +EXTERN UBYTE pwr_ResetSignal (drv_SignalID_Type * in_SignalIDPtr); +EXTERN UBYTE pwr_SetConfig (pwr_DCB_Type * in_DCBPtr); +EXTERN UBYTE pwr_GetConfig (pwr_DCB_Type * out_DCBPtr); +EXTERN UBYTE pwr_GetStatus (pwr_Status_Type * out_StatusPtr); + +EXTERN UBYTE pwr_PowerOffMobile (void); +#ifndef _SIMULATION_ +EXTERN void Bsp_get_boot_time(unsigned int * boot_time); /*OMAPS00091029 x0039928(sumanth)*/ +void boot_time_snapshot(BootTimeEvent event); +#endif +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/ra_l1int.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,67 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM-F&D (8411) +| Modul : RA_L1INT ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : This Modul defines the Layer 1 Functional Interface (L1INT) of the RA ++----------------------------------------------------------------------------- +*/ + +#ifndef RA_L1INT_H +#define RA_L1INT_H + +#include "cl_ribu.h" + +EXTERN void l1i_ra_activate_req + ( + T_RA_ACTIVATE_REQ *ra_activate_req + ); + +EXTERN void l1i_ra_datatrans_req + ( + T_RA_DATATRANS_REQ *ra_datatrans_req + ); + +EXTERN void l1i_ra_deactivate_req + ( + T_RA_DEACTIVATE_REQ *ra_deactivate_req + ); + +EXTERN void l1i_ra_data_req + ( + T_RA_DATA_REQ *ra_data_req, + T_FRAME_DESC *frame_desc + ); + +EXTERN void l1i_ra_data_req_new + ( + T_FD *pFD + ); + +EXTERN void l1i_ra_break_req + ( + T_RA_BREAK_REQ *ra_break_req + ); + +EXTERN void l1i_ra_detect_req + ( + T_RA_DETECT_REQ *ra_detect_req + ); + +EXTERN void l1i_ra_modify_req + ( + T_RA_MODIFY_REQ *ra_modify_req + ); +#endif +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/rom_tables.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,55 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM-PS +| Modul : DRV_ROM_TABLES ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : This Module defines the operator list tables in ROM ++----------------------------------------------------------------------------- +*/ + +#ifndef ROM_TABLES_H +#define ROM_TABLES_H + + +/*==== INCLUDES ===================================================*/ + +/* The swconfig.cfg is genarated file and we are including here to remove + multiple inclusions in other .c files */ + +#include "swconfig.cfg" + + +/* NHK: + * Once the tables plmn_compressed, plmn_dict_offset and plmn_dict go to ROM, their names below should match corresponding ROM addresses + * KSR: Moved to g23m\condat\com\src\drivers\rom_tables.c + */ +#ifdef TI_PS_OP_OPN_TAB_ROMBASED +EXTERN const UBYTE *const ptr_plmn_compressed; +EXTERN const USHORT *const ptr_plmn_dict_offset; +EXTERN const UBYTE *const ptr_plmn_dict; +#endif /* TI_PS_OP_OPN_TAB_ROMBASED */ + +/* Changes for ROM data */ +/* NHK: + * Once the tables chset and gsmToAsciiTable go to ROM, their names below should match corresponding ROM addresses + * KSR: Moved to g23m\condat\com\src\drivers\rom_tables.c + */ +#ifdef TI_PS_OP_CNV_TAB_ROMBASED +#define CSCS_CHSET_Chars 256 +EXTERN const UBYTE (*const chset)[CSCS_CHSET_Chars]; +EXTERN const UBYTE *const gsmToAsciiTable; +EXTERN const UBYTE *const hexVal; +#endif /* TI_PS_OP_CNV_TAB_ROMBASED */ + +#endif /* #ifndef ROM_TABLES_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/rtc.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,110 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM (6301) +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Type definitions and function prototypes for the real time clock driver +| SPR 1725, re-wrote file for new RTC driver implementation. ++----------------------------------------------------------------------------- + + Aug 02, 2006 REF:OMAPS00083404 Prabakar R (a0393213) + Description: Removal of clone code: entity GDI + Solution: Two similar functions(rtc_get_time_date() and rtc_get_alarm()) are made into one function rtc_get_time_date(). + As a result, interface for rtc_get_time_date() has been changed. The change is only for locosto. +*/ + +#ifndef DEF_RTC__H +#define DEF_RTC__H +/*==== INCLUDES ===================================================*/ +#include <string.h> +#include "typedefs.h" +#include "gdi.h" +#include "kbd.h" +/*==== EXPORT =====================================================*/ +/* + * type definitions + */ + + + typedef enum +{ + RTC_TIME_FORMAT_12HOUR, + RTC_TIME_FORMAT_24HOUR +} T_RTC_TIME_FORMAT; + +typedef struct { + UBYTE day; + UBYTE month; + USHORT year; +} T_RTC_DATE; + + +typedef struct +{ UBYTE minute; + UBYTE hour; + UBYTE second; + T_RTC_TIME_FORMAT format; + BOOL PM_flag; +} T_RTC_TIME; + +/* + Aug 02, 2006 REF:OMAPS00083404 Prabakar R (a0393213) + Description: Removal of clone code: entity GDI + Solution: Two similar functions(rtc_get_time_date() and rtc_get_alarm()) are made into one function rtc_get_time_date(). + This type is added to differenciate the functionality in the function. +*/ +typedef enum +{ + RTC_TIME_TYPE_CURRENT, + RTC_TIME_TYPE_ALARM +} T_RTC_TIME_TYPE; + +typedef void (*RtcCallback) (void*); /* RTC event handler */ + +/* + * Prototypes + */ + + +BOOL rtc_clock_cleared();// wrapper for RTC_RtcReset(); + +UBYTE rtc_set_time_date(T_RTC_DATE* date, T_RTC_TIME* time); // wrapper for RTC_setTimeDate(); + +/* + Aug 02, 2006 REF:OMAPS00083404 Prabakar R (a0393213) + Description: Removal of clone code: entity GDI + Solution: Two similar functions(rtc_get_time_date() and rtc_get_alarm()) are made into one function rtc_get_time_date() + As a result interface of rtc_get_time_date() has been changed. A new parameter 'type' has been added. + +*/ +UBYTE rtc_get_time_date(T_RTC_DATE* date, T_RTC_TIME* time , T_RTC_TIME_TYPE type ); // wrapper for RTC_getTimeDate(); + +UBYTE rtc_set_alarm(T_RTC_DATE* date , T_RTC_TIME* time, RtcCallback callback_func );//wrapper for RTC_setAlarm(); + +/* + Aug 02, 2006 REF:OMAPS00083404 Prabakar R (a0393213) + Description: Removal of clone code: entity GDI + Solution: Two similar functions(rtc_get_time_date() and rtc_get_alarm()) are made into one function rtc_get_time_date() + So rtc_get_alarm() is removed. To get the time which is set for alarm, use rtc_get_time_date() with RTC_TIME_TYPE_ALARM as third argument +*/ + +UBYTE rtc_unset_alarm();//wrapper for RTC_UnsetAlarm(); + +UBYTE rtc_set_time_format(T_RTC_TIME_FORMAT format);//wrapper for RTC_Set12HourMode(); + + + + + +#endif /* #ifndef DEF_RTC_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/rtcdrv.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,43 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM (6301) +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Types definitions for the real time clock driver +| . ++----------------------------------------------------------------------------- +*/ + +#ifndef DEF_RTC_H +#define DEF_RTC_H + +/* + * type definitions + */ +typedef struct rtc_time_type +{ + UBYTE year; + UBYTE month; + UBYTE day; + UBYTE hour; + UBYTE minute; + UBYTE second; +} rtc_time_type; + +/* + * Prototypes + */ +EXTERN UBYTE rtc_read_time ( rtc_time_type *rtc_time ); + +#endif /* #ifndef DEF_RTC_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/rx.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,85 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM (6301) +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Types definitions for the fieldstrength driver +| . ++----------------------------------------------------------------------------- + + $Hist + + Oct 05, 2006 ER: OMAPS00094496 x0061088(Prachi) + Description:Enhance RSSI to 3 parameters: Strength, quality, min-access-level + Solution:In order to provide a more accurate antenna icon on screen, in addition to "signal strength" the parameters + "signal quality" and "Min-aces-level" are required. + +*/ + +#ifndef RX_H +#define RX_H + +/* + * Signal Values + */ +#define RX_QUAL_UNAVAILABLE 0xFF /* should be kept identically */ + /* with the value defined in RR */ +#ifdef FF_PS_RSSI +#define RX_ACCE_UNAVAILABLE 0xFF +#endif + +/* + * Signal Types + */ +#define RX_SIGTYPE_RXLEVEL 0 + +/* + * Status Type + */ +typedef struct rx_Status_Type +{ + UBYTE actLevel; + UBYTE gsmLevel; + UBYTE rxQuality; +#ifdef FF_PS_RSSI + UBYTE min_access_level; +#endif +} rx_Status_Type; + +/* + * Driver Control Block + */ +typedef struct rx_DCB_Type +{ + UBYTE Steps; +} rx_DCB_Type; + +#if defined (NEW_FRAME) +/* + * to achieve backward compatibility with older definitions + */ +#define drv_SignalCB_Type T_DRV_CB_FUNC +#define drv_SignalID_Type T_DRV_SIGNAL +#define T_VSI_THANDLE USHORT +#endif +/* + * Prototypes + */ +EXTERN UBYTE rx_Init (drv_SignalCB_Type in_SignalCBPtr); +EXTERN void rx_Exit (void); +EXTERN UBYTE rx_SetConfig (rx_DCB_Type * in_DCBPtr); +EXTERN UBYTE rx_GetConfig (rx_DCB_Type * out_DCBPtr); +EXTERN UBYTE rx_GetStatus (rx_Status_Type * out_StatusPtr); +EXTERN void rx_timeout (T_VSI_THANDLE rx_handle); +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/socket_api.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,854 @@ +/* ++------------------------------------------------------------------------------ +| File: socket.h ++------------------------------------------------------------------------------ +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : This file implements the socket specific definitions to be used by applications in order to +| set up a connection(GPRS or CSD) or create sockets for data receiption. +| For a description of the socket API read g23m\condat\doc\8462_601.doc ++----------------------------------------------------------------------------- +*/ + +#ifndef __SOCKET_H__ +#define __SOCKET_H__ + +#include "typedefs.h" +#include "vsi.h" +#include "gsm.h" +#include "prim.h" // to get the DCM defines + + +/***************** Defines added for TCPIP testing with the application. ***********/ + +/* + * Value constants for VAL_bearer_select + */ +#define DCM_SOCK_BEARER_ANY (0x1) /* DCM will decide which connection type to be used */ +#define DCM_SOCK_BEARER_GPRS (0x2) /* Use a GPRS context as bearer, DCM will decide which GPRS settings to be used */ +#define DCM_SOCK_BEARER_GSM (0x3) /* Use GSM data connection as bearer DCM will decide which GSM settings to be used */ +#define DCM_SOCK_BEARER_USE_PROFILE (0x4) /* Use a specific data account for this connection */ +#define DCM_SOCK_BEARER_AS_SPECIFIED (0x5) /* Use the data account information which is which is delivered within this signal */ + +/* + * Value constants for VAL_authtype + */ +#define DCM_SOCK_AUTH_PAP (0x1) /* PAP authentification protocol */ +#define DCM_SOCK_AUTH_CHAP (0x2) /* CHAP authentification protocol !!! NOT SUPPORTED */ +#define DCM_SOCK_AUTH_NO (0x3) /* No authentication */ + +/* + * user defined constants + */ +#define CDCM_APN_MAX_LEN (0x64) +#define CDCM_PHONE_NR_LEN (0x54) +#define CDCM_USER_MAX_LEN (0x19) +#define CDCM_PASSWORD_MAX_LEN (0x19) + +/************************************************************************************/ + +/* + * Maximum length of the full-qualified domain name of an Internet host + */ +#define SOCK_MAXHOSTNAMELEN 255 + +/* Maximum length (in octets) of a GPRS Access Point Name (APN). */ +#define SOCK_MAX_APN_LEN CDCM_APN_MAX_LEN + +/* Maximum length (in octets) of a telephone number. */ +#define SOCK_MAX_PHONENUM_LEN CDCM_PHONE_NR_LEN + +/* Maximum length (in octets) of a user id. */ +#define SOCK_MAX_USERID_LEN CDCM_USER_MAX_LEN + +/* Maximum length (in octets) of a user password. */ +#define SOCK_MAX_PASSWORD_LEN CDCM_PASSWORD_MAX_LEN + +/* + * Type of an IP protocol + * The values of this type are used as the 'ipproto' argument when creating + * a socket to specify if a UDP socket or a TCP socket shall be created. + */ +typedef enum { + SOCK_IPPROTO_TCP = 6, + SOCK_IPPROTO_UDP = 17 +} T_SOCK_IPPROTO; + + +/* + * Type of a socket descriptor + */ +typedef unsigned long T_SOCK_SOCKET; + +/* + * Type of an API instance + */ +typedef unsigned long T_SOCK_API_INSTANCE; + +/* + * Type of an IP version 4 addresses in network byte order + */ +typedef unsigned long T_SOCK_IPADDR; + +#define SOCK_IPADDR_ANY (T_SOCK_IPADDR)0 /* Unspecified IP address */ + +/* + * UDP or TCP port number in network byte order + */ +typedef unsigned short T_SOCK_PORT; + +#define SOCK_PORT_ANY (T_SOCK_PORT)0 /* Unspecified port number */ + +/* + * Convert U32 value from host byte order to network byte order + */ +#define SOCK_HTONL( x ) \ + ((U32)((((U32)( x ) & 0x000000ffU) << 24) | \ + (((U32)( x ) & 0x0000ff00U) << 8) | \ + (((U32)( x ) & 0x00ff0000U) >> 8) | \ + (((U32)( x ) & 0xff000000U) >> 24))) + +/* + * Convert U16 value from host byte order to network byte order + */ +#define SOCK_HTONS( x ) \ + ((U16)((((U16)( x ) & 0x00ff) << 8) | \ + (((U16)( x ) & 0xff00) >> 8))) + +/* + * Convert U32 value from network byte order to host byte order + */ +#define SOCK_NTOHL( x ) \ + ((U32)((((U32)( x ) & 0x000000ffU) << 24) | \ + (((U32)( x ) & 0x0000ff00U) << 8) | \ + (((U32)( x ) & 0x00ff0000U) >> 8) | \ + (((U32)( x ) & 0xff000000U) >> 24))) + +/* + * Convert U16 value from network byte order to host byte order + */ +#define SOCK_NTOHS( x ) \ + ((U16)((((U16)( x ) & 0x00ff) << 8) | \ + (((U16)( x ) & 0xff00) >> 8))) + +/* + * Construct IP address in network byte order from single octets. + */ +#define SOCK_MK_IPADDR( a, b, c, d ) \ + ((T_SOCK_IPADDR)((a << 24) | (b << 16) | (c << 8) | d)) + +/* + * Type of a Socket API event + */ +typedef enum { + SOCK_CREATE_CNF = 1, /* Result event of sock_create() */ + SOCK_CLOSE_CNF = 2, /* Result event of sock_close() */ + SOCK_BIND_CNF = 3, /* Result event of sock_bind() */ + SOCK_LISTEN_CNF = 4, /* Result event of sock_listen() */ + SOCK_CONNECT_CNF = 5, /* Result event of sock_connect() */ + SOCK_SOCKNAME_CNF = 6, /* Result event of sock_getsockname() */ + SOCK_PEERNAME_CNF = 7, /* Result event of sock_getpeername() */ + SOCK_HOSTINFO_CNF = 8, /* Result event of sock_gethostbyname() or sock_gethostbyaddr() */ + SOCK_MTU_SIZE_CNF = 9, /* Result event of sock_get_mtu_size() */ + SOCK_RECV_IND = 10, /* Network event: data has been received */ + SOCK_CONNECT_IND = 11, /* Network event: an incoming connection has been accepted. */ + SOCK_CONN_CLOSED_IND = 12, /* Network event: connection has been closed by the remote peer */ + SOCK_ERROR_IND = 13, /* Network event: an asynchronous error has occurred */ + SOCK_FLOW_READY_IND = 14, /* Flow control: the API is ready to send data again */ + + SOCK_OPEN_BEARER_CNF, // Result Event of sock_open_bearer() + SOCK_CLOSE_BEARER_CNF, // Result event of sock_close_bearer() + SOCK_BEARER_INFO_CNF, // Result event of sock_bearer_info() + SOCK_BAERER_CLOSED_IND // The bearer connection has been closed +} T_SOCK_EVENTTYPE; + +/* + * Result codes of the API functions to indicate success or an error condition. + * This type is used as the result code of the function and as the result value + * in the associated event. It is also used for the error codes of a + * 'SOCK_ERROR_IND' event + */ +typedef enum { + SOCK_RESULT_OK = 0, /* No problem detected. a corresponding primitive has been sent to the TCP/IP entity */ + SOCK_RESULT_INVALID_PARAMETER = 1, /* A parameter given to the function is invalid */ + SOCK_RESULT_INTERNAL_ERROR = 2, /* An internal error has happened */ + SOCK_RESULT_ADDR_IN_USE = 3, /* The address or port is already in use */ + SOCK_RESULT_OUT_OF_MEMORY = 4, /* There is not enough memory to fulfill the request */ + SOCK_RESULT_NOT_SUPPORTED = 5, /* The socket is not of a type that can support this operation */ + SOCK_RESULT_UNREACHABLE = 6, /* The specified host cannot be reached */ + SOCK_RESULT_CONN_REFUSED = 7, /* The connection to the specified address was refused by the remote host */ + SOCK_RESULT_TIMEOUT = 8, /* The connection attempt timed out without establishing a connection */ + SOCK_RESULT_IS_CONNECTED = 9, /* The request could not be fulfilled because the socket is already connected */ + SOCK_RESULT_HOST_NOT_FOUND = 10, /* The specified host could not be found in the DNS */ + SOCK_RESULT_DNS_TEMP_ERROR = 11, /* A temporary DNS error has occurred. Retrying the query may be successful */ + SOCK_RESULT_DNS_PERM_ERROR = 12, /* A permanent DNS error has occurred */ + SOCK_RESULT_NO_IPADDR = 13, /* The specified name has been found in the DNS, but no IP address is available */ + SOCK_RESULT_NOT_CONNECTED = 14, /* The socket has not been connected yet */ + SOCK_RESULT_MSG_TOO_BIG = 15, /* The size of the data buffer is too large for a UDP socket */ + SOCK_RESULT_CONN_RESET = 16, /* The connection has been reset by the remote peer */ + SOCK_RESULT_CONN_ABORTED = 17, /* The connection was aborted due to timeout or some other error condition */ + SOCK_RESULT_NO_BUFSPACE = 18, /* Sending failed temporarily because the space to buffer the message was exhausted. */ + SOCK_RESULT_NETWORK_LOST, // As a result code: The operation failed because TCP/IP's bearer connection has been disconnected.As an asynchronous event code: The bearer connection has been closed. + SOCK_RESULT_NOT_READY, // The operation failed because the bearer connection has not been opened. + SOCK_RESULT_BEARER_NOT_READY, // The bearer connection could not be opened because the mobile is not yet completely attached to the network. A retry at a later time may be successful. + SOCK_RESULT_IN_PROGRESS, // The operation failed because a similar operation is already in progress. + SOCK_RESULT_BEARER_ACTIVE// The operation failed because a bearer connection is already open. +} T_SOCK_RESULT; + + +/* Type of the bearer_select parameter of sock_open_bearer(), used to select the + * type of the bearer connection to be opened by the Data Connection Manager + * (DCM), and of the bearer_type field of the T_SOCK_BEARER_INFO struct. + */ +typedef enum { + SOCK_BEARER_ANY = DCM_SOCK_BEARER_ANY, + SOCK_BEARER_GPRS = DCM_SOCK_BEARER_GPRS, + SOCK_BEARER_GSM = DCM_SOCK_BEARER_GSM, + SOCK_BEARER_USE_PROFILE = DCM_SOCK_BEARER_USE_PROFILE, + SOCK_BEARER_AS_SPECIFIED = DCM_SOCK_BEARER_AS_SPECIFIED +} T_SOCK_BEARER_TYPE; + +// FST: ????? +typedef enum { + SOCK_AUTH_PAP = DCM_SOCK_AUTH_PAP, + SOCK_AUTH_CHAP = DCM_SOCK_AUTH_CHAP, + SOCK_AUTH_NO= DCM_SOCK_AUTH_NO +} T_SOCK_AUTHTYPE; + +/* + * Type of the generic event data structure passed + * to the callback function on an event. + * The actual event structure may be bigger(depending on its type), + * but it will contain these fields at the beginning + */ +typedef struct { + T_SOCK_EVENTTYPE event_type; /* Type of the event. */ + T_SOCK_RESULT result; /* Result code of the operation */ + T_SOCK_SOCKET socket; /* Socket for which the event occurred */ +} T_SOCK_EVENTSTRUCT; + +/* + * Pointer to the callback function specified by the application + */ +typedef void (*T_SOCK_CALLBACK)(T_SOCK_EVENTSTRUCT* event, void *context); + +/* System wide handle of a bearer connection. + * Variables of this type are used as handles to identify a bearer connection. + * !! NOT NEEDED FOR CURRENT IMPLEMENTATION ONLY MENTIONED FOR FUTURE SUPPOSE.!! + */ +typedef U16 T_SOCK_BEARER_HANDLE; + +typedef struct { + T_SOCK_BEARER_HANDLE bearer_handle; + T_HANDLE app_handle; + T_SOCK_BEARER_TYPE bearer_type; + BOOL apn_valid; + char apn[SOCK_MAX_APN_LEN+1]; + BOOL phone_nr_valid; + char phone_nr[SOCK_MAX_PHONENUM_LEN+1]; + BOOL user_id_valid; + char user_id[SOCK_MAX_USERID_LEN+1]; + BOOL password_valid; + char password[SOCK_MAX_PASSWORD_LEN+1]; + int cid; + T_SOCK_IPADDR ip_address; + T_SOCK_IPADDR dns1; + T_SOCK_IPADDR dns2; + T_SOCK_IPADDR gateway; + T_SOCK_AUTHTYPE authtype; + BOOL data_compr; + BOOL header_comp; + int precedence; + int delay; + int reliability; + int peak_throughput; + int mean_througput; + BOOL shareable; +} T_SOCK_BEARER_INFO; + +/* ========================================================================== */ +/* ============================== Result Events from TCPIP ================= */ + +typedef struct { + T_SOCK_EVENTTYPE event_type; /* Type of the event. */ + T_SOCK_RESULT result; /* Result code of the operation */ + T_SOCK_SOCKET socket; /* Socket for which the event occurred */ + T_SOCK_BEARER_HANDLE bearer_handle; +} T_SOCK_OPEN_BEARER_CNF; + +typedef T_SOCK_EVENTSTRUCT T_SOCK_CLOSE_BEARER_CNF; + +typedef struct { + T_SOCK_EVENTTYPE event_type; /* Type of the event. */ + T_SOCK_RESULT result; /* Result code of the operation */ + T_SOCK_SOCKET socket; /* Socket for which the event occurred */ + T_SOCK_BEARER_INFO bearer_params; +} T_SOCK_BEARER_INFO_CNF; + +typedef struct { + T_SOCK_EVENTTYPE event_type; /* Type of the event. */ + T_SOCK_RESULT result; /* Result code of the operation */ + T_SOCK_SOCKET socket; /* Socket for which the event occurred */ + U32 dcm_error; /* The parameter contains errors received from + * PS (ETSI Spec 07.07) */ +} T_SOCK_BAERER_CLOSED_IND; + +typedef struct { + T_SOCK_EVENTTYPE event_type; /* Type of the event. */ + T_SOCK_RESULT result; /* Result code of the operation */ + T_SOCK_SOCKET socket; /* Socket for which the event occurred */ +} T_SOCK_CREATE_CNF; + +typedef T_SOCK_EVENTSTRUCT T_SOCK_CLOSE_CNF; +typedef T_SOCK_EVENTSTRUCT T_SOCK_BIND_CNF; +typedef T_SOCK_EVENTSTRUCT T_SOCK_LISTEN_CNF; +typedef T_SOCK_EVENTSTRUCT T_SOCK_CONNECT_CNF; + +typedef struct { + T_SOCK_EVENTTYPE event_type; /* Type of the event. */ + T_SOCK_RESULT result; /* Result code of the operation */ + T_SOCK_SOCKET socket; /* Socket for which the event occurred */ + T_SOCK_IPADDR ipaddr; /* The local IP address of the socket */ + T_SOCK_PORT port; /* The local port number of the socket */ +} T_SOCK_SOCKNAME_CNF; + +typedef T_SOCK_SOCKNAME_CNF T_SOCK_PEERNAME_CNF; + +typedef struct { + T_SOCK_EVENTTYPE event_type; /* Type of the event. */ + T_SOCK_RESULT result; /* Result code of the operation */ + T_SOCK_SOCKET socket; /* unused */ + char hostname[SOCK_MAXHOSTNAMELEN+1]; /* The name of the host as + a zero-terminated string */ + T_SOCK_IPADDR ipaddr; /* The local IP address of the socket */ +} T_SOCK_HOSTINFO_CNF; + +typedef struct { + T_SOCK_EVENTTYPE event_type; /* Type of the event. */ + T_SOCK_RESULT result; /* Result code of the operation */ + T_SOCK_SOCKET socket; /* Socket for which the event occurred */ + U16 mtu_size; /* MTU size */ +} T_SOCK_MTU_SIZE_CNF; + +typedef struct { + T_SOCK_EVENTTYPE event_type; /* Type of the event. */ + T_SOCK_RESULT result; /* Result code of the operation */ + T_SOCK_SOCKET socket; /* Socket for which the event occurred */ + U32 data_length; /* Length of the data portion received. */ + char *data_buffer; /* Pointer to the data received. The application + shall free this data buffer after use. */ +} T_SOCK_RECV_IND; + + +typedef struct { + T_SOCK_EVENTTYPE event_type; /* Type of the event. */ + T_SOCK_RESULT result; /* Result code of the operation */ + T_SOCK_SOCKET socket; /* Socket for which the event occurred */ + T_SOCK_SOCKET new_socket; /* New socket allocated for the connection. */ + T_SOCK_IPADDR peer_ipaddr; /* IP address of the remote peer. */ + T_SOCK_PORT peer_port; /* Port number on the remote side. */ +} T_SOCK_CONNECT_IND; + +typedef T_SOCK_EVENTSTRUCT T_SOCK_CONN_CLOSED_IND; +typedef T_SOCK_EVENTSTRUCT T_SOCK_ERROR_IND; +typedef T_SOCK_EVENTSTRUCT T_SOCK_FLOW_READY_IND; + + + +/* ========================================================================== */ +/* ================== Prototypes of socket API ============================== */ + + +/* ******************* API administrative functions ************************* */ + +/*------------------------------------------------------------------------------ + Function : sock_api_initialize + Parameter : - T_SOCK_API_INSTANCE * : + 'The function returns an API instance value. The value is needed + for several API functions.' + - T_HANDLE : + 'Application task handle as passed to pei_init()' + - char* : + 'Name of the application entity as used with vsi_c_open().' + Return : The function returns TRUE if the initialization was successful. + Description : Initializes the socket interface API. +------------------------------------------------------------------------------*/ +BOOL sock_api_initialize(T_SOCK_API_INSTANCE *api_instance, + T_HANDLE app_handle, + char* app_name); + + +/*------------------------------------------------------------------------------ + Function : sock_api_deinitialize + Parameter : - T_SOCK_API_INSTANCE : + 'API instance value.' + Return : None + Description : Deinitializes the socket interface API. The function releases + all associated memory. +------------------------------------------------------------------------------*/ +void sock_api_deinitialize(T_SOCK_API_INSTANCE api_instance); + + +/*------------------------------------------------------------------------------ + Function : sock_api_handles_primitive + Parameter : - T_SOCK_API_INSTANCE: API instance value + - T_PRIM: Pointer to primitive received from + the primitive queue' + Return : The function returns TRUE if the primitive has been handled by + this function.In this case the application should not do + anything else with the primitive and should not call PFREE() + to free the memory block used for the primitive. + The function returns FALSE if the primitive has not been + handled by this function. In this case the application should + process the primitive as usual. + Description : Handles primitives for the socket API. + To free the application from the handling of the event + primitives sent by the TCP/IP entity, the Socket API provides + this function that checks if a primitive is to be handled by + the Socket API and if it is, handles it. The application is + supposed to call it immediately after receiving a primitive. + If the primitive is meant for the Socket API, it is handled by + this function. This will in most cases include calling the + callback function supplied by the application to deliver an + event. If the primitive is not meant for the Socket API, + no action is taken. + It is recommended to call this function early in the + application entity's pei_primitive() function. +------------------------------------------------------------------------------*/ +BOOL sock_api_handles_primitive(T_SOCK_API_INSTANCE api_instance, + T_PRIM *prim); + + +/* ******************* Bearer related functions ***************************** */ + +/*------------------------------------------------------------------------------ + Function : sock_open_bearer() + Parameter : - T_SOCK_API_INSTANCE: API instance value + - T_SOCK_BEARER_TYPE : CSD or GPRS + - int: Number of the selected profile with a bearer + selection of SOCK_BEARER_USE_PROFILE. + Unused in other cases. + - T_SOCK_BEARER_INFO: requested parameters of the bearer connection + - T_SOCK_CALLBACK: callback function to be called for return events. + - void*: An arbitrary pointer to be passed to the + callback function when it is called + Return : T_SOCK_RESULT indicates successor a problem that happend + Return Event : T_SOCK_OPEN_BEARER_CNF + Description : Opens a CSD or GPRS connection for use with TCP/IP. + This function a bearer connection for use with TCP/IP. It must be + called after sock_api_initialize() and before any other + TCP/IP-related functions. +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_open_bearer(T_SOCK_API_INSTANCE api_instance, + T_SOCK_BEARER_TYPE bearer_select, + int profile_number, + T_SOCK_BEARER_INFO *params, + T_SOCK_CALLBACK sock_cb, + void *context); + + +/*------------------------------------------------------------------------------ + Function : sock_close_bearer() + Parameter : - T_SOCK_API_INSTANCE : API instance value + - T_SOCK_BEARER_HANDLE: returned by SOCK_OPEN_BEARER_CNF + - T_SOCK_CALLBACK: Callback function to be called for return events. + - void*: An arbitrary pointer to be passed to the + callback function when it is called + Return : T_SOCK_RESULT indicates successor a problem that happend + Return Event : T_SOCK_CLOSE_BEARER_CNF + Description : Close a bearer connection that has been opened with sock_open_bearer(). +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_close_bearer(T_SOCK_API_INSTANCE api_instance, + T_SOCK_BEARER_HANDLE bearer_handle, + T_SOCK_CALLBACK sock_cb, + void *context); + + +/*------------------------------------------------------------------------------ + Function : sock_bearer_info() + Parameter : - T_SOCK_API_INSTANCE: API instance value + - T_SOCK_BEARER_HANDLE: returned by SOCK_OPEN_BEARER_CNF + - T_SOCK_CALLBACK: Callback function to be called for + return events. + - void*: An arbitrary pointer to be passed to the + callback function when it is called + Return : T_SOCK_RESULT + Return Event : T_SOCK_BEARER_INFO_CNF + Description : Get information about a bearer connection that has been opened + with sock_open_bearer(). +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_bearer_info(T_SOCK_API_INSTANCE api_instance, + T_SOCK_BEARER_HANDLE bearer_handle, + T_SOCK_CALLBACK sock_cb, + void *context); + + +/* ******************* Socket related functions ***************************** */ + +/*------------------------------------------------------------------------------ + Function : sock_create + Parameter : - T_SOCK_API_INSTANCE : + 'API instance value.' + - T_SOCK_IPPROTO : + 'The protocol (UDP or TCP) to be used with this socket' + - T_SOCK_CALLBACK : + 'The callback function to be called for events on this socket' + - void * : + 'An arbitrary pointer to be passed to + the callback function when it is called' + Return : (T_SOCK_RESULT) + Return Event : 'SOCK_CREATE_CNF' + - T_SOCK_RESULT : Result code + - T_SOCK_SOCKET : The socket descriptor returned by the TCP/IP entity + Description : - Create a new UDP or TCP socket + - This function creates a socket that can subsequently be used with + the other Socket API functions +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_create(T_SOCK_API_INSTANCE api_instance, + T_SOCK_IPPROTO ipproto, + T_SOCK_CALLBACK callback, + void *context); + + +/*------------------------------------------------------------------------------ + Function : sock_close + Parameter : - T_SOCK_SOCKET : + 'The socket descriptor to be closed' + Return : (T_SOCK_RESULT) + Return Event : 'SOCK_CLOSE_CNF' + - T_SOCK_RESULT : Result code + - T_SOCK_SOCKET : The socket descriptor to be closed + Description : - Close socket, shutdown connection if present + - This function closes a socket that has previously + been created with sock_create(). + If a connection is open for this socket, it will be closed. + If this socket has listened for connections, + no further connections will be accepted + History : 0001 03.08.11 shkim Created +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_close(T_SOCK_SOCKET socket); + + +/*------------------------------------------------------------------------------ + Function : sock_bind + Parameter : - T_SOCK_SOCKET : + 'The socket descriptor to be closed' + - T_SOCK_PORT : + 'The port number to bind the socket to' + Return : (T_SOCK_RESULT) + Return Event : 'SOCK_BIND_CNF' + - T_SOCK_RESULT : Result code + - T_SOCK_SOCKET : The socket descriptor to be bound + Description : - Bind socket to a specific local port number + - This function binds a socket to the specified local port + History : 0001 03.08.11 shkim Created +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_bind(T_SOCK_SOCKET socket, + T_SOCK_PORT port); + + +/*------------------------------------------------------------------------------ + Function : sock_listen + Parameter : - T_SOCK_SOCKET : + 'The socket descriptor to listen on' + Return : (T_SOCK_RESULT) + Return Event : 'SOCK_LISTEN_CNF' + - T_SOCK_RESULT : Result code + - T_SOCK_SOCKET : The socket descriptor to listen on + Description : - Accept TCP connections on this socket + - This function makes TCP/IP listen for + TCP connections on this socket. + The socket should have been bound to a specific port + using sock_bind() before. + History : 0001 03.08.11 shkim Created +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_listen(T_SOCK_SOCKET socket); + + +/*------------------------------------------------------------------------------ + Function : sock_connect + Parameter : - T_SOCK_SOCKET : + 'The socket descriptor to connect' + - T_SOCK_IPADDR : + 'The IP address to connect to' + - T_SOCK_PORT : + 'The port number to connect to' + Return : (T_SOCK_RESULT) + Return Event : 'SOCK_CONNECT_CNF' + - T_SOCK_RESULT : Result code + - T_SOCK_SOCKET : The socket descriptor to connect + Description : - Connect the socket to a remote endpoint + - With TCP sockets, a TCP connection is established to + the specified IP address and the specified port. + The connection can then be used to send data using sock_send(); + received data is indicated by a SOCK_RECV_IND event. + With UDP sockets, the specified IP address and port number + are stored with the socket; + subsequent UDP messages can be sent to this address + using sock_send(); + only messages from this address will be received. + History : 0001 03.08.11 shkim Created +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_connect(T_SOCK_SOCKET socket, + T_SOCK_IPADDR ipaddr, + T_SOCK_PORT port); + + +/*------------------------------------------------------------------------------ + Function : sock_getsockname + Parameter : - T_SOCK_SOCKET : + 'The socket descriptor to retrieve information about' + Return : (T_SOCK_RESULT) + Return Event : 'SOCK_SOCKNAME_CNF' + - T_SOCK_RESULT : Result code + - T_SOCK_SOCKET : The socket descriptor to connect + - T_SOCK_IPADDR : The local IP address of the socket + - T_SOCK_PORT : The local port number of the socket + Description : - Retrieve local address information + - The function retrieves local address information of the socket. + If the socket has not yet been bound to an address using sock_bind(), + the port number is unspecified (SOCK_PORT_ANY) + History : 0001 03.08.11 shkim Created +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_getsockname(T_SOCK_SOCKET socket); + + +/*------------------------------------------------------------------------------ + Function : sock_getpeername + Parameter : - T_SOCK_SOCKET : + 'The socket descriptor to retrieve information about' + Return : (T_SOCK_RESULT) + Return Event : 'SOCK_PEERNAME_CNF' + - T_SOCK_RESULT : Result code + - T_SOCK_SOCKET : The socket descriptor to connect + - T_SOCK_IPADDR : The IP address of the remote peer + - T_SOCK_PORT : The port number at the remote peer + Description : - Retrieve remote address information + - The function retrieves address information of + the connection at the remote peer. + If the socket is not connected, + the IP address and port number are unspecified +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_getpeername(T_SOCK_SOCKET socket); + + +/*------------------------------------------------------------------------------ + Function : sock_gethostbyname + Parameter : - T_SOCK_API_INSTANCE : + 'API instance value.' + - char * : + 'The name of the referenced host' + - T_SOCK_CALLBACK : + 'The callback function to be called for the result event' + - void * : + 'An arbitrary pointer to be passed to the callback + function when it is called' + Return : (T_SOCK_RESULT) + Return Event : 'SOCK_HOSTINFO_CNF' + - T_SOCK_RESULT : Result code + - char hostname[SOCK_MAXHOSTNAMELEN+1] : The name of the + host as a zero-terminated string + - T_SOCK_IPADDR : The IP address of the host + Description : - Get the IP address of a host + - The function queries the IP address information of + the specified host from the DNS. + Because the function is not associated to any socket, + a callback function and a context + pointer must be specified separately +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_gethostbyname(T_SOCK_API_INSTANCE api_instance, + char *hostname, + T_SOCK_CALLBACK callback, + void *context); + + +/*------------------------------------------------------------------------------ + Function : sock_gethostbyaddr + Parameter : - T_SOCK_API_INSTANCE : + 'API instance value.' + - T_SOCK_IPADDR : + 'The IP address of the referenced host' + - T_SOCK_CALLBACK : + 'The callback function to be called for the result event' + - void * : + 'An arbitrary pointer to be passed to the callback function + when it is called' + Return : (T_SOCK_RESULT) + Return Event : 'SOCK_HOSTINFO_CNF' + - T_SOCK_RESULT : Result code + - char hostname[SOCK_MAXHOSTNAMELEN+1] : The name of the + host as a zero-terminated string + - T_SOCK_IPADDR : The IP address of the host + Description : - Get the name of a host + - The function queries the hostname for the specified + IP address from the DNS. + Because the function is not associated to any socket, + a callback function and a context pointer must be specified separately +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_gethostbyaddr(T_SOCK_API_INSTANCE api_instance, + T_SOCK_IPADDR ipaddr, + T_SOCK_CALLBACK callback, + void *context); + + +/*------------------------------------------------------------------------------ + Function : sock_send + Parameter : - T_SOCK_SOCKET : + 'The socket to send the data on' + - char * : + 'The data buffer to be sent' + - U16 : + 'The length of the data buffer in bytes' + Return : (T_SOCK_RESULT) + Return Event : None + Description : - Send data on a socket ( TCP only ) + - The function sends the specified data buffer over the socket. + The socket must be connected, + i. e. it must have been connected to a remote peer + using sock_connect() or been created when accepting + a connection as indicated by SOCK_SONNECT_IND. + Implementation note: In order to send the payload data via DTI, + the data must be copied into a DTI descriptor by the Socket API; + there is no way to avoid the copy operation without + putting the burden of knowing DTI-internal data + structures on the application. + It has been decided to pay the cost of the copy operation + in order to free the application from this responsibility +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_send(T_SOCK_SOCKET socket, + char *buffer, + U16 buffer_length); + + +/*------------------------------------------------------------------------------ + Function : sock_sendto + Parameter : - T_SOCK_SOCKET : + 'The socket to send the data on' + - char * : + 'The data buffer to be sent' + - U16 : + 'The length of the data buffer' + - T_SOCK_IPADDR : + 'IP address of the host to send data to' + - T_SOCK_PORT : + 'Remote port to send data to' + Return : (T_SOCK_RESULT) + Return Event : None + Description : - Send data on a socket( UDP only ) + - The function sends the specified data buffer + over the socket to the specified address. The socket must be + a UDP socket. + Implementation note: In order to send the payload data via DTI, + the data must be copied into a DTI descriptor by the Socket API; + there is no way to avoid the copy operation without putting + the burden of knowing DTI-internal data structures on + the application. It has been decided to pay the cost of + the copy operation in order to free the application from + this responsibility +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_sendto(T_SOCK_SOCKET socket, + char *buffer, + U16 buffer_length, + T_SOCK_IPADDR ipaddr, + T_SOCK_PORT port); + + +/*------------------------------------------------------------------------------------ + Function : sock_set_callback + Parameter : - T_SOCK_SOCKET : + 'Socket to set callback and context for' + - T_SOCK_CALLBACK : + 'New callback function for the socket' + - void * : + 'New context pointer for the socket' + Return : (T_SOCK_RESULT) + Return Event : None + Description : - Set a new callback function and context pointer for the socket + - The function defines a new callback function and a new context + pointer for the socket. All socket events after this call will be + delivered using the new callback function and the new context + pointer +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_set_callback(T_SOCK_SOCKET socket, + T_SOCK_CALLBACK callback, + void *context); + + +/*------------------------------------------------------------------------------ + Function : sock_get_callback + Parameter : - T_SOCK_SOCKET : + 'Socket to get callback and context from' + - T_SOCK_CALLBACK * : + 'Return callback function pointer for the socket' + - void ** : + 'Return context pointer for the socket' + Return : (T_SOCK_RESULT) + Return Event : None + Description : - Get callback function pointer and context pointer for the socket + - The function returns callback function pointer and context pointer + for the socket. + pointer +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_get_callback(T_SOCK_SOCKET socket, + T_SOCK_CALLBACK *callback_p, + void **context_p); + + +/*------------------------------------------------------------------------------ + Function : sock_flow_xoff + Parameter : - T_SOCK_SOCKET : + 'Socket to switch to "xoff" status' + Return : (T_SOCK_RESULT) + Return Event : None + Description : - Flow control: make TCP/IP stop sending data + - This function makes the Socket API stop TCP/IP sending data. + If TCP/IP has already been stopped, the function has no effect. + History : 0001 03.08.11 shkim Created + 0002 03.09.12 STW T_SOCK_RESULT added +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_flow_xoff(T_SOCK_SOCKET socket); + + +/*------------------------------------------------------------------------------ + Function : sock_flow_xon + Parameter : - T_SOCK_SOCKET : + 'Socket to switch to "xon" status' + Return : (T_SOCK_RESULT) + Return Event : None + Description : - Flow control: make TCP/IP resume sending data + - This function makes TCP/IP resume sending data. + If TCP/IP has not been stopped, the function has no effect + History : 0001 03.08.11 shkim Created + 0002 03.09.12 STW T_SOCK_RESULT added +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_flow_xon(T_SOCK_SOCKET socket); + + +/*------------------------------------------------------------------------------ + Function : sock_get_mtu_size + Parameter : - T_SOCK_SOCKET : + 'Socket to get MTU size from' + Return : (T_SOCK_RESULT) + Return Event : 'SOCK_MTU_SIZE_CNF' + - T_SOCK_RESULT : Result code + - T_SOCK_SOCKET : The socket descriptor (unused). + - U16 : MTU size + Description : - Get MTU size of network connection + - The function retrieves the size of + the Maximum Transfer Unit(MTU) of the network connection. + History : 0001 03.08.11 shkim Created + 0002 03.09.12 STW T_SOCK_SOCKET added +------------------------------------------------------------------------------*/ +T_SOCK_RESULT sock_get_mtu_size(T_SOCK_SOCKET socket); + + +#endif /* __SOCKET_H__ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/include/vmd.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,112 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM (6301) +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Types definitions for the voice memo and dialling driver +| . ++----------------------------------------------------------------------------- +*/ + +#ifndef DEF_VMD_H +#define DEF_VMD_H + +/* + * Signal Types + */ +#define VMD_END_RECORD 1 +#define VMD_END_PLAY 2 +#define VMD_SPEECH_RECOGNITION 3 + + +/* + * type definitions + */ +typedef struct vmd_start_record_type +{ + USHORT * start_address; + USHORT * stop_address; + UBYTE dtx_used; + USHORT tone_id; +} vmd_start_record_type; + +typedef struct vmd_start_play_type +{ + USHORT * start_address; +} vmd_start_play_type; + +typedef struct vmd_end_record_type +{ + USHORT * stop_address; +} vmd_end_record_type; + +typedef struct vmd_end_play_type +{ + USHORT * stop_address; +} vmd_end_play_type; + + +typedef struct vmd_speech_recognition_req_type +{ + USHORT i_speaker; + USHORT i_action; + USHORT i_param1; + USHORT i_param2; + USHORT * address; + USHORT total_vocabulary_number; +} vmd_speech_recognition_req_type; + +/* + * Constants + */ +#define SC_SR_MAX_NB_USER 10 + +#define SC_SR_START_ENROLL 1 +#define SC_SR_START_UPDATE 2 +#define SC_SR_START_RECO 3 +#define SC_SR_ABORT 6 +#define SC_SR_START_UPDATE_CHECK 13 + +#define C_SR_CORRECT_END 0 +#define C_SR_CORRECT_END_ACQ 1 +#define C_SR_CORRECT_END_UPD 2 +#define C_SR_CORRECT_END_RECO 3 +#define C_SR_TIME_OUT 11 +#define C_SR_BAD_ACQUISITION 12 +#define C_SR_OOV_TOOCLOSE 13 +#define C_SR_UPDATE_CHECK_ERR 14 +#define C_SR_BAD_RECOGNITION 20 + +#if defined (NEW_FRAME) +/* + * to achieve backward compatibility with older definitions + */ +#define drv_SignalCB_Type T_DRV_CB_FUNC +#define drv_SignalID_Type T_DRV_SIGNAL +#endif + + /* + * Prototypes + */ +EXTERN UBYTE vmd_init (drv_SignalCB_Type in_SignalCBPtr); +EXTERN void vmd_exit (void); +EXTERN UBYTE vmd_start_voice_memo_recording (vmd_start_record_type * vmd_parameter); +EXTERN UBYTE vmd_stop_voice_memo_recording (void); +EXTERN UBYTE vmd_start_voice_memo_playing (vmd_start_play_type * vmd_parameter); +EXTERN UBYTE vmd_stop_voice_memo_playing (void); + +EXTERN UBYTE vmd_start_recognition (vmd_speech_recognition_req_type * vmd_parameter); +EXTERN UBYTE vmd_primitive (USHORT opc, void * data); + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/src/comlib/cl_imei.c Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,396 @@ +/* ++----------------------------------------------------------------------------- +| Project : COMLIB +| Modul : cl_imei.c ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Definitions of common library functions: IMEI decryption with + DES algorithm ++----------------------------------------------------------------------------- +*/ +/* + * Version 1.0 + */ + +/**********************************************************************************/ + +/* +NOTE: +*/ + +/**********************************************************************************/ + +#ifndef CL_IMEI_C +#define CL_IMEI_C + +#include "typedefs.h" +#include "vsi.h" /* to get a lot of macros */ + +#ifndef _SIMULATION_ +#include "ffs/ffs.h" +#include "config/chipset.cfg" +#include "config/board.cfg" +#include "memif/mem.h" +#include "pcm.h" +#endif /* ifdef SIMULATION */ + +#include "cl_imei.h" +#include "cl_des.h" +#include <string.h> + +#undef FF_PROTECTED_IMEI +#if defined(CL_IMEI_CALYPSO_PLUS_PLATFORM) && defined(FF_PROTECTED_IMEI) +#include "secure_rom/secure_rom.h" +#endif + + +#if defined( CL_IMEI_CALYPSO_PLATFORM) OR defined(CL_IMEI_CALYPSO_PLUS_PLATFORM) OR !defined(CL_IMEI_LOCOSTO_PLATFORM) + +static UBYTE stored_imei[CL_IMEI_SIZE]; /* when the imei is read once, the value + is stored in this buffer */ + +static UBYTE imei_flag = 0; /* this flag indicates, if IMEI was successful read + and is stored in the stored_imei buffer */ +#endif /*CL_IMEI_CALYPSO_PLATFORM OR CL_IMEI_CALYPSO_PLUS_PLATFORM */ +#if !defined (CL_IMEI_CALYPSO_PLUS_PLATFORM) +/* Default IMEISV for D-Sample 00440000-350-111-20 */ +const UBYTE C_DEFAULT_IMEISV_DSAMPLE[CL_IMEI_SIZE] = + {0x00, 0x44, 0x00, 0x00, 0x35, 0x01, 0x11, 0x20}; +#define CL_IMEI_FFS_PATH "/gsm/imei.enc" +#endif /* CL_IMEI_CALYPSO_PLATFORM */ + +#ifdef CL_IMEI_CALYPSO_PLUS_PLATFORM +/* Default IMEISV for E-Sample 00440000-351-222-30 */ +const UBYTE C_DEFAULT_IMEISV_ESAMPLE[CL_IMEI_SIZE] = + {0x00, 0x44, 0x00, 0x00, 0x35, 0x12, 0x22, 0x30}; +#endif /* CL_IMEI_CALYPSO_PLUS_PLATFORM */ + +/*==== FUNCTIONS ==================================================*/ +#ifdef FF_PROTECTED_IMEI + +#ifdef CL_IMEI_CALYPSO_PLATFORM +/* ++------------------------------------------------------------------------------ +| Function : get_dieID ++------------------------------------------------------------------------------ +| Description : the function reads the Die-ID from base band processor and +| extracts it from 4 BYTEs to 8 BYTEs. +| +| Parameters : inBufSize - size of buffer where to store Die ID, min.8 BYTE +| *outBufPtr - pointer to buffer where to store the Die ID +| Return : void ++------------------------------------------------------------------------------ +*/ +LOCAL void get_dieID(USHORT inBufSize, UBYTE *outBufPtr) +{ + int i; + USHORT *outBuf16 = (USHORT*)&outBufPtr[0]; + volatile USHORT *reg_p = (USHORT *) CL_IMEI_DIE_ID_REG; + + TRACE_FUNCTION("get_dieID()"); + + if(inBufSize < CL_IMEI_DIE_ID_SIZE){ + TRACE_ERROR("CL IMEI ERROR: buffer size for Die ID to short!"); + } +#ifdef IMEI_DEBUG + TRACE_EVENT_P1("CL IMEI INFO: Die-ID address(0x%x)", CL_IMEI_DIE_ID_REG); +#endif + for (i = 0; i < CL_IMEI_DIE_ID_SIZE; i++) { + /* Die ID is 4 BYTE long, extract it to 8 BYTE. */ + outBuf16[i] = (USHORT)(*(UINT8*)(reg_p)++); + } +} + +/* ++------------------------------------------------------------------------------ +| Function : ffs_get_imeisv ++------------------------------------------------------------------------------ +| Description : the function reads IMEI from FFS +| +| Parameters : inBufSize - size of buffer where to store IMEI, min. 8 BYTE +| *outBufPtr - pointer to buffer where to store the IMEI +| Return : 0 - OK +| <0 - ERROR ++------------------------------------------------------------------------------ +*/ +LOCAL BYTE ffs_get_imeisv (USHORT inBufSize, UBYTE *outBufPtr) +{ + UBYTE i; + UBYTE isdid_buf[CL_IMEI_ISDID_SIZE]; + UBYTE r_dieId[CL_DES_KEY_SIZE]; /* read Die ID */ + UBYTE d_dieId[CL_DES_KEY_SIZE]; /* deciphered Die ID */ + SHORT ret; + + TRACE_FUNCTION("ffs_get_imeisv()"); + + if(inBufSize < CL_IMEI_SIZE){ + TRACE_ERROR("CL IMEI ERROR: buffer size for IMEI to short!"); + return CL_IMEI_ERROR; + } + + /* + * Read ISDID(enciphered IMEISV+DieID) from FFS. + */ + if((ret = ffs_file_read(CL_IMEI_FFS_PATH, isdid_buf, CL_IMEI_ISDID_SIZE)) >= EFFS_OK) + { + /* + * Read Die ID for using as DES key + */ + get_dieID(CL_DES_KEY_SIZE, r_dieId); + /* + * Call DES algorithm routine + */ + /* decipher first 8 BYTEs */ + cl_des(&isdid_buf[0], r_dieId, outBufPtr, CL_DES_DECRYPTION); + /* decipher the rest 8 BYTEs */ + cl_des(&isdid_buf[CL_DES_BUFFER_SIZE], r_dieId, d_dieId, CL_DES_DECRYPTION); + if(!memcmp(d_dieId, r_dieId, CL_DES_KEY_SIZE)) + { + /* Die ID is valid */ + ret = CL_IMEI_OK; + } else {/* Die ID is corrupted */ + char pr_buf[126]; + TRACE_ERROR("CL IMEI ERROR: Die ID is corrupted"); + sprintf(pr_buf,"Read DieID: %02x %02x %02x %02x %02x %02x %02x %02x", + r_dieId[0], r_dieId[1], r_dieId[2], r_dieId[3], + r_dieId[4], r_dieId[5], r_dieId[6], r_dieId[7]); + TRACE_ERROR(pr_buf); + sprintf(pr_buf,"Deciphered DieID: %02x %02x %02x %02x %02x %02x %02x %02x", + d_dieId[0], d_dieId[1], d_dieId[2], d_dieId[3], + d_dieId[4], d_dieId[5], d_dieId[6], d_dieId[7]); + TRACE_ERROR(pr_buf); + + ret = CL_IMEI_INVALID_DIE_ID; + } + } else { + ret = CL_IMEI_READ_IMEI_FAILED; + } + + return ret; + +}/* ffs_get_imeisv() */ +#endif /* CL_IMEI_CALYPSO_PLATFORM */ + + +#ifdef CL_IMEI_CALYPSO_PLUS_PLATFORM +/* ++------------------------------------------------------------------------------ +| Function : securerom_get_imeisv ++------------------------------------------------------------------------------ +| Description : the function reads IMEI from Secure ROM +| +| Parameters : inBufSize - size of buffer where to store IMEI, min. 8 BYTE +| *outBufPtr - pointer to buffer where to store the IMEI +| Return : 0 - OK +| <0 - ERROR ++------------------------------------------------------------------------------ +*/ +LOCAL BYTE securerom_get_imeisv (USHORT inBufSize, UBYTE *outBufPtr) +{ + BYTE ret; + + TRACE_FUNCTION("securerom_get_imeisv()"); + + if((ret = securerom_drv(inBufSize, outBufPtr)) == CL_IMEI_OK){ + return CL_IMEI_OK; + } else { + return CL_IMEI_READ_IMEI_FAILED; + } +} +#endif /* CL_IMEI_CALYPSO_PLUS_PLATFORM */ + +#ifndef CL_IMEI_LOCOSTO_PLATFORM +/* ++------------------------------------------------------------------------------ +| Function : get_secure_imeisv ++------------------------------------------------------------------------------ +| Description : the function reads IMEI either from FFS or from Secure ROM of +| from other locations depended on hardware platform +| +| Parameters : inBufSize - size of buffer where to store IMEI, min. 8 BYTE +| *outBufPtr - pointer to buffer where to store the IMEI +| Return : 0 - OK +| negative value - ERROR ++------------------------------------------------------------------------------ +*/ +LOCAL BYTE get_secure_imeisv(USHORT inBufSize, UBYTE *outBufPtr) +{ + UBYTE chipset = CHIPSET; + UBYTE board = BOARD; + + TRACE_FUNCTION("get_secure_imeisv()"); + +/* + * SW is running on Calypso platform (D-Sample) + */ +#ifdef CL_IMEI_CALYPSO_PLATFORM + /* + * Read IMEI from FFS inclusive deciphering with DES. + */ + if((ffs_get_imeisv (inBufSize, outBufPtr)) EQ CL_IMEI_OK) + { + /* store IMEI */ + memcpy(stored_imei, outBufPtr, CL_IMEI_SIZE); + imei_flag = 1; + return CL_IMEI_OK; + } +#else /* CL_IMEI_CALYPSO_PLATFORM */ +/* + * SW is running on Calypso plus platform (E-Sample) + */ +#ifdef CL_IMEI_CALYPSO_PLUS_PLATFORM + if((securerom_get_imeisv (inBufSize, outBufPtr)) EQ CL_IMEI_OK) + { + /* store IMEI */ + memcpy(stored_imei, outBufPtr, CL_IMEI_SIZE); + imei_flag = 1; + return CL_IMEI_OK; + } +#else /* CL_IMEI_CALYPSO_PLUS_PLATFORM */ +/* + * SW is running on an other platform (neither Calypso nor Calypso plus) + */ +#ifdef CL_IMEI_OTHER_PLATFORM + { + TRACE_EVENT_P2("CL IMEI WARNING: unknown hardware: board=%d, chipset=%d, return default imei", + board, chipset); + memcpy(outBufPtr, C_DEFAULT_IMEISV_DSAMPLE, CL_IMEI_SIZE); + return CL_IMEI_OK; + } +#endif /* CL_IMEI_OTHER_PLATFORM */ +#endif /* CL_IMEI_CALYPSO_PLUS_PLATFORM */ +#endif /* CL_IMEI_CALYPSO_PLATFORM */ + + +} /* get_secure_imeisv() */ +#endif /* CL_IMEI_LOCOSTO_PLATFORM */ + + +#endif /* FF_PROTECTED_IMEI */ + +#ifndef CL_IMEI_LOCOSTO_PLATFORM +/* ++------------------------------------------------------------------------------ +| Function : cl_get_imeisv ++------------------------------------------------------------------------------ +| Description : Common IMEI getter function +| +| Parameters : imeiBufSize - size of buffer where to store IMEI, min 8 BYTEs +| *imeiBufPtr - pointer to buffer where to store the IMEI +| imeiType - indicates, if the IMEI should be read from +| FFS/Secure ROM (value=CL_IMEI_GET_SECURE_IMEI) or +| if the already read and stored IMEI (if available) +| should be delivered (value=CL_IMEI_GET_STORED_IMEI) +| The second option should be used only by ACI or +| BMI to show the IMEISV on mobile's display or +| in terminal window, e.g. if user calls *#06#. +| For IMEI Control reason (used by ACI), the value +| has to be CL_IMEI_CONTROL_IMEI +| Return : OK - 0 +| ERROR - negative values ++------------------------------------------------------------------------------ +*/ +extern BYTE cl_get_imeisv(USHORT imeiBufSize, UBYTE *imeiBufPtr, UBYTE imeiType) +{ + BYTE ret = 0; + + TRACE_FUNCTION("cl_get_imeisv()"); + +#ifdef _SIMULATION_ + memcpy(imeiBufPtr, C_DEFAULT_IMEISV_DSAMPLE, CL_IMEI_SIZE); + return CL_IMEI_OK; +#else /* _SIMULATION_ */ + +#ifdef FF_PROTECTED_IMEI + /* + * The user has required a stored IMEI. If it has been already read + * and stored, so return stored IMEI + */ + if((imeiType == CL_IMEI_GET_STORED_IMEI) && (imei_flag == 1)){ + memcpy(imeiBufPtr, stored_imei, CL_IMEI_SIZE); + return CL_IMEI_OK; + } + /* + * The user has required a secure IMEI. Read IMEI from FFS or from Secure ROM + */ + if((ret = get_secure_imeisv(imeiBufSize, imeiBufPtr)) == CL_IMEI_OK) + { + return CL_IMEI_OK; + } else { + TRACE_ERROR("CL IMEI FATAL ERROR: IMEI not available!"); + /* + * Notify the Frame entity about FATAL ERROR, but not in the case, + * if ACI is checking IMEI, because ACI will take trouble about it. + */ + if (imeiType != CL_IMEI_CONTROL_IMEI){ + TRACE_ASSERT(ret == CL_IMEI_OK); + } + return ret; + } +/* + * The feature flag FF_PROTECTED_IMEI is not enabled. + */ +#else /* FF_PROTECTED_IMEI */ + +/* + * Return default CALYPSO+ IMEISV value + */ +#ifdef CL_IMEI_CALYPSO_PLUS_PLATFORM + + TRACE_EVENT("CL IMEI INFO: return default IMEI-SV number"); + memcpy(imeiBufPtr, C_DEFAULT_IMEISV_ESAMPLE, CL_IMEI_SIZE); + +/* + * CL_IMEI_CALYPSO_PLATFORM or CL_IMEI_OTHER_PLATFORM is defined. + * Try to read the IMEI number from the old ffs:/pcm/IMEI file, + * if it failes, return default CALYPSO IMEISV value + */ +#else /* CL_IMEI_CALYPSO_PLUS_PLATFORM */ + { + UBYTE version; + USHORT ret; + UBYTE buf[SIZE_EF_IMEI]; + + ret = pcm_ReadFile ((UBYTE *)EF_IMEI_ID, SIZE_EF_IMEI, buf, &version); + if(ret == PCM_OK){ + TRACE_EVENT("CL IMEI INFO: return IMEI-SV number from ffs:/pcm/IMEI"); + /* + * swap digits + */ + imeiBufPtr[0] = ((buf[0] & 0xf0) >> 4) | ((buf[0] & 0x0f) << 4); + imeiBufPtr[1] = ((buf[1] & 0xf0) >> 4) | ((buf[1] & 0x0f) << 4); + imeiBufPtr[2] = ((buf[2] & 0xf0) >> 4) | ((buf[2] & 0x0f) << 4); + imeiBufPtr[3] = ((buf[3] & 0xf0) >> 4) | ((buf[3] & 0x0f) << 4); + imeiBufPtr[4] = ((buf[4] & 0xf0) >> 4) | ((buf[4] & 0x0f) << 4); + imeiBufPtr[5] = ((buf[5] & 0xf0) >> 4) | ((buf[5] & 0x0f) << 4); + imeiBufPtr[6] = ((buf[6] & 0xf0) >> 4) | ((buf[6] & 0x0f) << 4); + imeiBufPtr[7] = ((buf[7] & 0xf0) >> 4) | ((buf[7] & 0x0f) << 4); + /* store IMEI */ + memcpy(stored_imei, imeiBufPtr, CL_IMEI_SIZE); + imei_flag = 1; + + }else{ + TRACE_EVENT("CL IMEI INFO: return default IMEI-SV number"); + memcpy(imeiBufPtr, C_DEFAULT_IMEISV_DSAMPLE, CL_IMEI_SIZE); + } + } +#endif /* CL_IMEI_CALYPSO_PLUS_PLATFORM */ + + return CL_IMEI_OK; + +#endif /* FF_PROTECTED_IMEI */ +#endif /* _SIMULATION_ */ +} +#endif /* #ifndef CL_IMEI_LOCOSTO_PLATFORM */ + +#endif /* CL_IMEI_C */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/src/comlib/cl_list.c Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,650 @@ +/* ++----------------------------------------------------------------------------- +| Project : +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : This module defines the functions for the List +| processing functions used in components RR/PL of the mobile station. ++----------------------------------------------------------------------------- +*/ + +#ifndef CL_LIST_C +#define CL_LIST_C + +#define ENTITY_RR +#define ENTITY_PL + +/*==== INCLUDES ===================================================*/ + +#include <string.h> +#include <stdlib.h> +#include <stddef.h> +#include "typedefs.h" +#include "message.h" +#include "vsi.h" +#include "gsm.h" +#include "prim.h" +#include "cl_list.h" + +/*==== CONST ======================================================*/ +#ifdef TI_PS_FF_QUAD_BAND_SUPPORT +#define INRANGE(min, x, max) ((unsigned)(x-min) <= (max-min)) +#endif + +/*==== VARIABLES ==================================================*/ +LOCAL const BYTE ByteBitMask[]= {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x1}; + +/*==== EXPORT =====================================================*/ + +/*==== PRIVATE FUNCTIONS ==========================================*/ +LOCAL UBYTE srv_is_not_in_list (USHORT * channels, + USHORT new_channel, + USHORT size); + + +/*==== PUBLIC FUNCTIONS ===========================================*/ +/* + * List processing Functions + * + * RR uses a lot of channel lists. They are organized internally as bitmaps. + * In the following a set of functions is defined for access to this lists: + * + * srv_set_channel + * srv_unset_channel + * srv_get_channel + * srv_create_list + * srv_clear_list + * srv_copy_list + * srv_compare_list + * srv_merge_list + * srv_is_empty_list + * srv_create_chan_mob_alloc + * + * The size of the internal channel lists depends on the supported frequency + * band: + * + * STD=1 (STD_900) GSM 900 + * STD=2 (STD_EGSM) E-GSM + * STD=3 (STD_1900) PCS 1900 + * STD=4 (STD_1800) DCS 1800 + * STD=5 (STD_DUAL) GSM 900 / DCS 1800 DUALBAND + * STD=6 (STD_DUAL_EGSM) GSM 900 / E-GSM / DCS 1800 DUALBAND + * STD=7 (STD_850) GSM 850 + * STD=8 (STD_DUAL_US) GSM 850 / PCS 1900 DUALBAND + * + * We use a compressed bit array to store the list of channels. + * Dependent on the configured or found frequency bands the bit array + * needs several numbers of bytes. For the representation of the individual + * bits in the array we need the function scr_channel_bit(), setBit(), + * resetBit() and getBit(). + * + */ + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6147) MODULE : RR_SRV | +| STATE : code ROUTINE : setBit | ++--------------------------------------------------------------------+ + + PURPOSE : sets bit. + +*/ + +LOCAL void setBit (UBYTE* bitstream, unsigned bitindex) +{ + bitstream[bitindex >> 3] |= ByteBitMask[bitindex & 7]; +} + + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6147) MODULE : RR_SRV | +| STATE : code ROUTINE : resetBit | ++--------------------------------------------------------------------+ + + PURPOSE : Resets bit. + +*/ + +LOCAL void resetBit (UBYTE* bitstream, unsigned bitindex) +{ + bitstream[bitindex >> 3] &= ~ByteBitMask[bitindex & 7]; +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6147) MODULE : RR_SRV | +| STATE : code ROUTINE : getBit | ++--------------------------------------------------------------------+ + + PURPOSE : Gets bit. + +*/ + + +LOCAL BYTE getBit (UBYTE* bitstream, unsigned bitindex) +{ + unsigned ByteIdx = bitindex >> 3; + + if (bitstream[ByteIdx]) + return (bitstream[ByteIdx] & ByteBitMask[bitindex & 7]) ? 1 : 0; + else + return 0; +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6147) MODULE : RR_SRV | +| STATE : code ROUTINE : scr_channel_bit | ++--------------------------------------------------------------------+ + + PURPOSE : calculate bit position in the bitstream for a given + channel and execute function dependent on mode. + +*/ + +GLOBAL UBYTE scr_channel_bit(T_LIST * list, int channel, int mode) +{ + int bitposition = -1; + UBYTE ret = 0; + + /* + * a more efficient way of range checking for ARM + * (according to application note 34, ARM DAI 0034A, January 1998) + * + * For the following code: + * if (channel >= low_channel AND channel <= high_channel) + * bitposition = ...; + * + * exist the faster way to implemented this: + * if ((unsigned)(channel - low_channel) <= (high_channel - low_channel) + * bitposition = ...; + * + * Future versions of the compiler will perform this optimization + * automatically. + * + * We use the follwing macro: + * #define INRANGE(min, x, max) ((unsigned)(x-min) <= (max-min)) + */ + if(channel EQ CHANNEL_0) + channel = CHANNEL_0_INTERNAL; + + bitposition = BITOFFSET_LIST - channel; + /*if (channel EQ CHANNEL_0) + bitposition = (USHORT)(BITOFFSET_DUAL_EGSM_B - CHANNEL_0_INTERNAL); + else if (INRANGE(LOW_CHANNEL_900,channel,HIGH_CHANNEL_900)) + bitposition = (USHORT)(BITOFFSET_DUAL_EGSM_A - channel); + else if (INRANGE(LOW_CHANNEL_EGSM,channel,HIGH_CHANNEL_EGSM)) + bitposition = (USHORT)(BITOFFSET_DUAL_EGSM_B - channel); + else if (INRANGE(LOW_CHANNEL_1800,channel,HIGH_CHANNEL_1800)) + bitposition = (USHORT)(BITOFFSET_DUAL_EGSM_C - channel); + if (INRANGE(LOW_CHANNEL_850,channel,HIGH_CHANNEL_850)) + bitposition = (USHORT)(BITOFFSET_DUAL_US_A - channel); + else if (INRANGE(LOW_CHANNEL_1900,channel,HIGH_CHANNEL_1900)) + bitposition = (USHORT)(BITOFFSET_DUAL_US_B - channel); +*/ + if (bitposition >=0) + { + switch (mode) + { + case SET_CHANNEL_BIT: + setBit (list->channels, bitposition); + break; + case RESET_CHANNEL_BIT: + resetBit (list->channels, bitposition); + break; + case GET_CHANNEL_BIT: + ret = getBit (list->channels, bitposition); + break; + case CHECK_CHANNEL: + ret = 1; + break; + } + } + return ret; +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6147) MODULE : RR_SRV | +| STATE : code ROUTINE : srv_create_list | ++--------------------------------------------------------------------+ + + PURPOSE : Creates a frequency list in USHORT format from the + bit list. USHORT format means an array of USHORTs + followed by NOT_PRESENT_16BIT (0xFFFF), except for the + case when all elements of the array are used, i.e. the + array's space is fully occupied. + In this function the channels are just converted between + the formats, any semantic errors are not checked here, ie. + if the MS is 1800-only and the list contains a 900 channel + this will be converted even if this leads to an error. + This has to be handled by the caller. + + Parameters: + list - [in] is the input list. + channel_array - [out] converted list. + size - [in] defines the maximum number of channels + in the list. + zero_at_start - [in] specifies where the CHANNEL_0 should be + put: + TRUE - at the start of the list + FALSE - at the end of the list + start_index - [in] specifies a index into the channel_array. + new channels are added at the positions + following and including the index: + channel_array[start_index] to + channel_array[size-1] + + If the start_index is not equal zero it is + also checked if the new channel is already + in the channel_array list (from + channel_array[0] to + channel_array[start_index-1]) + + If the start_index is equal zero the + above check is not performed. + + Return Value: + number of elements added + start_index + +*/ + +GLOBAL int srv_create_list (T_LIST * list, USHORT * channel_array, USHORT size, + UBYTE zero_at_start, USHORT start_index) +{ + int BitOffset, Idx; + unsigned int ByteValue, BitMask, LeftMask; + int i = start_index; + UBYTE *pch; + USHORT *parray = &channel_array[start_index]; + + pch = &list->channels[T_LIST_MAX_SIZE-1]; + for(Idx = T_LIST_MAX_SIZE-1; Idx >= 0 AND i < size; Idx--, pch--) + { + /* + * check and add all channels + */ + if ((ByteValue = *pch) NEQ 0) + { + /* byte contains set bits */ + + /* check single bits */ + for (BitOffset=7, BitMask=0x01, LeftMask=0xfe; + BitOffset>=0; + BitOffset--, BitMask<<=1, LeftMask<<=1) + { + if (ByteValue & BitMask) + { + *parray = BITOFFSET_LIST - (BitOffset+(Idx<<3)); + if(!start_index OR + srv_is_not_in_list (channel_array, *parray, start_index)) + { + /* if the check is ok, ie: + * always add channel, or the channel has not yet existed + * in the list, then advance the pointer and add the + * next channel on next position + * if the check fails the pointer is not advanced and + * the channel will not be added and the next channel + * will overwrite the current channel. + */ + parray++; + + /* check if list is full */ + if (++i >= size) + break; + } + /* check if any bits are left */ + if ((ByteValue & LeftMask) EQ 0) + break; + } + } /* for all bits in byte */ + } /* if Byte NEQ 0 */ + } /* for all Bytes in List */ + + + /* + * If CHANNEL_0 is included in the list + * it has to be changed from CHANNEL_0_INTERNAL to CHANNEL_0 + * and then the zero_at_start flag is handled. + * + * If CHANNEL_0 is in the list it is always + * at the end of the list. + */ + if(i NEQ start_index AND + *(parray-1) EQ CHANNEL_0_INTERNAL) + { + *(parray-1) = CHANNEL_0; + + if(zero_at_start AND (i > 1)) + { + memmove(&channel_array[1], &channel_array[0], (int)sizeof(channel_array[0])*(i-1)); + channel_array[0] = CHANNEL_0; + } + } + + /* + * add the end identifier to the output list + */ + if (i<size) + { + *parray = NOT_PRESENT_16BIT; + } + + return i; +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6147) MODULE : RR_SRV | +| STATE : code ROUTINE : srv_is_not_in_list | ++--------------------------------------------------------------------+ + + PURPOSE : Checks if the given channel number is a member of the given + list. + + Parameters: + channels - contains the existing output list. + new_channel - is the channel number which shall be checked. + size - indicates the length of the list. + +*/ + +static UBYTE srv_is_not_in_list (USHORT * channels, + USHORT new_channel, + USHORT size) +{ + USHORT i; + + /* + * for all members of the list + */ + for (i=0;i<size;i++) + { + /* + * The end of the list is reached + * that means the new channel is not inside. + */ + if (channels[i] EQ NOT_PRESENT_16BIT) + return TRUE; + + /* + * the channel is inside + */ + if (channels[i] EQ new_channel) + return FALSE; + } + + return TRUE; +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6147) MODULE : RR_SRV | +| STATE : code ROUTINE : srv_clear_list | ++--------------------------------------------------------------------+ + + PURPOSE : Clears a list by clearing all bits. + +*/ + +GLOBAL void srv_clear_list (T_LIST * list) +{ + /* + * simple algorithm: clear the whole list. + */ + memset (list, 0, sizeof (T_LIST)); +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6147) MODULE : RR_SRV | +| STATE : code ROUTINE : srv_copy_list | ++--------------------------------------------------------------------+ + + PURPOSE : Copies a list. + +*/ + +GLOBAL void srv_copy_list (T_LIST * target_list, T_LIST * source_list, + UBYTE size) +{ + memcpy (target_list, source_list, size); +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6147) MODULE : RR_SRV | +| STATE : code ROUTINE : srv_compare_list | ++--------------------------------------------------------------------+ + + PURPOSE : Compares two lists. + +*/ + +GLOBAL UBYTE srv_compare_list (T_LIST * list1, T_LIST * list2) +{ + return (memcmp (list1, list2, sizeof (T_LIST)) EQ 0); +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6147) MODULE : RR_SRV | +| STATE : code ROUTINE : srv_merge_list | ++--------------------------------------------------------------------+ + + PURPOSE : Merges two lists. Both lists are bitmaps. So the merge + is done by a bitwise OR. + +*/ + +GLOBAL void srv_merge_list (T_LIST * target_list, T_LIST * list) +{ + USHORT i; + + /* + * The maximum list size is T_LIST_MAX_SIZE Bytes for the dualband extended + * frequency standard. + */ + + for (i=0;i<T_LIST_MAX_SIZE;i++) + target_list->channels[i] |= list->channels[i]; +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6147) MODULE : RR_SRV | +| STATE : code ROUTINE : srv_unmask_list | ++--------------------------------------------------------------------+ + + PURPOSE : This routine resets those bits in destination list that are set in + the source list. + Refer Cell Selection Improvements-LLD section:4.1.1.3.11 +*/ + +GLOBAL void srv_unmask_list(T_LIST *target,T_LIST *source) +{ + UBYTE count=0; + for (count=0;count<T_LIST_MAX_SIZE; count++) + { + target->channels[count] &= ~source->channels[count]; + } +} + + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6147) MODULE : RR_SRV | +| STATE : code ROUTINE : srv_trace_freq_in_list | ++--------------------------------------------------------------------+ + + PURPOSE : This routine traces the frequencies in the list + CSI-LLD section:4.1.1.3.11 +*/ + +GLOBAL void srv_trace_freq_in_list(T_LIST *list) +{ + U16 i; + + for(i=CHANNEL_0;i<CHANNEL_0_INTERNAL;i++) + { + if(srv_get_channel (list, i)) + { + TRACE_EVENT_P1("arfcn=%u",i); + } + } +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6147) MODULE : RR_SRV | +| STATE : code ROUTINE : srv_count_list | ++--------------------------------------------------------------------+ + + PURPOSE : This routine returns the count of the number of channels + set in the List + CSI-LLD section:4.1.1.3.11 +*/ + +GLOBAL U16 srv_count_list(T_LIST *list) +{ + U16 i; + U16 sum = 0; + + for(i=CHANNEL_0;i<CHANNEL_0_INTERNAL;i++) + { + if(srv_get_channel (list, i)) + { + sum++; + } + } + + return sum; +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6147) MODULE : RR_SRV | +| STATE : code ROUTINE : srv_is_list_set | ++--------------------------------------------------------------------+ + + PURPOSE : This routine checks if any channel in the list is set + CSI-LLD section:4.1.1.3.11 +*/ + +GLOBAL BOOL srv_is_list_set(T_LIST *list) +{ + U8 i; + + for(i=0;i<T_LIST_MAX_SIZE;i++) + { + if(list->channels[i]) + { + return TRUE; + } + } + + return FALSE; +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6147) MODULE : RR_SRV | +| STATE : code ROUTINE : srv_get_region_from_std | ++--------------------------------------------------------------------+ + + PURPOSE : This routine derived "region" from "std" + CSI-LLD section:4.1.1.3.11 +*/ +GLOBAL U8 srv_get_region_from_std(U8 std) +{ +#ifdef TI_PS_FF_QUAD_BAND_SUPPORT + U8 region = BOTH_REGIONS; +#else + U8 region = EUROPEAN_REGION; +#endif + + switch(std) + { + case STD_850: + case STD_1900: + case STD_DUAL_US: + region = AMERICAN_REGION; + break; +#ifdef TI_PS_FF_QUAD_BAND_SUPPORT + case STD_900: + case STD_1800: + case STD_DUAL: + case STD_DUAL_EGSM: + region = EUROPEAN_REGION; + break; + default: + TRACE_EVENT_P1 ("srv_get_region_from_std: wrong std %x", std); + TRACE_ERROR ("srv_get_region_from_std: wrong std"); + break; +#endif + } + + return region; +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6147) MODULE : RR_SRV | +| STATE : code ROUTINE : srv_get_region_from_std_arfcn| ++--------------------------------------------------------------------+ + + PURPOSE : This routine derived "region" from "std" and "ARFCN" +*/ +#ifdef TI_PS_FF_QUAD_BAND_SUPPORT +GLOBAL U8 srv_get_region_from_std_arfcn(U8 std, U16 arfcn) +{ + U8 region = EUROPEAN_REGION; + + switch(std) + { + case STD_850_1800: + case STD_850_900_1800: + if (INRANGE(LOW_CHANNEL_850,arfcn,HIGH_CHANNEL_850)) + region = AMERICAN_REGION; + else + region = EUROPEAN_REGION; + break; + + case STD_900_1900: + if (INRANGE(LOW_CHANNEL_1900,arfcn,HIGH_CHANNEL_1900)) + region = AMERICAN_REGION; + else + region = EUROPEAN_REGION; + break; + + case STD_850_900_1900: + if (INRANGE(LOW_CHANNEL_1900,arfcn,HIGH_CHANNEL_1900) OR + INRANGE(LOW_CHANNEL_850,arfcn,HIGH_CHANNEL_850)) + region = AMERICAN_REGION; + else + region = EUROPEAN_REGION; + break; + default: + TRACE_EVENT_P1 ("srv_get_region_from_std_arfcn: wrong std %x", std); + TRACE_ERROR ("srv_get_region_from_std_arfcn: wrong std"); + break; + } + + return region; +} +#endif + +#endif /* !CL_LIST_C */ +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/src/comlib/cl_md5.c Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,576 @@ +/* ++----------------------------------------------------------------------------- +| Project : COMLIB +| Modul : cl_md5.c ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Definitions of common library functions: MD5 algorithm ++----------------------------------------------------------------------------- +*/ +/* + * Version 1.0 + */ + +/**********************************************************************************/ + +/* +NOTE: +*/ + +/**********************************************************************************/ + +#ifndef CL_MD5_C +#define CL_MD5_C + +#include "typedefs.h" +#include <string.h> +#include "vsi.h" /* to get a lot of macros */ +#include "cl_md5.h" +#include "stdio.h" + + +/*==== FUNCTIONS ==================================================*/ + + +/* + * Constants for MD5 routine. + */ + +#define S11 7 +#define S12 12 +#define S13 17 +#define S14 22 +#define S21 5 +#define S22 9 +#define S23 14 +#define S24 20 +#define S31 4 +#define S32 11 +#define S33 16 +#define S34 23 +#define S41 6 +#define S42 10 +#define S43 15 +#define S44 21 + +/* + * F, G, H and I are basic MD5 functions. + */ +#define F(x, y, z) (((x) & (y)) | ((~x) & (z))) +#define G(x, y, z) (((x) & (z)) | ((y) & (~z))) +#define H(x, y, z) ((x) ^ (y) ^ (z)) +#define I(x, y, z) ((y) ^ ((x) | (~z))) + +/* + * ROTATE_LEFT rotates x left n bits. + */ +#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) + +/* + * FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. + * Rotation is separate from addition to prevent recomputation. + */ +#define FF(a, b, c, d, x, s, ac) { \ + (a) += F ((b), (c), (d)) + (x) + (UINT)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } +#define GG(a, b, c, d, x, s, ac) { \ + (a) += G ((b), (c), (d)) + (x) + (UINT)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } +#define HH(a, b, c, d, x, s, ac) { \ + (a) += H ((b), (c), (d)) + (x) + (UINT)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } +#define II(a, b, c, d, x, s, ac) { \ + (a) += I ((b), (c), (d)) + (x) + (UINT)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } +/* + * 1. Append the length in bits + * 2. Process message + * 3. Store state in digest + */ +#define PROCESS_MSG() {\ + memcpy(&context.buffer[56], bits, 8);\ + cl_md5_transform(context.state, context.buffer);\ + cl_md5_enc (digest, context.state, 16);\ + } + +#ifdef _SIMULATION_ +/* ++------------------------------------------------------------------------------ +| Function : MDPrint ++------------------------------------------------------------------------------ +| Description : Prints a message digest in hexadecimal. +| +| Parameters : UBYTE digest[16] ++------------------------------------------------------------------------------ +*/ +GLOBAL void MDPrint (UBYTE *digest, UINT len) +{ + UINT i; + for (i = 0; i < len; i+=8) + TRACE_EVENT_P8 ("0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, ", + digest[i], digest[i+1], digest[i+2], digest[i+3], + digest[i+4], digest[i+5], digest[i+6], digest[i+7]); +} +#endif + +/* ++------------------------------------------------------------------------------ +| Function : cl_md5_enc ++------------------------------------------------------------------------------ +| Description : Encodes input (UINT) into output (UBYTE). Assumes len +| is a multiple of 4. +| +| Parameters : UBYTE *output +| UINT *input +| UINT len ++------------------------------------------------------------------------------ +*/ +void cl_md5_enc (UBYTE *output, UINT *input, UINT len) +{ + UINT i, j; + + for (i = 0, j = 0; j < len; i++, j += 4) { + output[j] = (UBYTE)(input[i] & 0xff); + output[j+1] = (UBYTE)((input[i] >> 8) & 0xff); + output[j+2] = (UBYTE)((input[i] >> 16) & 0xff); + output[j+3] = (UBYTE)((input[i] >> 24) & 0xff); + } +} + +/* ++------------------------------------------------------------------------------ +| Function : cl_md5_dec ++------------------------------------------------------------------------------ +| Description : Decodes input (UBYTE) into output (UINT). Assumes len +| is a multiple of 4. +| +| Parameters : UINT *output +| UBYTE *input +| UINT len ++------------------------------------------------------------------------------ +*/ +void cl_md5_dec (UINT *output, UBYTE *input, UINT len) +{ + UINT i, j; + + for (i = 0, j = 0; j < len; i++, j += 4) + output[i] = ((UINT)input[j]) | (((UINT)input[j+1]) << 8) | + (((UINT)input[j+2]) << 16) | (((UINT)input[j+3]) << 24); +} + + +/* ++------------------------------------------------------------------------------ +| Function : cl_md5_transform ++------------------------------------------------------------------------------ +| Description : MD5 basic transformation. Transforms state based on block. +| For more information see RFC 1321 "MD5 Message-Digest Algorithm". +| This routine is derived from the RSA Data Security, Inc. MD5 +| Message-Digest Algorithm. +| +| Parameters : UINT state[4] +| UBYTE block[64] +| ++------------------------------------------------------------------------------ +*/ +void cl_md5_transform (UINT state[4], UBYTE block[64]) +{ + UINT a = state[0], b = state[1], c = state[2], d = state[3], x[16]; + + cl_md5_dec (x, block, 64); + + /* Round 1 */ + FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */ + FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */ + FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */ + FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */ + FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */ + FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */ + FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */ + FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */ + FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */ + FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */ + FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ + FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ + FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ + FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ + FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ + FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ + + /* Round 2 */ + GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */ + GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */ + GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ + GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */ + GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */ + GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */ + GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ + GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */ + GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */ + GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ + GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */ + + GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */ + GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ + GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */ + GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */ + GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ + + /* Round 3 */ + HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */ + HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */ + HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ + HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ + HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */ + HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */ + HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */ + HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ + HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ + HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */ + HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */ + HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */ + HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */ + HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ + HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ + HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */ + + /* Round 4 */ + II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */ + II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */ + II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ + II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */ + II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ + II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */ + II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ + II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */ + II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */ + II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ + II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */ + II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ + II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */ + II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ + II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */ + II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */ + + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + + /* Zeroize sensitive information.*/ + memset((UBYTE *)x, 0, sizeof (x)); +} + +/* ++------------------------------------------------------------------------------ +| Function : cl_md5 ++------------------------------------------------------------------------------ +| Description : Digests a string and prints the result. For more information see +| RFC 1321 "MD5 Message-Digest Algorithm". +| +| Parameters : UBYTE *input - input challenge string +| UINT len - length of input string +| UBYTE *digest - output digest message ++------------------------------------------------------------------------------ +*/ +GLOBAL void cl_md5 (UBYTE *input, UINT len, UBYTE *digest) +{ + MD5_CTX context; + UBYTE bits[8]; + UINT ind; + int chk_len; + TRACE_EVENT("cl_md5"); + + if(len==0) + len = strlen ((char *)input); + +#ifdef _SIMULATION_ + TRACE_EVENT("Input Message"); + MDPrint (input, len); +#endif + + /* + * MD5 initialization. Begins an MD5 operation, writing a new context. + */ + context.count[0] = context.count[1] = 0; + /* + * Load magic initialization constants according to RFC 1321 + */ + context.state[0] = 0x67452301; /* word A */ + context.state[1] = 0xefcdab89; /* word B */ + context.state[2] = 0x98badcfe; /* word C */ + context.state[3] = 0x10325476; /* word D */ + /* + * Update number of bits (64-bit representation of message length) + */ + if ((context.count[0] += ((UINT)len << 3)) < ((UINT)len << 3)) + context.count[1]++; + context.count[1] += ((UINT)len >> 29); + /* + * Save number of bits + */ + cl_md5_enc (bits, context.count, 8); + + /* + * Step 1. Append Padding Bits + * The message is extended so that its length is congruent to 56 bytes + * (448 bits), modulo 64 (512). Extending is always performed, even if the + * length is already congruent to 56 bytes, modulo 64. + * + * Extending is performed as follows, a single "1" bit is append to the + * message, and then "0" bits are appended so that the legth in bits of the + * message becomes congruent to 56, modulo 64. In all, at least one byte and + * at most 64 bytes are appended. + * + * Step 2. Append Length. + * A 64-bit representation of the message length before the padding is + * appended to the result of previous step. + * + * Step 3. Process Message in 16-word blocks + */ + if(len < 56) + { + /* + * copy message + */ + memcpy(&context.buffer[0], &input[0], len); + /* + * Append length to 56 bytes + */ + context.buffer[len] = 0x80; /* append a single "1" bit */ + memset(&context.buffer[len+1], 0, 55-len); /* append "0" bits */ + /* + * Append length in bits and process message + */ + PROCESS_MSG(); + } + else if(len >= 56 && len < 64) + { + /* + * copy message + */ + memcpy(&context.buffer[0], &input[0], len); + /* + * Append length to 64 bytes + */ + context.buffer[len] = 0x80; + memset(&context.buffer[len+1], 0, 63-len); + /* + * Process message + */ + cl_md5_transform (context.state, context.buffer); + /* + * Append length to 56 bytes + */ + memset(&context.buffer[0], 0, 56); + /* + * Append the length in bits and process message + */ + PROCESS_MSG(); + } + else if(len >= 64) + { + /* + * Copy first 64 bytes + */ + memcpy(&context.buffer[0], &input[0], 64); + /* + * Process message + */ + cl_md5_transform (context.state, context.buffer); + if(len >= 120) + { + /* + * Process message in 64-byte blocks + */ + for (ind = 64; ind + 63 < len; ind += 64) + cl_md5_transform (context.state, &input[ind]); + } + else + ind = 64; + /* + * Copy the rest + */ + memcpy(&context.buffer[0], &input[ind], len-ind); + /* + * Append length to 56 bytes + */ + /*lint -e661 -e662 -e669 possible access or creation of bount ptr or data overrun*/ + context.buffer[len-ind] = 0x80; + chk_len=55-(len-ind); + if(chk_len >=0) + memset(&context.buffer[len-ind+1], 0, chk_len); + /*lint +e661 +e662 +e669 possible access or creation of bount ptr or data overun*/ + /* + * Append the length in bits and process message + */ + PROCESS_MSG(); + } + +#ifdef _SIMULATION_ + TRACE_EVENT("Digest Message"); + MDPrint (digest, 16); +#endif +} + + +#ifdef _SIMULATION_ +/* ++------------------------------------------------------------------------------ +| Function : MDTestSuite ++------------------------------------------------------------------------------ +| Description : Digests a reference suite of strings and prints the results. +| +| Parameters : void ++------------------------------------------------------------------------------ +*/ +GLOBAL void cl_md5TestSuite () +{ + UBYTE digest[16]; + UBYTE test_digest0[16] = {0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04, + 0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e}; + UBYTE test_digest1[16] = {0x0c, 0xc1, 0x75, 0xb9, 0xc0, 0xf1, 0xb6, 0xa8, + 0x31, 0xc3, 0x99, 0xe2, 0x69, 0x77, 0x26, 0x61}; + UBYTE test_digest3[16] = {0x90, 0x01, 0x50, 0x98, 0x3c, 0xd2, 0x4f, 0xb0, + 0xd6, 0x96, 0x3f, 0x7d, 0x28, 0xe1, 0x7f, 0x72}; + UBYTE test_digest14[16] = {0xf9, 0x6b, 0x69, 0x7d, 0x7c, 0xb7, 0x93, 0x8d, + 0x52, 0x5a, 0x2f, 0x31, 0xaa, 0xf1, 0x61, 0xd0}; + UBYTE test_digest26[16] = {0xc3, 0xfc, 0xd3, 0xd7, 0x61, 0x92, 0xe4, 0x00, + 0x7d, 0xfb, 0x49, 0x6c, 0xca, 0x67, 0xe1, 0x3b}; + UBYTE test_digest62[16] = {0xd1, 0x74, 0xab, 0x98, 0xd2, 0x77, 0xd9, 0xf5, + 0xa5, 0x61, 0x1c, 0x2c, 0x9f, 0x41, 0x9d, 0x9f}; + UBYTE test_digest80[16] = {0x57, 0xed, 0xf4, 0xa2, 0x2b, 0xe3, 0xc9, 0x55, + 0xac, 0x49, 0xda, 0x2e, 0x21, 0x07, 0xb6, 0x7a}; + UBYTE test_digest160[16] = {0x26, 0x8c, 0x79, 0x19, 0x18, 0x9d, 0x85, 0xe2, + 0x76, 0xd7, 0x4b, 0x8c, 0x60, 0xb2, 0xf8, 0x4f}; + + TRACE_EVENT("MD5 test suite:"); + + /* + * Test 1. Lenght := 0 + */ + cl_md5("", 0, digest); + if(memcmp(digest, test_digest0, 16)) + { + TRACE_EVENT("CHAP MD5: Test 1 failed!!"); + } + else + { + TRACE_EVENT("CHAP MD5: Test 1 passed."); + } + + /* + * Test 2. Lenght := 1 + */ + cl_md5("a", 0, digest); + if(memcmp(digest, test_digest1, 16)) + { + TRACE_EVENT("CHAP MD5: Test 2 failed!!"); + } + else + { + TRACE_EVENT("CHAP MD5: Test 2 passed."); + } + + /* + * Test 3. Lenght := 3 + */ + cl_md5("abc", 0, digest); + if(memcmp(digest, test_digest3, 16)) + { + TRACE_EVENT("CHAP MD5: Test 3 failed!!"); + } + else + { + TRACE_EVENT("CHAP MD5: Test 3 passed."); + } + + /* + * Test 4. Lenght := 14 + */ + cl_md5("message digest", 0, digest); + if(memcmp(digest, test_digest14, 16)) + { + TRACE_EVENT("CHAP MD5: Test 4 failed!!"); + } + else + { + TRACE_EVENT("CHAP MD5: Test 4 passed."); + } + + /* + * Test 5. Lenght := 26 + */ + cl_md5("abcdefghijklmnopqrstuvwxyz", 0, digest); + if(memcmp(digest, test_digest26, 16)) + { + TRACE_EVENT("CHAP MD5: Test5 failed!!"); + } + else + { + TRACE_EVENT("CHAP MD5: Test 5 passed."); + } + + /* + * Test 6. Lenght := 62 + */ + cl_md5("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", 0, digest);/*62*/ + if(memcmp(digest, test_digest62, 16)) + { + TRACE_EVENT("CHAP MD5: Test 6 failed!!"); + } + else + { + TRACE_EVENT("CHAP MD5: Test 6 passed."); + } + + /* + * Test 7. Lenght := 80 + */ + cl_md5("12345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, digest);/*80*/ + if(memcmp(digest, test_digest80, 16)) + { + TRACE_EVENT("CHAP MD5: Test 7 failed!!"); + } + else + { + TRACE_EVENT("CHAP MD5: Test 7 passed."); + } + + /* + * Test 8. Lenght := 160 + */ + cl_md5("12345678901234567890123456789012345678901234567890123456789012345678901234567890\ +12345678901234567890123456789012345678901234567890123456789012345678901234567890", 0, digest); + if(memcmp(digest, test_digest160, 16)) + { + TRACE_EVENT("CHAP MD5: Test 8 failed!!"); + } + else + { + TRACE_EVENT("CHAP MD5: Test 8 passed."); + } + +} +#endif/*_SIMULATION_*/ + + +#endif /* CL_MD5_C */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/src/comlib/cl_ribu.c Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,283 @@ +/* ++----------------------------------------------------------------------------- +| Project : COMLIB +| Modul : cl_ribu.c ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Definitions of common library functions: ring buffer ++----------------------------------------------------------------------------- +*/ +/* + * Version 1.0 + */ + +/**********************************************************************************/ + +/* +NOTE: +*/ + +/**********************************************************************************/ + +#ifndef CL_RIBU_C +#define CL_RIBU_C + +#include <string.h> + +#include "typedefs.h" +#include "vsi.h" +#include "cl_ribu.h" + +#undef ENA_ASSERT + +/*==== FUNCTIONS ==================================================*/ + +GLOBAL void cl_ribu_init(T_RIBU *ribu, const U8 depth) +{ + TRACE_FUNCTION("cl_ribu_init()"); + +#ifdef ENA_ASSERT + assert(ribu NEQ NULL); +#else + if (ribu EQ NULL) + { + TRACE_ERROR("ribu EQ NULL"); + return; + } +#endif + + ribu->ri = 0; + ribu->wi = 0; + ribu->depth = depth; + ribu->filled = 0; +} + +GLOBAL U8 cl_ribu_read_index(T_RIBU *ribu) +{ + U8 ri; + + TRACE_FUNCTION("cl_ribu_read_index()"); + +#ifdef ENA_ASSERT + assert(ribu NEQ NULL); +#else + if (ribu EQ NULL) + { + TRACE_ERROR("ribu EQ NULL"); + return 0; //255; + } +#endif + + ri = ribu->ri; + ribu->ri++; + if (ribu->ri EQ ribu->depth) + { + ribu->ri = 0; + } + ribu->filled--; + return ri; +} + +GLOBAL U8 cl_ribu_write_index(T_RIBU *ribu) +{ + U8 wi; + + TRACE_FUNCTION("cl_ribu_write_index()"); + +#ifdef ENA_ASSERT + assert(ribu NEQ NULL); +#else + if (ribu EQ NULL) + { + TRACE_ERROR("ribu EQ NULL"); + return 0; //255; + } +#endif + + wi = ribu->wi; + ribu->wi++; + if (ribu->wi EQ ribu->depth) + { + ribu->wi = 0; + } + +#ifdef ENA_ASSERT + assert(ribu->ri NEQ ribu->wi); +#else + if (ribu->ri EQ ribu->wi) + { + TRACE_ERROR("cl_ribu_write_index(): buffer full!"); + return 0; //255; + } +#endif + + ribu->filled++; + return wi; +} + +GLOBAL void cl_ribu_create(T_RIBU_FD **ribu, const U8 buflen, const U8 depth) +{ + int i; + + TRACE_FUNCTION("cl_ribu_create()"); + + if (*ribu NEQ NULL) + { + TRACE_EVENT("cl_ribu_create(): *ribu already created ?"); + } + + MALLOC(*ribu, sizeof(T_RIBU_FD)); + + cl_ribu_init(&(*ribu)->idx, depth); + + MALLOC((*ribu)->pFDv, depth * sizeof(T_FD*)); + + for (i = 0; i < depth; i++) + { + T_FD **pFD = &(*ribu)->pFDv[i]; + MALLOC(*pFD, sizeof(T_FD)); + MALLOC((*pFD)->buf, buflen * sizeof(U8)); + } +} + +GLOBAL void cl_ribu_release(T_RIBU_FD **ribu) +{ + int i; + + TRACE_FUNCTION("cl_ribu_release()"); + + if (*ribu EQ NULL) + { + TRACE_EVENT("cl_ribu_release(): *ribu EQ NULL!"); + return; + } + + for (i = 0; i < (*ribu)->idx.depth; i++) + { + T_FD *pFD = (*ribu)->pFDv[i]; + MFREE(pFD->buf); + MFREE(pFD); + } + + MFREE((*ribu)->pFDv); + MFREE(*ribu); + *ribu = NULL; +} + +GLOBAL BOOL cl_ribu_data_avail(const T_RIBU_FD *ribu) +{ + TRACE_FUNCTION("cl_ribu_data_avail()"); + +#ifdef ENA_ASSERT + assert(ribu NEQ NULL); +#else + if (ribu EQ NULL) + { + TRACE_ERROR("ribu EQ NULL"); + return 0; //255; + } +#endif + + return ribu->idx.ri NEQ ribu->idx.wi; +} + +GLOBAL T_FD *cl_ribu_get_new_frame_desc(T_RIBU_FD *ribu) +{ + U8 wi; + T_FD *pFDc; + + TRACE_FUNCTION("cl_ribu_get_new_frame_desc()"); + +#ifdef ENA_ASSERT + assert(ribu NEQ NULL); +#else + if (ribu EQ NULL) + { + TRACE_ERROR("ribu EQ NULL"); + return NULL; + } +#endif + + wi = cl_ribu_write_index(&ribu->idx); + if (wi >= ribu->idx.depth) + { + TRACE_EVENT_P1("invalid write index: %d", (int)wi); + return NULL; + } + pFDc = ribu->pFDv[wi]; + + return pFDc; +} + +GLOBAL void cl_ribu_put(const T_FD fd, T_RIBU_FD *ribu) +{ + T_FD *pFDc = cl_ribu_get_new_frame_desc(ribu); + + TRACE_FUNCTION("cl_ribu_put()"); + + if (pFDc EQ NULL) + { + TRACE_ERROR("cl_ribu_put(): no write buffer!"); + return; + } + + (*pFDc).type = fd.type; + (*pFDc).status = fd.status; + (*pFDc).len = fd.len; + memcpy((*pFDc).buf, fd.buf, fd.len); +} + +GLOBAL T_FD *cl_ribu_get(T_RIBU_FD *ribu) +{ + int ri; + T_FD *pFDc; + + TRACE_FUNCTION("cl_ribu_get()"); + +#ifdef ENA_ASSERT + assert(ribu NEQ NULL); +#else + if (ribu EQ NULL) + { + TRACE_ERROR("ribu EQ NULL"); + return NULL; + } +#endif + + ri = (int)cl_ribu_read_index(&ribu->idx); + pFDc = ribu->pFDv[ri]; + + return pFDc; +} + +GLOBAL void cl_set_frame_desc(T_FRAME_DESC *frame_desc, U8 *A0, U16 L0, U8 *A1, U16 L1) +{ + TRACE_ASSERT(frame_desc NEQ NULL); + + frame_desc->Adr[0] = A0; + frame_desc->Len[0] = L0; + frame_desc->Adr[1] = A1; + frame_desc->Len[1] = L1; +} + +GLOBAL void cl_set_frame_desc_0(T_FRAME_DESC *frame_desc, U8 *A0, U16 L0) +{ + TRACE_ASSERT(frame_desc NEQ NULL); + + frame_desc->Adr[0] = A0; + frame_desc->Len[0] = L0; + frame_desc->Adr[1] = NULL; + frame_desc->Len[1] = 0; +} + +#endif /* CL_RIBU_C */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/src/comlib/cl_rlcmac.c Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,117 @@ +/* ++----------------------------------------------------------------------------- +| Project : COMLIB +| Modul : RLCMAC ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Definitions of common library functions: RLC/MAC layer. ++----------------------------------------------------------------------------- +*/ + +#ifndef CL_RLCMAC_C +#define CL_RLCMAC_C +#endif /* #ifndef CL_RLCMAC_C */ + +#define ENTITY_GRLC +#define ENTITY_GRR + +/*==== INCLUDES =============================================================*/ + +#include "typedefs.h" +#include "vsi.h" +#include "macdef.h" +#include "gprs.h" +#include "gsm.h" +#include "ccdapi.h" +#include "prim.h" +#include "message.h" +#include "cl_rlcmac.h" + +/*==== CONST ================================================================*/ + +/*==== LOCAL VARS ===========================================================*/ + +/*==== PRIVATE FUNCTIONS ====================================================*/ + +/*==== PUBLIC FUNCTIONS =====================================================*/ +/* ++------------------------------------------------------------------------------ +| Function : cl_rlcmac_get_msg_name ++------------------------------------------------------------------------------ +| Description : +| +| Parameters : +| ++------------------------------------------------------------------------------ +*/ + +#if !defined (NTRACE) + + +#define RETURN(msg) return( #msg ); + +GLOBAL char* cl_rlcmac_get_msg_name ( UBYTE msg_type, + T_RLC_MAC_ROUTE route ) +{ + if( route EQ RLC_MAC_ROUTE_UL ) + { + switch( msg_type ) + { + case U_RESOURCE_REQ_c: RETURN( U_RESOURCE_REQ ); /*lint !e527*/ + case U_DL_ACK_c: RETURN( U_DL_ACK ); /*lint !e527 !e825*/ + case U_CTRL_ACK_c: RETURN( U_CTRL_ACK ); /*lint !e527 !e825*/ + case U_CELL_CHAN_FAILURE_c: RETURN( U_CELL_CHAN_FAILURE ); /*lint !e527 !e825*/ + case U_UL_DUMMY_c: RETURN( U_UL_DUMMY ); /*lint !e527 !e825*/ + case U_MEAS_REPORT_c: RETURN( U_MEAS_REPORT ); /*lint !e527 !e825*/ + case U_MS_TBF_STATUS_c: RETURN( U_MS_TBF_STATUS ); /*lint !e527 !e825*/ + case U_PKT_PSI_STATUS_MSG_c: RETURN( U_PKT_PSI_STATUS_MSG ); /*lint !e527 !e825*/ + case U_MSG_TYPE_CHANNEL_REQ_c: return( "U_MSG_TYPE_CHANNEL_REQ" ); /*lint !e527 !e825*/ + case U_MSG_TYPE_UNKNOWN_c: /*lint !e527 !e825*/ + default: return( "U_MSG_TYPE_UNKNOWN" ); /*lint !e527 !e825*/ + } + } + else + { + switch( msg_type ) + { + case D_ACCESS_REJ_c: RETURN( D_ACCESS_REJ ); /*lint !e527*/ + case D_QUEUING_NOT_c: RETURN( D_QUEUING_NOT ); /*lint !e527 !e825*/ + case D_UL_ASSIGN_c: RETURN( D_UL_ASSIGN ); /*lint !e527 !e825*/ + case D_DL_ASSIGN_c: RETURN( D_DL_ASSIGN ); /*lint !e527 !e825*/ + case D_TBF_RELEASE_c: RETURN( D_TBF_RELEASE ); /*lint !e527 !e825*/ + case D_PAGING_REQ_c: RETURN( D_PAGING_REQ ); /*lint !e527 !e825*/ + case D_UL_ACK_c: RETURN( D_UL_ACK ); /*lint !e527 !e825*/ + case PSI_1_c: RETURN( PSI_1 ); /*lint !e527 !e825*/ + case PSI_2_c: RETURN( PSI_2 ); /*lint !e527 !e825*/ + case PSI_3_c: RETURN( PSI_3 ); /*lint !e527 !e825*/ + case PSI_3_BIS_c: RETURN( PSI_3_BIS ); /*lint !e527 !e825*/ + case PSI_4_c: RETURN( PSI_4 ); /*lint !e527 !e825*/ + case PSI_5_c: RETURN( PSI_5 ); /*lint !e527 !e825*/ + case PSI_13_c: RETURN( PSI_13 ); /*lint !e527 !e825*/ + case D_CELL_CHAN_ORDER_c: RETURN( D_CELL_CHAN_ORDER ); /*lint !e527 !e825*/ + case D_DL_DUMMY_c: RETURN( D_DL_DUMMY ); /*lint !e527 !e825*/ + case D_MEAS_ORDER_c: RETURN( D_MEAS_ORDER ); /*lint !e527 !e825*/ + case D_PDCH_RELEASE_c: RETURN( D_PDCH_RELEASE ); /*lint !e527 !e825*/ + case D_POLLING_REQ_c: RETURN( D_POLLING_REQ ); /*lint !e527 !e825*/ + case D_CTRL_PWR_TA_c: RETURN( D_CTRL_PWR_TA ); /*lint !e527 !e825*/ + case D_PRACH_PAR_c: RETURN( D_PRACH_PAR ); /*lint !e527 !e825*/ + case D_TS_RECONFIG_c: RETURN( D_TS_RECONFIG ); /*lint !e527 !e825*/ + case D_MSG_TYPE_CRC_ERROR_c: return( "D_MSG_TYPE_CRC_ERROR" ); /*lint !e527 !e825*/ + case D_MSG_TYPE_2ND_SEGMENT_c: return( "D_MSG_TYPE_2ND_SEGMENT" ); /*lint !e527 !e825*/ + case D_MSG_TYPE_UNKNOWN_c: /*lint !e527 !e825*/ + default: return( "D_MSG_TYPE_UNKNOWN" ); /*lint !e527 !e825*/ + } + } +} /* cl_rlcmac_get_msg_name */ + +#endif /* #if !defined (NTRACE) */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/src/comlib/cl_shrd.c Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,438 @@ +/* ++----------------------------------------------------------------------------- +| Project : COMLIB +| Modul : cl_shrd.c ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Definitions of common library functions: Implementation of + creation of Semaphores and usage of it by any entity in + PS ++----------------------------------------------------------------------------- +*/ +/* + * Version 1.0 + */ + +/**********************************************************************************/ + +/* +NOTE: +*/ + +/**********************************************************************************/ +#ifndef CL_SHRD_C +#define CL_SHRD_C +/*==== INCLUDES ===================================================*/ + +#include <string.h> +#include <stdio.h> +#include "typedefs.h" +#include "vsi.h" +#include "cl_shrd.h" + +/*==== VARIABLES ==================================================*/ + +static T_HANDLE cl_handle; + +#ifdef OPTION_MULTITHREAD +#define VSI_CALLER cl_handle, +#else +#define VSI_CALLER +#endif + +/* Pointer is used for faster memory access */ +static T_SHRD_DATA shrd_data_base; +T_SHRD_DATA *shared_data = &shrd_data_base; + +static T_HANDLE sem_SHARED = VSI_ERROR; +static BOOL is_initialized = FALSE; + +/*==== FUNCTIONS ==================================================*/ + +/* ++--------------------------------------------------------------------------------- +| Function : cl_shrd_init ++--------------------------------------------------------------------------------- +| Description : Opens counting semaphore specified by its name. +| If semaphore doesnot exists, creates semaphore with count given. +| +| Parameters : T_HANDLE +| +| Return : void +| ++--------------------------------------------------------------------------------- +*/ +GLOBAL void cl_shrd_init (T_HANDLE handle) +{ + TRACE_FUNCTION ("cl_shrd_init()"); + + if(is_initialized NEQ TRUE) + { + cl_handle = handle; + + memset(shared_data, 0, sizeof(T_SHRD_DATA)); + sem_SHARED = vsi_s_open (VSI_CALLER "SHARED_SEM",1); + + if (sem_SHARED NEQ VSI_ERROR) + { + TRACE_EVENT ("Semaphore opened successfully \"SHARED_SEM\""); + is_initialized = TRUE; +#ifdef TI_PS_FF_AT_P_CMD_CTREG + /* + * Initialize the Two tables with the default values + */ + memcpy(shared_data->no_serv_mod_time,&no_service_mode_time, + sizeof(no_service_mode_time)); + + memcpy(shared_data->lim_serv_mod_time,&lim_service_mode_time, + sizeof(lim_service_mode_time)); +#endif /* TI_PS_FF_AT_P_CMD_CTREG */ + } + else + TRACE_EVENT ("Cant open semaphore \"SHARED_SEM\""); + } +} + +/* ++------------------------------------------------------------------------------ +| Function : cl_shrd_exit ++------------------------------------------------------------------------------ +| Description : Close the semaphore. +| +| Parameters : void +| +| Return : void +| ++------------------------------------------------------------------------------ +*/ + +GLOBAL void cl_shrd_exit (void) +{ + TRACE_FUNCTION ("cl_shrd_exit()"); + if(is_initialized EQ TRUE) + { + if (sem_SHARED NEQ VSI_ERROR) + vsi_s_close (VSI_CALLER sem_SHARED); + + memset(shared_data, 0, sizeof(T_SHRD_DATA)); + is_initialized = FALSE; + } +} + +/* ++------------------------------------------------------------------------------ +| Function : cl_shrd_get_loc ++------------------------------------------------------------------------------ +| Description : Copies the content from global T_LOC_INFO to the +| passed parameter +| +| Parameters : <loc_info>: Location information +| +| Return : void +| ++------------------------------------------------------------------------------ +*/ + +GLOBAL BOOL cl_shrd_get_loc (T_LOC_INFO *loc_info) +{ + BOOL ret = FALSE; + TRACE_FUNCTION ("cl_shrd_get_loc()"); + + if (sem_SHARED NEQ VSI_ERROR) + { + if (vsi_s_get (VSI_CALLER sem_SHARED) EQ VSI_OK) + { + if ( loc_info NEQ NULL ) + memcpy(loc_info, &shared_data->location_info, sizeof(T_LOC_INFO)); + vsi_s_release (VSI_CALLER sem_SHARED); + ret = TRUE; + } + else + { + TRACE_EVENT ("Semaphore not free or Invalid handle \"sem_SHARED\""); + return(ret); + } + } + return(ret); +} + +/* ++------------------------------------------------------------------------------ +| Function : cl_shrd_set_loc ++------------------------------------------------------------------------------ +| Description : Copies the content from passed parameter to the +| global structure +| +| Parameters : <loc_info>: Location information +| +| Return : void +| ++------------------------------------------------------------------------------ +*/ + +GLOBAL void cl_shrd_set_loc (T_LOC_INFO *loc_info) +{ + TRACE_FUNCTION ("cl_shrd_set_loc()"); + + if (sem_SHARED NEQ VSI_ERROR) + { + if (vsi_s_get (VSI_CALLER sem_SHARED) EQ VSI_OK) + { + if ( loc_info NEQ NULL ) + memcpy(&shared_data->location_info, loc_info, sizeof(T_LOC_INFO)); + vsi_s_release (VSI_CALLER sem_SHARED); + } + else + { + TRACE_EVENT ("Semaphore not free or Invalid handle \"sem_SHARED\""); + } + } +} + +/* ++------------------------------------------------------------------------------ +| Function : cl_shrd_get_tim_adv ++------------------------------------------------------------------------------ +| Description : Copies the content from global T_TIM_ADV to the +| passed parameter +| +| Parameters : <tim_adv>: Timing Advance and ME status. +| +| Return : void +| ++------------------------------------------------------------------------------ +*/ + +GLOBAL BOOL cl_shrd_get_tim_adv (T_TIM_ADV *tim_adv) +{ + BOOL ret = FALSE; + TRACE_FUNCTION ("cl_shrd_get_tim_adv()"); + + if (sem_SHARED NEQ VSI_ERROR) + { + if (vsi_s_get (VSI_CALLER sem_SHARED) EQ VSI_OK) + { + if ( tim_adv NEQ NULL ) + memcpy(tim_adv, &shared_data->timing_advance, sizeof(T_TIM_ADV)); + vsi_s_release (VSI_CALLER sem_SHARED); + ret = TRUE; + } + else + { + TRACE_EVENT ("Semaphore not free or Invalid handle \"sem_SHARED\""); + return(ret); + } + } + return(ret); +} + +/* ++------------------------------------------------------------------------------ +| Function : cl_shrd_set_tim_adv ++------------------------------------------------------------------------------ +| Description : Copies the content from passed parameter to the +| global structure +| +| Parameters : <tim_adv>: Timing Advance and ME status. +| +| Return : void +| ++------------------------------------------------------------------------------ +*/ + +GLOBAL void cl_shrd_set_tim_adv (T_TIM_ADV *tim_adv) +{ + TRACE_FUNCTION ("cl_shrd_set_tim_adv()"); + + if (sem_SHARED NEQ VSI_ERROR) + { + if (vsi_s_get (VSI_CALLER sem_SHARED) EQ VSI_OK) + { + if ( tim_adv NEQ NULL ) + memcpy(&shared_data->timing_advance, tim_adv, sizeof(T_TIM_ADV)); + vsi_s_release (VSI_CALLER sem_SHARED); + } + else + { + TRACE_EVENT ("Semaphore not free or Invalid handle \"sem_SHARED\""); + } + } +} +#ifdef TI_PS_FF_AT_P_CMD_CTREG +/* ++------------------------------------------------------------------------------ +| Function : cl_shrd_set_treg_val ++------------------------------------------------------------------------------ +| Description : Copies the content from passed parameter to the +| global structure Used for %CTREG setting the values. +| +| Parameters : <mode> : Selects the mode of operation read or write +| <tab_id> : Selects either no_service_mode_time or +| lim_service_mode_time for updating. +| <tab_val>: Table values to be updated in the selcted table. +| +| Return : BOOL +| ++------------------------------------------------------------------------------ +*/ + +GLOBAL BOOL cl_shrd_set_treg_val ( T_TREG *treg ) +{ + UBYTE i; + BOOL ret = FALSE; + + TRACE_FUNCTION ("cl_shrd_set_treg_val()"); + + if (sem_SHARED NEQ VSI_ERROR) + { + if (vsi_s_get (VSI_CALLER sem_SHARED) EQ VSI_OK) + { + if ( treg NEQ NULL ) + { + switch(treg->tab_id) + { + case NOSERVICE_MODE_TIME: + memcpy(shared_data->no_serv_mod_time, treg->tab_val, + MAX_CTREG_TAB_LEN); + break; + case LIMSERVICE_MODE_TIME: + memcpy(shared_data->lim_serv_mod_time, treg->tab_val, + MAX_CTREG_TAB_LEN); + break; + default: + break; + } + ret = TRUE; + } + vsi_s_release (VSI_CALLER sem_SHARED); + } + else + { + TRACE_EVENT ("Semaphore not free or Invalid handle \"sem_SHARED\""); + } + } + return(ret); +} + +/* ++------------------------------------------------------------------------------ +| Function : cl_shrd_get_treg_val ++------------------------------------------------------------------------------ +| Description : Reads the content from passed parameter to the +| global structure. +| +| Parameters : <mode> : Selects the mode of operation read or write +| <tab_id> : Selects either no_service_mode_time or +| lim_service_mode_time for updating. +| <tab_val>: Table values to be read from the selected table. +| +| Return : BOOL +| ++------------------------------------------------------------------------------ +*/ + +GLOBAL BOOL cl_shrd_get_treg_val ( T_TREG *treg ) +{ + UBYTE i; + BOOL ret = FALSE; + + TRACE_FUNCTION ("cl_shrd_get_treg_val()"); + + if (sem_SHARED NEQ VSI_ERROR) + { + if (vsi_s_get (VSI_CALLER sem_SHARED) EQ VSI_OK) + { + if ( treg NEQ NULL ) + { + switch(treg->tab_id) + { + case NOSERVICE_MODE_TIME: + memcpy(treg->tab_val, shared_data->no_serv_mod_time, + MAX_CTREG_TAB_LEN); + break; + case LIMSERVICE_MODE_TIME: + memcpy(treg->tab_val, shared_data->lim_serv_mod_time, + MAX_CTREG_TAB_LEN); + break; + default: + break; + } + ret = TRUE; + } + vsi_s_release (VSI_CALLER sem_SHARED); + } + else + { + TRACE_EVENT ("Semaphore not free or Invalid handle \"sem_SHARED\""); + } + } + return(ret); +} + +/* ++------------------------------------------------------------------------------ +| Function : cl_shrd_get_treg ++------------------------------------------------------------------------------ +| Description : Reads the TREG Timer value from the selected Table and +| returns the data to called Entity (RR) +| +| Parameters : <tab_id> : Selects either no_service_mode_time or +| lim_service_mode_time for getting TREG value. +| <offset> : Offset value to point at exact position in the +| selected Table for getting TREG value. +| <tab_val>: Table value in the selcted table. +| +| Return : BOOL +| ++------------------------------------------------------------------------------ +*/ + +GLOBAL BOOL cl_shrd_get_treg (UBYTE tab_id, UBYTE offset, UBYTE *tab_val) +{ + BOOL ret = FALSE; + + TRACE_FUNCTION ("cl_shrd_get_treg()"); + + if (sem_SHARED NEQ VSI_ERROR) + { + if (vsi_s_get (VSI_CALLER sem_SHARED) EQ VSI_OK) + { + /* Check for the proper value of offset, it should be between 0 to 24 */ + if(offset > (MAX_CTREG_TAB_LEN - 1)) + { + return(ret); + } + switch(tab_id) + { + case NOSERVICE_MODE_TIME: + *tab_val = shared_data->no_serv_mod_time[offset]; + break; + case LIMSERVICE_MODE_TIME: + *tab_val = shared_data->lim_serv_mod_time[offset]; + break; + default: + break; + } + ret = TRUE; + vsi_s_release (VSI_CALLER sem_SHARED); + } + else + { + TRACE_EVENT ("Semaphore not free or Invalid handle \"sem_SHARED\""); + } + } + return(ret); +} +#endif /* TI_PS_FF_AT_P_CMD_CTREG */ + +#endif /* CL_SHRD_C */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/src/config/gsm_bsp_pool_size.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,1862 @@ +/*============================================================================= + * Copyright 2001-2002 Texas Instruments Inc. All rights reserved. + */ + +#ifndef __RVF_POOL_SIZE_H_ +#define __RVF_POOL_SIZE_H_ +#include "chipset.cfg" +#include "rv/rv_defined_swe.h" +#include "rv.cfg" + +#define QUE_SIZE(n) (24*(n)+8*((n)+1)) +/* + * ATP SWE + */ +#ifdef RVM_ATP_SWE +#endif + +/* + * ATP_UART SWE + */ +#ifdef RVM_ATP_UART_SWE +#endif + +/* + * Bluetooth memory partitions + */ +#ifdef BTS + #define BTS_TASK_MEM 8000 + #define BTT_TASK_MEM 4000 + #define BTAV_TASK_MEM 4000 + #define BTU_TASK_MEM 2000 + #ifdef FMS + #define FMS_TASK_MEM 4000 + #endif +#define BT_BTS_TASK_MEM ((4096+8) + /* allocation per stack. 4096 is the stack size in pei_create */ \ + (32*10+44+8)) /* allocation per queue. 10 is the queue size in pei_create */ + #define BT_BTAV_TASK_MEM ((2996+8) + /* allocation per stack. 2996 is the stack size in pei_create */ \ + (32*10+44+8)) /* allocation per queue. 10 is the queue size in pei_create */ + #define BT_BTU_TASK_MEM ((4096+8) + /* allocation per stack. 4096 is the stack size in pei_create */ \ + (32*10+44+8)) /* allocation per queue. 10 is the queue size in pei_create */ + #define BT_TASK_MEM (BT_BTS_TASK_MEM + BT_BTAV_TASK_MEM + BT_BTU_TASK_MEM) +#else + + +#define BTS_TASK_MEM 0 +#define BTT_TASK_MEM 0 +#define BTAV_TASK_MEM 0 +#define BTU_TASK_MEM 0 +#define FMS_TASK_MEM 0 +#endif + +/* + * AUDIO SWE + */ +#ifdef RVM_AUDIO_MAIN_SWE + #include "audio/audio_pool_size.h" + +/* sizes of audio partitions */ + #define AUDIO_PARTITION_0_SIZE 35 + #define AUDIO_PARTITION_1_SIZE 45 + #define AUDIO_PARTITION_2_SIZE 55 + #define AUDIO_PARTITION_3_SIZE 65 + #define AUDIO_PARTITION_4_SIZE 75 + #define AUDIO_PARTITION_5_SIZE 85 + #define AUDIO_PARTITION_6_SIZE 95 + #define AUDIO_PARTITION_7_SIZE 2500 +#if (L1_PCM_EXTRACTION==1) + #define AUDIO_PARTITION_8_SIZE 40985 +#endif + #define AUDIO_INT_PARTITION_0_SIZE 45 + #define AUDIO_INT_PARTITION_1_SIZE 55 + #define AUDIO_INT_PARTITION_2_SIZE 525 + +/* number of partitions */ + #define AUDIO_0_PARTITIONS 5 + #define AUDIO_1_PARTITIONS 5 + #define AUDIO_2_PARTITIONS 5 + #define AUDIO_3_PARTITIONS 5 + #define AUDIO_4_PARTITIONS 5 + #define AUDIO_5_PARTITIONS 5 + #define AUDIO_6_PARTITIONS 5 + #define AUDIO_7_PARTITIONS 3 +#if (L1_PCM_EXTRACTION==1) + #define AUDIO_8_PARTITIONS 8 +#endif + + #define AUDIO_INT_0_PARTITIONS (15) + #define AUDIO_INT_1_PARTITIONS (15) + #define AUDIO_INT_2_PARTITIONS 5 + + #define AUDIO_TASK_MEM (AUDIO_STACK_SIZE+QUE_SIZE(10)) +#else + #define AUDIO_PARTITION_0_SIZE 0 + #define AUDIO_PARTITION_1_SIZE 0 + #define AUDIO_PARTITION_2_SIZE 0 + #define AUDIO_PARTITION_3_SIZE 0 + #define AUDIO_PARTITION_4_SIZE 0 + #define AUDIO_PARTITION_5_SIZE 0 + #define AUDIO_PARTITION_6_SIZE 0 + #define AUDIO_PARTITION_7_SIZE 0 +#if (L1_PCM_EXTRACTION==1) + #define AUDIO_PARTITION_8_SIZE 0 +#endif + + #define AUDIO_INT_PARTITION_0_SIZE 0 + #define AUDIO_INT_PARTITION_1_SIZE 0 + #define AUDIO_INT_PARTITION_2_SIZE 0 + +/* number of partitions */ + #define AUDIO_0_PARTITIONS 0 + #define AUDIO_1_PARTITIONS 0 + #define AUDIO_2_PARTITIONS 0 + #define AUDIO_3_PARTITIONS 0 + #define AUDIO_4_PARTITIONS 0 + #define AUDIO_5_PARTITIONS 0 + #define AUDIO_6_PARTITIONS 0 + #define AUDIO_7_PARTITIONS 0 +#if (L1_PCM_EXTRACTION==1) + #define AUDIO_8_PARTITIONS 0 +#endif + + #define AUDIO_INT_0_PARTITIONS 0 + #define AUDIO_INT_1_PARTITIONS 0 + #define AUDIO_INT_2_PARTITIONS 0 + + #define AUDIO_TASK_MEM 0 + +#endif + +/* + * Background AUDIO SWE + */ +#ifdef RVM_AUDIO_BGD_SWE +#else +#endif + +/* + * AS SWE + */ +#ifdef RVM_AS_SWE + #include "as/as_pool_size.h" + #define AS_PARTITION_0_SIZE 45 + #define AS_PARTITION_1_SIZE 55 + #define AS_PARTITION_2_SIZE 105 + #define AS_PARTITION_3_SIZE 255 + +/* number of partitions */ + + #define AS_0_PARTITIONS 1 + #define AS_1_PARTITIONS 7 + #define AS_2_PARTITIONS 1 + #define AS_3_PARTITIONS 1 + + #define AS_TASK_MEM (AS_STACK_SIZE+QUE_SIZE(10)) +#else + #define AS_PARTITION_0_SIZE 0 + #define AS_PARTITION_1_SIZE 0 + #define AS_PARTITION_2_SIZE 0 + #define AS_PARTITION_3_SIZE 0 + +/* number of partitions */ + #define AS_0_PARTITIONS 0 + #define AS_1_PARTITIONS 0 + #define AS_2_PARTITIONS 0 + #define AS_3_PARTITIONS 0 + + #define AS_TASK_MEM 0 +#endif + + +/* + * BPR SWE + */ + +#ifdef RVM_BPR_SWE + /* + * Values used in bpr1_env.h + */ +#endif + + +/* + * DACI SWE + */ +#ifdef RVM_DACI_SWE +#endif + +/* + * DAR SWE + */ +#ifdef RVM_DAR_SWE + #include "dar/dar_pool_size.h" + #define DAR_PARTITION_0_SIZE 45 + #define DAR_PARTITION_1_SIZE 65 + #define DAR_PARTITION_2_SIZE 85 + #define DAR_PARTITION_3_SIZE 125 + #define DAR_PARTITION_4_SIZE 275 + #define DAR_PARTITION_5_SIZE 525 + +/* number of partitions */ + #define DAR_0_PARTITIONS 5 + #define DAR_1_PARTITIONS 5 + #define DAR_2_PARTITIONS 5 + #define DAR_3_PARTITIONS 5 + #define DAR_4_PARTITIONS 5 + #define DAR_5_PARTITIONS 2 + + #define DAR_TASK_MEM (DAR_STACK_SIZE+QUE_SIZE(10)) +#else + #define DAR_PARTITION_0_SIZE 0 + #define DAR_PARTITION_1_SIZE 0 + #define DAR_PARTITION_2_SIZE 0 + #define DAR_PARTITION_3_SIZE 0 + #define DAR_PARTITION_4_SIZE 0 + #define DAR_PARTITION_5_SIZE 0 + +/* number of partitions */ + #define DAR_0_PARTITIONS 0 + #define DAR_1_PARTITIONS 0 + #define DAR_2_PARTITIONS 0 + #define DAR_3_PARTITIONS 0 + #define DAR_4_PARTITIONS 0 + #define DAR_5_PARTITIONS 0 + + #define DAR_TASK_MEM 0 + +#endif + +/* + * DCM SWE + */ +#ifdef RVM_DCM_SWE +#endif + +/* + * DCFG SWE + */ +#ifdef RVM_DCFG_SWE +#endif + + +/* + * DMG SWE + */ +#ifdef RVM_DMG_SWE +#endif + +/* + * CAMD SWE + */ +#ifdef RVM_CAMD_SWE + #include "camd/camd_pool_size.h" + #define CAMD_PARTITION_0_SIZE 55 + #define CAMD_PARTITION_1_SIZE 95 + #define CAMD_PARTITION_2_SIZE 185 + + #define CAMD_INT_PARTITION_0_SIZE 65 + #define CAMD_INT_PARTITION_1_SIZE 125 + #define CAMD_INT_PARTITION_2_SIZE 525 + + +/* number of partitions */ + #define CAMD_0_PARTITIONS 3 + #define CAMD_1_PARTITIONS 3 + #define CAMD_2_PARTITIONS 2 + + #define CAMD_INT_0_PARTITIONS 10 + #define CAMD_INT_1_PARTITIONS 5 + #define CAMD_INT_2_PARTITIONS 1 + + #define CAMD_TASK_MEM (CAMD_STACK_SIZE+QUE_SIZE(10)) + +#else + #define CAMD_PARTITION_0_SIZE 0 + #define CAMD_PARTITION_1_SIZE 0 + #define CAMD_PARTITION_2_SIZE 0 + + #define CAMD_INT_PARTITION_0_SIZE 0 + #define CAMD_INT_PARTITION_1_SIZE 0 + #define CAMD_INT_PARTITION_2_SIZE 0 + + +/* number of partitions */ + #define CAMD_0_PARTITIONS 0 + #define CAMD_1_PARTITIONS 0 + #define CAMD_2_PARTITIONS 0 + + #define CAMD_INT_0_PARTITIONS 0 + #define CAMD_INT_1_PARTITIONS 0 + #define CAMD_INT_2_PARTITIONS 0 + + #define CAMD_TASK_MEM 0 + +#endif + +/* + * DMA SWE + */ +#ifdef RVM_DMA_SWE + #include "dma/dma_pool_size.h" + #define DMA_PARTITION_0_SIZE 45 + #define DMA_PARTITION_1_SIZE 55 + #define DMA_PARTITION_2_SIZE 75 + #define DMA_PARTITION_3_SIZE 2025 + +/* number of partitions */ + #define DMA_0_PARTITIONS 20 + #define DMA_1_PARTITIONS 10 + #define DMA_2_PARTITIONS 10 + #define DMA_3_PARTITIONS 1 + + #define DMA_TASK_MEM (DMA_STACK_SIZE+QUE_SIZE(10)) + +#else + #define DMA_PARTITION_0_SIZE 0 + #define DMA_PARTITION_1_SIZE 0 + #define DMA_PARTITION_2_SIZE 0 + #define DMA_PARTITION_3_SIZE 0 + +/* number of partitions */ + #define DMA_0_PARTITIONS 0 + #define DMA_1_PARTITIONS 0 + #define DMA_2_PARTITIONS 0 + #define DMA_3_PARTITIONS 0 + + #define DMA_TASK_MEM 0 + +#endif + +/* + * ETM SWE + */ +#ifdef RVM_ETM_SWE + #include "etm/etm_pool_size.h" + #define ETM_PARTITION_0_SIZE 35 + #define ETM_PARTITION_1_SIZE 75 + #define ETM_PARTITION_2_SIZE 295 + #define ETM_PARTITION_3_SIZE 315 + #define ETM_PARTITION_4_SIZE 2025 + +/* number of partitions */ + + #define ETM_0_PARTITIONS 5 + #define ETM_1_PARTITIONS 5 + #define ETM_2_PARTITIONS 3 + #define ETM_3_PARTITIONS 3 + #define ETM_4_PARTITIONS 1 + #define ETM_TASK_MEM (ETM_STACK_SIZE+QUE_SIZE(10)) + +#else + #define ETM_PARTITION_0_SIZE 0 + #define ETM_PARTITION_1_SIZE 0 + #define ETM_PARTITION_2_SIZE 0 + #define ETM_PARTITION_3_SIZE 0 + #define ETM_PARTITION_4_SIZE 0 + +/* number of partitions */ + #define ETM_0_PARTITIONS 0 + #define ETM_1_PARTITIONS 0 + #define ETM_2_PARTITIONS 0 + #define ETM_3_PARTITIONS 0 + #define ETM_4_PARTITIONS 0 + + #define ETM_TASK_MEM 0 +#endif + +/* + * FFS SWE + */ +#ifdef RVM_FFS_SWE + #include "ffs/ffs_pool_size.h" + #define FFS_PARTITION_0_SIZE 35 + #define FFS_PARTITION_1_SIZE 55 + #define FFS_PARTITION_2_SIZE 75 + #define FFS_PARTITION_3_SIZE 295 + #define FFS_PARTITION_4_SIZE 315 + #define FFS_PARTITION_5_SIZE 3025 + +/* number of partitions */ + #define FFS_0_PARTITIONS 5 + #define FFS_1_PARTITIONS 5 + #define FFS_2_PARTITIONS 5 + #define FFS_3_PARTITIONS 1 + #define FFS_4_PARTITIONS 1 + #define FFS_5_PARTITIONS 2 + + #define FFS_TASK_MEM (FFS_STACK_SIZE+QUE_SIZE(10)) +#else + #define FFS_PARTITION_0_SIZE 0 + #define FFS_PARTITION_1_SIZE 0 + #define FFS_PARTITION_2_SIZE 0 + #define FFS_PARTITION_3_SIZE 0 + #define FFS_PARTITION_4_SIZE 0 + #define FFS_PARTITION_5_SIZE 0 + + +/* number of partitions */ + #define FFS_0_PARTITIONS 0 + #define FFS_1_PARTITIONS 0 + #define FFS_2_PARTITIONS 0 + #define FFS_3_PARTITIONS 0 + #define FFS_4_PARTITIONS 0 + #define FFS_5_PARTITIONS 0 + + #define FFS_TASK_MEM 0 +#endif + + +/* + * HASH SWE + */ +#ifdef RVM_HASH_SWE + #include "hash/hash_pool_size.h" + #define HASH_PARTITION_0_SIZE 75 + #define HASH_PARTITION_1_SIZE 115 + +/* number of partitions */ + #define HASH_0_PARTITIONS 10 + #define HASH_1_PARTITIONS 5 + #define HASH_TASK_MEM (HASH_STACK_SIZE+QUE_SIZE(10)) + +#else + #define HASH_PARTITION_0_SIZE 0 + #define HASH_PARTITION_1_SIZE 0 + +/* number of partitions */ + #define HASH_0_PARTITIONS 0 + #define HASH_1_PARTITIONS 0 + #define HASH_TASK_MEM 0 +#endif + +/* + * I2C SWE + */ +#ifdef RVM_I2C_SWE +#endif + +/* + * KPD SWE + */ +#ifdef RVM_KPD_SWE +#include "kpd/kpd_pool_size.h" + #define KPD_PARTITION_0_SIZE 35 + #define KPD_PARTITION_1_SIZE 45 + #define KPD_PARTITION_2_SIZE 55 + #define KPD_PARTITION_3_SIZE 65 + #define KPD_PARTITION_4_SIZE 75 + #define KPD_PARTITION_5_SIZE 85 + #define KPD_PARTITION_6_SIZE 115 + +/* number of partitions */ + #define KPD_0_PARTITIONS 2 + #define KPD_1_PARTITIONS 7 + #define KPD_2_PARTITIONS 5 + #define KPD_3_PARTITIONS 1 + #define KPD_4_PARTITIONS 1 + #define KPD_5_PARTITIONS 4 + #define KPD_6_PARTITIONS 2 + #define KPD_TASK_MEM (KPD_STACK_SIZE+QUE_SIZE(10)) +#else + #define KPD_PARTITION_0_SIZE 0 + #define KPD_PARTITION_1_SIZE 0 + #define KPD_PARTITION_2_SIZE 0 + #define KPD_PARTITION_3_SIZE 0 + #define KPD_PARTITION_4_SIZE 0 + #define KPD_PARTITION_5_SIZE 0 + #define KPD_PARTITION_6_SIZE 0 + +/* number of partitions */ + #define KPD_0_PARTITIONS 0 + #define KPD_1_PARTITIONS 0 + #define KPD_2_PARTITIONS 0 + #define KPD_3_PARTITIONS 0 + #define KPD_4_PARTITIONS 0 + #define KPD_5_PARTITIONS 0 + #define KPD_6_PARTITIONS 0 + + #define KPD_TASK_MEM 0 +#endif + +/* + * LLS SWE + */ +#ifdef RVM_LLS_SWE +#endif + +/* + * MDC SWE + */ +#ifdef RVM_MDC_SWE + #include "mdc/mdc_pool_size.h" +#endif + +/* + * MDL SWE + */ +#ifdef RVM_MDL_SWE +#endif + +/* + * MFW SWE + */ +#ifdef RVM_MFW_SWE +#endif + +/* + * MKS SWE + */ +#ifdef RVM_MKS_SWE + #include "mks/mks_pool_size.h" + #define MKS_PARTITION_0_SIZE 85 + /* number of partitions */ + #define MKS_0_PARTITIONS 5 + + #define MKS_TASK_MEM (MKS_STACK_SIZE+QUE_SIZE(10)) +#else + #define MKS_PARTITION_0_SIZE 0 + /* number of partitions */ + #define MKS_0_PARTITIONS 0 + + #define MKS_TASK_MEM 0 +#endif + + +/* + * MPM SWE + */ +#ifdef RVM_MPM_SWE +#endif + + +/* + * USB SWE (USB LLD SWE) + */ +#ifdef RVM_USB_SWE + #include "usb/usb_pool_size.h" + #define USB_PARTITION_0_SIZE 45 + #define USB_PARTITION_1_SIZE 55 + #define USB_PARTITION_2_SIZE 75 + #define USB_PARTITION_3_SIZE 95 + #define USB_PARTITION_4_SIZE 105 + #define USB_PARTITION_5_SIZE 445 + +/* number of partitions */ + #define USB_0_PARTITIONS 5 + #define USB_1_PARTITIONS 3 + #define USB_2_PARTITIONS 1 + #define USB_3_PARTITIONS 4 + #define USB_4_PARTITIONS 2 + #define USB_5_PARTITIONS 1 + #define USB_TASK_MEM (USB_STACK_SIZE+QUE_SIZE(10)) +#else + #define USB_PARTITION_0_SIZE 0 + #define USB_PARTITION_1_SIZE 0 + #define USB_PARTITION_2_SIZE 0 + #define USB_PARTITION_3_SIZE 0 + #define USB_PARTITION_4_SIZE 0 + #define USB_PARTITION_5_SIZE 0 + + +/* number of partitions */ + #define USB_0_PARTITIONS 0 + #define USB_1_PARTITIONS 0 + #define USB_2_PARTITIONS 0 + #define USB_3_PARTITIONS 0 + #define USB_4_PARTITIONS 0 + #define USB_5_PARTITIONS 0 + + #define USB_TASK_MEM 0 +#endif + +/* + * USBTRC SWE (USBTRC Class SWE) + */ +#ifdef RVM_USBTRC_SWE + #include "usbtrc/usbtrc_pool_size.h" +#define USBTRC_PARTITION_0_SIZE 95 + #define USBTRC_PARTITION_1_SIZE 125 + #define USBTRC_PARTITION_2_SIZE 155 + #define USBTRC_PARTITION_3_SIZE 225 + #define USBTRC_PARTITION_4_SIZE 1055 + #define USBTRC_PARTITION_5_SIZE 5025 + + +/* number of partitions */ + #define USBTRC_0_PARTITIONS 10 + #define USBTRC_1_PARTITIONS 10 + #define USBTRC_2_PARTITIONS 3 + #define USBTRC_3_PARTITIONS 3 + #define USBTRC_4_PARTITIONS 1 + #define USBTRC_5_PARTITIONS 3 + #define USBTRC_TASK_MEM (USBTRC_STACK_SIZE+QUE_SIZE(10)) +#else + #define USBTRC_PARTITION_0_SIZE 0 + #define USBTRC_PARTITION_1_SIZE 0 + #define USBTRC_PARTITION_2_SIZE 0 + #define USBTRC_PARTITION_3_SIZE 0 + #define USBTRC_PARTITION_4_SIZE 0 + #define USBTRC_PARTITION_5_SIZE 0 + + +/* number of partitions */ + #define USBTRC_0_PARTITIONS 0 + #define USBTRC_1_PARTITIONS 0 + #define USBTRC_2_PARTITIONS 0 + #define USBTRC_3_PARTITIONS 0 + #define USBTRC_4_PARTITIONS 0 + #define USBTRC_5_PARTITIONS 0 + + #define USBTRC_TASK_MEM 0 +#endif + +/* + * USBMS SWE (USBMS SWE) + */ +#ifdef RVM_USBMS_SWE + #include "usbms/usbms_pool_size.h" + #define USBMS_PARTITION_0_SIZE 45 + #define USBMS_PARTITION_1_SIZE 65 + #define USBMS_PARTITION_2_SIZE 155 + #define USBMS_PARTITION_3_SIZE 295 + #define USBMS_PARTITION_4_SIZE 0 // added for T_USBMS_XFER_BUFFER + + #define USBMS_INT_PARTITION_0_SIZE 20024 + +/* number of partitions */ + #define USBMS_0_PARTITIONS 5 + #define USBMS_1_PARTITIONS 5 + #define USBMS_2_PARTITIONS 3 + #define USBMS_3_PARTITIONS 2 + + #define USBMS_INT_0_PARTITIONS 1 + + #define USBMS_TASK_MEM (USBMS_STACK_SIZE+QUE_SIZE(10)) +#else +#define USBMS_PARTITION_0_SIZE 0 + #define USBMS_PARTITION_1_SIZE 0 + #define USBMS_PARTITION_2_SIZE 0 + #define USBMS_PARTITION_3_SIZE 0 + #define USBMS_PARTITION_4_SIZE 0 // added for T_USBMS_XFER_BUFFER + #define USBMS_INT_PARTITION_0_SIZE 0 + + +/* number of partitions */ + #define USBMS_0_PARTITIONS 0 + #define USBMS_1_PARTITIONS 0 + #define USBMS_2_PARTITIONS 0 + #define USBMS_3_PARTITIONS 0 + #define USBMS_INT_0_PARTITIONS 0 + #define USBMS_TASK_MEM 0 +#endif + +/* + * USBFAX SWE (USB FAX/DATA Class SWE) + */ +#ifdef RVM_USBFAX_SWE + #include "usbfax/usbfax_pool_size.h" + #define USBFAX_PARTITION_0_SIZE 35 + #define USBFAX_PARTITION_1_SIZE 45 + #define USBFAX_PARTITION_2_SIZE 55 + #define USBFAX_PARTITION_3_SIZE 4435 + +/* number of partitions */ + #define USBFAX_0_PARTITIONS 30 + #define USBFAX_1_PARTITIONS 30 + #define USBFAX_2_PARTITIONS 30 + #define USBFAX_3_PARTITIONS 1 + + #define USBFAX_TASK_MEM (USBFAX_STACK_SIZE+QUE_SIZE(10)) +#else + #define USBFAX_PARTITION_0_SIZE 0 + #define USBFAX_PARTITION_1_SIZE 0 + #define USBFAX_PARTITION_2_SIZE 0 + #define USBFAX_PARTITION_3_SIZE 0 + + +/* number of partitions */ + #define USBFAX_0_PARTITIONS 0 + #define USBFAX_1_PARTITIONS 0 + #define USBFAX_2_PARTITIONS 0 + #define USBFAX_3_PARTITIONS 0 + + #define USBFAX_TASK_MEM 0 +#endif + + +/* + * MC SWE + */ +#ifdef RVM_MC_SWE +#endif + + + +/* + * DATALIGHT SWE + */ +#ifdef RVM_DATALIGHT_SWE + #include "datalight/datalight_pool_size.h" +#define DATALIGHT_PARTITION_0_SIZE 105 +#define DATALIGHT_PARTITION_1_SIZE 1225 + +/* number of partitions */ + #define DATALIGHT_0_PARTITIONS 20 + #define DATALIGHT_1_PARTITIONS 2 + #define DATALIGHT_TASK_MEM DATALIGHT_STACK_SIZE+QUE_SIZE(10) + + /* NAN partitions */ + #define NAN_PARTITION_0_SIZE 0 + #define NAN_PARTITION_1_SIZE 0 + /* number of partitions */ + #define NAN_0_PARTITIONS 0 + #define NAN_1_PARTITIONS 0 + #define NAN_TASK_MEM 0 + + /* NOR paritions */ + #define NOR_BM_PARTITION_0_SIZE 0 +/* number of partitions */ + #define NOR_BM_0_PARTITIONS 0 + #define NOR_BM_1_PARTITIONS 0 + + #define NOR_BM_TASK_MEM 0 + + +#else + +#define DATALIGHT_PARTITION_0_SIZE 0 + +/* number of partitions */ + #define DATALIGHT_0_PARTITIONS 0 + #define DATALIGHT_1_PARTITIONS 0 + + #define DATALIGHT_TASK_MEM 0 + +/* + * NAN SWE + */ +#ifdef RVM_NAN_SWE + #include "nan/nan_pool_size.h" +#define NAN_PARTITION_0_SIZE 105 + #define NAN_PARTITION_1_SIZE 1225 + +/* number of partitions */ + #define NAN_0_PARTITIONS 20 + #define NAN_1_PARTITIONS 2 + + #define NAN_TASK_MEM NAN_BM_STACK_SIZE+QUE_SIZE(10) +#else + #define NAN_PARTITION_0_SIZE 0 + #define NAN_PARTITION_1_SIZE 0 + +/* number of partitions */ + #define NAN_0_PARTITIONS 0 + #define NAN_1_PARTITIONS 0 + + #define NAN_TASK_MEM 0 +#endif + +/* + * NOR_BM SWE + */ +#ifdef RVM_NOR_BM_SWE + #include "nor_bm/nor_bm_pool_size.h" +#define NOR_BM_PARTITION_0_SIZE 105 +#define NOR_BM_PARTITION_1_SIZE 1225 + +/* number of partitions */ + #define NOR_BM_0_PARTITIONS 20 + #define NOR_BM_1_PARTITIONS 2 + #define NOR_BM_TASK_MEM NOR_BM_STACK_SIZE+QUE_SIZE(10) +#else + +#define NOR_BM_PARTITION_0_SIZE 0 + +/* number of partitions */ + #define NOR_BM_0_PARTITIONS 0 + #define NOR_BM_1_PARTITIONS 0 + + #define NOR_BM_TASK_MEM 0 +#endif +#endif + + +/* + * GBI SWE (Generic Block Interface) + */ +#ifdef RVM_GBI_SWE + #include "gbi/gbi_pool_size.h" + #define GBI_PARTITION_0_SIZE 35 + #define GBI_PARTITION_1_SIZE 45 + #define GBI_PARTITION_2_SIZE 55 + #define GBI_PARTITION_3_SIZE 65 + #define GBI_PARTITION_4_SIZE 75 + #define GBI_PARTITION_5_SIZE 85 + #define GBI_PARTITION_6_SIZE 135 + #define GBI_PARTITION_7_SIZE 155 + #define GBI_PARTITION_8_SIZE 235 + #define GBI_PARTITION_9_SIZE 545 + #define GBI_PARTITION_10_SIZE 645 + #define GBI_PARTITION_11_SIZE 3025 + + +/* number of partitions */ + #define GBI_0_PARTITIONS 40 + #define GBI_1_PARTITIONS 40 + #define GBI_2_PARTITIONS 20 + #define GBI_3_PARTITIONS 20 + #define GBI_4_PARTITIONS 20 + #define GBI_5_PARTITIONS 20 + #define GBI_6_PARTITIONS 20 + #define GBI_7_PARTITIONS 20 + #define GBI_8_PARTITIONS 20 + #define GBI_9_PARTITIONS 10 + #define GBI_10_PARTITIONS 10 + #define GBI_11_PARTITIONS 1 + + #define GBI_TASK_MEM (GBI_STACK_SIZE+QUE_SIZE(10)) +#else + #define GBI_PARTITION_0_SIZE 0 + #define GBI_PARTITION_1_SIZE 0 + #define GBI_PARTITION_2_SIZE 0 + #define GBI_PARTITION_3_SIZE 0 + #define GBI_PARTITION_4_SIZE 0 + #define GBI_PARTITION_5_SIZE 0 + #define GBI_PARTITION_6_SIZE 0 + #define GBI_PARTITION_7_SIZE 0 + #define GBI_PARTITION_8_SIZE 0 + #define GBI_PARTITION_9_SIZE 0 + #define GBI_PARTITION_10_SIZE 0 + #define GBI_PARTITION_11_SIZE 0 + + +/* number of partitions */ + #define GBI_0_PARTITIONS 0 + #define GBI_1_PARTITIONS 0 + #define GBI_2_PARTITIONS 0 + #define GBI_3_PARTITIONS 0 + #define GBI_4_PARTITIONS 0 + #define GBI_5_PARTITIONS 0 + #define GBI_6_PARTITIONS 0 + #define GBI_7_PARTITIONS 0 + #define GBI_8_PARTITIONS 0 + #define GBI_9_PARTITIONS 0 + #define GBI_10_PARTITIONS 0 + #define GBI_11_PARTITIONS 0 + + #define GBI_TASK_MEM 0 +#endif + +/* + * RFSFAT SWE (FAT16 File System Core) + */ +#ifdef RVM_RFSFAT_SWE + #include "rfsfat/rfsfat_pool_size.h" + #define RFSFAT_PARTITION_0_SIZE 35 + #define RFSFAT_PARTITION_1_SIZE 45 + #define RFSFAT_PARTITION_2_SIZE 55 + #define RFSFAT_PARTITION_3_SIZE 65 + #define RFSFAT_PARTITION_4_SIZE 75 + #define RFSFAT_PARTITION_5_SIZE 105 + #define RFSFAT_PARTITION_6_SIZE 155 + #define RFSFAT_PARTITION_7_SIZE 545 + #define RFSFAT_PARTITION_8_SIZE 805 + #define RFSFAT_PARTITION_9_SIZE 1024 + #define RFSFAT_PARTITION_10_SIZE 10240 +/* number of partitions */ + #define RFSFAT_0_PARTITIONS 5 + #define RFSFAT_1_PARTITIONS 5 + #define RFSFAT_2_PARTITIONS 5 + #define RFSFAT_3_PARTITIONS 5 + #define RFSFAT_4_PARTITIONS 5 + #define RFSFAT_5_PARTITIONS 2 + #define RFSFAT_6_PARTITIONS 1 + #define RFSFAT_7_PARTITIONS 1 + #define RFSFAT_8_PARTITIONS 1 + #define RFSFAT_9_PARTITIONS 5 + #define RFSFAT_10_PARTITIONS 11 + #define RFSFAT_TASK_MEM (RFSFAT_STACK_SIZE+QUE_SIZE(10)) + +#else + #define RFSFAT_PARTITION_0_SIZE 0 + #define RFSFAT_PARTITION_1_SIZE 0 + #define RFSFAT_PARTITION_2_SIZE 0 + #define RFSFAT_PARTITION_3_SIZE 0 + #define RFSFAT_PARTITION_4_SIZE 0 + #define RFSFAT_PARTITION_5_SIZE 0 + #define RFSFAT_PARTITION_6_SIZE 0 + #define RFSFAT_PARTITION_7_SIZE 0 + #define RFSFAT_PARTITION_8_SIZE 0 + #define RFSFAT_PARTITION_9_SIZE 0 + #define RFSFAT_PARTITION_10_SIZE 0 +/* number of partitions */ + #define RFSFAT_0_PARTITIONS 0 + #define RFSFAT_1_PARTITIONS 0 + #define RFSFAT_2_PARTITIONS 0 + #define RFSFAT_3_PARTITIONS 0 + #define RFSFAT_4_PARTITIONS 0 + #define RFSFAT_5_PARTITIONS 0 + #define RFSFAT_6_PARTITIONS 0 + #define RFSFAT_7_PARTITIONS 0 + #define RFSFAT_8_PARTITIONS 0 + #define RFSFAT_9_PARTITIONS 0 + #define RFSFAT_10_PARTITIONS 0 + #define RFSFAT_TASK_MEM 0 + +#endif + +/* + * RFSNAND SWE + */ +#ifdef RVM_RFSNAND_SWE + #include "rfsnand/rfsnand_pool_size.h" + #define RFSNAND_PARTITION_0_SIZE 45 + #define RFSNAND_PARTITION_1_SIZE 55 + #define RFSNAND_PARTITION_2_SIZE 65 + #define RFSNAND_PARTITION_3_SIZE 115 + #define RFSNAND_PARTITION_4_SIZE 395 + #define RFSNAND_PARTITION_5_SIZE 545 + #define RFSNAND_PARTITION_6_SIZE 1085 + +/* number of partitions */ + #define RFSNAND_0_PARTITIONS 10 + #define RFSNAND_1_PARTITIONS 10 + #define RFSNAND_2_PARTITIONS 10 + #define RFSNAND_3_PARTITIONS 10 + #define RFSNAND_4_PARTITIONS 10 + #define RFSNAND_5_PARTITIONS 10 + #define RFSNAND_6_PARTITIONS 10 + + #define RFSNAND_TASK_MEM RFSNAND_STACK_SIZE+QUE_SIZE(10) + +#else + #define RFSNAND_PARTITION_0_SIZE 0 + #define RFSNAND_PARTITION_1_SIZE 0 + #define RFSNAND_PARTITION_2_SIZE 0 + #define RFSNAND_PARTITION_3_SIZE 0 + #define RFSNAND_PARTITION_4_SIZE 0 + #define RFSNAND_PARTITION_5_SIZE 0 + #define RFSNAND_PARTITION_6_SIZE 0 + +/* number of partitions */ + #define RFSNAND_0_PARTITIONS 0 + #define RFSNAND_1_PARTITIONS 0 + #define RFSNAND_2_PARTITIONS 0 + #define RFSNAND_3_PARTITIONS 0 + #define RFSNAND_4_PARTITIONS 0 + #define RFSNAND_5_PARTITIONS 0 + #define RFSNAND_6_PARTITIONS 0 + + #define RFSNAND_TASK_MEM 0 + +#endif + + +/* + * RFS SWE + */ +#ifdef RVM_RFS_SWE + #include "rfs/rfs_pool_size.h" + #define RFS_PARTITION_0_SIZE 35 + #define RFS_PARTITION_1_SIZE 45 + #define RFS_PARTITION_2_SIZE 55 + #define RFS_PARTITION_3_SIZE 65 + #define RFS_PARTITION_4_SIZE 75 + #define RFS_PARTITION_5_SIZE 105 + #define RFS_PARTITION_6_SIZE 155 + #define RFS_PARTITION_7_SIZE 545 + #define RFS_PARTITION_8_SIZE 805 +/* number of partitions */ + #define RFS_0_PARTITIONS 5 + #define RFS_1_PARTITIONS 5 + #define RFS_2_PARTITIONS 5 + #define RFS_3_PARTITIONS 5 + #define RFS_4_PARTITIONS 5 + #define RFS_5_PARTITIONS 2 + #define RFS_6_PARTITIONS 1 + #define RFS_7_PARTITIONS 1 + #define RFS_8_PARTITIONS 1 + #define RFS_TASK_MEM (RFS_STACK_SIZE+QUE_SIZE(10)) + +#else + #define RFS_PARTITION_0_SIZE 0 + #define RFS_PARTITION_1_SIZE 0 + #define RFS_PARTITION_2_SIZE 0 + #define RFS_PARTITION_3_SIZE 0 + #define RFS_PARTITION_4_SIZE 0 + #define RFS_PARTITION_5_SIZE 0 + #define RFS_PARTITION_6_SIZE 0 + #define RFS_PARTITION_7_SIZE 0 + #define RFS_PARTITION_8_SIZE 0 + +/* number of partitions */ + #define RFS_0_PARTITIONS 0 + #define RFS_1_PARTITIONS 0 + #define RFS_2_PARTITIONS 0 + #define RFS_3_PARTITIONS 0 + #define RFS_4_PARTITIONS 0 + #define RFS_5_PARTITIONS 0 + #define RFS_6_PARTITIONS 0 + #define RFS_7_PARTITIONS 0 + #define RFS_8_PARTITIONS 0 + + #define RFS_TASK_MEM 0 +#endif + + +/* + * PWR SWE + */ +#ifdef RVM_PWR_SWE + #include "pwr/pwr_pool_size.h" +#else +#endif + +/* + * LCC SWE + */ +#ifdef RVM_LCC_SWE + #include "lcc/lcc_pool_size.h" + #define LCC_PARTITION_0_SIZE 125 + #define LCC_PARTITION_1_SIZE 275 + #define LCC_PARTITION_2_SIZE 525 + +/* number of partitions */ + #define LCC_0_PARTITIONS 3 + #define LCC_1_PARTITIONS 3 + #define LCC_2_PARTITIONS 1 + + #define LCC_TASK_MEM (LCC_STACK_SIZE+QUE_SIZE(10)) +#else + #define LCC_PARTITION_0_SIZE 0 + #define LCC_PARTITION_1_SIZE 0 + #define LCC_PARTITION_2_SIZE 0 + + +/* number of partitions */ + #define LCC_0_PARTITIONS 0 + #define LCC_1_PARTITIONS 0 + #define LCC_2_PARTITIONS 0 + + #define LCC_TASK_MEM 0 +#endif + +/* + * R2D SWE + */ +#ifdef RVM_R2D_SWE + #include "r2d/r2d_pool_size.h" + #define R2D_PARTITION_0_SIZE 45 + #define R2D_PARTITION_1_SIZE 55 + #define R2D_PARTITION_2_SIZE 65 + #define R2D_PARTITION_3_SIZE 75 + #define R2D_PARTITION_4_SIZE 135 + #define R2D_PARTITION_5_SIZE 925 + + +/* number of partitions */ + #define R2D_0_PARTITIONS 10 + #define R2D_1_PARTITIONS 10 + #define R2D_2_PARTITIONS 10 + #define R2D_3_PARTITIONS 5 + #define R2D_4_PARTITIONS 5 + #define R2D_5_PARTITIONS 2 + #define R2D_TASK_MEM R2D_STACK_SIZE+QUE_SIZE(2) + +#else + #define R2D_PARTITION_0_SIZE 0 + #define R2D_PARTITION_1_SIZE 0 + #define R2D_PARTITION_2_SIZE 0 + #define R2D_PARTITION_3_SIZE 0 + #define R2D_PARTITION_4_SIZE 0 + #define R2D_PARTITION_5_SIZE 0 + + + +/* number of partitions */ + #define R2D_0_PARTITIONS 0 + #define R2D_1_PARTITIONS 0 + #define R2D_2_PARTITIONS 0 + #define R2D_3_PARTITIONS 0 + #define R2D_4_PARTITIONS 0 + #define R2D_5_PARTITIONS 0 + + #define R2D_TASK_MEM 0 +#endif + +/* lcd task memory requirment */ +#ifdef RVM_LCD_SWE +#include "lcd/lcd_pool_size.h" +#define LCD_TASK_MEM (LCD_STACK_SIZE+QUE_SIZE(2)) +#else +#define LCD_TASK_MEM 0 + +#endif + +/* + * RGUI SWE + */ +#ifdef RVM_RGUI_SWE +#endif + +/* + * RNET SWE + */ +#ifdef RVM_RNET_SWE +#endif + +/* + * RNET_BR SWE + */ +#ifdef RVM_RNET_BR_SWE +#endif + +/* + * RNET_RT SWE + */ +#ifdef RVM_RNET_RT_SWE +#endif + +/* + * RNET_WS SWE + */ +#ifdef RVM_RNET_WS_SWE +#endif + +/* + * RTC SWE + */ +#ifdef RVM_RTC_SWE + #include "rtc/rtc_pool_size.h" + #define RTC_PARTITION_0_SIZE 35 + #define RTC_PARTITION_1_SIZE 45 + + + +/* number of partitions */ + #define RTC_0_PARTITIONS 5 + #define RTC_1_PARTITIONS 3 + + #define RTC_TASK_MEM (RTC_STACK_SIZE+QUE_SIZE(10)) +#else + #define RTC_PARTITION_0_SIZE 0 + #define RTC_PARTITION_1_SIZE 0 + + +/* number of partitions */ + #define RTC_0_PARTITIONS 0 + #define RTC_1_PARTITIONS 0 + #define RTC_TASK_MEM 0 +#endif + + +/* + * SMBS SWE + */ +#ifdef RVM_SMBS_SWE +#endif + +/* + * SPI SWE + */ +#ifdef RVM_SPI_SWE +#endif + +/* + * TI_PRF SWE + */ +#ifdef RVM_TI_PRF_SWE +#endif + +/* + * TUT SWE + */ +#ifdef RVM_TUT_SWE +#endif + +/* + * TTY SWE + */ +#ifdef RVM_TTY_SWE + #include "tty/tty_pool_size.h" + #define TTY_PARTITION_0_SIZE 45 + #define TTY_PARTITION_1_SIZE 75 + #define TTY_PARTITION_2_SIZE 125 + + +/* number of partitions */ + + #define TTY_0_PARTITIONS 30 + #define TTY_1_PARTITIONS 10 + #define TTY_2_PARTITIONS 10 + + #define TTY_TASK_MEM (TTY_STACK_SIZE+QUE_SIZE(10)) +#else + #define TTY_PARTITION_0_SIZE 0 + #define TTY_PARTITION_1_SIZE 0 + #define TTY_PARTITION_2_SIZE 0 + +/* number of partitions */ + #define TTY_0_PARTITIONS 0 + #define TTY_1_PARTITIONS 0 + #define TTY_2_PARTITIONS 0 + #define TTY_TASK_MEM 0 +#endif + + + +/*** Bluetooth SWE (to move in a widcomm/widcomm_pool_size.h) ***/ + +/* + * BTA SWE (Bluetooth SWE) + */ +#ifdef RVM_BTA_SWE +#endif + +/* + * BTH SWE (Bluetooth SWE) + */ +#ifdef RVM_BTH_SWE +#endif + +/* + * BTU SWE (Bluetooth SWE) + */ +#ifdef RVM_BTU_SWE +#endif + +/* + * BTUI SWE (Bluetooth SWE) + */ +#ifdef RVM_BTUI_SWE + #endif + +/* + * GKI SWE (Bluetooth SWE) + */ +#ifdef RVM_GKI_SWE + #endif + +/* + * JPEG SWE (JPEG SWE) + */ +#ifdef RVM_JPEG_SWE +// #include "jpeg_pool_size.h" + #else + #endif + +#ifdef RVM_CRY_SWE + #include "cry/cry_pool_size.h" +#define CRY_PARTITION_0_SIZE 54 + #define CRY_PARTITION_1_SIZE 64 + +/* number of partitions */ + #define CRY_0_PARTITIONS 10 + #define CRY_1_PARTITIONS 5 + #define CRY_TASK_MEM CRY_STACK_SIZE+QUE_SIZE(10) + #else + #define CRY_PARTITION_0_SIZE 0 + #define CRY_PARTITION_1_SIZE 0 + +/* number of partitions */ + #define CRY_0_PARTITIONS 0 + #define CRY_1_PARTITIONS 0 + #define CRY_TASK_MEM 0 + #endif + +#ifdef RVM_RVT_SWE + #include "rvt/rvt_pool_size.h" + #define RVT_TASK_MEM (TRACE_STACK_SIZE+QUE_SIZE(2)) + #else +#define RVT_TASK_MEM 0 + #endif + +#if (TEST==1) + #include "tests/rtest/rtest_pool_size.h" + #define RV_TEST_TASK_MEM RTEST_STACK_SIZE+QUE_SIZE(10) + #define RTEST_TASK_MEM RTEST_STACK_SIZE+QUE_SIZE(10) +#else + #define RV_TEST_TASK_MEM 0 + #define RTEST_TASK_MEM 0 + #endif + + +/* + * HCI SWE (Bluetooth SWE) + */ +#ifdef RVM_HCI_SWE + #endif + +/* + * RPC SWE (Bluetooth SWE) + */ +#ifdef RVM_RPC_SWE +#endif + +#if (LOCOSTO_LITE==1) +#define BSP_PARTITION_0_SIZE 35 +#define BSP_PARTITION_0_USB_SIZE 40 +#define BSP_PARTITION_1_SIZE 45 +#define BSP_PARTITION_2_SIZE 55 +#define BSP_PARTITION_3_SIZE 65 +#define BSP_PARTITION_4_SIZE 75 +#define BSP_PARTITION_5_SIZE 85 +#define BSP_PARTITION_6_SIZE 95 +#define BSP_PARTITION_7_SIZE 105 +#define BSP_PARTITION_8_SIZE 115 +#define BSP_PARTITION_9_SIZE 125 +#define BSP_PARTITION_10_SIZE 155 +#define BSP_PARTITION_11_SIZE 185 +#define BSP_PARTITION_12_SIZE 225 +#define BSP_PARTITION_13_SIZE 235 +#define BSP_PARTITION_14_SIZE 255 +#define BSP_PARTITION_15_SIZE 275 +#define BSP_PARTITION_16_SIZE 285 +#define BSP_PARTITION_17_SIZE 295 +#define BSP_PARTITION_18_SIZE 315 +#define BSP_PARTITION_19_SIZE 400 +#define BSP_PARTITION_20_SIZE 445 +#define BSP_PARTITION_21_SIZE 525 +#define BSP_PARTITION_22_SIZE 545 +#define BSP_PARTITION_23_SIZE 645 +#define BSP_PARTITION_24_SIZE 805 +#define BSP_PARTITION_25_SIZE 925 +#define BSP_PARTITION_26_SIZE 1085 +#define BSP_PARTITION_27_SIZE 1225 +#define BSP_PARTITION_28_SIZE 2075 //2025 +#define BSP_PARTITION_29_SIZE 3025 +#define BSP_PARTITION_30_SIZE 4435 +#define BSP_PARTITION_31_SIZE 5035 +#define BSP_PARTITION_31_BAE_SIZE 8025 +#define BSP_PARTITION_32_SIZE 19225 +#define BSP_PARTITION_34_SIZE 65100 +#define BSP_PARTITION_35_SIZE 76825 +#define BSP_PARTITION_36_SIZE 153625 +#define BSP_PARTITION_37_SIZE 450000 +#define BSP_PARTITION_38_SIZE 620025 + + + + +#ifdef RVM_USBFAX_SWE +#define BSPPOOL_0_PARTITIONS (7+USBFAX_0_PARTITIONS) //35 +#else +#define BSPPOOL_0_PARTITIONS (7) //35 +#endif + +#define BSPPOOL_0_USB_PARTITIONS 20 + +#ifdef RVM_USBFAX_SWE +#define BSPPOOL_1_PARTITIONS (19+USBFAX_1_PARTITIONS) //45 +#define BSPPOOL_2_PARTITIONS (3+USBFAX_2_PARTITIONS) //55 +#else +#define BSPPOOL_1_PARTITIONS (10) //45 +#define BSPPOOL_2_PARTITIONS (3) //55 +#endif + +#define BSPPOOL_3_PARTITIONS (3) //65 +#define BSPPOOL_4_PARTITIONS (5) //75 +#define BSPPOOL_5_PARTITIONS (4) //85 +#define BSPPOOL_6_PARTITIONS (0) //95 +#define BSPPOOL_7_PARTITIONS 2 //105 +#define BSPPOOL_8_PARTITIONS (2) //115 +#define BSPPOOL_9_PARTITIONS (10) //125 +#define BSPPOOL_10_PARTITIONS (1) //155 +#define BSPPOOL_11_PARTITIONS 0 //185 +#define BSPPOOL_12_PARTITIONS (1) //225 +#define BSPPOOL_13_PARTITIONS 19 //235 +#define BSPPOOL_14_PARTITIONS 0 //255 +#define BSPPOOL_15_PARTITIONS 0 //275 +#define BSPPOOL_16_PARTITIONS (0) //285 +#define BSPPOOL_17_PARTITIONS 2 //295 +#if ((LOCOSTO_LITE == 1) && (L1_GTT == 1) && (!defined( RVM_BAE_SWE))) +#define BSPPOOL_18_PARTITIONS 4 //315 +#else +#define BSPPOOL_18_PARTITIONS 1 //315 +#endif +#define BSPPOOL_19_PARTITIONS 0 //400 +#define BSPPOOL_20_PARTITIONS 1 //445 +#define BSPPOOL_21_PARTITIONS 1 //525 +#define BSPPOOL_22_PARTITIONS (0) //545 +#define BSPPOOL_23_PARTITIONS (0) //645 +#if ((LOCOSTO_LITE == 1) && (L1_GTT == 1) && (!defined( RVM_BAE_SWE))) + #define BSPPOOL_24_PARTITIONS (3) //805 +#else +#define BSPPOOL_24_PARTITIONS (1) //805 +#endif +#define BSPPOOL_25_PARTITIONS (0) //925 +#define BSPPOOL_26_PARTITIONS 1 //1085 +#if ((LOCOSTO_LITE == 1) && (L1_GTT == 1) && (!defined( RVM_BAE_SWE))) +#define BSPPOOL_27_PARTITIONS 3 //1225 +#else +#define BSPPOOL_27_PARTITIONS 0 //1225 +#endif +#if (WCP_PROF == 1) +#define BSPPOOL_28_PARTITIONS (5) //2075 +#else +#define BSPPOOL_28_PARTITIONS (4) //2075 +#endif +#define BSPPOOL_29_PARTITIONS (0) //3025 + +#ifdef RVM_USBFAX_SWE +#define BSPPOOL_30_PARTITIONS (0+USBFAX_3_PARTITIONS) //4435 +#else +#define BSPPOOL_30_PARTITIONS 0 //4435 +#endif + +#define BSPPOOL_31_PARTITIONS 0 //5035 +#define BSPPOOL_31_BAE_PARTITIONS (0) //8025 +#define BSPPOOL_32_PARTITIONS 0 //19225 +#define BSPPOOL_33_PARTITIONS 0 //51025 +#define BSPPOOL_34_PARTITIONS 0 //65100 +#define BSPPOOL_35_PARTITIONS 0 //76825 +#define BSPPOOL_36_PARTITIONS 0 //153625 +#define BSPPOOL_37_PARTITIONS 0 //450000 +#define BSPPOOL_38_PARTITIONS 0//620025 +#define BSPPOOL_39_PARTITIONS 0//77500 + +/* RVT Partition Pools COnfiguration */ +/* Number of configurations */ + +#define BSPPOOL_RVT_0_PARTITIONS 65 +#define BSPPOOL_RVT_1_PARTITIONS 40 +#define BSPPOOL_RVT_2_PARTITIONS 25 +#define BSPPOOL_RVT_3_PARTITIONS 0 +#define BSPPOOL_RVT_4_PARTITIONS 0 +#define BSPPOOL_RVT_5_PARTITIONS 0 + +#define BSP_PARTITION_RVT_0_SIZE 8 +#define BSP_PARTITION_RVT_1_SIZE 50 +#define BSP_PARTITION_RVT_2_SIZE 100 +#define BSP_PARTITION_RVT_3_SIZE 200 +#define BSP_PARTITION_RVT_4_SIZE 300 +#define BSP_PARTITION_RVT_5_SIZE 500 +/*#define BSP_PARTITION_OVERHEAD 3100 - Use this if BAE is enabled and uses Partition Pool. Not needed if BAE allocs from Dynamic pool which is the case currently*/ +#ifdef RVM_USBFAX_SWE +#define BSP_PARTITION_OVERHEAD 6500 +#else +#define BSP_PARTITION_OVERHEAD 2500 + +#endif + +#if (REMU==1) +#define EXT_DATA_POOL_BSP_SIZE ( AS_TASK_MEM+\ + AUDIO_TASK_MEM+\ + CAMD_TASK_MEM+\ + CRY_TASK_MEM+\ + DAR_TASK_MEM+\ + DMA_TASK_MEM+\ + ETM_TASK_MEM+\ + FFS_TASK_MEM+\ + GBI_TASK_MEM+\ + HASH_TASK_MEM+\ + KPD_TASK_MEM+\ + LCC_TASK_MEM+\ + NAN_TASK_MEM+\ + NOR_BM_TASK_MEM+\ + DATALIGHT_TASK_MEM+\ + MKS_TASK_MEM+\ + R2D_TASK_MEM+\ + LCD_TASK_MEM+\ + RFS_TASK_MEM+\ + RFSFAT_TASK_MEM+\ + RFSNAND_TASK_MEM+\ + RTC_TASK_MEM+\ + RVT_TASK_MEM+\ + TTY_TASK_MEM+\ + USB_TASK_MEM+\ + USBFAX_TASK_MEM+\ + USBTRC_TASK_MEM+\ + USBMS_TASK_MEM+\ + RTEST_TASK_MEM+\ + RV_TEST_TASK_MEM+\ + BTAV_TASK_MEM+\ + BTS_TASK_MEM+\ + BTT_TASK_MEM+\ + BTU_TASK_MEM+\ + FMS_TASK_MEM+\ + BSP_PARTITION_OVERHEAD) + +#define INT_DATA_POOL_BSP_SIZE 0 +#if (TEST==1) +#define EXT_RVT_DATA_POOL_BSP_SIZE 75000 +#else +#ifdef MEMORY_SUPERVISION +#define EXT_RVT_DATA_POOL_BSP_SIZE 50000 +#else +#define EXT_RVT_DATA_POOL_BSP_SIZE 5000 +#endif +#endif +#else +#define EXT_DATA_POOL_BSP_SIZE 0 +#define EXT_DATA_POOL_BSP_SIZE 0 +#define EXT_RVT_DATA_POOL_BSP_SIZE 0 +#endif + +#else //LOCOSTO PLUS + +#define BSP_PARTITION_0_SIZE 35 +#define BSP_PARTITION_1_SIZE 45 +#define BSP_PARTITION_2_SIZE 55 +#define BSP_PARTITION_3_SIZE 65 +#define BSP_PARTITION_4_SIZE 75 +#define BSP_PARTITION_5_SIZE 85 +#define BSP_PARTITION_6_SIZE 95 +#define BSP_PARTITION_7_SIZE 105 +#define BSP_PARTITION_8_SIZE 115 +#define BSP_PARTITION_9_SIZE 125 +#define BSP_PARTITION_10_SIZE 155 +#define BSP_PARTITION_11_SIZE 185 +#define BSP_PARTITION_12_SIZE 225 +#define BSP_PARTITION_13_SIZE 235 +#define BSP_PARTITION_14_SIZE 255 +#define BSP_PARTITION_15_SIZE 275 +#define BSP_PARTITION_16_SIZE 285 +#define BSP_PARTITION_17_SIZE 295 +#define BSP_PARTITION_18_SIZE 315 +#define BSP_PARTITION_19_SIZE 400 +#define BSP_PARTITION_20_SIZE 445 +#define BSP_PARTITION_21_SIZE 525 +#define BSP_PARTITION_22_SIZE 545 +#define BSP_PARTITION_23_SIZE 645 +#define BSP_PARTITION_24_SIZE 805 +#define BSP_PARTITION_25_SIZE 925 +#define BSP_PARTITION_26_SIZE 1085 +#define BSP_PARTITION_27_SIZE 1225 +#define BSP_PARTITION_28_SIZE 2500 +#define BSP_PARTITION_29_SIZE 3025 +#define BSP_PARTITION_30_SIZE 4435 +#define BSP_PARTITION_31_SIZE 5035 +#define BSP_PARTITION_32_SIZE 19225 +#if (L1_PCM_EXTRACTION==1) +#define BSP_PARTITION_32_NEW_SIZE 40985 +#endif +#define BSP_PARTITION_33_SIZE 32768 + +/*Snapshot buffer for CAMD*/ +/* #define BSP_PARTITION_34_SIZE 1300*1024*2 */ + +/* Buffer for FileSystem performance Testcase */ +#define BSP_PARTITION_34_SIZE 524400 + + +#define BSPPOOL_0_PARTITIONS ( AUDIO_0_PARTITIONS +\ + ETM_0_PARTITIONS+\ + FFS_0_PARTITIONS+\ + KPD_0_PARTITIONS+\ + USBFAX_0_PARTITIONS+\ + GBI_0_PARTITIONS+\ + RFSFAT_0_PARTITIONS+\ + RFS_0_PARTITIONS+\ + RTC_0_PARTITIONS) + +#define BSPPOOL_1_PARTITIONS ( AUDIO_1_PARTITIONS+\ + AS_0_PARTITIONS+\ + DAR_0_PARTITIONS+\ + DMA_0_PARTITIONS+\ + KPD_1_PARTITIONS+\ + USB_0_PARTITIONS+\ + USBMS_0_PARTITIONS+\ + USBFAX_1_PARTITIONS+\ + GBI_1_PARTITIONS+\ + RFSFAT_1_PARTITIONS+\ + RFSNAND_0_PARTITIONS+\ + RFS_1_PARTITIONS+\ + R2D_0_PARTITIONS+\ + RTC_1_PARTITIONS+\ + TTY_0_PARTITIONS) + + +#define BSPPOOL_2_PARTITIONS ( AUDIO_2_PARTITIONS+\ + AS_1_PARTITIONS+\ + CAMD_0_PARTITIONS+\ + DMA_1_PARTITIONS+\ + FFS_1_PARTITIONS+\ + KPD_2_PARTITIONS+\ + USB_1_PARTITIONS+\ + USBFAX_2_PARTITIONS+\ + GBI_2_PARTITIONS+\ + RFSFAT_2_PARTITIONS+\ + RFSNAND_1_PARTITIONS+\ + RFS_2_PARTITIONS+\ + R2D_1_PARTITIONS) + +#define BSPPOOL_3_PARTITIONS ( AUDIO_3_PARTITIONS+\ + DAR_1_PARTITIONS+\ + KPD_3_PARTITIONS+\ + USBMS_1_PARTITIONS+\ + GBI_3_PARTITIONS+\ + RFSFAT_3_PARTITIONS+\ + RFSNAND_2_PARTITIONS+\ + RFS_3_PARTITIONS+\ + R2D_2_PARTITIONS+\ + CAMD_INT_0_PARTITIONS) + + +#define BSPPOOL_4_PARTITIONS ( AUDIO_4_PARTITIONS+\ + DMA_2_PARTITIONS+\ + ETM_1_PARTITIONS+\ + FFS_2_PARTITIONS+\ + HASH_0_PARTITIONS+\ + KPD_4_PARTITIONS+\ + USB_2_PARTITIONS+\ + GBI_4_PARTITIONS+\ + RFSFAT_4_PARTITIONS+\ + RFS_4_PARTITIONS+\ + R2D_3_PARTITIONS+\ + TTY_1_PARTITIONS) + + +#define BSPPOOL_5_PARTITIONS ( AUDIO_5_PARTITIONS+\ + DAR_2_PARTITIONS+\ + KPD_5_PARTITIONS+\ + MKS_0_PARTITIONS+\ + GBI_5_PARTITIONS) + + +#define BSPPOOL_6_PARTITIONS ( AUDIO_6_PARTITIONS+\ + CAMD_1_PARTITIONS+\ + USB_3_PARTITIONS+\ + USBTRC_0_PARTITIONS) + + +#define BSPPOOL_7_PARTITIONS ( AS_2_PARTITIONS+\ + USB_4_PARTITIONS+\ + RFSFAT_5_PARTITIONS+\ + RFS_5_PARTITIONS+\ + NAN_0_PARTITIONS+\ + DATALIGHT_0_PARTITIONS+\ + NOR_BM_0_PARTITIONS) + + +#define BSPPOOL_8_PARTITIONS ( HASH_1_PARTITIONS+\ + KPD_6_PARTITIONS+\ + RFSNAND_3_PARTITIONS) + + +#define BSPPOOL_9_PARTITIONS ( DAR_3_PARTITIONS+\ + CAMD_INT_1_PARTITIONS+\ + USBTRC_1_PARTITIONS+\ + LCC_0_PARTITIONS+\ + TTY_2_PARTITIONS+\ + CAMD_INT_1_PARTITIONS) + + +#define BSPPOOL_10_PARTITIONS ( GBI_6_PARTITIONS+\ + R2D_4_PARTITIONS+\ + USBTRC_2_PARTITIONS+\ + USBMS_2_PARTITIONS+\ + GBI_7_PARTITIONS+\ + RFSFAT_6_PARTITIONS+\ + RFS_6_PARTITIONS) + + +#define BSPPOOL_11_PARTITIONS (CAMD_2_PARTITIONS +8) + +#define BSPPOOL_12_PARTITIONS (USBTRC_3_PARTITIONS) + +#define BSPPOOL_13_PARTITIONS GBI_8_PARTITIONS + +#define BSPPOOL_14_PARTITIONS AS_3_PARTITIONS + +#define BSPPOOL_15_PARTITIONS ( DAR_4_PARTITIONS+\ + LCC_1_PARTITIONS) + + +#define BSPPOOL_16_PARTITIONS 0 //MOVED TO MM POOL + +#define BSPPOOL_17_PARTITIONS ( ETM_2_PARTITIONS+\ + FFS_3_PARTITIONS+\ + USBMS_3_PARTITIONS+8) + + +#define BSPPOOL_18_PARTITIONS ( ETM_3_PARTITIONS+\ + FFS_4_PARTITIONS+\ + MSL_4_PARTITIONS+4) + + +#define BSPPOOL_19_PARTITIONS RFSNAND_4_PARTITIONS + +#define BSPPOOL_20_PARTITIONS (USB_5_PARTITIONS+4) + +#define BSPPOOL_21_PARTITIONS ( DAR_5_PARTITIONS+\ + CAMD_INT_2_PARTITIONS+\ + LCC_2_PARTITIONS) + + +#define BSPPOOL_22_PARTITIONS ( GBI_9_PARTITIONS+\ + RFSFAT_7_PARTITIONS+\ + RFSNAND_5_PARTITIONS+\ + RFS_7_PARTITIONS) + + +#define BSPPOOL_23_PARTITIONS ( GBI_10_PARTITIONS) + + +#define BSPPOOL_24_PARTITIONS ( RFSFAT_8_PARTITIONS+\ + RFS_8_PARTITIONS) + + +#define BSPPOOL_25_PARTITIONS R2D_5_PARTITIONS + +#define BSPPOOL_26_PARTITIONS ( USBTRC_4_PARTITIONS+\ + DATALIGHT_1_PARTITIONS+\ + NOR_BM_1_PARTITIONS+\ + RFSNAND_6_PARTITIONS+\ + RFSFAT_9_PARTITIONS) + +#define BSPPOOL_27_PARTITIONS NAN_1_PARTITIONS + +#define BSPPOOL_28_PARTITIONS ( AUDIO_7_PARTITIONS+\ + DMA_3_PARTITIONS+\ + ETM_4_PARTITIONS+\ + FFS_5_PARTITIONS) + + +#define BSPPOOL_29_PARTITIONS (GBI_11_PARTITIONS) + + +#define BSPPOOL_30_PARTITIONS USBFAX_3_PARTITIONS + +#define BSPPOOL_31_PARTITIONS USBTRC_5_PARTITIONS + + +#define BSPPOOL_32_PARTITIONS ( USBMS_INT_0_PARTITIONS+\ + RFSFAT_10_PARTITIONS) +#if (L1_PCM_EXTRACTION==1) +#define BSPPOOL_32_NEW_PARTITIONS ( AUDIO_8_PARTITIONS ) +#endif + +#if (TEST==1) +#define BSPPOOL_33_PARTITIONS (6) /* For Reliance and FlashFx */ +#else +#define BSPPOOL_33_PARTITIONS 0 +#endif + +#if (TEST==1) +/* For Camera test case */ +/* +#ifdef RVM_CAMD_SWE + #define BSPPOOL_34_PARTITIONS (1) +#endif +*/ + #define BSPPOOL_34_PARTITIONS (4) /* For Filesystem performance test cases */ +#else + #define BSPPOOL_34_PARTITIONS (0) +#endif + + + + + +/* BSP Internla Memory requirements */ + +/* Partition sizes */ + +#define BSP_INT_PARTITION_0_SIZE 35 +#define BSP_INT_PARTITION_1_SIZE 45 +#define BSP_INT_PARTITION_2_SIZE 55 +#define BSP_INT_PARTITION_3_SIZE 65 +#define BSP_INT_PARTITION_4_SIZE 75 +#define BSP_INT_PARTITION_5_SIZE 85 +#define BSP_INT_PARTITION_6_SIZE 96 +#define BSP_INT_PARTITION_7_SIZE 125 +#define BSP_INT_PARTITION_8_SIZE 215 +#define BSP_INT_PARTITION_9_SIZE 680 +#define BSP_INT_PARTITION_10_SIZE 2025 +#define BSP_INT_PARTITION_11_SIZE 8025 + + + +/* number of partitions */ +#define BSPPOOL_INT_0_PARTITIONS 5//MOVED TO MM POOL + + +#define BSPPOOL_INT_1_PARTITIONS (AUDIO_INT_0_PARTITIONS) +#define BSPPOOL_INT_2_PARTITIONS (AUDIO_INT_1_PARTITIONS) +#define BSPPOOL_INT_3_PARTITIONS 0//MOVED TO MM POOL +#define BSPPOOL_INT_4_PARTITIONS 0//MOVED TO MM POOL +#define BSPPOOL_INT_5_PARTITIONS 0//MOVED TO MM POOL +#define BSPPOOL_INT_6_PARTITIONS 0//MOVED TO MM POOL +#define BSPPOOL_INT_7_PARTITIONS 0//MOVED TO MM POOL +#define BSPPOOL_INT_8_PARTITIONS 0//MOVED TO MM POOL +#define BSPPOOL_INT_9_PARTITIONS 2//MOVED TO MM POOL +#define SPPOOL_INT_10_PARTITIONS 0//MOVED TO MM POOL +#define BSPPOOL_INT_11_PARTITIONS 0//MOVED TO MM POOL + +/* RVT Partition Pools COnfiguration */ +/* RVT Partition Sizes */ +#define BSP_PARTITION_RVT_0_SIZE 8 +#define BSP_PARTITION_RVT_1_SIZE 50 +#define BSP_PARTITION_RVT_2_SIZE 100 +#define BSP_PARTITION_RVT_3_SIZE 200 +#define BSP_PARTITION_RVT_4_SIZE 300 +#define BSP_PARTITION_RVT_5_SIZE 500 + + +/* Number of configurations */ +#define BSPPOOL_RVT_0_PARTITIONS 310 +#define BSPPOOL_RVT_1_PARTITIONS 100 +#define BSPPOOL_RVT_2_PARTITIONS 100 +#define BSPPOOL_RVT_3_PARTITIONS 50 +#define BSPPOOL_RVT_4_PARTITIONS 30 +#define BSPPOOL_RVT_5_PARTITIONS 30 +#define BSP_PARTITION_OVERHEAD 6000 +#define MLUN_OVERHEAD 16*1024 // added For MLUN Support + +#if (REMU==1) +#define EXT_DATA_POOL_BSP_SIZE ( AS_TASK_MEM+\ + CAMD_TASK_MEM+\ + CRY_TASK_MEM+\ + DAR_TASK_MEM+\ + DMA_TASK_MEM+\ + ETM_TASK_MEM+\ + FFS_TASK_MEM+\ + GBI_TASK_MEM+\ + HASH_TASK_MEM+\ + KPD_TASK_MEM+\ + LCC_TASK_MEM+\ + NAN_TASK_MEM+\ + MKS_TASK_MEM+\ + R2D_TASK_MEM+\ + LCD_TASK_MEM+\ + RFS_TASK_MEM+\ + RFSFAT_TASK_MEM+\ + RFSNAND_TASK_MEM+\ + RTC_TASK_MEM+\ + RVT_TASK_MEM+\ + TTY_TASK_MEM+\ + USB_TASK_MEM+\ + USBFAX_TASK_MEM+\ + USBTRC_TASK_MEM+\ + USBMS_TASK_MEM+\ + RTEST_TASK_MEM+\ + RV_TEST_TASK_MEM+\ + MLUN_OVERHEAD+\ + BTT_TASK_MEM+\ + FMS_TASK_MEM+\ + BSP_PARTITION_OVERHEAD) + +#if(PSP_STANDALONE == 1) +#define INT_DATA_POOL_BSP_SIZE AUDIO_TASK_MEM +#else + #define INT_DATA_POOL_BSP_SIZE (AUDIO_TASK_MEM+BT_TASK_MEM)// removed for internal memory constraints by MM +1000 +#endif + +#ifdef MEMORY_SUPERVISION +#define EXT_RVT_DATA_POOL_BSP_SIZE 75000 +#else +#define EXT_RVT_DATA_POOL_BSP_SIZE 25000 +#endif + +#else +#define EXT_DATA_POOL_BSP_SIZE 0 +#define EXT_DATA_POOL_BSP_SIZE 0 +#define EXT_RVT_DATA_POOL_BSP_SIZE 0 +#endif + +#endif + +#endif // __RVF_POOL_SIZE_H_ + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/src/config/gsm_mm_pool_size.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,361 @@ +/*============================================================================= + * Copyright 2001-2002 Texas Instruments Inc. All rights reserved. + */ + +#ifndef __MM_POOL_SIZE_H_ +#define __MM_POOL_SIZE_H_ +#include "chipset.cfg" +#include "rv/rv_defined_swe.h" +#include "rv.cfg" + +#define QUE_SIZE(n) (24*(n)+8*((n)+1)) + +/*--------------------------------------------------------------------------- +* BAE memory requirements +----------------------------------------------------------------------------*/ + #include "bae/bae_pool_size.h" + #define BAE_PARTITION_0_SIZE 35 + #define BAE_PARTITION_1_SIZE 45 + #define BAE_PARTITION_2_SIZE 55 + #define BAE_PARTITION_3_SIZE 65 + #define BAE_PARTITION_4_SIZE 75 + #define BAE_PARTITION_5_SIZE 85 + #define BAE_PARTITION_6_SIZE 95 + #define BAE_PARTITION_7_SIZE 115 + #define BAE_PARTITION_8_SIZE 125 + #define BAE_PARTITION_9_SIZE 145 + #define BAE_PARTITION_10_SIZE 155 + #define BAE_PARTITION_11_SIZE 285 + #define BAE_PARTITION_12_SIZE 535 + #define BAE_PARTITION_13_SIZE 635 + #define BAE_PARTITION_14_SIZE 805 + + #define BAE_INT_PARTITION_0_SIZE 35 + #define BAE_INT_PARTITION_1_SIZE 45 + #define BAE_INT_PARTITION_2_SIZE 55 + #define BAE_INT_PARTITION_3_SIZE 65 + #define BAE_INT_PARTITION_4_SIZE 75 + #define BAE_INT_PARTITION_5_SIZE 85 + #define BAE_INT_PARTITION_6_SIZE 95 + #define BAE_INT_PARTITION_7_SIZE 125 + #define BAE_INT_PARTITION_8_SIZE 215 + #define BAE_INT_PARTITION_9_SIZE 835 + #define BAE_INT_PARTITION_10_SIZE 2025 + #define BAE_INT_PARTITION_11_SIZE 8025 + +/* number of partitions */ +#ifdef RVM_BAE_SWE + #if (LOCOSTO_LITE==1) + #define BAE_0_PARTITIONS 0 + #define BAE_1_PARTITIONS 0 + #define BAE_2_PARTITIONS 0 + #define BAE_3_PARTITIONS 0 + #define BAE_4_PARTITIONS 0 + #define BAE_5_PARTITIONS 0 + #define BAE_6_PARTITIONS 0 + #define BAE_7_PARTITIONS 0 + #define BAE_8_PARTITIONS 0 + #define BAE_9_PARTITIONS 0 + #define BAE_10_PARTITIONS 0 + #define BAE_11_PARTITIONS 0 + #define BAE_12_PARTITIONS 0 + #define BAE_13_PARTITIONS 0 + #define BAE_14_PARTITIONS 0 + + #define BAE_INT_0_PARTITIONS 0 + #define BAE_INT_1_PARTITIONS 0 + #define BAE_INT_2_PARTITIONS 0 + #define BAE_INT_3_PARTITIONS 0 + #define BAE_INT_4_PARTITIONS 0 + #define BAE_INT_5_PARTITIONS 0 + #define BAE_INT_6_PARTITIONS 0 + #define BAE_INT_7_PARTITIONS 0 + #define BAE_INT_8_PARTITIONS 0 + #define BAE_INT_9_PARTITIONS 0 + #define BAE_INT_10_PARTITIONS 0 + #define BAE_INT_11_PARTITIONS 0 + #define BAE_DATA_POOL_SIZE 18*1024 + #else + #define BAE_0_PARTITIONS 100 + #define BAE_1_PARTITIONS 100 + #define BAE_2_PARTITIONS 100 + #define BAE_3_PARTITIONS 30 + #define BAE_4_PARTITIONS 30 + #define BAE_5_PARTITIONS 30 + #define BAE_6_PARTITIONS 30 + #define BAE_7_PARTITIONS 30 + #define BAE_8_PARTITIONS 30 + #define BAE_9_PARTITIONS 10 + #define BAE_10_PARTITIONS 10 + #define BAE_11_PARTITIONS 10 + #define BAE_12_PARTITIONS 10 + #define BAE_13_PARTITIONS 10 + #define BAE_14_PARTITIONS 10 + + #define BAE_INT_0_PARTITIONS 59 + #define BAE_INT_1_PARTITIONS 8 + #define BAE_INT_2_PARTITIONS 3 + #define BAE_INT_3_PARTITIONS 3 + #define BAE_INT_4_PARTITIONS 10 + #define BAE_INT_5_PARTITIONS 3 + #define BAE_INT_6_PARTITIONS 1 + #define BAE_INT_7_PARTITIONS 1 + #define BAE_INT_8_PARTITIONS 1 + #define BAE_INT_9_PARTITIONS 1 + #define BAE_INT_10_PARTITIONS 2 + #define BAE_INT_11_PARTITIONS 1 + #define BAE_DATA_POOL_SIZE 0 + #endif + + #define BAE_TASK_MEM (BAE_STACK_SIZE+QUE_SIZE(10)) +#else + #define BAE_PARTITION_0_SIZE 0 + #define BAE_PARTITION_1_SIZE 0 + #define BAE_PARTITION_2_SIZE 0 + #define BAE_PARTITION_3_SIZE 0 + #define BAE_PARTITION_4_SIZE 0 + #define BAE_PARTITION_5_SIZE 0 + #define BAE_PARTITION_6_SIZE 0 + #define BAE_PARTITION_7_SIZE 0 + #define BAE_PARTITION_8_SIZE 0 + #define BAE_PARTITION_9_SIZE 0 + #define BAE_PARTITION_10_SIZE 0 + #define BAE_PARTITION_11_SIZE 0 + #define BAE_PARTITION_12_SIZE 0 + #define BAE_PARTITION_13_SIZE 0 + #define BAE_PARTITION_14_SIZE 0 + + #define BAE_INT_PARTITION_0_SIZE 0 + #define BAE_INT_PARTITION_1_SIZE 0 + #define BAE_INT_PARTITION_2_SIZE 0 + #define BAE_INT_PARTITION_3_SIZE 0 + #define BAE_INT_PARTITION_4_SIZE 0 + #define BAE_INT_PARTITION_5_SIZE 0 + #define BAE_INT_PARTITION_6_SIZE 0 + #define BAE_INT_PARTITION_7_SIZE 0 + #define BAE_INT_PARTITION_8_SIZE 0 + #define BAE_INT_PARTITION_9_SIZE 0 + #define BAE_INT_PARTITION_10_SIZE 0 + #define BAE_INT_PARTITION_11_SIZE 0 + +/* number of partitions */ + #define BAE_0_PARTITIONS 0 + #define BAE_1_PARTITIONS 0 + #define BAE_2_PARTITIONS 0 + #define BAE_3_PARTITIONS 0 + #define BAE_4_PARTITIONS 0 + #define BAE_5_PARTITIONS 0 + #define BAE_6_PARTITIONS 0 + #define BAE_7_PARTITIONS 0 + #define BAE_8_PARTITIONS 0 + #define BAE_9_PARTITIONS 0 + #define BAE_10_PARTITIONS 0 + #define BAE_11_PARTITIONS 0 + #define BAE_12_PARTITIONS 0 + #define BAE_13_PARTITIONS 0 + #define BAE_14_PARTITIONS 0 + + #define BAE_INT_0_PARTITIONS 0 + #define BAE_INT_1_PARTITIONS 0 + #define BAE_INT_2_PARTITIONS 0 + #define BAE_INT_3_PARTITIONS 0 + #define BAE_INT_4_PARTITIONS 0 + #define BAE_INT_5_PARTITIONS 0 + #define BAE_INT_6_PARTITIONS 0 + #define BAE_INT_7_PARTITIONS 0 + #define BAE_INT_8_PARTITIONS 0 + #define BAE_INT_9_PARTITIONS 0 + #define BAE_INT_10_PARTITIONS 0 + #define BAE_INT_11_PARTITIONS 0 + + #define BAE_DATA_POOL_SIZE 0 + #define BAE_TASK_MEM 0 +#endif +/*--------------------------------------------------------------------------- +* SSL memory requirements +----------------------------------------------------------------------------*/ +/* Partition Sizes */ +#include "ssl/inc/ssl_pool_size.h" +#include "msl/inc/msl_api.h" +#define SSL_PARTITION_0_SIZE 85 //Structure BSP2 +#define SSL_PARTITION_1_SIZE (DISPLAY_IMAGE_WIDTH * (DISPLAY_HEIGHT - DISPLAY_IMAGE_WIDTH)* BITSPERPIXEL_DISPLAY)/*176X44X2 : Menu : bsp32*/ +#define SSL_PARTITION_2_SIZE (DISPLAY_WIDTH * DISPLAY_WIDTH * BITSPERPIXEL_DISPLAY)/*176x176x2 : Image Viewer : bsp34*/ +#define SSL_PARTITION_3_SIZE (DISPLAY_WIDTH * DISPLAY_HEIGHT * BITSPERPIXEL_DISPLAY)/*176x220x2 : FrameBuffer, MMI : bsp 39*/ + +#ifdef RVM_SSL_SWE +/* Number of Partitions */ +#define SSL_0_PARTITIONS 34 +#define SSL_1_PARTITIONS 2 +#define SSL_2_PARTITIONS 1 +#define SSL_3_PARTITIONS 2 + +#define SSL_TASK_MEM (SSL_STACK_SIZE+QUE_SIZE(10)) + +#else + +/* Number of Partitions */ +#define SSL_0_PARTITIONS 0 +#define SSL_1_PARTITIONS 0 +#define SSL_2_PARTITIONS 0 +#define SSL_3_PARTITIONS 0 + +#define SSL_TASK_MEM 0 + +#endif + +/*--------------------------------------------------------------------------- +msl memory requirements +----------------------------------------------------------------------------*/ +#define MSL_PARTITION_0_SIZE (SNAPSHOT_WIDTH * SNAPSHOT_HEIGHT * BITSPERPIXEL_IMAGE)/*(SS image capture and color convert)*/ +#define MSL_PARTITION_1_SIZE (DISPLAY_IMAGE_HEIGHT * DISPLAY_IMAGE_WIDTH * BITSPERPIXEL_IMAGE) /*(second buffer for SS mode)*/ +#define MSL_PARTITION_2_SIZE MAX_ENCODED_BUFFER_SIZE //(encoder output buffer) +#define MSL_PARTITION_3_SIZE 95 +#define MSL_PARTITION_4_SIZE 315 + +#ifdef RVM_MSL_SWE +/* number of partitions */ +#ifdef MSL_SINGLEBUFFERMODE +#define MSL_0_PARTITIONS 1 +#define MSL_1_PARTITIONS 3 +#else +#define MSL_0_PARTITIONS 2 +#define MSL_1_PARTITIONS 0 +#endif +#define MSL_2_PARTITIONS MAX_BURSTCOUNT +#define MSL_3_PARTITIONS 1 +#define MSL_4_PARTITIONS 6 +#else + +#define MSL_0_PARTITIONS 0 +#define MSL_1_PARTITIONS 0 +#define MSL_2_PARTITIONS 0 +#define MSL_3_PARTITIONS 0 +#define MSL_4_PARTITIONS 0 +#endif //RVM_MSL_SWE + + +/*--------------------------------------------------------------------------- +Img memory requirements +----------------------------------------------------------------------------*/ +#include "img/inc/img_pool_size.h" +#define IMG_PARTITION_0_SIZE 45 +#define IMG_PARTITION_1_SIZE 55 +#define IMG_PARTITION_2_SIZE 85 +#define IMG_PARTITION_3_SIZE 120 + +#ifdef RVM_IMG_SWE + +#define IMG_0_PARTITIONS 5 +#define IMG_1_PARTITIONS 3 +#define IMG_2_PARTITIONS 3 +#define IMG_3_PARTITIONS 10 + +#define IMG_TASK_MEM (IMG_STACK_SIZE+QUE_SIZE(10)) + +#else + +#define IMG_0_PARTITIONS 0 +#define IMG_1_PARTITIONS 0 +#define IMG_2_PARTITIONS 0 +#define IMG_3_PARTITIONS 0 + +#define IMG_TASK_MEM 0 +#endif + +/*--------------------------------------------------------------------------- +* jpeg codec memory requirements +----------------------------------------------------------------------------*/ + #define JPEG_INT_PARTITION_0_SIZE 45 + #define JPEG_INT_PARTITION_1_SIZE 49 + #define JPEG_INT_PARTITION_2_SIZE 51 + #define JPEG_INT_PARTITION_3_SIZE 73 + #define JPEG_INT_PARTITION_4_SIZE 97 + #define JPEG_INT_PARTITION_5_SIZE 153 + #define JPEG_INT_PARTITION_6_SIZE 313 + #define JPEG_INT_PARTITION_7_SIZE 377 + #define JPEG_INT_PARTITION_8_SIZE 379 + #define JPEG_INT_PARTITION_9_SIZE 693 + #define JPEG_INT_PARTITION_10_SIZE 793 + #define JPEG_INT_PARTITION_11_SIZE 1280 + +#ifdef RVM_JPEGCODEC_SWE +/* jpeg codec partition counts */ + #define JPEG_INT_0_PARTITIONS 2 + #define JPEG_INT_1_PARTITIONS 1 + #define JPEG_INT_2_PARTITIONS 1 + #define JPEG_INT_3_PARTITIONS 1 + #define JPEG_INT_4_PARTITIONS 1 + #define JPEG_INT_5_PARTITIONS 1 + #define JPEG_INT_6_PARTITIONS 1 + #define JPEG_INT_7_PARTITIONS 1 + #define JPEG_INT_8_PARTITIONS 1 + #define JPEG_INT_9_PARTITIONS 1 + #define JPEG_INT_10_PARTITIONS 1 + #define JPEG_INT_11_PARTITIONS 2 + +#else + +/* jpeg codec partition counts */ + #define JPEG_INT_0_PARTITIONS 0 + #define JPEG_INT_1_PARTITIONS 0 + #define JPEG_INT_2_PARTITIONS 0 + #define JPEG_INT_3_PARTITIONS 0 + #define JPEG_INT_4_PARTITIONS 0 + #define JPEG_INT_5_PARTITIONS 0 + #define JPEG_INT_6_PARTITIONS 0 + #define JPEG_INT_7_PARTITIONS 0 + #define JPEG_INT_8_PARTITIONS 0 + #define JPEG_INT_9_PARTITIONS 0 + #define JPEG_INT_10_PARTITIONS 0 + #define JPEG_INT_11_PARTITIONS 0 +#endif //RVM_JPEGCODEC_SWE + +#define MM_EXT_DATA_POOL_SIZE ((MSL_PARTITION_0_SIZE*MSL_0_PARTITIONS) +\ + (MSL_PARTITION_1_SIZE*MSL_1_PARTITIONS ) +\ + (MSL_PARTITION_2_SIZE*MSL_2_PARTITIONS ) +\ + (MSL_PARTITION_3_SIZE*MSL_3_PARTITIONS ) +\ + (MSL_PARTITION_4_SIZE*MSL_4_PARTITIONS ) +\ + (SSL_PARTITION_0_SIZE*SSL_0_PARTITIONS) +\ + (SSL_PARTITION_1_SIZE*SSL_1_PARTITIONS) +\ + (SSL_PARTITION_2_SIZE*SSL_2_PARTITIONS) +\ + (SSL_PARTITION_3_SIZE*SSL_3_PARTITIONS) +\ + (IMG_PARTITION_0_SIZE*IMG_0_PARTITIONS) +\ + (IMG_PARTITION_1_SIZE*IMG_1_PARTITIONS) +\ + (IMG_PARTITION_2_SIZE*IMG_2_PARTITIONS) +\ + (IMG_PARTITION_3_SIZE*IMG_3_PARTITIONS) +\ + (BAE_PARTITION_0_SIZE*BAE_0_PARTITIONS) +\ + (BAE_PARTITION_1_SIZE*BAE_1_PARTITIONS) +\ + (BAE_PARTITION_2_SIZE*BAE_2_PARTITIONS) +\ + (BAE_PARTITION_3_SIZE*BAE_3_PARTITIONS) +\ + (BAE_PARTITION_4_SIZE*BAE_4_PARTITIONS) +\ + (BAE_PARTITION_5_SIZE*BAE_5_PARTITIONS) +\ + (BAE_PARTITION_6_SIZE*BAE_6_PARTITIONS) +\ + (BAE_PARTITION_7_SIZE*BAE_7_PARTITIONS) +\ + (BAE_PARTITION_8_SIZE*BAE_8_PARTITIONS) +\ + (BAE_PARTITION_9_SIZE*BAE_9_PARTITIONS) +\ + (BAE_PARTITION_10_SIZE*BAE_10_PARTITIONS) +\ + (BAE_PARTITION_11_SIZE*BAE_11_PARTITIONS) +\ + (BAE_PARTITION_12_SIZE*BAE_12_PARTITIONS) +\ + (BAE_PARTITION_13_SIZE*BAE_13_PARTITIONS) +\ + (BAE_PARTITION_14_SIZE*BAE_14_PARTITIONS)) + +#include "../dm_defs.h" +#define VIDEO_DECODER_INTERNAL_HEAP_SIZE 22068 +#define VIDEO_DECODER_INTERNAL_HAEP_ALLOCATIONS 1 + +#define AAC_OUTPUT_BUFFER_INTERNAL_HEAP_SIZE 8192 +#define AAC_OUTPUT_BUFFER_INTERNAL_HEAP_ALLOCATIONS 1 +#define HEAP_HEADER_FOOTER_SIZE 2*DM_OVERHEAD + +#define MM_INT_DATA_POOL_SIZE ( HEAP_HEADER_FOOTER_SIZE + \ + VIDEO_DECODER_INTERNAL_HEAP_SIZE + \ + AAC_OUTPUT_BUFFER_INTERNAL_HEAP_SIZE + \ + (VIDEO_DECODER_INTERNAL_HAEP_ALLOCATIONS+ AAC_OUTPUT_BUFFER_INTERNAL_HEAP_ALLOCATIONS) * DM_OVERHEAD ) + + + +#define EXT_DATA_POOL_MM_SIZE (BAE_TASK_MEM) +#define INT_DATA_POOL_MM_SIZE (IMG_TASK_MEM+\ + SSL_TASK_MEM) //move to internal stack pool for performance reasons. + +#endif //mm_pool_size
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/src/config/mm_int_ram.c Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,245 @@ +/* This file contains internal memory partition pool configuration for PSP drivers */ +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <stddef.h> +#include "typedefs.h" +#include "vsi.h" +#include "ccdapi.h" +#include "pei.h" +#include "tok.h" +#include "os_const.h" +#include "frm_types.h" +#include "gsm_mm_pool_size.h" +#if (CHIPSET==15) && (REMU==1) && (LOCOSTO_LITE==0) +#if (MMPOOL_INT_0_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_0_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_0_INT_RAM) +char int_poolmm_0 [ POOL_SIZE(MMPOOL_INT_0_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_0_SIZE)) ]; +#else +extern char int_poolmm_0 []; +#endif +#endif + +#if (MMPOOL_INT_1_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_1_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_1_INT_RAM) +char int_poolmm_1 [ POOL_SIZE(MMPOOL_INT_1_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_1_SIZE)) ]; +#else +extern char int_poolmm_1 []; +#endif +#endif + +#if (MMPOOL_INT_2_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_2_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_2_INT_RAM) +char int_poolmm_2 [ POOL_SIZE(MMPOOL_INT_2_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_2_SIZE)) ]; +#else +extern char int_poolmm_2 []; +#endif +#endif + +#if (MMPOOL_INT_3_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_3_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_3_INT_RAM) +char int_poolmm_3 [ POOL_SIZE(MMPOOL_INT_3_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_3_SIZE)) ]; +#else +extern char int_poolmm_3 []; +#endif +#endif + +#if (MMPOOL_INT_4_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_4_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_4_INT_RAM) +char int_poolmm_4 [ POOL_SIZE(MMPOOL_INT_4_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_4_SIZE)) ]; +#else +extern char int_poolmm_4 []; +#endif +#endif + +#if (MMPOOL_INT_5_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_5_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_5_INT_RAM) +char int_poolmm_5 [ POOL_SIZE(MMPOOL_INT_5_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_5_SIZE)) ]; +#else +extern char int_poolmm_5 []; +#endif +#endif + +#if (MMPOOL_INT_6_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_6_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_6_INT_RAM) +char int_poolmm_6 [ POOL_SIZE(MMPOOL_INT_6_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_6_SIZE)) ]; +#else +extern char int_poolmm_6 []; +#endif +#endif + +#if (MMPOOL_INT_7_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_7_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_7_INT_RAM) +char int_poolmm_7 [ POOL_SIZE(MMPOOL_INT_7_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_7_SIZE)) ]; +#else +extern char int_poolmm_7 []; +#endif +#endif + +#if (MMPOOL_INT_8_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_8_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_8_INT_RAM) +char int_poolmm_8 [ POOL_SIZE(MMPOOL_INT_8_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_8_SIZE)) ]; +#else +extern char int_poolmm_8 []; +#endif +#endif + +#if (MMPOOL_INT_9_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_9_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_9_INT_RAM) +char int_poolmm_9 [ POOL_SIZE(MMPOOL_INT_9_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_9_SIZE)) ]; +#else +extern char int_poolmm_9 []; +#endif +#endif + +#if (MMPOOL_INT_10_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_10_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_10_INT_RAM) +char int_poolmm_10 [ POOL_SIZE(MMPOOL_INT_10_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_10_SIZE)) ]; +#else +extern char int_poolmm_10[]; +#endif +#endif + +#if (MMPOOL_INT_11_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_11_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_11_INT_RAM) +char int_poolmm_11 [ POOL_SIZE(MMPOOL_INT_11_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_11_SIZE)) ]; +#else +extern char int_poolmm_11[]; +#endif +#endif + +#if (MMPOOL_INT_12_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_12_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_12_INT_RAM) +char int_poolmm_12 [ POOL_SIZE(MMPOOL_INT_12_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_12_SIZE)) ]; +#else +extern char int_poolmm_12[]; +#endif +#endif + +#if (MMPOOL_INT_13_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_13_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_13_INT_RAM) +char int_poolmm_13 [ POOL_SIZE(MMPOOL_INT_13_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_13_SIZE)) ]; +#else +extern char int_poolmm_13[]; +#endif +#endif + +#if (MMPOOL_INT_14_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_14_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_14_INT_RAM) +char int_poolmm_14 [ POOL_SIZE(MMPOOL_INT_14_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_14_SIZE)) ]; +#else +extern char int_poolmm_14[]; +#endif +#endif + +#if (MMPOOL_INT_15_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_15_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_15_INT_RAM) +char int_poolmm_15 [ POOL_SIZE(MMPOOL_INT_15_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_15_SIZE)) ]; +#else +extern char int_poolmm_15[]; +#endif +#endif + +#if (MMPOOL_INT_16_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_16_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_16_INT_RAM) +char int_poolmm_16 [ POOL_SIZE(MMPOOL_INT_16_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_16_SIZE)) ]; +#else +extern char int_poolmm_16[]; +#endif +#endif + +#if (MMPOOL_INT_17_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_17_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_17_INT_RAM) +char int_poolmm_17 [ POOL_SIZE(MMPOOL_INT_17_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_17_SIZE)) ]; +#else +extern char int_poolmm_17[]; +#endif +#endif + +#if (MMPOOL_INT_18_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined MM_18_INT_RAM) || (!defined DATA_INT_RAM && !defined MM_18_INT_RAM) +char int_poolmm_18 [ POOL_SIZE(MMPOOL_INT_18_PARTITIONS,ALIGN_SIZE(MM_INT_PARTITION_18_SIZE)) ]; +#else +extern char int_poolmm_18[]; +#endif +#endif + +const T_FRM_PARTITION_POOL_CONFIG mm_int_grp_config[] = +{ +#if (MMPOOL_INT_0_PARTITIONS>0) + { MMPOOL_INT_0_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_0_SIZE), &int_poolmm_0 }, +#endif +#if (MMPOOL_INT_1_PARTITIONS>0) + { MMPOOL_INT_1_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_1_SIZE), &int_poolmm_1 }, +#endif +#if (MMPOOL_INT_2_PARTITIONS>0) + { MMPOOL_INT_2_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_2_SIZE), &int_poolmm_2 }, +#endif +#if (MMPOOL_INT_3_PARTITIONS>0) + { MMPOOL_INT_3_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_3_SIZE), &int_poolmm_3 }, +#endif +#if (MMPOOL_INT_4_PARTITIONS>0) + { MMPOOL_INT_4_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_4_SIZE), &int_poolmm_4 }, +#endif +#if (MMPOOL_INT_5_PARTITIONS>0) + { MMPOOL_INT_5_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_5_SIZE), &int_poolmm_5 }, +#endif +#if (MMPOOL_INT_6_PARTITIONS>0) + { MMPOOL_INT_6_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_6_SIZE), &int_poolmm_6 }, +#endif + +#if (MMPOOL_INT_7_PARTITIONS>0) + { MMPOOL_INT_7_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_7_SIZE), &int_poolmm_7 }, +#endif + +#if (MMPOOL_INT_8_PARTITIONS>0) + { MMPOOL_INT_8_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_8_SIZE), &int_poolmm_8 }, +#endif + +#if (MMPOOL_INT_9_PARTITIONS>0) + { MMPOOL_INT_9_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_9_SIZE), &int_poolmm_9 }, +#endif + +#if (MMPOOL_INT_10_PARTITIONS>0) + { MMPOOL_INT_10_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_10_SIZE), &int_poolmm_10 }, +#endif + +#if (MMPOOL_INT_11_PARTITIONS>0) + { MMPOOL_INT_11_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_11_SIZE), &int_poolmm_11 }, +#endif + +#if (MMPOOL_INT_12_PARTITIONS>0) + { MMPOOL_INT_12_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_12_SIZE), &int_poolmm_12 }, +#endif + +#if (MMPOOL_INT_13_PARTITIONS>0) + { MMPOOL_INT_13_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_13_SIZE), &int_poolmm_13 }, +#endif + +#if (MMPOOL_INT_14_PARTITIONS>0) + { MMPOOL_INT_14_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_14_SIZE), &int_poolmm_14 }, +#endif + +#if (MMPOOL_INT_15_PARTITIONS>0) + { MMPOOL_INT_15_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_15_SIZE), &int_poolmm_15 }, +#endif + +#if (MMPOOL_INT_16_PARTITIONS>0) + { MMPOOL_INT_16_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_16_SIZE), &int_poolmm_16 }, +#endif + +#if (MMPOOL_INT_17_PARTITIONS>0) + { MMPOOL_INT_17_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_17_SIZE), &int_poolmm_17 }, +#endif + +#if (MMPOOL_INT_18_PARTITIONS>0) + { MMPOOL_INT_18_PARTITIONS, ALIGN_SIZE(MM_INT_PARTITION_18_SIZE), &int_poolmm_18 }, +#endif + { 0 , 0 , NULL } +}; + +#endif //DATA_IT_RAM + + + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/src/config/psp_int_ram.c Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,679 @@ +/* This file contains internal memory partition pool configuration for PSP drivers */ +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <stddef.h> +#include "typedefs.h" +#include "vsi.h" +#include "ccdapi.h" +#include "pei.h" +#include "tok.h" +#include "os_const.h" +#include "frm_types.h" +#include "gsm_bsp_pool_size.h" + +#if(PSP_STANDALONE==1) +char * str2ind_version = "&0"; +#endif + +#if (LOCOSTO_LITE==1) +#if (BSPPOOL_0_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool40 [ POOL_SIZE(BSPPOOL_0_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_0_SIZE)) ]; +#else +extern char pool40[]; +#endif +#endif + + +#if (BSPPOOL_0_USB_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool40_usb [ POOL_SIZE(BSPPOOL_0_USB_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_0_USB_SIZE)) ]; +#else +extern char pool40_usb[]; +#endif +#endif + +#if (BSPPOOL_1_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool41 [ POOL_SIZE(BSPPOOL_1_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_1_SIZE)) ]; +#else +extern char pool41[]; +#endif +#endif + +#if (BSPPOOL_2_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool42 [ POOL_SIZE(BSPPOOL_2_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_2_SIZE)) ]; +#else +extern char pool42[]; +#endif +#endif + +#if (BSPPOOL_3_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool43 [ POOL_SIZE(BSPPOOL_3_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_3_SIZE)) ]; +#else +extern char pool43[]; +#endif +#endif + +#if (BSPPOOL_4_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool44 [ POOL_SIZE(BSPPOOL_4_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_4_SIZE)) ]; +#else +extern char pool44[]; +#endif +#endif + +#if (BSPPOOL_5_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool45 [ POOL_SIZE(BSPPOOL_5_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_5_SIZE)) ]; +#else +extern char pool45[]; +#endif +#endif + +#if (BSPPOOL_6_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool46 [ POOL_SIZE(BSPPOOL_6_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_6_SIZE)) ]; +#else +extern char pool46[]; +#endif +#endif + +#if (BSPPOOL_7_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool47 [ POOL_SIZE(BSPPOOL_7_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_7_SIZE)) ]; +#else +extern char pool47[]; +#endif +#endif + +#if (BSPPOOL_8_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool48 [ POOL_SIZE(BSPPOOL_8_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_8_SIZE)) ]; +#else +extern char pool48[]; +#endif +#endif + +#if (BSPPOOL_9_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool49 [ POOL_SIZE(BSPPOOL_9_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_9_SIZE)) ]; +#else +extern char pool49[]; +#endif +#endif + +#if (BSPPOOL_10_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool50 [ POOL_SIZE(BSPPOOL_10_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_10_SIZE)) ]; +#else +extern char pool50[]; +#endif +#endif + +#if (BSPPOOL_11_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool51 [ POOL_SIZE(BSPPOOL_11_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_11_SIZE)) ]; +#else +extern char pool51[]; +#endif +#endif + +#if (BSPPOOL_12_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool52 [ POOL_SIZE(BSPPOOL_12_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_12_SIZE)) ]; +#else +extern char pool52[]; +#endif +#endif + +#if (BSPPOOL_13_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool53 [ POOL_SIZE(BSPPOOL_13_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_13_SIZE)) ]; +#else +extern char pool53[]; +#endif +#endif + +#if (BSPPOOL_14_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool54 [ POOL_SIZE(BSPPOOL_14_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_14_SIZE)) ]; +#else +extern char pool54[]; +#endif +#endif + +#if (BSPPOOL_15_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool55 [ POOL_SIZE(BSPPOOL_15_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_15_SIZE)) ]; +#else +extern char pool55[]; +#endif + #endif + +#if (BSPPOOL_16_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool56 [ POOL_SIZE(BSPPOOL_16_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_16_SIZE)) ]; + #else +extern char pool56[]; + #endif + #endif + +#if (BSPPOOL_17_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool57 [ POOL_SIZE(BSPPOOL_17_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_17_SIZE)) ]; +#else +extern char pool57[]; +#endif + #endif + + +#if (BSPPOOL_18_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool58 [ POOL_SIZE(BSPPOOL_18_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_18_SIZE)) ]; +#else +extern char pool58[]; +#endif + #endif + +#if (BSPPOOL_19_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool59 [ POOL_SIZE(BSPPOOL_19_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_19_SIZE)) ]; +#else +extern char pool59[]; +#endif + #endif + +#if (BSPPOOL_20_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool60 [ POOL_SIZE(BSPPOOL_20_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_20_SIZE)) ]; +#else +extern char pool60[]; +#endif + #endif + +#if (BSPPOOL_21_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool61 [ POOL_SIZE(BSPPOOL_21_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_21_SIZE)) ]; +#else +extern char pool61[]; +#endif + #endif + +#if (BSPPOOL_22_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool62 [ POOL_SIZE(BSPPOOL_22_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_22_SIZE)) ]; +#else +extern char pool62[]; +#endif + #endif + +#if (BSPPOOL_23_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool63 [ POOL_SIZE(BSPPOOL_23_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_23_SIZE)) ]; +#else +extern char pool63[]; +#endif + #endif + + +#if (BSPPOOL_24_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool64 [ POOL_SIZE(BSPPOOL_24_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_24_SIZE)) ]; +#else +extern char pool64[]; +#endif + #endif + + +#if (BSPPOOL_25_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool65 [ POOL_SIZE(BSPPOOL_25_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_25_SIZE)) ]; +#else +extern char pool65[]; +#endif +#endif + + +#if (BSPPOOL_26_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool66 [ POOL_SIZE(BSPPOOL_26_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_26_SIZE)) ]; +#else +extern char pool66[]; +#endif + #endif + + +#if (BSPPOOL_27_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool67 [ POOL_SIZE(BSPPOOL_27_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_27_SIZE)) ]; +#else +extern char pool67[]; +#endif + #endif + +#if (BSPPOOL_28_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool68 [ POOL_SIZE(BSPPOOL_28_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_28_SIZE)) ]; +#else +extern char pool68[]; +#endif +#endif + +#if (BSPPOOL_29_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) + char pool69 [ POOL_SIZE(BSPPOOL_29_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_29_SIZE)) ]; +#else +extern char pool69[]; +#endif +#endif + +#if (BSPPOOL_30_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) + char pool70 [ POOL_SIZE(BSPPOOL_30_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_30_SIZE)) ]; +#else +extern char pool70[]; +#endif +#endif + +#if (BSPPOOL_31_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) + char pool71 [ POOL_SIZE(BSPPOOL_31_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_31_SIZE)) ]; +#else +extern char pool71[]; +#endif +#endif + +#if (BSPPOOL_31_BAE_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) + char pool71_bae [ POOL_SIZE(BSPPOOL_31_BAE_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_31_BAE_SIZE)) ]; +#else +extern char pool71_bae[]; +#endif +#endif + +#if (BSPPOOL_32_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) + char pool72 [ POOL_SIZE(BSPPOOL_32_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_32_SIZE)) ]; +#else +extern char pool72[]; +#endif + #endif + +#if (BSPPOOL_33_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool73 [ POOL_SIZE(BSPPOOL_33_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_33_SIZE)) ]; +#else +extern char pool73[]; +#endif + #endif + + +#if (BSPPOOL_34_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool74 [ POOL_SIZE(BSPPOOL_34_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_34_SIZE)) ]; +#else +extern char pool74[]; +#endif + #endif + +#if (BSPPOOL_35_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool75 [ POOL_SIZE(BSPPOOL_35_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_35_SIZE)) ]; +#else +extern char pool75[]; +#endif + #endif + +#if (BSPPOOL_36_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool76 [ POOL_SIZE(BSPPOOL_36_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_36_SIZE)) ]; +#else +extern char pool76[]; +#endif + #endif + +#if (BSPPOOL_37_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool77 [ POOL_SIZE(BSPPOOL_37_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_37_SIZE)) ]; +#else +extern char pool77[]; +#endif + #endif + +#if (BSPPOOL_38_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) + char pool78 [ POOL_SIZE(BSPPOOL_38_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_38_SIZE)) ]; +#else +extern char pool78[]; +#endif + #endif + + +#ifndef DATA_INT_RAM +const T_FRM_PARTITION_POOL_CONFIG bsp_grp_config[] = +{ +#if (BSPPOOL_0_PARTITIONS>0) + {BSPPOOL_0_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_0_SIZE), &pool40 }, +#endif +#if (BSPPOOL_0_USB_PARTITIONS>0) + {BSPPOOL_0_USB_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_0_USB_SIZE), &pool40_usb }, +#endif +#if (BSPPOOL_1_PARTITIONS>0) + { BSPPOOL_1_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_1_SIZE), &pool41 }, +#endif +#if (BSPPOOL_2_PARTITIONS>0) + { BSPPOOL_2_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_2_SIZE), &pool42 }, +#endif +#if (BSPPOOL_3_PARTITIONS>0) + { BSPPOOL_3_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_3_SIZE), &pool43 }, +#endif +#if (BSPPOOL_4_PARTITIONS>0) + { BSPPOOL_4_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_4_SIZE), &pool44 }, +#endif +#if (BSPPOOL_5_PARTITIONS>0) + { BSPPOOL_5_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_5_SIZE), &pool45 }, +#endif +#if (BSPPOOL_6_PARTITIONS>0) + { BSPPOOL_6_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_6_SIZE), &pool46 }, +#endif +#if (BSPPOOL_7_PARTITIONS>0) + { BSPPOOL_7_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_7_SIZE), &pool47 }, +#endif +#if (BSPPOOL_8_PARTITIONS>0) + { BSPPOOL_8_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_8_SIZE), &pool48 }, +#endif +#if (BSPPOOL_9_PARTITIONS>0) + { BSPPOOL_9_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_9_SIZE), &pool49 }, +#endif +#if (BSPPOOL_10_PARTITIONS>0) + { BSPPOOL_10_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_10_SIZE), &pool50 }, +#endif +#if (BSPPOOL_11_PARTITIONS>0) + { BSPPOOL_11_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_11_SIZE), &pool51 }, +#endif +#if (BSPPOOL_12_PARTITIONS>0) + { BSPPOOL_12_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_12_SIZE), &pool52 }, +#endif +#if (BSPPOOL_13_PARTITIONS>0) + { BSPPOOL_13_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_13_SIZE), &pool53 }, +#endif +#if (BSPPOOL_14_PARTITIONS>0) + { BSPPOOL_14_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_14_SIZE), &pool54 }, +#endif +#if (BSPPOOL_15_PARTITIONS>0) + { BSPPOOL_15_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_15_SIZE), &pool55 }, +#endif +#if (BSPPOOL_16_PARTITIONS>0) + { BSPPOOL_16_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_16_SIZE), &pool56 }, +#endif +#if (BSPPOOL_17_PARTITIONS>0) + { BSPPOOL_17_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_17_SIZE), &pool57 }, +#endif +#if (BSPPOOL_18_PARTITIONS>0) + { BSPPOOL_18_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_18_SIZE), &pool58 }, +#endif +#if (BSPPOOL_19_PARTITIONS>0) + { BSPPOOL_19_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_19_SIZE), &pool59 }, + +#endif +#if (BSPPOOL_20_PARTITIONS>0) + { BSPPOOL_20_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_20_SIZE), &pool60 }, +#endif +#if (BSPPOOL_21_PARTITIONS>0) + { BSPPOOL_21_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_21_SIZE), &pool61 }, +#endif +#if (BSPPOOL_22_PARTITIONS>0) + { BSPPOOL_22_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_22_SIZE), &pool62 }, +#endif +#if (BSPPOOL_23_PARTITIONS>0) + { BSPPOOL_23_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_23_SIZE), &pool63 }, +#endif +#if (BSPPOOL_24_PARTITIONS>0) + { BSPPOOL_24_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_24_SIZE), &pool64 }, +#endif +#if (BSPPOOL_25_PARTITIONS>0) + { BSPPOOL_25_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_25_SIZE), &pool65 }, +#endif +#if (BSPPOOL_26_PARTITIONS>0) + { BSPPOOL_26_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_26_SIZE), &pool66 }, +#endif +#if (BSPPOOL_27_PARTITIONS>0) + { BSPPOOL_27_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_27_SIZE), &pool67 }, +#endif +#if (BSPPOOL_28_PARTITIONS>0) + { BSPPOOL_28_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_28_SIZE), &pool68 }, +#endif +#if (BSPPOOL_29_PARTITIONS>0) + { BSPPOOL_29_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_29_SIZE), &pool69 }, +#endif +#if (BSPPOOL_30_PARTITIONS>0) + + { BSPPOOL_30_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_30_SIZE), &pool70 }, +#endif +#if (BSPPOOL_31_PARTITIONS>0) + { BSPPOOL_31_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_31_SIZE), &pool71 }, +#endif +#if (BSPPOOL_31_BAE_PARTITIONS>0) + { BSPPOOL_31_BAE_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_31_BAE_SIZE), &pool71_bae }, +#endif +#if (BSPPOOL_32_PARTITIONS>0) + { BSPPOOL_32_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_32_SIZE), &pool72 }, +#endif +#if (BSPPOOL_33_PARTITIONS>0) + { BSPPOOL_33_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_33_SIZE), &pool73 }, +#endif +#if (BSPPOOL_34_PARTITIONS>0) + { BSPPOOL_34_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_34_SIZE), &pool74 }, +#endif +#if (BSPPOOL_35_PARTITIONS>0) + { BSPPOOL_35_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_35_SIZE), &pool75 }, +#endif +#if (BSPPOOL_36_PARTITIONS>0) + { BSPPOOL_36_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_36_SIZE), &pool76 }, +#endif +#if (BSPPOOL_37_PARTITIONS>0) + { BSPPOOL_37_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_37_SIZE), &pool77 }, +#endif +#if (BSPPOOL_38_PARTITIONS>0) + { BSPPOOL_38_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_38_SIZE), &pool78 }, +#endif + { 0 , 0 , NULL } +}; +#endif /* !DATA_INT_RAM */ + + +#else + +#if (BSPPOOL_INT_0_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_0_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_0_INT_RAM) +char int_pool40 [ POOL_SIZE(BSPPOOL_INT_0_PARTITIONS,ALIGN_SIZE(BSP_INT_PARTITION_0_SIZE)) ]; +#else +extern char int_pool40 []; +#endif +#endif + +#if (BSPPOOL_INT_1_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_1_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_1_INT_RAM) +char int_pool41 [ POOL_SIZE(BSPPOOL_INT_1_PARTITIONS,ALIGN_SIZE(BSP_INT_PARTITION_1_SIZE)) ]; +#else +extern char int_pool41 []; +#endif +#endif + +#if (BSPPOOL_INT_2_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_2_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_2_INT_RAM) +char int_pool42 [ POOL_SIZE(BSPPOOL_INT_2_PARTITIONS,ALIGN_SIZE(BSP_INT_PARTITION_2_SIZE)) ]; +#else +extern char int_pool42 []; +#endif +#endif + +#if (BSPPOOL_INT_3_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_3_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_3_INT_RAM) +char int_pool43 [ POOL_SIZE(BSPPOOL_INT_3_PARTITIONS,ALIGN_SIZE(BSP_INT_PARTITION_3_SIZE)) ]; +#else +extern char int_pool43 []; +#endif +#endif + +#if (BSPPOOL_INT_4_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_4_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_4_INT_RAM) +char int_pool44 [ POOL_SIZE(BSPPOOL_INT_4_PARTITIONS,ALIGN_SIZE(BSP_INT_PARTITION_4_SIZE)) ]; +#else +extern char int_pool44 []; +#endif +#endif + +#if (BSPPOOL_INT_5_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_5_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_5_INT_RAM) +char int_pool45 [ POOL_SIZE(BSPPOOL_INT_5_PARTITIONS,ALIGN_SIZE(BSP_INT_PARTITION_5_SIZE)) ]; +#else +extern char int_pool45 []; +#endif +#endif + +#if (BSPPOOL_INT_6_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_6_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_6_INT_RAM) +char int_pool46 [ POOL_SIZE(BSPPOOL_INT_6_PARTITIONS,ALIGN_SIZE(BSP_INT_PARTITION_6_SIZE)) ]; +#else +extern char int_pool46 []; +#endif +#endif + +#if (BSPPOOL_INT_7_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_7_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_7_INT_RAM) +char int_pool47 [ POOL_SIZE(BSPPOOL_INT_7_PARTITIONS,ALIGN_SIZE(BSP_INT_PARTITION_7_SIZE)) ]; +#else +extern char int_pool47 []; +#endif +#endif + +#if (BSPPOOL_INT_8_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_8_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_8_INT_RAM) +char int_pool48 [ POOL_SIZE(BSPPOOL_INT_8_PARTITIONS,ALIGN_SIZE(BSP_INT_PARTITION_8_SIZE)) ]; +#else +extern char int_pool48 []; +#endif +#endif + +#if (BSPPOOL_INT_9_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_9_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_9_INT_RAM) +char int_pool49 [ POOL_SIZE(BSPPOOL_INT_9_PARTITIONS,ALIGN_SIZE(BSP_INT_PARTITION_9_SIZE)) ]; +#else +extern char int_pool49 []; +#endif +#endif + +#if (BSPPOOL_INT_10_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_10_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_10_INT_RAM) +char int_pool50 [ POOL_SIZE(BSPPOOL_INT_10_PARTITIONS,ALIGN_SIZE(BSP_INT_PARTITION_10_SIZE)) ]; +#else +extern char int_pool50 []; +#endif +#endif + +#if (BSPPOOL_INT_11_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_11_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_11_INT_RAM) +char int_pool51 [ POOL_SIZE(BSPPOOL_INT_11_PARTITIONS,ALIGN_SIZE(BSP_INT_PARTITION_11_SIZE)) ]; +#else +extern char int_pool51 []; +#endif +#endif + +#if (BSPPOOL_INT_JPEG_2_PARTITIONS>0) +char int_pool_JPEG_2 [ POOL_SIZE(BSPPOOL_INT_JPEG_2_PARTITIONS,ALIGN_SIZE(BSP_INT_PARTITION_JPEG_2_SIZE)) ]; +#endif + +#if (BSPPOOL_INT_JPEG_3_PARTITIONS>0) +char int_pool_JPEG_3 [ POOL_SIZE(BSPPOOL_INT_JPEG_3_PARTITIONS,ALIGN_SIZE(BSP_INT_PARTITION_JPEG_3_SIZE)) ]; +#endif + +#if (BSPPOOL_INT_JPEG_4_PARTITIONS>0) +char int_pool_JPEG_4 [ POOL_SIZE(BSPPOOL_INT_JPEG_4_PARTITIONS,ALIGN_SIZE(BSP_INT_PARTITION_JPEG_4_SIZE)) ]; +#endif + +#if (BSPPOOL_INT_JPEG_5_PARTITIONS>0) +char int_pool_JPEG_5 [ POOL_SIZE(BSPPOOL_INT_JPEG_5_PARTITIONS,ALIGN_SIZE(BSP_INT_PARTITION_JPEG_5_SIZE)) ]; +#endif + +#if (BSPPOOL_INT_JPEG_6_PARTITIONS>0) +char int_pool_JPEG_6 [ POOL_SIZE(BSPPOOL_INT_JPEG_6_PARTITIONS,ALIGN_SIZE(BSP_INT_PARTITION_JPEG_6_SIZE)) ]; +#endif + + + + +#ifndef DATA_INT_RAM +const T_FRM_PARTITION_POOL_CONFIG bsp_int_grp_config[] = +{ +#if (BSPPOOL_INT_0_PARTITIONS>0) + { BSPPOOL_INT_0_PARTITIONS, ALIGN_SIZE(BSP_INT_PARTITION_0_SIZE), &int_pool40 }, +#endif +#if (BSPPOOL_INT_1_PARTITIONS>0) + { BSPPOOL_INT_1_PARTITIONS, ALIGN_SIZE(BSP_INT_PARTITION_1_SIZE), &int_pool41 }, +#endif +#if (BSPPOOL_INT_2_PARTITIONS>0) + { BSPPOOL_INT_2_PARTITIONS, ALIGN_SIZE(BSP_INT_PARTITION_2_SIZE), &int_pool42 }, +#endif +#if (BSPPOOL_INT_3_PARTITIONS>0) + { BSPPOOL_INT_3_PARTITIONS, ALIGN_SIZE(BSP_INT_PARTITION_3_SIZE), &int_pool43 }, +#endif +#if (BSPPOOL_INT_4_PARTITIONS>0) + { BSPPOOL_INT_4_PARTITIONS, ALIGN_SIZE(BSP_INT_PARTITION_4_SIZE), &int_pool44 }, +#endif +#if (BSPPOOL_INT_5_PARTITIONS>0) + { BSPPOOL_INT_5_PARTITIONS, ALIGN_SIZE(BSP_INT_PARTITION_5_SIZE), &int_pool45 }, +#endif +#if (BSPPOOL_INT_6_PARTITIONS>0) + { BSPPOOL_INT_6_PARTITIONS, ALIGN_SIZE(BSP_INT_PARTITION_6_SIZE), &int_pool46 }, +#endif + +#if (BSPPOOL_INT_7_PARTITIONS>0) + { BSPPOOL_INT_7_PARTITIONS, ALIGN_SIZE(BSP_INT_PARTITION_7_SIZE), &int_pool47 }, +#endif + +#if (BSPPOOL_INT_8_PARTITIONS>0) + { BSPPOOL_INT_8_PARTITIONS, ALIGN_SIZE(BSP_INT_PARTITION_8_SIZE), &int_pool48 }, +#endif + +#if (BSPPOOL_INT_JPEG_2_PARTITIONS>0) + { BSPPOOL_INT_JPEG_2_PARTITIONS, ALIGN_SIZE(BSP_INT_PARTITION_JPEG_2_SIZE), &int_pool_JPEG_2 }, +#endif +#if (BSPPOOL_INT_JPEG_3_PARTITIONS>0) + { BSPPOOL_INT_JPEG_3_PARTITIONS, ALIGN_SIZE(BSP_INT_PARTITION_JPEG_3_SIZE), &int_pool_JPEG_3 }, +#endif +#if (BSPPOOL_INT_JPEG_4_PARTITIONS>0) + { BSPPOOL_INT_JPEG_4_PARTITIONS, ALIGN_SIZE(BSP_INT_PARTITION_JPEG_4_SIZE), &int_pool_JPEG_4 }, +#endif +#if (BSPPOOL_INT_JPEG_5_PARTITIONS>0) + { BSPPOOL_INT_JPEG_5_PARTITIONS, ALIGN_SIZE(BSP_INT_PARTITION_JPEG_5_SIZE), &int_pool_JPEG_5 }, +#endif + +#if (BSPPOOL_INT_9_PARTITIONS>0) + { BSPPOOL_INT_9_PARTITIONS, ALIGN_SIZE(BSP_INT_PARTITION_9_SIZE), &int_pool49 }, +#endif + +#if (BSPPOOL_INT_JPEG_6_PARTITIONS>0) + { BSPPOOL_INT_JPEG_6_PARTITIONS, ALIGN_SIZE(BSP_INT_PARTITION_JPEG_6_SIZE), &int_pool_JPEG_6 }, +#endif + +#if (BSPPOOL_INT_10_PARTITIONS>0) + { BSPPOOL_INT_10_PARTITIONS, ALIGN_SIZE(BSP_INT_PARTITION_10_SIZE), &int_pool50 }, +#endif + +#if (BSPPOOL_INT_11_PARTITIONS>0) + { BSPPOOL_INT_11_PARTITIONS, ALIGN_SIZE(BSP_INT_PARTITION_11_SIZE), &int_pool51 }, +#endif + { 0 , 0 , NULL } +}; +#endif /* !DATA_INT_RAM */ +#endif + + + + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/src/driver/em.c Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,1092 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM-PS +| Modul : DRV_RX ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : This Module defines the engineering mode +| device driver for the G23 protocol stack. +| +| This driver is used to control all engineering mode related +| functions. ++----------------------------------------------------------------------------- +*/ + +#ifndef DRV_EM_C +#define DRV_EM_C +/*==== INCLUDES ===================================================*/ +#if defined (NEW_FRAME) + +#include <string.h> +#include "typedefs.h" +#include "vsi.h" +#include "custom.h" +#include "gsm.h" +#include "prim.h" +#include "gdi.h" +#include "em.h" + +#else + +#include <string.h> +#include "stddefs.h" +#include "custom.h" +#include "gsm.h" +#include "prim.h" +#include "vsi.h" +#include "gdi.h" +#include "em.h" + +#endif + +/*==== EXPORT =====================================================*/ + +/*==== VARIABLES ==================================================*/ +#define EV_BUFFER_SIZE 512 + + +UBYTE ev_enabled = FALSE; +USHORT ev_first_read; +USHORT ev_first_write; +USHORT ev_size; +UBYTE ev_buffer [EV_BUFFER_SIZE]; +/*==== FUNCTIONS ==================================================*/ +LOCAL void em_get_size (UBYTE size); +LOCAL UBYTE em_check_em_class_infra_data (UBYTE em_subclass, + UBYTE em_type, + em_data_type * out_em_data); +LOCAL UBYTE em_check_em_subclass_sc_info (UBYTE em_type, + em_data_type * out_em_data); +LOCAL UBYTE em_check_em_subclass_nc_info (UBYTE em_type, + em_data_type * out_em_data); +LOCAL UBYTE em_check_em_subclass_lup_and_pag (UBYTE em_type, + em_data_type * out_em_data); + +/*==== CONSTANTS ==================================================*/ +#ifndef FF_EM_MODE +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6103) MODULE : DRV_EM | +| STATE : code ROUTINE : em_Init | ++--------------------------------------------------------------------+ + + PURPOSE : The function initializes the driver´s internal data. + The function returns DRV_OK in case of a successful + completition. The function returns DRV_INITIALIZED if + the driver has already been initialized and is ready to + be used or is already in use. In case of an initialization + failure, which means the that the driver cannot be used, + the function returns DRV_INITFAILURE. + +*/ + +GLOBAL UBYTE em_Init (void) +{ + ev_enabled = FALSE; + + return DRV_OK; +} +#endif /* FF_EM_MODE */ + +#ifndef FF_EM_MODE +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6103) MODULE : DRV_EM | +| STATE : code ROUTINE : em_Exit | ++--------------------------------------------------------------------+ + + PURPOSE : The function is used to indicate that the driver + and its functionality isn´t needed anymore. + +*/ + +GLOBAL void em_Exit (void) +{ +} +#endif /* FF_EM_MODE */ + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6103) MODULE : DRV_EM | +| STATE : code ROUTINE : em_Read_Parameter | ++--------------------------------------------------------------------+ + + PURPOSE : This function is used to read a parameter of the mobile. + +*/ + +GLOBAL UBYTE em_Read_Parameter (UBYTE em_class, + UBYTE em_subclass, + UBYTE em_type, + em_data_type * out_em_data) +{ + switch (em_class) + { + case EM_CLASS_INFRA_DATA: + return (em_check_em_class_infra_data (em_subclass, em_type, out_em_data)); + default: + return EM_INVALID_CLASS; + } +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6103) MODULE : DRV_EM | +| STATE : code ROUTINE : em_Enable_Post_Mortem | ++--------------------------------------------------------------------+ + + PURPOSE : This function enables recording of event data in the + post mortem memory. + +*/ + +GLOBAL UBYTE em_Enable_Post_Mortem () +{ + ev_first_read = 0; + ev_first_write = 0; + ev_size = EV_BUFFER_SIZE; + ev_enabled = TRUE; + return DRV_OK; +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6103) MODULE : DRV_EM | +| STATE : code ROUTINE : em_Disable_Post_Mortem | ++--------------------------------------------------------------------+ + + PURPOSE : This function disables recording of event data in the + post mortem memory and allows reading of the data. + +*/ + +GLOBAL UBYTE em_Disable_Post_Mortem () +{ + ev_enabled = FALSE; + return DRV_OK; +} + + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6103) MODULE : DRV_EM | +| STATE : code ROUTINE : em_Read_Post_Mortem | ++--------------------------------------------------------------------+ + + PURPOSE : This function is used to read a parameter of the + post mortem memory. + +*/ + +GLOBAL UBYTE em_Read_Post_Mortem (em_data_type * out_em_data) +{ + UBYTE subclass; + UBYTE i; +#if defined (WIN32) + char buf[60]; + sprintf (buf, "before %d %d read", ev_first_read, ev_first_write); + TRACE_EVENT (buf); +#endif + if (ev_enabled EQ FALSE) + { + if (ev_size EQ EV_BUFFER_SIZE) + return EM_NO_MORE_DATA; + + out_em_data->em_class = EM_CLASS_EVENT_TRACE; + subclass = ev_buffer [ev_first_read++]; + out_em_data->em_subclass = subclass & 0x3F; + if (ev_first_read >= EV_BUFFER_SIZE) + ev_first_read -= EV_BUFFER_SIZE; + out_em_data->em_type = ev_buffer [ev_first_read++]; + if (ev_first_read >= EV_BUFFER_SIZE) + ev_first_read -= EV_BUFFER_SIZE; +#if defined (WIN32) + sprintf (buf, "subclass %x read", subclass); + TRACE_EVENT (buf); +#endif + switch (subclass & 0xC0) + { + case 0x00: + // single entry + ev_size += 2; + out_em_data->em_length = 0; + break; + case 0x40: + // ubyte entry + ev_size += 3; + out_em_data->em_length = 1; + out_em_data->em_parameter[0] = ev_buffer [ev_first_read++]; + if (ev_first_read >= EV_BUFFER_SIZE) + ev_first_read -= EV_BUFFER_SIZE; + break; + case 0x80: + // ushort entry + ev_size += 4; + out_em_data->em_length = 2; + out_em_data->em_parameter[0] = ev_buffer [ev_first_read++]; + if (ev_first_read >= EV_BUFFER_SIZE) + ev_first_read -= EV_BUFFER_SIZE; + out_em_data->em_parameter[1] = ev_buffer [ev_first_read++]; + if (ev_first_read >= EV_BUFFER_SIZE) + ev_first_read -= EV_BUFFER_SIZE; + break; + case 0xC0: + // array entry + // skip to length + out_em_data->em_length = ev_buffer [ev_first_read++]; + if (ev_first_read >= EV_BUFFER_SIZE) + ev_first_read -= EV_BUFFER_SIZE; + for (i=0;i<out_em_data->em_length;i++) + { + out_em_data->em_parameter[i] = ev_buffer[ev_first_read++]; + if (ev_first_read >= EV_BUFFER_SIZE) + ev_first_read -= EV_BUFFER_SIZE; + } + ev_size += (out_em_data->em_length+3); + break; + } +#if defined (WIN32) + sprintf (buf, "after %d %d read", ev_first_read, ev_first_write); + TRACE_EVENT (buf); +#endif + return DRV_OK; + } + else + { + return EM_INVALID_ACCESS; + } +} + + +/* + ************************************************************************************* + * + * Internal Functions + * + ************************************************************************************* + */ + +/* + * the internal event buffer is organised as a ring buffer. Using different + * access functions the data is stored in one of the four following ways: + * + * SINGLE TRACE (no parameter) + * + * Byte 1: 00 xxxxxx subclass + * Byte 2: yyyyyyyyy type + * + * UBYTE TRACE (one byte parameter) + * + * Byte 1: 01 xxxxxx subclass + * Byte 2: yyyyyyyyy type + * Byte 3: zzzzzzzzz parameter + * + * USHORT TRACE (two bytes parameter) + * + * Byte 1: 10 xxxxxx subclass + * Byte 2: yyyyyyyyy type + * Byte 3: zzzzzzzzz parameter + * Byte 4: zzzzzzzzz parameter + * + * ARRAY TRACE (n bytes parameter) + * + * Byte 1: 11 xxxxxx subclass + * Byte 2: yyyyyyyyy type + * Byte 3: aaaaaaaaa len + * Byte 4-n+3: zzzzzzzzz parameter + * + * The parameter ev_enabled defines whether recording is enabled or not. + * after power on it is disabled. + * + * The parameter ev_first_read indicates the first position in the ev_buffer + * which shall be read. + * + * The parameter ev_first_write indicates the first position in the ev_buffer + * which shall be used for the next recorded event. + * + * The parameter ev_size defines the free memory in the ev_buffer. If the next + * write event is greater than the free memory the ev_first_read is changed to + * have enough memory. + * + */ + +GLOBAL void em_trace_single (UBYTE class, + UBYTE subclass, + UBYTE type) +{ +#if defined (WIN32) + char buf[60]; +#endif + TRACE_FUNCTION ("em_trace_single"); + +#if defined (WIN32) + sprintf (buf, "before %d %d Single", ev_first_read, ev_first_write); + TRACE_EVENT (buf); +#endif + if (ev_enabled) + { + // get memory if needed + em_get_size (2); + // write subclass + ev_buffer[ev_first_write++] = subclass; + if (ev_first_write >= EV_BUFFER_SIZE) + ev_first_write -= EV_BUFFER_SIZE; + // write type + ev_buffer[ev_first_write++] = type; + if (ev_first_write >= EV_BUFFER_SIZE) + ev_first_write -= EV_BUFFER_SIZE; + ev_size -= 2; + } +#if defined (WIN32) + sprintf (buf, "after %d %d Single", ev_first_read, ev_first_write); + TRACE_EVENT (buf); +#endif +} + +GLOBAL void em_trace_ubyte (UBYTE class, + UBYTE subclass, + UBYTE type, + UBYTE para_ubyte) +{ +#if defined (WIN32) + char buf[60]; + + TRACE_FUNCTION ("em_trace_ubyte"); + + sprintf (buf, "before %d %d ubyte", ev_first_read, ev_first_write); + TRACE_EVENT (buf); +#endif + + if (ev_enabled) + { + // get memory if needed + em_get_size (3); + // write subclass + ev_buffer[ev_first_write++] = subclass + 0x40; + if (ev_first_write >= EV_BUFFER_SIZE) + ev_first_write -= EV_BUFFER_SIZE; + // write type + ev_buffer[ev_first_write++] = type; + if (ev_first_write >= EV_BUFFER_SIZE) + ev_first_write -= EV_BUFFER_SIZE; + // write parameter + ev_buffer[ev_first_write++] = para_ubyte; + if (ev_first_write >= EV_BUFFER_SIZE) + ev_first_write -= EV_BUFFER_SIZE; + ev_size -= 3; + } +#if defined (WIN32) + sprintf (buf, "after %d %d ubyte", ev_first_read, ev_first_write); + TRACE_EVENT (buf); +#endif +} + +GLOBAL void em_trace_ushort (UBYTE class, + UBYTE subclass, + UBYTE type, + USHORT para_ushort) +{ +#if defined (WIN32) + char buf[60]; + + TRACE_FUNCTION ("em_trace_ushort"); + + sprintf (buf, "before %d %d ushort", ev_first_read, ev_first_write); + TRACE_EVENT (buf); +#endif + + if (ev_enabled) + { + // get memory if needed + em_get_size (4); + // write subclass + ev_buffer[ev_first_write++] = subclass + 0x80; + if (ev_first_write >= EV_BUFFER_SIZE) + ev_first_write -= EV_BUFFER_SIZE; + // write type + ev_buffer[ev_first_write++] = type; + if (ev_first_write >= EV_BUFFER_SIZE) + ev_first_write -= EV_BUFFER_SIZE; + // write parameter + ev_buffer[ev_first_write++] = para_ushort >> 8; + if (ev_first_write >= EV_BUFFER_SIZE) + ev_first_write -= EV_BUFFER_SIZE; + // write parameter + ev_buffer[ev_first_write++] = para_ushort & 8; + if (ev_first_write >= EV_BUFFER_SIZE) + ev_first_write -= EV_BUFFER_SIZE; + ev_size -= 4; + } +#if defined (WIN32) + sprintf (buf, "after %d %d ushort", ev_first_read, ev_first_write); + TRACE_EVENT (buf); +#endif +} + + +GLOBAL void em_trace_array (UBYTE class, + UBYTE subclass, + UBYTE type, + UBYTE * array, + UBYTE length) +{ + UBYTE i; +#if defined (WIN32) + char buf[60]; + + TRACE_FUNCTION ("em_trace_array"); + + sprintf (buf, "before %d %d array", ev_first_read, ev_first_write); + TRACE_EVENT (buf); +#endif + + if (ev_enabled) + { + // get memory if needed + em_get_size ((UBYTE)(length+3)); + // write subclass + ev_buffer[ev_first_write++] = subclass + 0xC0; + if (ev_first_write >= EV_BUFFER_SIZE) + ev_first_write -= EV_BUFFER_SIZE; + // write type + ev_buffer[ev_first_write++] = type; + if (ev_first_write >= EV_BUFFER_SIZE) + ev_first_write -= EV_BUFFER_SIZE; + // write length + ev_buffer[ev_first_write++] = length; + if (ev_first_write >= EV_BUFFER_SIZE) + ev_first_write -= EV_BUFFER_SIZE; + // write parameter + for (i=0;i<length;i++) + { + ev_buffer[ev_first_write++] = array[i]; + if (ev_first_write >= EV_BUFFER_SIZE) + ev_first_write -= EV_BUFFER_SIZE; + } + ev_size -= (length+3); + } +#if defined (WIN32) + sprintf (buf, "after %d %d array", ev_first_read, ev_first_write); + TRACE_EVENT (buf); + sprintf (buf, "%x %x %x %x %x", + ev_buffer[0], + ev_buffer[1], + ev_buffer[2], + ev_buffer[3], + ev_buffer[4]); + TRACE_EVENT (buf); +#endif +} + + +LOCAL void em_get_size (UBYTE size) +{ + while (ev_size < size) + { + /* + * increase ev_first_read to get memory + */ + switch (ev_buffer [ev_first_read & 0xC0]) + { + case 0x00: + // single entry + ev_size += 2; + ev_first_read += 2; + break; + case 0x40: + // ubyte entry + ev_size += 3; + ev_first_read += 3; + break; + case 0x80: + // ushort entry + ev_size += 3; + ev_first_read += 3; + break; + case 0xC0: + // array entry + // skip to length + ev_first_read += 2; + if (ev_first_read >= EV_BUFFER_SIZE) + ev_first_read -= EV_BUFFER_SIZE; + ev_first_read += (1+ev_buffer[ev_first_read]); + break; + } + // align if at the end of the buffer + if (ev_first_read >= EV_BUFFER_SIZE) + ev_first_read -= EV_BUFFER_SIZE; + } +} + +LOCAL UBYTE em_check_em_class_infra_data (UBYTE em_subclass, + UBYTE em_type, + em_data_type * out_em_data) +{ + switch (em_subclass) + { + case EM_SUBCLASS_SC_INFO: + return (em_check_em_subclass_sc_info (em_type, out_em_data)); + case EM_SUBCLASS_NC_INFO: + return (em_check_em_subclass_nc_info (em_type, out_em_data)); + case EM_SUBCLASS_LUP_AND_PAG: + return (em_check_em_subclass_lup_and_pag (em_type, out_em_data)); + default: + return EM_INVALID_SUBCLASS; + } +} + +LOCAL UBYTE em_check_em_subclass_sc_info (UBYTE em_type, + em_data_type * out_em_data) +{ + T_EM_NC_DATA em_nc_data; + /* + * ret 0 not available + * 1 idle mode + * 2 dedicated mode + */ + UBYTE ret; + + out_em_data->em_class = EM_CLASS_INFRA_DATA; + out_em_data->em_subclass = EM_SUBCLASS_SC_INFO; + out_em_data->em_type = em_type; + + ret = em_get_nc_data (&em_nc_data, 6); // serving cell data + + switch (em_type) + { + case EM_IN_SC_BCCH_ARFCN: + if (ret EQ 1) + { + sprintf ((char *)out_em_data->em_parameter,"%3x",em_nc_data.arfcn); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_SC_C1: + if (ret EQ 1) + { + sprintf ((char *)out_em_data->em_parameter,"%3d",em_nc_data.c1); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_SC_C2: + if (ret EQ 1) + { + sprintf ((char *)out_em_data->em_parameter,"%3d",em_nc_data.c2); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_SC_BSIC: + if (ret EQ 1) + { + sprintf ((char *)out_em_data->em_parameter,"%3x",em_nc_data.bsic); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_SC_LAC: + if (ret EQ 1) + { + sprintf ((char *)out_em_data->em_parameter,"%3x",em_nc_data.lac); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_SC_BA: + if (ret EQ 1) + { + sprintf ((char *)out_em_data->em_parameter,"%3d",em_nc_data.cba); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_SC_BQ: + if (ret EQ 1) + { + sprintf ((char *)out_em_data->em_parameter,"%3d",em_nc_data.cbq); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_SC_TIL_STATE: +#if !defined(FF_GTI) + if (ret EQ 1) + { + sprintf ((char *)out_em_data->em_parameter,"%3d",em_nc_data.til_state); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else +#endif /* !FF_GTI */ + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_SC_RX: + if (ret EQ 1) + { + sprintf ((char *)out_em_data->em_parameter,"%3d",em_nc_data.rxlev); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_SC_NMR_RAW: + if (em_get_network_meas (out_em_data->em_parameter) EQ 1) + { + out_em_data->em_length = 16; + return DRV_OK; + } + else + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_SC_BCCH_LIST_RAW: + if (em_get_bcch_chan_list (out_em_data) NEQ 1) + return DRV_OK; + else + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + default: + return EM_INVALID_TYPE; + } +} + +LOCAL UBYTE em_check_em_subclass_nc_info (UBYTE em_type, + em_data_type * out_em_data) +{ + T_EM_NC_DATA em_nc_data; + /* + * ret 0 not available + * 1 idle mode + * 2 dedicated mode + */ + UBYTE ret; + UBYTE cell_id; + + out_em_data->em_class = EM_CLASS_INFRA_DATA; + out_em_data->em_subclass = EM_SUBCLASS_NC_INFO; + out_em_data->em_type = em_type; + + switch( em_type ) + { + case EM_IN_NC_BCCH_1: + case EM_IN_NC_RX_1: + case EM_IN_NC_C1_1: + case EM_IN_NC_C2_1: + case EM_IN_NC_BSIC_1: + case EM_IN_NC_CID_1: + case EM_IN_NC_FN_OFFSET_1: + case EM_IN_NC_TA_OFFSET_1: + case EM_IN_NC_LAC_1: + case EM_IN_NC_BA_1: + case EM_IN_NC_BQ_1: + case EM_IN_NC_TIL_STATE_1: + cell_id = 0; + break; + + case EM_IN_NC_BCCH_2: + case EM_IN_NC_RX_2: + case EM_IN_NC_C1_2: + case EM_IN_NC_C2_2: + case EM_IN_NC_BSIC_2: + case EM_IN_NC_CID_2: + case EM_IN_NC_FN_OFFSET_2: + case EM_IN_NC_TA_OFFSET_2: + case EM_IN_NC_LAC_2: + case EM_IN_NC_BA_2: + case EM_IN_NC_BQ_2: + case EM_IN_NC_TIL_STATE_2: + cell_id = 1; + break; + + case EM_IN_NC_BCCH_3: + case EM_IN_NC_RX_3: + case EM_IN_NC_C1_3: + case EM_IN_NC_C2_3: + case EM_IN_NC_BSIC_3: + case EM_IN_NC_CID_3: + case EM_IN_NC_FN_OFFSET_3: + case EM_IN_NC_TA_OFFSET_3: + case EM_IN_NC_LAC_3: + case EM_IN_NC_BA_3: + case EM_IN_NC_BQ_3: + case EM_IN_NC_TIL_STATE_3: + cell_id = 2; + break; + + case EM_IN_NC_BCCH_4: + case EM_IN_NC_RX_4: + case EM_IN_NC_C1_4: + case EM_IN_NC_C2_4: + case EM_IN_NC_BSIC_4: + case EM_IN_NC_CID_4: + case EM_IN_NC_FN_OFFSET_4: + case EM_IN_NC_TA_OFFSET_4: + case EM_IN_NC_LAC_4: + case EM_IN_NC_BA_4: + case EM_IN_NC_BQ_4: + case EM_IN_NC_TIL_STATE_4: + cell_id = 3; + break; + + case EM_IN_NC_BCCH_5: + case EM_IN_NC_RX_5: + case EM_IN_NC_C1_5: + case EM_IN_NC_C2_5: + case EM_IN_NC_BSIC_5: + case EM_IN_NC_CID_5: + case EM_IN_NC_FN_OFFSET_5: + case EM_IN_NC_TA_OFFSET_5: + case EM_IN_NC_LAC_5: + case EM_IN_NC_BA_5: + case EM_IN_NC_BQ_5: + case EM_IN_NC_TIL_STATE_5: + cell_id = 4; + break; + + case EM_IN_NC_BCCH_6: + case EM_IN_NC_RX_6: + case EM_IN_NC_C1_6: + case EM_IN_NC_C2_6: + case EM_IN_NC_BSIC_6: + case EM_IN_NC_CID_6: + case EM_IN_NC_FN_OFFSET_6: + case EM_IN_NC_TA_OFFSET_6: + case EM_IN_NC_LAC_6: + case EM_IN_NC_BA_6: + case EM_IN_NC_BQ_6: + case EM_IN_NC_TIL_STATE_6: + cell_id = 5; + break; + + case EM_IN_NC_TIL_SYNC_CNT: + case EM_IN_NC_TIL_BCCH_CNT: + cell_id = 6; /* Serving cell */ + break; + + default: + return EM_DATA_NOT_AVAIL; + } + + + ret = em_get_nc_data (&em_nc_data, cell_id); /* ncell data */ + + switch (em_type) + { + case EM_IN_NC_BCCH_1: + case EM_IN_NC_BCCH_2: + case EM_IN_NC_BCCH_3: + case EM_IN_NC_BCCH_4: + case EM_IN_NC_BCCH_5: + case EM_IN_NC_BCCH_6: + if (ret NEQ 0) + { + sprintf ((char *)out_em_data->em_parameter,"%3x",em_nc_data.arfcn); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_NC_RX_1: + case EM_IN_NC_RX_2: + case EM_IN_NC_RX_3: + case EM_IN_NC_RX_4: + case EM_IN_NC_RX_5: + case EM_IN_NC_RX_6: + if (ret NEQ 0) + { + sprintf ((char *)out_em_data->em_parameter,"%3d",em_nc_data.rxlev); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_NC_BSIC_1: + case EM_IN_NC_BSIC_2: + case EM_IN_NC_BSIC_3: + case EM_IN_NC_BSIC_4: + case EM_IN_NC_BSIC_5: + case EM_IN_NC_BSIC_6: + if (ret NEQ 0) + { + sprintf ((char *)out_em_data->em_parameter,"%3x",em_nc_data.bsic); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_NC_C1_1: + case EM_IN_NC_C1_2: + case EM_IN_NC_C1_3: + case EM_IN_NC_C1_4: + case EM_IN_NC_C1_5: + case EM_IN_NC_C1_6: + if (ret EQ 1) + { + sprintf ((char *)out_em_data->em_parameter,"%3d",em_nc_data.c1); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_NC_C2_1: + case EM_IN_NC_C2_2: + case EM_IN_NC_C2_3: + case EM_IN_NC_C2_4: + case EM_IN_NC_C2_5: + case EM_IN_NC_C2_6: + if (ret EQ 1) + { + sprintf ((char *)out_em_data->em_parameter,"%3d",em_nc_data.c2); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_NC_LAC_1: + case EM_IN_NC_LAC_2: + case EM_IN_NC_LAC_3: + case EM_IN_NC_LAC_4: + case EM_IN_NC_LAC_5: + case EM_IN_NC_LAC_6: + if (ret EQ 1) + { + sprintf ((char *)out_em_data->em_parameter,"%3x",em_nc_data.lac); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_NC_BA_1: + case EM_IN_NC_BA_2: + case EM_IN_NC_BA_3: + case EM_IN_NC_BA_4: + case EM_IN_NC_BA_5: + case EM_IN_NC_BA_6: + if (ret EQ 1) + { + sprintf ((char *)out_em_data->em_parameter,"%3x",em_nc_data.cba); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_NC_BQ_1: + case EM_IN_NC_BQ_2: + case EM_IN_NC_BQ_3: + case EM_IN_NC_BQ_4: + case EM_IN_NC_BQ_5: + case EM_IN_NC_BQ_6: + if (ret EQ 1) + { + sprintf ((char *)out_em_data->em_parameter,"%3x",em_nc_data.cbq); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_NC_TIL_STATE_1: + case EM_IN_NC_TIL_STATE_2: + case EM_IN_NC_TIL_STATE_3: + case EM_IN_NC_TIL_STATE_4: + case EM_IN_NC_TIL_STATE_5: + case EM_IN_NC_TIL_STATE_6: +#if !defined(FF_GTI) + if (ret NEQ 0) + { + sprintf ((char *)out_em_data->em_parameter,"%3d",em_nc_data.til_state); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else +#endif /* !FF_GTI */ + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_NC_TIL_SYNC_CNT: +#if !defined(FF_GTI) + if ( (ret EQ 1) && (em_nc_data.sync_cnt NEQ 0xFF) ) + { + sprintf ((char *)out_em_data->em_parameter,"%3d",em_nc_data.sync_cnt); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else +#endif /* !FF_GTI */ + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + case EM_IN_NC_TIL_BCCH_CNT: +#if !defined(FF_GTI) + if ( (ret EQ 1) && (em_nc_data.bcch_cnt NEQ 0xFF) ) + { + sprintf ((char *)out_em_data->em_parameter,"%3d",em_nc_data.bcch_cnt); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + else +#endif /* !FF_GTI */ + return EM_DATA_NOT_AVAIL; + /* break is removed as return is using before break,which will never execute */ + + default: + return EM_INVALID_TYPE; + /* break is removed as return is using before break,which will never execute */ + + } +} + +LOCAL UBYTE em_check_em_subclass_lup_and_pag (UBYTE em_type, + em_data_type * out_em_data) +{ + UBYTE * sys_info_3 = NULL; + + out_em_data->em_class = EM_CLASS_INFRA_DATA; + out_em_data->em_subclass = EM_SUBCLASS_LUP_AND_PAG; + out_em_data->em_type = em_type; + +#if defined(FF_GTI) + sys_info_3 = em_get_sysinfo_type3 (); /* sys info 3 */ +#else + sys_info_3 = em_get_sys_info (0x1B); /* sys info 3 */ +#endif /* FF_GTI */ + + switch (em_type) + { + case EM_IN_LP_BS_PA_MFRMS: + if (sys_info_3 EQ NULL) + return EM_DATA_NOT_AVAIL; + else + { + sprintf ((char *)out_em_data->em_parameter,"%d",(sys_info_3[10]&7)+2); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + case EM_IN_LP_T3212: + if (sys_info_3 EQ NULL) + return EM_DATA_NOT_AVAIL; + else + { + sprintf ((char *)out_em_data->em_parameter,"%d",sys_info_3[11]); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + case EM_IN_LP_MCC: + if (sys_info_3 EQ NULL) + return EM_DATA_NOT_AVAIL; + else + { + USHORT mcc; + + mcc = (sys_info_3[4] & 0x0F)*100 + + ((sys_info_3[4] & 0xF0)>>4)*10 + + (sys_info_3[5] & 0x0F); + sprintf ((char *)out_em_data->em_parameter,"%d",mcc); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + case EM_IN_LP_MNC: + if (sys_info_3 EQ NULL) + return EM_DATA_NOT_AVAIL; + else + { + USHORT mnc; + + mnc = (sys_info_3[6] & 0x0F)*10 + + ((sys_info_3[6] & 0xF0)>>4); + sprintf ((char *)out_em_data->em_parameter,"%d",mnc); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + return DRV_OK; + } + case EM_IN_LP_LAC: + case EM_IN_LP_LAC_RAW: + if (sys_info_3 EQ NULL) + return EM_DATA_NOT_AVAIL; + else + { + USHORT lac; + + lac = (sys_info_3[7] << 8) + + sys_info_3[8]; + if (em_type EQ EM_IN_LP_LAC) + { + sprintf ((char *)out_em_data->em_parameter,"%d",lac); + out_em_data->em_length = strlen ((char *)out_em_data->em_parameter); + } + else + { + out_em_data->em_parameter[0] = sys_info_3[7]; + out_em_data->em_parameter[1] = sys_info_3[8]; + out_em_data->em_length = 2; + } + return DRV_OK; + } + case EM_IN_LP_CI_RAW: + if (sys_info_3 EQ NULL) + return EM_DATA_NOT_AVAIL; + else + { + out_em_data->em_parameter[0] = sys_info_3[2]; + out_em_data->em_parameter[1] = sys_info_3[3]; + out_em_data->em_length = 2; + } + return DRV_OK; + + default: + return EM_INVALID_TYPE; + } +} + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/src/driver/ffs_coat.c Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,847 @@ +/* ++----------------------------------------------------------------------------- +| Modul : ffs_coat ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Encapsulate the FFS API. ++----------------------------------------------------------------------------- +*/ + +#ifndef __FFS_COAT_C__ +#define __FFS_COAT_C__ + +/*==== INCLUDES ===================================================*/ +#define SAP_ACI + +#include "typedefs.h" +#include "pconst.cdg" +#include "prim.h" +#include "vsi.h" +#include "ffs/ffs.h" +#include "ffs_coat.h" + + +/*==== CONSTANTS ==================================================*/ + +/*==== TYPES ======================================================*/ + +/*==== CONSTANTS ==================================================*/ +//#define FFS_STATE_CHECK +#define FFS_PAR_CHECK +#define FFS_ERR_CHECK + +/*==== EXTERNALS ==================================================*/ + +/*==== VARIABLES ==================================================*/ + +/*==== MACROS =====================================================*/ +#if defined(FFS_STATE_CHECK) +#define _STATE_CHECK(ffs_ret)\ + {ffs_ret=_FFS_StateCheck (_FFS_FCT_NAME,hMMI,file,line);\ + if (ffs_ret NEQ EFFS_OK)return ffs_ret;} +#else /* FFS_PAR_CHECK */ +#define _STATE_CHECK(ffs_ret) +#endif /* FFS_PAR_CHECK */ + +#if defined(FFS_PAR_CHECK) +#define _PAR_CHECK_NULL(parname,parnumber,ret)\ + if (!parname){\ + _FFS_ParCheck ("NULL", _FFS_FCT_NAME, parnumber, hMMI,file, line);\ + return ret;} + +#define _PAR_CHECK_LESSZERO(parname,parnumber,ret)\ + if (parname < 0){\ + _FFS_ParCheck ("<0", _FFS_FCT_NAME, parnumber, hMMI,file, line);\ + return ret;} +#else /* FFS_PAR_CHECK */ +#define _PAR_CHECK_NULL(parname,parnumber,ret) +#define _PAR_CHECK_LESSZERO(parname,parnumber,ret) +#endif /* FFS_PAR_CHECK */ + + +#if defined(FFS_ERR_CHECK) +#define _ERROR_CHECK(ffs_ret)\ + if (ffs_ret < 0)_FFS_ErrorMsg(NULL, _FFS_FCT_NAME, ffs_ret, hMMI,file, line) +#else /* FFS_ERR_CHECK */ +#define _ERROR_CHECK(ffs_ret) +#endif /* FFS_ERR_CHECK */ + +/*==== FUNCTIONS ==================================================*/ +#if defined(FFS_COAT_ENABLED) +static void _FFS_ParCheck (const char * const errmsg, const char * const fct, + int parameter, + T_HANDLE hMMI, const char * const file, int line); + +static void _FFS_ErrorMsg (const char * const errmsg, const char * const fct, + int ffs_ret, + T_HANDLE hMMI, const char * const file, int line); + +/* FFS functions whose positive return value has a meaning */ +T_FFS_FD _FFS_open(const char *name, T_FFS_OPEN_FLAGS option, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_open" +T_FFS_FD ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (name, 1, EFFS_BADNAME); + + ffs_ret = ffs_open (name, option); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + +T_FFS_SIZE _FFS_write(T_FFS_FD fdi, void *src, T_FFS_SIZE amount, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_write" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (src, 2, EFFS_BADOP); + + ffs_ret = ffs_write (fdi, src, amount); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_SIZE _FFS_read(T_FFS_FD fdi, void *src, T_FFS_SIZE size, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_read" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (src, 2, EFFS_BADOP); + + ffs_ret = ffs_read (fdi, src, size); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_SIZE _FFS_seek(T_FFS_FD fdi, T_FFS_SIZE offset, T_FFS_WHENCE whence, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_seek" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_LESSZERO (offset, 2, EFFS_BADOP); + + ffs_ret = ffs_seek (fdi, offset, whence); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_SIZE _FFS_opendir(const char *name, T_FFS_DIR *dir, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_opendir" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (name, 1, EFFS_NOTADIR); + _PAR_CHECK_NULL (dir, 2, EFFS_NOTADIR); + + ffs_ret = ffs_opendir (name, dir); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_SIZE _FFS_readdir (T_FFS_DIR *dir, char *name, T_FFS_SIZE size, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_readdir" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (dir, 1, EFFS_NOTADIR); + _PAR_CHECK_NULL (name, 2, EFFS_NOTADIR); + _PAR_CHECK_LESSZERO (size, 3, EFFS_NOTADIR); + + ffs_ret = ffs_readdir (dir, name, size); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_SIZE _FFS_readlink(const char *name, char *addr, T_FFS_SIZE size, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_readlink" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (name, 1, EFFS_NOTAFILE); + _PAR_CHECK_NULL (addr, 2, EFFS_NOTAFILE); + _PAR_CHECK_LESSZERO (size, 3, EFFS_FILETOOBIG); + + ffs_ret = ffs_readlink (name, addr, size); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_SIZE _FFS_file_read(const char *name, void *addr, T_FFS_SIZE size, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_file_read" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (name, 1, EFFS_NOTAFILE); + _PAR_CHECK_NULL (addr, 2, EFFS_NOTAFILE); + _PAR_CHECK_LESSZERO (size, 3, EFFS_FILETOOBIG); + + ffs_ret = ffs_file_read (name, addr, size); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_SIZE _FFS_fread(const char *name, void *addr, T_FFS_SIZE size, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_fread" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (name, 1, EFFS_NOTAFILE); + _PAR_CHECK_NULL (addr, 2, EFFS_NOTAFILE); + _PAR_CHECK_LESSZERO (size, 3, EFFS_FILETOOBIG); + + /* ffs_fread is deprecated, use ffs_file_read instead */ + ffs_ret = ffs_file_read (name, addr, size); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + + +/* FFS functions which return a value EFFS_OK if OK */ +T_FFS_RET _FFS_preformat(UINT16 magic, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_preformat" +T_FFS_SIZE ffs_ret; + + ffs_ret = ffs_preformat (magic); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_format(const char *name, UINT16 magic, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_format" +T_FFS_SIZE ffs_ret; + + _PAR_CHECK_NULL (name, 1, EFFS_BADNAME); + + ffs_ret = ffs_format (name, magic); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_close(T_FFS_FD fdi, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_close" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + + ffs_ret = ffs_close (fdi); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_truncate(const char *path, T_FFS_OFFSET length, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_truncate" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (path, 1, EFFS_NOTFOUND); + _PAR_CHECK_LESSZERO (length, 2, EFFS_NOTFOUND); + + ffs_ret = ffs_truncate (path, length); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_ftruncate(T_FFS_FD fdi, T_FFS_OFFSET length, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_ftruncate" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (fdi, 1, EFFS_BADFD); + _PAR_CHECK_LESSZERO (length, 2, EFFS_NOTFOUND); + + ffs_ret = ffs_ftruncate (fdi, length); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_fdatasync(T_FFS_FD fdi, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_fdatasync" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (fdi, 1, EFFS_BADFD); + + ffs_ret = ffs_fdatasync (fdi); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_stat(const char *name, T_FFS_STAT *stat, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_stat" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (name, 1, EFFS_NOTFOUND); + _PAR_CHECK_NULL (stat, 2, EFFS_NOTFOUND); + + ffs_ret = ffs_stat (name, stat); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_fstat(T_FFS_FD fdi, T_FFS_STAT *stat, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_fstat" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (fdi, 1, EFFS_BADFD); + _PAR_CHECK_NULL (stat, 2, EFFS_NOTFOUND); + + ffs_ret = ffs_fstat (fdi, stat); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_lstat(const char *name, T_FFS_STAT *stat, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_lstat" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (name, 1, EFFS_NOTFOUND); + _PAR_CHECK_NULL (stat, 2, EFFS_NOTFOUND); + + ffs_ret = ffs_lstat (name, stat); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_xlstat(const char *name, T_FFS_XSTAT *stat, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_xlstat" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (name, 1, EFFS_NOTFOUND); + _PAR_CHECK_NULL (stat, 2, EFFS_NOTFOUND); + + ffs_ret = ffs_xlstat (name, stat); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_linkstat(const char *name, T_FFS_STAT *stat, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_linkstat" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (name, 1, EFFS_NOTFOUND); + _PAR_CHECK_NULL (stat, 2, EFFS_NOTFOUND); + + /* ffs_linkstat is deprecated, use ffs_lstat instead */ + ffs_ret = ffs_lstat (name, stat); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_remove(const char *name, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_remove" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (name, 1, EFFS_NOTFOUND); + + ffs_ret = ffs_remove (name); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_mkdir(const char *name, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_mkdir" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (name, 1, EFFS_BADNAME); + + ffs_ret = ffs_mkdir (name); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_symlink(const char *name, const char *actualpath, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_symlink" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (name, 1, EFFS_BADNAME); + _PAR_CHECK_NULL (actualpath, 2, EFFS_BADNAME); + + ffs_ret = ffs_symlink (name, actualpath); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_rename(const char *oldname, const char *newname, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_rename" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (oldname, 1, EFFS_BADNAME); + _PAR_CHECK_NULL (newname, 2, EFFS_BADNAME); + + ffs_ret = ffs_rename (oldname, newname); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_file_write(const char *name, void *addr, T_FFS_SIZE size, + T_FFS_OPEN_FLAGS flags, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_file_write" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (name, 1, EFFS_BADNAME); + _PAR_CHECK_NULL (addr, 2, EFFS_NOTAFILE); + _PAR_CHECK_LESSZERO (size, 2, EFFS_FILETOOBIG); + + ffs_ret = ffs_file_write (name, addr, size, flags); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_fcreate(const char *name, void *addr, T_FFS_SIZE size, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_fcreate" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (name, 1, EFFS_BADNAME); + _PAR_CHECK_NULL (addr, 2, EFFS_NOTAFILE); + _PAR_CHECK_LESSZERO (size, 2, EFFS_FILETOOBIG); + + /* ffs_fcreate is deprecated, use ffs_file_write instead */ + ffs_ret = ffs_file_write (name, addr, size, FFS_O_CREATE|FFS_O_EXCL); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_fupdate(const char *name, void *addr, T_FFS_SIZE size, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_fupdate" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (name, 1, EFFS_BADNAME); + _PAR_CHECK_NULL (addr, 2, EFFS_NOTAFILE); + _PAR_CHECK_LESSZERO (size, 2, EFFS_FILETOOBIG); + + /* ffs_fupdate is deprecated, use ffs_file_write instead */ + ffs_ret = ffs_file_write (name, addr, size, FFS_O_TRUNC); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_fwrite(const char *name, void *addr, T_FFS_SIZE size, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_fwrite" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (name, 1, EFFS_BADNAME); + _PAR_CHECK_NULL (addr, 2, EFFS_NOTAFILE); + _PAR_CHECK_LESSZERO (size, 2, EFFS_FILETOOBIG); + + /* ffs_fwrite is deprecated, use ffs_file_write instead */ + ffs_ret = ffs_file_write (name, addr, size, FFS_O_CREATE|FFS_O_TRUNC); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_fcontrol(const char *pathname, INT8 action, int param, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_fcontrol" +T_FFS_SIZE ffs_ret; + + _STATE_CHECK (ffs_ret); + _PAR_CHECK_NULL (pathname, 1, EFFS_BADNAME); + + ffs_ret = ffs_fcontrol (pathname, action, param); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + + +T_FFS_RET _FFS_query(INT8 query, void *p, + T_HANDLE hMMI, const char * const file, int line) +{ +#define _FFS_FCT_NAME "ffs_query" +T_FFS_SIZE ffs_ret; + + _PAR_CHECK_NULL (p, 2, EFFS_BADNAME); + + ffs_ret = ffs_query (query, p); + _ERROR_CHECK (ffs_ret); + + return ffs_ret; +#undef _FFS_FCT_NAME +} + +#if defined(FFS_PAR_CHECK) +static void _FFS_ParCheck (const char * const errmsg, const char * const fct, + int parameter, + T_HANDLE hMMI, const char * const file, int line) +{ + char *f; + int l; + + l = strlen (file); + if (l <= 20) + f = (char *)file; + else + f = (char *)file + l - 20; + + TRACE_EVENT_P5 ("FFS PAR ERR:par %u of %s is %s (%s#%u)", + parameter, + fct ? fct : "", + errmsg ? errmsg : "", + f, + line); +} +#endif /* FFS_PAR_CHECK */ + +char *ffs_strerror(effs_t error) +{ + switch (error) { + case EFFS_OK: return "ok"; /* 0 */ + case EFFS_NODEVICE: return "flash device unknown"; /* -1 */ + case EFFS_CORRUPTED: return "filesystem corrupted!?"; /* -2 */ + case EFFS_NOPREFORMAT: return "ffs not preformatted"; /* -3 */ + case EFFS_NOFORMAT: return "ffs not formatted"; /* -4 */ + case EFFS_BADFORMAT: return "incompatible ffs version"; /* -5 */ + case EFFS_MAGIC: return "bad magic"; /* -6 */ + case EFFS_AGAIN: return "not ready, try again later"; /* -7 */ + case EFFS_NOSYS: return "function not implemented"; /* -8 */ + case EFFS_DRIVER: return "ffs device driver error"; /* -9 */ + case EFFS_NOSPACE: return "out of data space"; /* -10 */ + case EFFS_FSFULL: return "file system full, no free inodes"; /* -11 */ + case EFFS_BADNAME: return "bad filename"; /* -12 */ + case EFFS_NOTFOUND: return "object not found"; /* -13 */ + case EFFS_EXISTS: return "object exists"; /* -14 */ + case EFFS_ACCESS: return "access permission violation"; /* -15 */ + case EFFS_NAMETOOLONG: return "filename too long"; /* -16 */ + case EFFS_INVALID: return "invalid argument"; /* -17 */ + case EFFS_DIRNOTEMPTY: return "directory not empty"; /* -18 */ + case EFFS_NOTADIR: return "object is not a directory"; /* -19 */ + case EFFS_SPARE: return "SPARE"; /* -20 */ + case EFFS_FILETOOBIG: return "file too big"; /* -21 */ + case EFFS_NOTAFILE: return "object is not a file"; /* -22 */ + case EFFS_PATHTOODEEP: return "path too deep"; /* -23 */ + case EFFS_NUMFD: return "Max number of open files reached"; /* -24 */ + case EFFS_BADFD: return "Bad file descriptor"; /* -25 */ + case EFFS_BADOP: return "Bad operation"; /* -26 */ + case EFFS_LOCKED: return "The file is locked"; /* -27 */ + case EFFS_TOOBIG: return "too big (tmffs buffer overflow)"; /* -30 */ + case EFFS_MEMORY: return "out of memory"; /* -31 */ + case EFFS_MSGSEND: return "message send failed"; /* -32 */ + case EFFS_SIBLINGLOOP: return "directory sibling loop"; /* -40 */ + case EFFS_NOBLOCKS: return "No more blocks!?"; /* -41 */ + default: return "unknown ffs error code!"; + } +} + +static void _FFS_ErrorMsg (const char * const errmsg, const char * const fct, + int ffs_ret, + T_HANDLE hMMI, const char * const file, int line) +{ + char *f; + int l; + + l = strlen (file); + if (l <= 20) + f = (char *)file; + else + f = (char *)file + l - 20; + + TRACE_EVENT_P5 ("FFS ERR on %s: %d %s (%s#%u)", + fct ? fct : "", + ffs_ret, + ffs_strerror (ffs_ret), + f, + line); +} + +#endif /* FFS_COAT_ENABLED */ + +#if 1 +GLOBAL T_FFS_RET _FFS_StateCheck (const char * const fct, + T_HANDLE hMMI, const char * const file, int line) +{ + int query_result; + int bytes_free, bytes_used, bytes_max, bytes_lost; + T_FFS_RET ffs_ret; + + SYST_TRACE ("_FFS_StateCheck()"); + + bytes_free = bytes_used = bytes_max = bytes_lost = 0; + + ffs_ret = ffs_query (Q_BYTES_FREE, &query_result); + if (ffs_ret EQ EFFS_OK) + { + bytes_free = query_result; + ffs_ret = ffs_query (Q_BYTES_USED, &query_result); + if (ffs_ret EQ EFFS_OK) + { + bytes_used = query_result; + ffs_ret = ffs_query (Q_BYTES_LOST, &query_result); + if (ffs_ret EQ EFFS_OK) + { + bytes_lost = query_result; + ffs_ret = ffs_query (Q_BYTES_MAX, &query_result); + if (ffs_ret EQ EFFS_OK) + { + bytes_max = query_result; + } + } + } + } + + #if 0 + { + char *f; + int l; + + PALLOC (trc_ind, ACI_TRC_IND); /* T_ACI_TRC_IND */ + trc_ind->cmd_src = 1; /* CMD_SRC_ATI_1 */ + + l = strlen (file); + if (l <= 20) + f = (char *)file; + else + f = (char *)file + l - 20; + + sprintf (trc_ind->trc_buf, "STATE before %s (%s#%u)", fct?fct:"", f, line); + trc_ind->trc_len = strlen (trc_ind->trc_buf); + + PSEND (hMMI, trc_ind); + } + #endif /* 0|1 */ + { + TRACE_EVENT_P4 ("FFS free=%5u used=%5u lost=%5u max=%6u", + bytes_free, + bytes_used, + bytes_lost, + bytes_max); + } + + return EFFS_OK; +} +#else /* 1|0 */ +GLOBAL T_FFS_RET _FFS_StateCheck (const char * const fct, + T_HANDLE hMMI, const char * const file, int line) +{ + USHORT query_result; + int objects_free, objects_used, objects_max, objects_lost; + T_FFS_RET ffs_ret; + + SYST_TRACE ("_FFS_StateCheck()"); + + ffs_ret = ffs_query (Q_OBJECTS_FREE, &query_result); + if (ffs_ret NEQ EFFS_OK) + return ffs_ret; + else + objects_free = query_result; + + ffs_ret = ffs_query (Q_INODES_USED, &query_result); + if (ffs_ret NEQ EFFS_OK) + return ffs_ret; + else + objects_used = query_result; + + ffs_ret = ffs_query (Q_INODES_LOST, &query_result); + if (ffs_ret NEQ EFFS_OK) + return ffs_ret; + else + objects_lost = query_result; + + ffs_ret = ffs_query (Q_OBJECTS_MAX, &query_result); + if (ffs_ret NEQ EFFS_OK) + return ffs_ret; + else + objects_max = query_result; + + #if 0 + { + char *f; + int l; + + PALLOC (trc_ind, ACI_TRC_IND); /* T_ACI_TRC_IND */ + trc_ind->cmd_src = 1; /* CMD_SRC_ATI_1 */ + + l = strlen (file); + if (l <= 20) + f = (char *)file; + else + f = (char *)file + l - 20; + + sprintf (trc_ind->trc_buf, "STATE before %s (%s#%u)", fct?fct:"", f, line); + trc_ind->trc_len = strlen (trc_ind->trc_buf); + + PSEND (hMMI, trc_ind); + } + #endif /* 0|1 */ + { + PALLOC (trc_ind, ACI_TRC_IND); /* T_ACI_TRC_IND */ + trc_ind->cmd_src = 1; /* CMD_SRC_ATI_1 */ + + sprintf (trc_ind->trc_buf, "FFS objs: free=%3u used=%3u lost=%3u max=%3u", + objects_free, objects_used, objects_lost, objects_max); + trc_ind->trc_len = strlen (trc_ind->trc_buf); + + SYST_TRACE ((char *)trc_ind->trc_buf); + + PSEND (hMMI, trc_ind); + } + + return EFFS_OK; +} +#endif /* 1|0 */ + +#endif +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/src/driver/rom_tables.c Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,23 @@ +#ifndef ROM_TABLES_C +#define ROM_TABLES_C + +#include <stdlib.h> +#include <stdio.h> +#include <ctype.h> +#include "typedefs.h" + +#include "rom_tables.h" + +#ifdef TI_PS_OP_OPN_TAB_ROMBASED +GLOBAL const UBYTE *const ptr_plmn_compressed = (UBYTE *)PLMN_COMPRESSED_OPN_TABLE_ADDRESS; +GLOBAL const USHORT *const ptr_plmn_dict_offset = (USHORT *)PLMN_OFFSET_OPN_TABLE_ADDRESS; +GLOBAL const UBYTE *const ptr_plmn_dict = (UBYTE *)PLMN_DICT_OPN_TABLE_ADDRESS; +#endif /* TI_PS_OP_OPN_TAB_ROMBASED */ + +#ifdef TI_PS_OP_CNV_TAB_ROMBASED +GLOBAL const UBYTE (*const chset)[CSCS_CHSET_Chars] = (UBYTE(*)[CSCS_CHSET_Chars])CHSET_ROM_TABLE_CONVERSION_ADDRESS; +GLOBAL const UBYTE *const gsmToAsciiTable = (UBYTE *) GSM_ASCII_ROM_TABLE_CONVERSION_ADDRESS; +GLOBAL const UBYTE *const hexVal = (UBYTE *) HEX_VALUE_ROM_TABLE_CONVERSION_ADDRESS; +#endif /*TI_PS_OP_CNV_TAB_ROMBASED */ + +#endif /* #ifndef ROM_TABLES_C */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/com/src/driver/vmd.c Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,457 @@ +/* ++----------------------------------------------------------------------------- +| Project : GSM-PS +| Modul : DRV_VMD ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : This Module defines the voice memo and recognition +| driver interface for the G23 protocol stack. +| +| This driver is used to control all voice memo and +| voice recognition related procedure. ++----------------------------------------------------------------------------- +*/ + +#ifndef DRV_VMD_C +#define DRV_VMD_C +/*==== INCLUDES ===================================================*/ + +#include <string.h> +#include "typedefs.h" +#include "vsi.h" +#include "custom.h" +#include "prim.h" +#include "gsm.h" +#include "tok.h" +#include "gdi.h" +#include "vmd.h" +#ifdef TI_PS_HCOMM_CHANGE +#include "cl_hComm_handle.h" +#endif +/*==== EXPORT =====================================================*/ +/*==== VARIABLES ==================================================*/ + +drv_SignalCB_Type vmd_signal_callback = NULL; + +#ifdef TI_PS_HCOMM_CHANGE +#else +#if defined (NEW_FRAME) +EXTERN T_HANDLE hCommL1; +#else +EXTERN T_VSI_CHANDLE hCommL1; +#endif +#endif + +/*==== FUNCTIONS ==================================================*/ + +/*==== TYPES ======================================================*/ + +typedef struct T_MMI_VM_RECORD_REQ_V +{ + UBYTE dtx_used; + USHORT d_k_x1_t0; + USHORT d_k_x1_t1; + USHORT d_k_x1_t2; + USHORT d_pe_rep; + USHORT d_pe_off; + USHORT d_se_off; + USHORT d_bu_off; + USHORT d_t0_on; + USHORT d_t0_off; + USHORT d_t1_on; + USHORT d_t1_off; + USHORT d_t2_on; + USHORT d_t2_off; + USHORT * start_address; + USHORT * stop_address; +} T_MMI_VM_RECORD_REQ_V; + +typedef struct T_MMI_VM_PLAY_REQ_V +{ + USHORT * start_address; +} T_MMI_VM_PLAY_REQ_V; + +typedef struct T_MMI_VM_END_PLAY_IND +{ + USHORT * stop_address; +} T_MMI_VM_END_PLAY_IND; + +typedef struct T_MMI_VM_END_RECORD_IND +{ + USHORT * stop_address; +} T_MMI_VM_END_RECORD_IND; + +typedef struct T_MMI_VM_END_PLAY_REQ +{ + UBYTE dummy; +} T_MMI_VM_END_PLAY_REQ; + +typedef struct T_MMI_VM_END_RECORD_REQ +{ + UBYTE dummy; +} T_MMI_VM_END_RECORD_REQ; + +typedef struct +{ + USHORT param1; + USHORT param2; + USHORT param3; + USHORT param4; + USHORT param5; +} +T_MMI_SR_REQ_V; + +typedef struct +{ + UBYTE error_code; + UBYTE index; +} T_MMI_SR_IND_V; + +#define MMI_VM_RECORD_REQ_V 8 +#define MMI_VM_PLAY_REQ_V 9 +#define MMI_VM_END_RECORD_REQ 10 + +#define MMI_SR_REQ_V 110 +#define MMI_SR_IND_V 119 + +#define MMI_VM_END_PLAY_REQ 114 +#define MMI_VM_END_PLAY_IND 115 +#define MMI_VM_END_RECORD_IND 116 + +LOCAL void vmd_mmi_vm_end_record_ind (T_MMI_VM_END_RECORD_IND * vmd_parameter); +LOCAL void vmd_mmi_vm_end_play_ind (T_MMI_VM_END_PLAY_IND * vmd_parameter); +LOCAL void vmd_mmi_sr_end_ind (T_MMI_SR_IND_V * vmd_parameter); + +/*==== CONSTANTS ==================================================*/ +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6103) MODULE : DRV_VMD | +| STATE : code ROUTINE : vmd_init | ++--------------------------------------------------------------------+ + + PURPOSE : The function initializes the driver´s internal data. + The function returns DRV_OK in case of a successful + completition. The function returns DRV_INITIALIZED if + the driver has already been initialized and is ready to + be used or is already in use. In case of an initialization + failure, which means the that the driver cannot be used, + the function returns DRV_INITFAILURE. + +*/ + +GLOBAL UBYTE vmd_init (drv_SignalCB_Type in_SignalCBPtr) +{ + vmd_signal_callback = in_SignalCBPtr; /* store call-back function */ + + return DRV_OK; +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6103) MODULE : DRV_VMD | +| STATE : code ROUTINE : vmd_exit | ++--------------------------------------------------------------------+ + + PURPOSE : The function is called when the driver functionality is + not longer required. +*/ + +GLOBAL void vmd_exit (void) +{ + vmd_signal_callback = NULL; +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6103) MODULE : DRV_VMD | +| STATE : code ROUTINE : vmd_start_voice_memo_recording | ++--------------------------------------------------------------------+ + + PURPOSE : This function is used to start voice memo recording. + The needed parameters are defined in the structure + vmd_start_record_type. + +*/ + +GLOBAL UBYTE vmd_start_voice_memo_recording (vmd_start_record_type * vmd_parameter) +{ + PALLOC (mmi_vm_record_req, MMI_VM_RECORD_REQ_V); + + /* + * copy parameters to send to layer 1 + */ + mmi_vm_record_req->start_address = vmd_parameter->start_address; + mmi_vm_record_req->stop_address = vmd_parameter->stop_address; + mmi_vm_record_req->dtx_used = vmd_parameter->dtx_used; + + switch (vmd_parameter->tone_id) + { + /* case .... + add here the parameter to generate a + tone during dedicated mode. + break; + */ + case 0: /* no tone in idle mode */ + mmi_vm_record_req->d_k_x1_t0 = 0; + mmi_vm_record_req->d_k_x1_t1 = 0; + mmi_vm_record_req->d_k_x1_t2 = 0; + mmi_vm_record_req->d_pe_rep = 0; + mmi_vm_record_req->d_pe_off = 0; + mmi_vm_record_req->d_se_off = 0; + mmi_vm_record_req->d_bu_off = 0; + mmi_vm_record_req->d_t0_on = 0; + mmi_vm_record_req->d_t0_off = 0; + mmi_vm_record_req->d_t1_on = 0; + mmi_vm_record_req->d_t1_off = 0; + mmi_vm_record_req->d_t2_on = 0; + mmi_vm_record_req->d_t2_off = 0; + break; + } + + + PSENDX (L1, mmi_vm_record_req); + + return DRV_OK; +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6103) MODULE : DRV_VMD | +| STATE : code ROUTINE : vmd_stop_voice_memo_recording | ++--------------------------------------------------------------------+ + + PURPOSE : This function is used to stop voice memo recording. + +*/ + +GLOBAL UBYTE vmd_stop_voice_memo_recording () +{ + PALLOC (mmi_vm_end_record_req, MMI_VM_END_RECORD_REQ); + + PSENDX (L1, mmi_vm_end_record_req); + + return DRV_OK; +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6103) MODULE : DRV_VMD | +| STATE : code ROUTINE : vmd_start_voice_memo_playing | ++--------------------------------------------------------------------+ + + PURPOSE : This function is used to start voice memo playing. + The needed parameters are defined in the structure + vmd_start_play_type. + +*/ + +GLOBAL UBYTE vmd_start_voice_memo_playing (vmd_start_play_type * vmd_parameter) +{ + + PALLOC (mmi_vm_play_req, MMI_VM_PLAY_REQ_V); + + /* + * copy parameters to send to layer 1 + */ + mmi_vm_play_req->start_address = vmd_parameter->start_address; + + PSENDX (L1, mmi_vm_play_req); + + return DRV_OK; +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6103) MODULE : DRV_VMD | +| STATE : code ROUTINE : vmd_stop_voice_memo_playing | ++--------------------------------------------------------------------+ + + PURPOSE : This function is used to stop voice memo playing. + +*/ + +GLOBAL UBYTE vmd_stop_voice_memo_playing () +{ + PALLOC (mmi_vm_end_play_req, MMI_VM_END_PLAY_REQ); + + PSENDX (L1, mmi_vm_end_play_req); + + return DRV_OK; +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6103) MODULE : DRV_VMD | +| STATE : code ROUTINE : vmd_start_recognition | ++--------------------------------------------------------------------+ + + PURPOSE : This function is used to a speech recognition procedure. + The needed parameters are defined in the structure + vmd_start_recognition_req_type. + +*/ + +GLOBAL UBYTE vmd_start_recognition (vmd_speech_recognition_req_type * vmd_parameter) +{ + PALLOC (mmi_sr_req, MMI_SR_REQ_V); + + /* + * copy parameters to send to layer 1 + * + * NOTE: parameter usage is not clear (missing documents) + */ + mmi_sr_req->param1 = vmd_parameter->i_speaker; + mmi_sr_req->param2 = vmd_parameter->i_action; + mmi_sr_req->param3 = vmd_parameter->i_param1; + mmi_sr_req->param4 = vmd_parameter->i_param2; + + PSENDX (L1, mmi_sr_req); + + return DRV_OK; +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6103) MODULE : DRV_VMD | +| STATE : code ROUTINE : vmd_mmi_vm_end_record_ind | ++--------------------------------------------------------------------+ + + PURPOSE : This function is called after reception of the + MMI_VM_END_RECORD_IND primitive from layer 1. + +*/ + +LOCAL void vmd_mmi_vm_end_record_ind (T_MMI_VM_END_RECORD_IND * vmd_parameter) +{ + drv_SignalID_Type signal_params; + + signal_params.SignalType = VMD_END_RECORD; + +#if defined (NEW_FRAME) + + signal_params.SignalType = 0; +//nm +// signal_params.UserData = vmd_parameter; + +#else + signal_params.SignalValue = 0; +//nm +// signal_params.UserData = vmd_parameter; +#endif + + if (vmd_signal_callback NEQ NULL) + (*vmd_signal_callback)(&signal_params); +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6103) MODULE : DRV_VMD | +| STATE : code ROUTINE : vmd_mmi_vm_end_play_ind | ++--------------------------------------------------------------------+ + + PURPOSE : This function is called after reception of the + MMI_VM_END_PLAY_IND primitive from layer 1. + +*/ + +LOCAL void vmd_mmi_vm_end_play_ind (T_MMI_VM_END_PLAY_IND * vmd_parameter) +{ + drv_SignalID_Type signal_params; + + signal_params.SignalType = VMD_END_PLAY; + +#if defined (NEW_FRAME) + signal_params.SignalType = 0; +//nm +// signal_params.UserData = vmd_parameter; + +#else + signal_params.SignalValue = 0; +//nm +// signal_params.UserData = vmd_parameter; +#endif + + if (vmd_signal_callback NEQ NULL) + (*vmd_signal_callback)(&signal_params); +} + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6103) MODULE : DRV_VMD | +| STATE : code ROUTINE : vmd_mmi_sr_ind | ++--------------------------------------------------------------------+ + + PURPOSE : This function is called after reception of the + MMI_SR_IND primitive from layer 1. + +*/ + +LOCAL void vmd_mmi_sr_end_ind (T_MMI_SR_IND_V * vmd_parameter) +{ + drv_SignalID_Type signal_params; + + signal_params.SignalType = VMD_SPEECH_RECOGNITION; + +#if defined (NEW_FRAME) + signal_params.SignalType = 0; +//nm +// signal_params.UserData = vmd_parameter; + +#else + signal_params.SignalValue = 0; +//nm +// signal_params.UserData = vmd_parameter; +#endif + + if (vmd_signal_callback NEQ NULL) + (*vmd_signal_callback)(&signal_params); +} + + +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6103) MODULE : DRV_VMD | +| STATE : code ROUTINE : vmd_primitive | ++--------------------------------------------------------------------+ + + PURPOSE : This function is called from the CST pei module after + reception of a primitive from layer 1. If it is a + VMD primitive it is distributed and the primitive is + freed, else nothing happens. + +*/ + +GLOBAL UBYTE vmd_primitive (USHORT opc, void * data) +{ + switch (opc) + { + case MMI_VM_END_RECORD_IND: + vmd_mmi_vm_end_record_ind ((T_MMI_VM_END_RECORD_IND *)data); + PFREE (data); + return TRUE; + + case MMI_VM_END_PLAY_IND: + vmd_mmi_vm_end_play_ind ((T_MMI_VM_END_PLAY_IND *)data); + PFREE (data); + return TRUE; + + case MMI_SR_IND_V: + vmd_mmi_sr_end_ind ((T_MMI_SR_IND_V *)data); + PFREE (data); + return TRUE; + + } + return FALSE; +} + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/frame/config/custcomp.c Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,39 @@ +/* ++----------------------------------------------------------------------------- +| Project : +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Component Table for GPRS ++----------------------------------------------------------------------------- +*/ + +#ifndef __CUSTCOMP_C__ +#define __CUSTCOMP_C__ +#endif + + +/*==== INCLUDES ===================================================*/ + +#include "typedefs.h" +#include "gprsconst.h" +#include "vsi.h" +#include "pei.h" +#include "frm_defs.h" +#include "frm_types.h" + +/* +const T_COMPONENT_ADDRESS ComponentTable1 = +{ NULL }; +*/ +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/frame/config/gprscomp.c Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,1841 @@ +/* ++----------------------------------------------------------------------------- +| Project : +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Component Table for GPRS ++----------------------------------------------------------------------------- +*/ + +#ifndef _TARGET_ +#define NEW_ENTITY +#endif + +/*==== INCLUDES ===================================================*/ + +#include "nucleus.h" +#include "typedefs.h" +#include "os.h" +#include "vsi.h" +#include "pei.h" +#include "gprsconst.h" +#include "frm_defs.h" +#include "frm_types.h" +#include "frm_glob.h" +#include "os_types.h" +#include "os_glob.h" +#include "gprsconst.h" +#include "chipset.cfg" +#include "rv/rv_defined_swe.h" +#include "../src/config/gsm_bsp_pool_size.h" +#include "../src/config/gsm_mm_pool_size.h" +#if (REMU==1) +#include "../sm_remu/inc/remu_internal.h" +#endif + + +/*==== CONSTANTS ==================================================*/ + + +/*==== EXTERNALS ==================================================*/ + +extern SHORT tstrcv_pei_create(T_PEI_INFO const **Info); +extern SHORT tstsnd_pei_create(T_PEI_INFO const **Info); +#if(PSP_STANDALONE==0) +extern SHORT aci_pei_create (T_PEI_INFO const **Info); +extern SHORT cst_pei_create (T_PEI_INFO const **Info); +#ifdef FF_ESIM +extern SHORT esim_pei_create (T_PEI_INFO const **Info); /* esim module */ +#endif +extern SHORT sim_pei_create (T_PEI_INFO const **Info); +extern SHORT sms_pei_create (T_PEI_INFO const **Info); +extern SHORT cc_pei_create (T_PEI_INFO const **Info); +extern SHORT sm_pei_create (T_PEI_INFO const **Info); +extern SHORT ss_pei_create (T_PEI_INFO const **Info); +extern SHORT mm_pei_create (T_PEI_INFO const **Info); +extern SHORT gmm_pei_create (T_PEI_INFO const **Info); +extern SHORT rr_pei_create (T_PEI_INFO const **Info); +extern SHORT grr_pei_create (T_PEI_INFO const **Info); +extern SHORT grlc_pei_create (T_PEI_INFO const **Info); +extern SHORT dl_pei_create (T_PEI_INFO const **Info); +extern SHORT pl_pei_create (T_PEI_INFO const **Info); +#ifdef FAX_AND_DATA +extern SHORT l2r_pei_create (T_PEI_INFO const **Info); +extern SHORT rlp_pei_create (T_PEI_INFO const **Info); +#ifdef FF_FAX +extern SHORT fad_pei_create (T_PEI_INFO const **Info); +extern SHORT t30_pei_create (T_PEI_INFO const **Info); +#endif +#endif /* FAX_AND_DATA */ +extern SHORT llc_pei_create (T_PEI_INFO const **Info); +extern SHORT sndcp_pei_create (T_PEI_INFO const **Info); +extern SHORT ppp_pei_create (T_PEI_INFO const **Info); +extern SHORT uart_pei_create (T_PEI_INFO const **Info); + +#ifdef FF_MUX +extern SHORT mux_pei_create (T_PEI_INFO const **Info); +#endif /* MUX */ + +#ifdef FF_PKTIO +extern SHORT pktio_pei_create (T_PEI_INFO const **Info); +#endif /* #ifdef FF_PKTIO */ + +#ifdef FF_PSI +extern SHORT psi_pei_create (T_PEI_INFO const **Info); +#endif + +#ifdef FF_EOTD +extern SHORT lc_pei_create (T_PEI_INFO const **Info); +extern SHORT rrlp_pei_create (T_PEI_INFO const **Info); +#endif /* FF_EOTD */ + +#ifdef CO_UDP_IP +extern SHORT udp_pei_create (T_PEI_INFO const **Info); +extern SHORT ip_pei_create (T_PEI_INFO const **Info); +#endif /* CO_UDP_IP */ + +#ifdef FF_WAP +extern SHORT wap_pei_create (T_PEI_INFO const **Info); +#endif /* FF_WAP */ + +#ifndef _TARGET_ + extern SHORT clt_pei_create (T_PEI_INFO const **Info); +#endif /* !_TARGET_ */ + +#ifdef _TARGET_ +extern SHORT l1_pei_create (T_PEI_INFO const **Info); +#ifdef FF_TCP_IP +extern SHORT aaa_pei_create (T_PEI_INFO const **Info); +#endif /* FF_TCP_IP */ +#endif /* _TARGET_ */ + + +extern SHORT upm_pei_create (T_PEI_INFO const **Info); + +#ifdef FF_GPF_TCPIP +extern SHORT tcpip_pei_create (T_PEI_INFO const **Info); +#endif /* FF_TCP_IP */ + +#if defined (CO_TCPIP_TESTAPP) || defined (CO_BAT_TESTAPP) +extern SHORT app_pei_create (T_PEI_INFO const **Info); +#endif /* CO_TCPIP_TESTAPP */ +#ifndef _TARGET_ +extern SHORT ra_pei_create (T_PEI_INFO const **Info); +#endif + +#ifndef FF_ATI_BAT + #ifdef FF_BAT +extern SHORT gdd_dio_pei_create(T_PEI_INFO const **Info); + #endif +#endif + +#ifdef BTS +/* For Bluetooth BTS */ +extern SHORT bts_pei_create(T_PEI_INFO const**p_info); +#ifdef BTW +/* For Bluetooth BTW */ +extern SHORT btw_pei_create(T_PEI_INFO const**p_info); +#endif /* BTW */ +#ifdef BTT +/* For Bluetooth Reference Applications : BTT */ +extern SHORT btt_pei_create(T_PEI_INFO const**p_info); +#endif /* BTT */ +#ifdef BTAV +/* For Bluetooth BTAV */ +extern SHORT btav_pei_create(T_PEI_INFO const**p_info); +#endif /* BTAV */ +#ifdef BTU +/* For Bluetooth BTU */ +extern SHORT btu_pei_create(T_PEI_INFO const**p_info); +#endif /* BTU */ +#ifdef FMS +extern SHORT fms_pei_create(T_PEI_INFO const* * p_info); +#endif /*FMS */ +#endif /* BTS */ +#endif + +/*==== VARIABLES ==================================================*/ + +//EF For normal Test Definition Language (TDL) TAP usage set newTstHeader = FALSE +//EF For multiple entity (TCSL) Test Case Script Lang. set newTstHeader = TRUE +#ifndef _TARGET_ + +#ifdef TDL_TAP +BOOL newTstHeader = FALSE; +#else +BOOL newTstHeader = TRUE; +#endif + +#endif + +#ifndef DATA_EXT_RAM + +const T_COMPONENT_ADDRESS tstrcv_list[] = +{ + { tstrcv_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; + +const T_COMPONENT_ADDRESS tstsnd_list[] = +{ + { tstsnd_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; + +#if(PSP_STANDALONE==0) +const T_COMPONENT_ADDRESS mmi_list[] = +{ + { aci_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; + +#ifdef FF_ESIM +const T_COMPONENT_ADDRESS esim_list[] = +{ + { esim_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +const T_COMPONENT_ADDRESS cst_list[] = +{ + { cst_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; + +const T_COMPONENT_ADDRESS sim_list[] = +{ + { sim_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; + +const T_COMPONENT_ADDRESS cm_list[] = +{ + { sms_pei_create, NULL, ASSIGNED_BY_TI }, + { cc_pei_create, NULL, ASSIGNED_BY_TI }, + { sm_pei_create, NULL, ASSIGNED_BY_TI }, + { ss_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, (int)"CM" } +}; + +const T_COMPONENT_ADDRESS mmgmm_list[] = +{ + { mm_pei_create, NULL, ASSIGNED_BY_TI }, + { gmm_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, (int)"MMGMM" } +}; + +const T_COMPONENT_ADDRESS rr_list[] = +{ + { rr_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; + +const T_COMPONENT_ADDRESS grr_list[] = +{ + { grr_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; + +const T_COMPONENT_ADDRESS grlc_list[] = +{ + { grlc_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; + +const T_COMPONENT_ADDRESS dl_list[] = +{ + { dl_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; + +const T_COMPONENT_ADDRESS pl_list[] = +{ + { pl_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; + +#ifdef FAX_AND_DATA +const T_COMPONENT_ADDRESS l2rt30_list[] = +{ + { l2r_pei_create, NULL, ASSIGNED_BY_TI }, +#ifdef FF_FAX + { t30_pei_create, NULL, ASSIGNED_BY_TI }, +#endif + { NULL, NULL, (int)"L2RT30" } +}; + +const T_COMPONENT_ADDRESS rlpfad_list[] = +{ + { rlp_pei_create, NULL, ASSIGNED_BY_TI }, +#ifdef FF_FAX + { fad_pei_create, NULL, ASSIGNED_BY_TI }, +#endif + { NULL, NULL, (int)"RLPFAD" } +}; +#endif /* FAX_AND_DATA */ + + +const T_COMPONENT_ADDRESS llc_list[] = +{ + { llc_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; + +const T_COMPONENT_ADDRESS sndcp_list[] = +{ + { sndcp_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; + +const T_COMPONENT_ADDRESS ppp_list[] = +{ + { ppp_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; + +const T_COMPONENT_ADDRESS uart_list[] = +{ + { uart_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; + +#ifdef FF_MUX +const T_COMPONENT_ADDRESS mux_list[] = +{ + { mux_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif /* MUX */ + +#ifdef FF_PKTIO +const T_COMPONENT_ADDRESS pktio_list[] = +{ + { pktio_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif /* #ifdef FF_PKTIO */ + +#ifdef FF_PSI +const T_COMPONENT_ADDRESS psi_list[] = +{ + { psi_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif /* #ifdef FF_PSI */ + +//#ifdef FF_EGPRS +const T_COMPONENT_ADDRESS upm_list[] = +{ + { upm_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +//#endif /* #ifdef FF_UPM */ + +#ifndef _TARGET_ +const T_COMPONENT_ADDRESS clt_list[] = +{ + { clt_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif /* !_TARGET_ */ + + +#ifdef FF_EOTD +const T_COMPONENT_ADDRESS eotd_list[] = +{ + { lc_pei_create, NULL, ASSIGNED_BY_TI }, + { rrlp_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, (int)"EOTD" } +}; +#endif /* FF_EOTD */ + +#ifdef FF_WAP +const T_COMPONENT_ADDRESS wap_list[] = +{ + { wap_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif /* FF_WAP */ + +#ifdef CO_UDP_IP +const T_COMPONENT_ADDRESS udp_list[] = +{ + { udp_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; + +const T_COMPONENT_ADDRESS ip_list[] = +{ + { ip_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif /* CO_UDP_IP */ + +#ifndef _TARGET_ +const T_COMPONENT_ADDRESS ra_list[] = +{ + { ra_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif /* !_TARGET_ */ + +#ifdef FF_TCP_IP +const T_COMPONENT_ADDRESS aaa_list[] = +{ +#ifdef _TARGET_ + { aaa_pei_create, NULL, ASSIGNED_BY_TI }, +#else /* _TARGET_ */ + { NULL, "AAA", ASSIGNED_BY_TI }, +#endif /* else _TARGET_ */ + { NULL, NULL, 0 } +}; +#endif /* FF_TCP_IP */ + +#ifdef FF_GPF_TCPIP +const T_COMPONENT_ADDRESS tcpip_list[] = +{ + { tcpip_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#if defined (CO_TCPIP_TESTAPP) || defined (CO_BAT_TESTAPP) +const T_COMPONENT_ADDRESS app_list[] = +{ + { app_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif /* CO_TCPIP_TESTAPP */ + +const T_COMPONENT_ADDRESS l1_list[] = +{ +#ifdef _TARGET_ + { l1_pei_create, NULL, ASSIGNED_BY_TI }, +#else + { NULL, "L1", ASSIGNED_BY_TI }, +#endif + { NULL, NULL, 0 } +}; + +#ifndef FF_ATI_BAT + #ifdef FF_BAT +const T_COMPONENT_ADDRESS gdd_dio_list[] = +{ + { gdd_dio_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; + #endif +#endif + +#ifdef BTS +/* Bluetooth sub-system */ +const T_COMPONENT_ADDRESS bts_list[] = +{ + { bts_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#ifdef BTW +/* Bluetooth Worker */ +const T_COMPONENT_ADDRESS btw_list[] = +{ + { btw_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif /* BTW */ +#ifdef BTT +/* Bluetooth Reference Applications */ +const T_COMPONENT_ADDRESS btt_list[] = +{ + { btt_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif /* BTT */ +#ifdef BTAV +/* Bluetooth AV task */ +const T_COMPONENT_ADDRESS btav_list[] = +{ + { btav_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif /* BTAV */ +#ifdef BTU +/* Bluetooth UART */ +const T_COMPONENT_ADDRESS btu_list[] = +{ + { btu_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif /* BTU */ + +#ifdef FMS +const T_COMPONENT_ADDRESS fms_list[] = +{ + { fms_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif /*FMS */ +#endif /* BTS */ +#endif + +#if (CHIPSET==15) && (REMU==1) && defined _TARGET_ + +#ifdef RVM_KPD_SWE +extern SHORT kpd_pei_create (T_PEI_INFO const **Info); +const T_COMPONENT_ADDRESS kpd_list[] = +{ + { kpd_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#if (TEST == 1) +extern SHORT rv_test_pei_create (T_PEI_INFO const **Info); + +const T_COMPONENT_ADDRESS rv_test_list[] = +{ + { rv_test_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +extern SHORT rtest_pei_create (T_PEI_INFO const **Info); + +const T_COMPONENT_ADDRESS rtest_list[] = +{ + { rtest_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_DMA_SWE +extern SHORT dma_pei_create (T_PEI_INFO const **Info); + +const T_COMPONENT_ADDRESS dma_list[] = +{ + { dma_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_R2D_SWE +extern SHORT r2d_pei_create (T_PEI_INFO const **Info); + +const T_COMPONENT_ADDRESS r2d_list[] = +{ + { r2d_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_RVT_SWE +extern SHORT rvt_pei_create (T_PEI_INFO const **Info); +const T_COMPONENT_ADDRESS rvt_list[] = +{ + { rvt_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_USB_SWE +extern SHORT usb_pei_create (T_PEI_INFO const **Info); +const T_COMPONENT_ADDRESS usb_list[] = +{ + { usb_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_USBFAX_SWE +extern SHORT usbfax_pei_create (T_PEI_INFO const **Info); +const T_COMPONENT_ADDRESS usbfax_list[] = +{ + { usbfax_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_USBMS_SWE +extern SHORT usbms_pei_create (T_PEI_INFO const **Info); +const T_COMPONENT_ADDRESS usbms_list[] = +{ + { usbms_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + + +#ifdef RVM_USBTRC_SWE +extern SHORT usbtrc_pei_create (T_PEI_INFO const **Info); +const T_COMPONENT_ADDRESS usbtrc_list[] = +{ + { usbtrc_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + + +#ifdef RVM_RTC_SWE +extern SHORT rtc_pei_create (T_PEI_INFO const **Info); +const T_COMPONENT_ADDRESS rtc_list[] = +{ + { rtc_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_ETM_SWE +extern SHORT etm_pei_create (T_PEI_INFO const **Info); + +const T_COMPONENT_ADDRESS etm_list[] = +{ + { etm_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_FFS_SWE +extern SHORT ffs_pei_create (T_PEI_INFO const **Info); + +const T_COMPONENT_ADDRESS ffs_list[] = +{ + { ffs_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_DAR_SWE +extern SHORT dar_pei_create (T_PEI_INFO const **Info); + +const T_COMPONENT_ADDRESS dar_list[] = +{ + { dar_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + + +#ifdef RVM_GBI_SWE +extern SHORT gbi_pei_create (T_PEI_INFO const **Info); + +const T_COMPONENT_ADDRESS gbi_list[] = +{ + { gbi_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_DATALIGHT_SWE +extern SHORT datalight_pei_create (T_PEI_INFO const **Info); + +const T_COMPONENT_ADDRESS datalight_list[] = +{ + { datalight_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#else +#ifdef RVM_NAN_SWE +extern SHORT nan_pei_create (T_PEI_INFO const **Info); + +const T_COMPONENT_ADDRESS nan_list[] = +{ + { nan_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_NOR_BM_SWE +extern SHORT nor_bm_pei_create (T_PEI_INFO const **Info); + +const T_COMPONENT_ADDRESS nor_bm_list[] = +{ + { nor_bm_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif +#endif + +#ifdef RVM_CAMA_SWE +extern SHORT cama_pei_create (T_PEI_INFO const **Info); + +const T_COMPONENT_ADDRESS cama_list[] = +{ + { cama_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_CAMD_SWE +extern SHORT camd_pei_create (T_PEI_INFO const **Info); + +const T_COMPONENT_ADDRESS camd_list[] = +{ + { camd_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_AUDIO_MAIN_SWE +extern SHORT audio_pei_create (T_PEI_INFO const **Info); + +const T_COMPONENT_ADDRESS audio_list[] = +{ + { audio_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_BAE_SWE +extern SHORT bae_pei_create (T_PEI_INFO const **Info); + +const T_COMPONENT_ADDRESS bae_list[] = +{ + { bae_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_AS_SWE +extern SHORT as_pei_create (T_PEI_INFO const **Info); + +const T_COMPONENT_ADDRESS as_list[] = +{ + { as_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_IMG_SWE +extern SHORT img_pei_create (T_PEI_INFO const **Info); + const T_COMPONENT_ADDRESS img_list[] = +{ + { img_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_RFS_SWE +extern SHORT rfs_pei_create (T_PEI_INFO const **Info); + const T_COMPONENT_ADDRESS rfs_list[] = +{ + { rfs_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_RFSNAND_SWE +extern SHORT rfsnand_pei_create (T_PEI_INFO const **Info); + + const T_COMPONENT_ADDRESS rfsnand_list[] = +{ + { rfsnand_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_RFSFAT_SWE +extern SHORT rfsfat_pei_create (T_PEI_INFO const **Info); + const T_COMPONENT_ADDRESS rfsfat_list[] = +{ + { rfsfat_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_MKS_SWE +extern SHORT mks_pei_create (T_PEI_INFO const **Info); + const T_COMPONENT_ADDRESS mks_list[] = +{ + { mks_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_HASH_SWE +extern SHORT hash_pei_create (T_PEI_INFO const **Info); + const T_COMPONENT_ADDRESS hash_list[] = +{ + { hash_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_CRY_SWE +extern SHORT cry_pei_create (T_PEI_INFO const **Info); + const T_COMPONENT_ADDRESS cry_list[] = +{ + { cry_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_TTY_SWE +extern SHORT tty_pei_create (T_PEI_INFO const **Info); + const T_COMPONENT_ADDRESS tty_list[] = +{ + { tty_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_LCD_SWE +extern SHORT lcd_pei_create (T_PEI_INFO const **Info); +const T_COMPONENT_ADDRESS lcd_list[] = +{ + { lcd_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#if(PSP_STANDALONE==0) +#ifdef RVM_SSL_SWE +extern SHORT ssl_pei_create (T_PEI_INFO const **Info); +const T_COMPONENT_ADDRESS ssl_list[] = +{ + { ssl_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif +#endif + +#ifdef RVM_LCC_SWE +extern SHORT lcc_pei_create (T_PEI_INFO const **Info); +const T_COMPONENT_ADDRESS lcc_list[] = +{ + { lcc_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#ifdef RVM_MC_SWE +extern SHORT mc_pei_create (T_PEI_INFO const **Info); +const T_COMPONENT_ADDRESS mc_list[] = +{ + { mc_pei_create, NULL, ASSIGNED_BY_TI }, + { NULL, NULL, 0 } +}; +#endif + +#endif //if CHIPSET == 15 and REMU == 1 + + +const T_COMPONENT_ADDRESS *ComponentTables[]= +{ + tstrcv_list, + tstsnd_list, +#if (CHIPSET==15) && (REMU==1) && defined _TARGET_ /* PSP Driver Entities. DO NOT ADD ENTIRIS IN PSP ENTITIES + SECTION THIS WILL LEAD TO SYTEM CRASH */ +#ifdef RVM_KPD_SWE + kpd_list, +#endif + +#if (TEST == 1) + rv_test_list, + rtest_list, +#endif + +#ifdef RVM_DMA_SWE + dma_list, +#endif + +#ifdef RVM_R2D_SWE + r2d_list, +#endif + +#ifdef RVM_RVT_SWE + rvt_list, +#endif + +#ifdef RVM_USB_SWE + usb_list, +#endif + +#ifdef RVM_USBFAX_SWE + usbfax_list, +#endif + +#ifdef RVM_USBMS_SWE + usbms_list, +#endif + +#ifdef RVM_USBTRC_SWE + usbtrc_list, +#endif + +#ifdef RVM_RTC_SWE + rtc_list, +#endif + +#ifdef RVM_ETM_SWE + etm_list, +#endif + +#ifdef RVM_FFS_SWE + ffs_list, +#endif +#ifdef RVM_DAR_SWE + dar_list, +#endif + +#ifdef RVM_MC_SWE +mc_list, +#endif + +#ifdef RVM_GBI_SWE + gbi_list, +#endif + +#ifdef RVM_DATALIGHT_SWE + datalight_list, +#else + +#ifdef RVM_NAN_SWE + nan_list, +#endif + +#ifdef RVM_NOR_BM_SWE + nor_bm_list, +#endif +#endif /* RVM_DATALIGHT_SWE */ + +#ifdef RVM_CAMA_SWE + cama_list, +#endif + +#ifdef RVM_CAMD_SWE + camd_list, +#endif + +#ifdef RVM_RFS_SWE + rfs_list, +#endif + +#ifdef RVM_RFSFAT_SWE + rfsfat_list, +#endif +#ifdef RVM_AUDIO_MAIN_SWE + audio_list, +#endif +#ifdef RVM_IMG_SWE + img_list, +#endif + +#ifdef RVM_RFSNAND_SWE + rfsnand_list, +#endif +#ifdef RVM_BAE_SWE + bae_list, +#endif + +#ifdef RVM_AS_SWE + as_list, +#endif +#ifdef RVM_MKS_SWE + mks_list, +#endif + +#ifdef RVM_HASH_SWE +hash_list, +#endif + +#ifdef RVM_CRY_SWE + cry_list, +#endif +#ifdef RVM_TTY_SWE +#if (L1_GTT == 1) +tty_list, +#endif +#endif + +#ifdef RVM_LCD_SWE + lcd_list, +#endif + +#ifdef RVM_LCC_SWE + lcc_list, +#endif + +#if(PSP_STANDALONE==0) +#ifdef RVM_SSL_SWE + ssl_list, +#endif +#endif + +#endif /* end (CHIPSET==15) */ +#if(PSP_STANDALONE==0) + mmi_list, + cst_list, + sim_list, +#ifdef BTS + bts_list, /* Bluetooth sub-system */ +#ifdef BTW + btw_list, /* Bluetooth worker test */ +#endif /* BTW */ +#ifdef BTT + btt_list, /* Bluetooth Reference Applications */ +#endif /* BTT */ +#ifdef BTAV + btav_list, /*Bluetooth AV task */ +#endif /* BTAV */ +#ifdef BTU + btu_list, /* Bluetooth UART */ +#endif /* BTU */ +#ifdef FMS + fms_list, +#endif /*FMS */ +#endif /* BTS */ + + cm_list, + mmgmm_list, + rr_list, + grr_list, + grlc_list, + dl_list, + pl_list, +#ifdef FAX_AND_DATA + l2rt30_list, + rlpfad_list, +#endif /* FAX_AND_DATA */ + llc_list, + sndcp_list, + ppp_list, + uart_list, +#ifdef FF_MUX + mux_list, +#endif +#ifdef FF_PKTIO + pktio_list, +#endif +#ifdef FF_PSI + psi_list, +#endif +upm_list, +#ifndef _TARGET_ + clt_list, +#endif /* !_TARGET_ */ +#ifndef FF_ATI_BAT + #ifdef FF_BAT + gdd_dio_list, + #endif /* FF_BAT */ +#endif +#ifdef FF_EOTD + eotd_list, +#endif +#ifdef FF_WAP + wap_list, +#endif + +#ifdef CO_UDP_IP + udp_list, + ip_list, +#endif +#if defined _SIMULATION_ && defined FF_FAX + ra_list, +#endif +#ifdef FF_TCP_IP + aaa_list, +#endif /* FF_TCP_IP */ + +#ifdef FF_GPF_TCPIP + tcpip_list, +#endif + +#if defined (CO_TCPIP_TESTAPP) || defined (CO_BAT_TESTAPP) + app_list, +#endif /* CO_TCPIP_TESTAPP */ + +#ifdef FF_ESIM + esim_list, /* needed for esim module */ +#endif + l1_list, +#endif + NULL +}; + +/*==== VERSIONS ===================================================*/ +#ifndef CTRACE + char * str2ind_version = "&0"; +#endif + +#endif /* DATA_EXT_RAM */ + +/*==== MEMORY CONFIGURATION =======================================*/ + +/* + * Partitions pool configuration for primitive communication + */ + +/* + * Memory extensions for multiplexer + */ +#ifdef FF_MUX +#define PRIMPOOL_0_MUX_ADDITION 30 +#define PRIMPOOL_2_MUX_ADDITION 10 +#else /* FF_MUX */ +#define PRIMPOOL_0_MUX_ADDITION 0 +#define PRIMPOOL_2_MUX_ADDITION 0 +#endif /* else FF_MUX */ + +/* + * Memory extensions for multiple PDP contexts + */ +#ifdef FF_PKTIO +#define PRIMPOOL_2_MPDP_ADDITION 30 +#else /* FF_PKTIO */ +#define PRIMPOOL_2_MPDP_ADDITION 0 +#endif /* else FF_PKTIO */ +#ifdef WIN32 +/* + * Required for testing LLC acknowledged mode. + */ +#define PRIMPOOL_0_PARTITIONS 200 +#define PRIMPOOL_1_PARTITIONS 100 +#define PRIMPOOL_2_PARTITIONS 20 +#define PRIMPOOL_3_PARTITIONS 20 + +#else /*WIN32*/ + +#define PRIMPOOL_0_PARTITIONS (190 + PRIMPOOL_0_MUX_ADDITION + 20) +#define PRIMPOOL_1_PARTITIONS 110 +#define PRIMPOOL_2_PARTITIONS ( 50 + PRIMPOOL_2_MPDP_ADDITION + PRIMPOOL_2_MUX_ADDITION + 5) +#if (DRP_FW_EXT==1) +#define PRIMPOOL_3_PARTITIONS 8 +#else +#define PRIMPOOL_3_PARTITIONS 7 +#endif +#endif /*WIN32*/ + +#define PRIM_PARTITION_0_SIZE 60 +#define PRIM_PARTITION_1_SIZE 128 +#define PRIM_PARTITION_2_SIZE 632 + +#if (CHIPSET == 15) +#define PRIM_PARTITION_3_SIZE 1764 +#else +#define PRIM_PARTITION_3_SIZE 1600 +#endif + +#ifndef DATA_INT_RAM +unsigned int MaxPrimPartSize = PRIM_PARTITION_3_SIZE; +#endif /* !DATA_INT_RAM */ + +#if (!defined DATA_EXT_RAM && defined PRIM_0_INT_RAM) || (!defined DATA_INT_RAM && !defined PRIM_0_INT_RAM) +char pool10 [ POOL_SIZE(PRIMPOOL_0_PARTITIONS,ALIGN_SIZE(PRIM_PARTITION_0_SIZE)) ]; +#else +extern char pool10 []; +#endif + +#if (!defined DATA_EXT_RAM && defined PRIM_1_INT_RAM) || (!defined DATA_INT_RAM && !defined PRIM_1_INT_RAM) +char pool11 [ POOL_SIZE(PRIMPOOL_1_PARTITIONS,ALIGN_SIZE(PRIM_PARTITION_1_SIZE)) ]; +#else +extern char pool11 []; +#endif + +#if (!defined DATA_EXT_RAM && defined PRIM_2_INT_RAM) || (!defined DATA_INT_RAM && !defined PRIM_2_INT_RAM) +char pool12 [ POOL_SIZE(PRIMPOOL_2_PARTITIONS,ALIGN_SIZE(PRIM_PARTITION_2_SIZE)) ]; +#else +extern char pool12 []; +#endif + +#if (!defined DATA_EXT_RAM && defined PRIM_3_INT_RAM) || (!defined DATA_INT_RAM && !defined PRIM_3_INT_RAM) +char pool13 [ POOL_SIZE(PRIMPOOL_3_PARTITIONS,ALIGN_SIZE(PRIM_PARTITION_3_SIZE)) ]; +#else +extern char pool13 []; +#endif + +#ifndef DATA_INT_RAM +const T_FRM_PARTITION_POOL_CONFIG prim_grp_config[] = +{ + { PRIMPOOL_0_PARTITIONS, ALIGN_SIZE(PRIM_PARTITION_0_SIZE), &pool10 }, + { PRIMPOOL_1_PARTITIONS, ALIGN_SIZE(PRIM_PARTITION_1_SIZE), &pool11 }, + { PRIMPOOL_2_PARTITIONS, ALIGN_SIZE(PRIM_PARTITION_2_SIZE), &pool12 }, + { PRIMPOOL_3_PARTITIONS, ALIGN_SIZE(PRIM_PARTITION_3_SIZE), &pool13 }, + { 0 , 0 , NULL } +}; +#endif /* !DATA_INT_RAM */ + +/* + * Partitions pool configuration for test interface communication + */ +#define TESTPOOL_0_PARTITIONS 10 +#define TESTPOOL_1_PARTITIONS 200 +#define TESTPOOL_2_PARTITIONS 2 + +#define TSTSND_QUEUE_ENTRIES (TESTPOOL_0_PARTITIONS+TESTPOOL_1_PARTITIONS+TESTPOOL_2_PARTITIONS) +#define TSTRCV_QUEUE_ENTRIES 50 + +#define TEST_PARTITION_0_SIZE 80 +#ifdef _TARGET_ + #define TEST_PARTITION_1_SIZE 160 +#else + #define TEST_PARTITION_1_SIZE 260 +#endif +#define TEST_PARTITION_2_SIZE 1600 + +#ifndef DATA_INT_RAM +const USHORT TST_SndQueueEntries = TSTSND_QUEUE_ENTRIES; +const USHORT TST_RcvQueueEntries = TSTRCV_QUEUE_ENTRIES; +const USHORT TextTracePartitionSize = TEST_PARTITION_1_SIZE; +#endif /* !DATA_INT_RAM */ + +#if (!defined DATA_EXT_RAM && defined TEST_0_INT_RAM) || (!defined DATA_INT_RAM && !defined TEST_0_INT_RAM) +char pool20 [ POOL_SIZE(TESTPOOL_0_PARTITIONS,ALIGN_SIZE(TEST_PARTITION_0_SIZE)) ]; +#else +extern char pool20 []; +#endif + +#if (!defined DATA_EXT_RAM && defined TEST_1_INT_RAM) || (!defined DATA_INT_RAM && !defined TEST_1_INT_RAM) +char pool21 [ POOL_SIZE(TESTPOOL_1_PARTITIONS,ALIGN_SIZE(TEST_PARTITION_1_SIZE)) ]; +#else +extern char pool21 []; +#endif + +#if (!defined DATA_EXT_RAM && defined TEST_2_INT_RAM) || (!defined DATA_INT_RAM && !defined TEST_2_INT_RAM) +char pool22 [ POOL_SIZE(TESTPOOL_2_PARTITIONS,ALIGN_SIZE(TEST_PARTITION_2_SIZE)) ]; +#else +extern char pool22 []; +#endif + +#ifndef DATA_INT_RAM +const T_FRM_PARTITION_POOL_CONFIG test_grp_config[] = +{ + { TESTPOOL_0_PARTITIONS, ALIGN_SIZE(TEST_PARTITION_0_SIZE), &pool20 }, + { TESTPOOL_1_PARTITIONS, ALIGN_SIZE(TEST_PARTITION_1_SIZE), &pool21 }, + { TESTPOOL_2_PARTITIONS, ALIGN_SIZE(TEST_PARTITION_2_SIZE), &pool22 }, + { 0 , 0 , NULL } +}; +#endif /* !DATA_INT_RAM */ + +/* + * Partitions pool configuration for general purpose allocation + */ + +#define DMEMPOOL_0_PARTITIONS 70 +#define DMEMPOOL_1_PARTITIONS 2 + +#define DMEM_PARTITION_0_SIZE 16 +#ifdef _TARGET_ +#define DMEM_PARTITION_1_SIZE 1600 /* for non tracing ccd arm7 */ +#else +#define DMEM_PARTITION_1_SIZE 2800 /* for non tracing ccd pc */ +#endif + +#if (!defined DATA_EXT_RAM && defined DMEM_0_INT_RAM) || (!defined DATA_INT_RAM && !defined DMEM_0_INT_RAM) +char pool30 [ POOL_SIZE(DMEMPOOL_0_PARTITIONS,ALIGN_SIZE(DMEM_PARTITION_0_SIZE)) ]; +#else +extern char pool30 []; +#endif + +#if (!defined DATA_EXT_RAM && defined DMEM_1_INT_RAM) || (!defined DATA_INT_RAM && !defined DMEM_1_INT_RAM) +char pool31 [ POOL_SIZE(DMEMPOOL_1_PARTITIONS,ALIGN_SIZE(DMEM_PARTITION_1_SIZE)) ]; +#else +extern char pool31 []; +#endif + +#ifndef DATA_INT_RAM +const T_FRM_PARTITION_POOL_CONFIG dmem_grp_config[] = +{ + { DMEMPOOL_0_PARTITIONS, ALIGN_SIZE(DMEM_PARTITION_0_SIZE), &pool30 }, + { DMEMPOOL_1_PARTITIONS, ALIGN_SIZE(DMEM_PARTITION_1_SIZE), &pool31 }, + { 0 , 0 , NULL } +}; +#endif /* !DATA_INT_RAM */ + +/* + * Partitions pool configuration for board support package (based on REMU) + */ +#if (CHIPSET==15) && (REMU==1) && (LOCOSTO_LITE==0) + +#if (BSPPOOL_0_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool40 [ POOL_SIZE(BSPPOOL_0_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_0_SIZE)) ]; +#else +extern char pool40[]; +#endif +#endif + +#if (BSPPOOL_1_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool41 [ POOL_SIZE(BSPPOOL_1_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_1_SIZE)) ]; +#else +extern char pool41[]; +#endif +#endif + +#if (BSPPOOL_2_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool42 [ POOL_SIZE(BSPPOOL_2_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_2_SIZE)) ]; +#else +extern char pool42[]; +#endif +#endif + +#if (BSPPOOL_3_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool43 [ POOL_SIZE(BSPPOOL_3_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_3_SIZE)) ]; +#else +extern char pool43[]; +#endif +#endif + +#if (BSPPOOL_4_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool44 [ POOL_SIZE(BSPPOOL_4_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_4_SIZE)) ]; +#else +extern char pool44[]; +#endif +#endif + +#if (BSPPOOL_5_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool45 [ POOL_SIZE(BSPPOOL_5_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_5_SIZE)) ]; +#else +extern char pool45[]; +#endif +#endif + +#if (BSPPOOL_6_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool46 [ POOL_SIZE(BSPPOOL_6_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_6_SIZE)) ]; +#else +extern char pool46[]; +#endif +#endif + +#if (BSPPOOL_7_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool47 [ POOL_SIZE(BSPPOOL_7_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_7_SIZE)) ]; +#else +extern char pool47[]; +#endif +#endif + +#if (BSPPOOL_8_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool48 [ POOL_SIZE(BSPPOOL_8_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_8_SIZE)) ]; +#else +extern char pool48[]; +#endif +#endif + +#if (BSPPOOL_9_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool49 [ POOL_SIZE(BSPPOOL_9_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_9_SIZE)) ]; +#else +extern char pool49[]; +#endif +#endif + +#if (BSPPOOL_10_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool50 [ POOL_SIZE(BSPPOOL_10_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_10_SIZE)) ]; +#else +extern char pool50[]; +#endif +#endif + +#if (BSPPOOL_11_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool51 [ POOL_SIZE(BSPPOOL_11_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_11_SIZE)) ]; +#else +extern char pool51[]; +#endif +#endif + +#if (BSPPOOL_12_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool52 [ POOL_SIZE(BSPPOOL_12_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_12_SIZE)) ]; +#else +extern char pool52[]; +#endif +#endif + +#if (BSPPOOL_13_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool53 [ POOL_SIZE(BSPPOOL_13_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_13_SIZE)) ]; +#else +extern char pool53[]; +#endif +#endif + +#if (BSPPOOL_14_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool54 [ POOL_SIZE(BSPPOOL_14_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_14_SIZE)) ]; +#else +extern char pool54[]; +#endif +#endif + +#if (BSPPOOL_15_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool55 [ POOL_SIZE(BSPPOOL_15_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_15_SIZE)) ]; +#else +extern char pool55[]; +#endif + #endif + +#if (BSPPOOL_16_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool56 [ POOL_SIZE(BSPPOOL_16_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_16_SIZE)) ]; + #else +extern char pool56[]; + #endif + #endif + +#if (BSPPOOL_17_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool57 [ POOL_SIZE(BSPPOOL_17_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_17_SIZE)) ]; +#else +extern char pool57[]; +#endif + #endif + + +#if (BSPPOOL_18_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool58 [ POOL_SIZE(BSPPOOL_18_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_18_SIZE)) ]; +#else +extern char pool58[]; +#endif + #endif + +#if (BSPPOOL_19_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool59 [ POOL_SIZE(BSPPOOL_19_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_19_SIZE)) ]; +#else +extern char pool59[]; +#endif + #endif + +#if (BSPPOOL_20_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool60 [ POOL_SIZE(BSPPOOL_20_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_20_SIZE)) ]; +#else +extern char pool60[]; +#endif + #endif + +#if (BSPPOOL_21_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool61 [ POOL_SIZE(BSPPOOL_21_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_21_SIZE)) ]; +#else +extern char pool61[]; +#endif + #endif + +#if (BSPPOOL_22_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool62 [ POOL_SIZE(BSPPOOL_22_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_22_SIZE)) ]; +#else +extern char pool62[]; +#endif + #endif + +#if (BSPPOOL_23_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool63 [ POOL_SIZE(BSPPOOL_23_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_23_SIZE)) ]; +#else +extern char pool63[]; +#endif + #endif + + +#if (BSPPOOL_24_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool64 [ POOL_SIZE(BSPPOOL_24_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_24_SIZE)) ]; +#else +extern char pool64[]; +#endif + #endif + + +#if (BSPPOOL_25_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool65 [ POOL_SIZE(BSPPOOL_25_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_25_SIZE)) ]; +#else +extern char pool65[]; +#endif +#endif + + +#if (BSPPOOL_26_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool66 [ POOL_SIZE(BSPPOOL_26_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_26_SIZE)) ]; +#else +extern char pool66[]; +#endif + #endif + + +#if (BSPPOOL_27_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool67 [ POOL_SIZE(BSPPOOL_27_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_27_SIZE)) ]; +#else +extern char pool67[]; +#endif + #endif + +#if (BSPPOOL_28_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) +char pool68 [ POOL_SIZE(BSPPOOL_28_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_28_SIZE)) ]; +#else +extern char pool68[]; +#endif +#endif + +#if (BSPPOOL_29_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) + char pool69 [ POOL_SIZE(BSPPOOL_29_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_29_SIZE)) ]; +#else +extern char pool69[]; +#endif +#endif + +#if (BSPPOOL_30_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) + char pool70 [ POOL_SIZE(BSPPOOL_30_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_30_SIZE)) ]; +#else +extern char pool70[]; +#endif +#endif + +#if (BSPPOOL_31_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) + char pool71 [ POOL_SIZE(BSPPOOL_31_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_31_SIZE)) ]; +#else +extern char pool71[]; +#endif +#endif + +#if (BSPPOOL_32_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) + char pool72 [ POOL_SIZE(BSPPOOL_32_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_32_SIZE)) ]; +#else +extern char pool72[]; +#endif + #endif + +#if (L1_PCM_EXTRACTION==1) +#if (BSPPOOL_32_NEW_PARTITIONS>0) +#if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) + char pool72_new [ POOL_SIZE(BSPPOOL_32_NEW_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_32_NEW_SIZE)) ]; +#else +extern char pool72_new[]; +#endif + #endif +#endif + +#if (BSPPOOL_33_PARTITIONS>0) + #if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) + char pool73_new [ POOL_SIZE(BSPPOOL_33_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_33_SIZE)) ]; + #else + extern char pool73_new[]; + #endif +#endif + +/*Added for camd snapshot in RTEST*/ +#if (BSPPOOL_34_PARTITIONS>0) + #if (!defined DATA_EXT_RAM && defined BSP_26_INT_RAM) || (!defined DATA_INT_RAM && !defined BSP_26_INT_RAM) + char pool74_new [ POOL_SIZE(BSPPOOL_34_PARTITIONS,ALIGN_SIZE(BSP_PARTITION_34_SIZE)) ]; + #else + extern char pool74_new[]; + #endif +#endif + +#ifndef DATA_INT_RAM +const T_FRM_PARTITION_POOL_CONFIG bsp_grp_config[] = +{ +#if (BSPPOOL_0_PARTITIONS>0) + {BSPPOOL_0_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_0_SIZE), &pool40 }, +#endif +#if (BSPPOOL_1_PARTITIONS>0) + { BSPPOOL_1_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_1_SIZE), &pool41 }, +#endif +#if (BSPPOOL_2_PARTITIONS>0) + { BSPPOOL_2_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_2_SIZE), &pool42 }, +#endif +#if (BSPPOOL_3_PARTITIONS>0) + { BSPPOOL_3_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_3_SIZE), &pool43 }, +#endif +#if (BSPPOOL_4_PARTITIONS>0) + { BSPPOOL_4_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_4_SIZE), &pool44 }, +#endif +#if (BSPPOOL_5_PARTITIONS>0) + { BSPPOOL_5_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_5_SIZE), &pool45 }, +#endif +#if (BSPPOOL_6_PARTITIONS>0) + { BSPPOOL_6_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_6_SIZE), &pool46 }, +#endif +#if (BSPPOOL_7_PARTITIONS>0) + { BSPPOOL_7_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_7_SIZE), &pool47 }, +#endif +#if (BSPPOOL_8_PARTITIONS>0) + { BSPPOOL_8_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_8_SIZE), &pool48 }, +#endif +#if (BSPPOOL_9_PARTITIONS>0) + { BSPPOOL_9_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_9_SIZE), &pool49 }, +#endif +#if (BSPPOOL_10_PARTITIONS>0) + { BSPPOOL_10_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_10_SIZE), &pool50 }, +#endif +#if (BSPPOOL_11_PARTITIONS>0) + { BSPPOOL_11_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_11_SIZE), &pool51 }, +#endif +#if (BSPPOOL_12_PARTITIONS>0) + { BSPPOOL_12_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_12_SIZE), &pool52 }, +#endif +#if (BSPPOOL_13_PARTITIONS>0) + { BSPPOOL_13_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_13_SIZE), &pool53 }, +#endif +#if (BSPPOOL_14_PARTITIONS>0) + { BSPPOOL_14_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_14_SIZE), &pool54 }, +#endif +#if (BSPPOOL_15_PARTITIONS>0) + { BSPPOOL_15_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_15_SIZE), &pool55 }, +#endif +#if (BSPPOOL_16_PARTITIONS>0) + { BSPPOOL_16_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_16_SIZE), &pool56 }, +#endif +#if (BSPPOOL_17_PARTITIONS>0) + { BSPPOOL_17_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_17_SIZE), &pool57 }, +#endif +#if (BSPPOOL_18_PARTITIONS>0) + { BSPPOOL_18_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_18_SIZE), &pool58 }, +#endif +#if (BSPPOOL_19_PARTITIONS>0) + { BSPPOOL_19_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_19_SIZE), &pool59 }, +#endif +#if (BSPPOOL_20_PARTITIONS>0) + { BSPPOOL_20_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_20_SIZE), &pool60 }, +#endif +#if (BSPPOOL_21_PARTITIONS>0) + { BSPPOOL_21_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_21_SIZE), &pool61 }, +#endif +#if (BSPPOOL_22_PARTITIONS>0) + { BSPPOOL_22_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_22_SIZE), &pool62 }, +#endif +#if (BSPPOOL_23_PARTITIONS>0) + { BSPPOOL_23_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_23_SIZE), &pool63 }, +#endif +#if (BSPPOOL_24_PARTITIONS>0) + { BSPPOOL_24_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_24_SIZE), &pool64 }, +#endif +#if (BSPPOOL_25_PARTITIONS>0) + { BSPPOOL_25_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_25_SIZE), &pool65 }, +#endif +#if (BSPPOOL_26_PARTITIONS>0) + { BSPPOOL_26_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_26_SIZE), &pool66 }, +#endif +#if (BSPPOOL_27_PARTITIONS>0) + { BSPPOOL_27_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_27_SIZE), &pool67 }, +#endif +#if (BSPPOOL_28_PARTITIONS>0) + { BSPPOOL_28_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_28_SIZE), &pool68 }, +#endif +#if (BSPPOOL_29_PARTITIONS>0) + { BSPPOOL_29_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_29_SIZE), &pool69 }, +#endif +#if (BSPPOOL_30_PARTITIONS>0) + + { BSPPOOL_30_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_30_SIZE), &pool70 }, +#endif +#if (BSPPOOL_31_PARTITIONS>0) + { BSPPOOL_31_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_31_SIZE), &pool71 }, +#endif +#if (BSPPOOL_32_PARTITIONS>0) + { BSPPOOL_32_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_32_SIZE), &pool72 }, +#endif +#if (L1_PCM_EXTRACTION==1) +#if (BSPPOOL_32_NEW_PARTITIONS>0) + { BSPPOOL_32_NEW_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_32_NEW_SIZE), &pool72_new }, +#endif +#endif +#if (BSPPOOL_33_PARTITIONS>0) + { BSPPOOL_33_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_33_SIZE), &pool73_new }, +#endif +#if (BSPPOOL_34_PARTITIONS>0) + { BSPPOOL_34_PARTITIONS, ALIGN_SIZE(BSP_PARTITION_34_SIZE), &pool74_new }, +#endif + + { 0 , 0 , NULL } +}; +/* Moved the defn of GSPTaskIdTable from REMU library to here so that size of this table will vary depending + on LITE or PLUS build. Adding a buffer of 5 to ensure that remu task id will not exceed size of GSPTaskIdTable. + Note that all the REMU entities should be immediately after tst snd and tst rcv task in ComponentTables list. + Otherwise GSPTaskIdTable will overflow which will lead to system crash */ +T_GSP_RT_ADDR_ID_DATA* GSPTaskIdTable[MAX_REMU_ENTITIES+5]; + +#endif /* !DATA_INT_RAM */ +#endif /* end CHIPSET==15*/ + + + +/* + * Partitions group list + */ + +extern T_HANDLE PrimGroupHandle; +extern T_HANDLE DmemGroupHandle; +extern T_HANDLE TestGroupHandle; +#if (CHIPSET==15) && (REMU==1) && defined _TARGET_ +#if (LOCOSTO_LITE==0) +extern T_HANDLE BspGroupHandle; +extern T_HANDLE BspIntGroupHandle; +extern T_FRM_PARTITION_POOL_CONFIG bsp_int_grp_config[]; +#endif +extern T_HANDLE BspGroupHandle; +extern T_HANDLE BspRvtGroupHandle; +#endif + +#ifndef DATA_INT_RAM +const T_FRM_PARTITION_GROUP_CONFIG partition_grp_config[MAX_POOL_GROUPS+1] = +{ + { "PRIM", &prim_grp_config[0] }, + { "TEST", &test_grp_config[0] }, + { "DMEM", &dmem_grp_config[0] }, +#if (CHIPSET==15) && (REMU==1) && defined _TARGET_ + { "BEXT", &bsp_grp_config[0] }, +#if (LOCOSTO_LITE==0) + { "BINT", & bsp_int_grp_config[0] }, +#endif +#endif + { NULL, NULL } +}; + +T_HANDLE *PoolGroupHandle[MAX_POOL_GROUPS+1] = +{ + &PrimGroupHandle, + &TestGroupHandle, + &DmemGroupHandle, +#if (CHIPSET==15) && (REMU==1) && defined _TARGET_ + &BspGroupHandle, +#if (LOCOSTO_LITE==0) + &BspIntGroupHandle, +#endif +#endif + NULL +}; +#endif /* !DATA_INT_RAM */ + +/* + * Dynamic Memory Pool Configuration + */ + +#ifdef _TARGET_ +#ifdef FF_ESIM + #define EXT_DATA_POOL_PS_BASE_SIZE 45000 +#else +#define EXT_DATA_POOL_PS_BASE_SIZE 52000 /* L23 task stacks movement to external RAM: OMAPS00122070 */ +#endif +#define INT_DATA_POOL_PS_BASE_SIZE 8012 +#else /* _TARGET_ */ +#define EXT_DATA_POOL_TCPIP_ADDTIION 120000 +#define EXT_DATA_POOL_PS_BASE_SIZE 80000 + EXT_DATA_POOL_TCPIP_ADDTIION +#define INT_DATA_POOL_PS_BASE_SIZE 1000 +#endif /* _TARGET_ */ + +#ifdef MEMORY_SUPERVISION + #define EXT_DATA_POOL_PPS_ADDITION ((EXT_DATA_POOL_PS_BASE_SIZE>>3)+25000) + #define INT_DATA_POOL_PPS_ADDITION ((INT_DATA_POOL_PS_BASE_SIZE>>3)) +#else /* MEMORY_SUPERVISION */ + #define EXT_DATA_POOL_PPS_ADDITION 0 + #define INT_DATA_POOL_PPS_ADDITION 0 +#endif /* MEMORY_SUPERVISION */ + +#if defined (FF_WAP) || defined (FF_SAT_E) + #define EXT_DATA_POOL_WAP_ADDITION 15000 +#else + #define EXT_DATA_POOL_WAP_ADDITION 0 +#endif /* FF_WAP OR SAT E */ + +#ifdef GRR_PPC_IF_PRIM + #define INT_DATA_POOL_GRR_PPC_IF_PRIM_ADDITION 3000 +#else /* #ifdef GRR_PPC_IF_PRIM */ + #define INT_DATA_POOL_GRR_PPC_IF_PRIM_ADDITION 0 +#endif /* #ifdef GRR_PPC_IF_PRIM */ + +#ifdef BTU + #define EXT_DATA_POOL_BTU_ADDITION 2000 +#else + #define EXT_DATA_POOL_BTU_ADDITION 0 +#endif + +#define EXT_DATA_POOL_PS_SIZE (EXT_DATA_POOL_PS_BASE_SIZE + EXT_DATA_POOL_WAP_ADDITION + EXT_DATA_POOL_PPS_ADDITION+EXT_DATA_POOL_BTU_ADDITION) +#define INT_DATA_POOL_PS_SIZE (INT_DATA_POOL_PS_BASE_SIZE + INT_DATA_POOL_GRR_PPC_IF_PRIM_ADDITION + INT_DATA_POOL_PPS_ADDITION) + +#define EXT_DATA_POOL_GPF_SIZE (2048 + OS_QUEUE_ENTRY_SIZE(TSTSND_QUEUE_ENTRIES) + OS_QUEUE_ENTRY_SIZE(TSTRCV_QUEUE_ENTRIES)) + +#define EXT_DATA_POOL_SIZE (EXT_DATA_POOL_PS_SIZE + EXT_DATA_POOL_GPF_SIZE + EXT_DATA_POOL_BSP_SIZE + EXT_DATA_POOL_MM_SIZE) +#define INT_DATA_POOL_SIZE (INT_DATA_POOL_PS_SIZE+INT_DATA_POOL_BSP_SIZE+INT_DATA_POOL_MM_SIZE+1000) + +#if(PSP_STANDALONE == 1) +#define MM_EXT_DATA_POOL_SIZE (1) +#define MM_INT_DATA_POOL_SIZE (1) +#endif + +#ifndef DATA_INT_RAM +char ext_data_pool [ EXT_DATA_POOL_SIZE ]; +char mm_ext_data_pool [MM_EXT_DATA_POOL_SIZE]; + +#if (REMU==1) +#ifdef _TARGET_ + char rvt_data_pool [ EXT_RVT_DATA_POOL_BSP_SIZE ]; +#endif +#endif +GLOBAL T_HANDLE mm_ext_data_pool_handle; +GLOBAL T_HANDLE mm_int_data_pool_handle; +#endif /*DATA_INT_RAM*/ + +#ifndef DATA_EXT_RAM +char int_data_pool [ INT_DATA_POOL_SIZE ]; +char mm_int_data_pool [MM_INT_DATA_POOL_SIZE]; +#else +extern char int_data_pool [ ]; +extern char mm_int_data_pool []; +#endif +#ifndef DATA_INT_RAM + +const T_MEMORY_POOL_CONFIG memory_pool_config[MAX_MEMORY_POOLS+1] = +{ + { "INTPOOL", INT_DATA_POOL_SIZE, &int_data_pool[0] }, + { "EXTPOOL", EXT_DATA_POOL_SIZE, &ext_data_pool[0] }, + { "MMEPOOL", MM_EXT_DATA_POOL_SIZE, &mm_ext_data_pool[0] }, + { "MMIPOOL", MM_INT_DATA_POOL_SIZE, &mm_int_data_pool[0] }, +#if (REMU==1) +#ifdef _TARGET_ + { "RVTPOOL", EXT_RVT_DATA_POOL_BSP_SIZE, &rvt_data_pool[0] }, +#endif +#endif + { NULL } +}; + +extern T_HANDLE ext_data_pool_handle; +extern T_HANDLE int_data_pool_handle; +extern T_HANDLE rvt_data_pool_handle; + +T_HANDLE *MemoryPoolHandle[MAX_MEMORY_POOLS+1] = +{ + &int_data_pool_handle, + &ext_data_pool_handle, + &mm_ext_data_pool_handle, + &mm_int_data_pool_handle, +#if (REMU==1) +#ifdef _TARGET_ + &rvt_data_pool_handle, +#endif +#endif + NULL +}; + +#endif /* !DATA_INT_RAM */ + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/frame/config/gprsconst.h Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,122 @@ +/* ++----------------------------------------------------------------------------- +| Project : +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Constants to determine the dimensions of the frame ++----------------------------------------------------------------------------- +*/ + +#ifndef GPRSCONST_H +#define GPRSCONST_H +#include "chipset.cfg" +#include "swconfig.cfg" + +#ifdef MAX_EVENT_GROUPS +#undef MAX_EVENT_GROUPS +#endif + +#if (CHIPSET==15) && (REMU==1) +#if (LOCOSTO_LITE==1) +#define MAX_REMU_SIMULTANEOUS_TIMER 15 +#define MAX_REMU_ENTITIES 15 +#define MAX_REMU_OS_TASKS 15 +#define MAX_REMU_SEMAPHORES 15 +#define MAX_REMU_EVENT_GROUPS 15 +#else +#define MAX_REMU_SIMULTANEOUS_TIMER 30 +#define MAX_REMU_ENTITIES 30 +#define MAX_REMU_OS_TASKS 30 +#if (RELIANCE_FS==1) +#if ((DATALIGHT_NOR==1) && (DATALIGHT_NAND==1)) +#define MAX_REMU_SEMAPHORES 90 +#else +#define MAX_REMU_SEMAPHORES 75 +#endif +#else +#define MAX_REMU_SEMAPHORES 55 +#endif +#define MAX_REMU_EVENT_GROUPS 30 +#endif +#define MAX_EVENT_GROUPS ( MAX_REMU_ENTITIES + 5 ) +#else +#define MAX_REMU_SIMULTANEOUS_TIMER 0 +#define MAX_REMU_ENTITIES 0 +#define MAX_REMU_OS_TASKS 0 +#define MAX_REMU_SEMAPHORES 0 +#define MAX_REMU_EVENT_GROUPS 0 +#define MAX_EVENT_GROUPS 0 +#endif + + + +#ifdef BTS /* BTU is included */ + #ifdef BTT /* BTAV is included */ + #ifdef FMS + #define BT_ADAPTER_ADD_ENTITIES 9 + #define BT_ADAPTER_ADD_OS_TASKS 9 + #define BT_ADAPTER_ADD_SEMAPHORES 10 + #else + #define BT_ADAPTER_ADD_ENTITIES 8 + #define BT_ADAPTER_ADD_OS_TASKS 8 + #define BT_ADAPTER_ADD_SEMAPHORES 9 + #endif + #else + #define BT_ADAPTER_ADD_ENTITIES 6 + #define BT_ADAPTER_ADD_OS_TASKS 6 + #define BT_ADAPTER_ADD_SEMAPHORES 2 + #endif +#else +#define BT_ADAPTER_ADD_ENTITIES 3 +#define BT_ADAPTER_ADD_OS_TASKS 3 +#define BT_ADAPTER_ADD_SEMAPHORES 0 +#endif + + + +/*==== CONSTANTS ============================================================*/ + +#define MAX_TIMER 231 +#define MAX_SIMULTANEOUS_TIMER (50 + MAX_REMU_SIMULTANEOUS_TIMER) + + +#ifdef FF_BAT /* with GDD_DIO entity */ +#if(PSP_STANDALONE==0) +#define MAX_ENTITIES (39 + MAX_REMU_ENTITIES + BT_ADAPTER_ADD_ENTITIES) +#define MAX_OS_TASKS (33 + MAX_REMU_OS_TASKS + BT_ADAPTER_ADD_OS_TASKS) +#else +#define MAX_ENTITIES (2 + MAX_REMU_ENTITIES + 0) +#define MAX_OS_TASKS (2 + MAX_REMU_OS_TASKS + 0) +#endif +#define MAX_SEMAPHORES (14+ MAX_REMU_SEMAPHORES + BT_ADAPTER_ADD_SEMAPHORES) +#else +#if(PSP_STANDALONE==0) +#define MAX_ENTITIES (38 + MAX_REMU_ENTITIES + BT_ADAPTER_ADD_ENTITIES) +#define MAX_OS_TASKS (32 + MAX_REMU_OS_TASKS + BT_ADAPTER_ADD_OS_TASKS) +#else +#define MAX_ENTITIES (2 + MAX_REMU_ENTITIES + 0) +#define MAX_OS_TASKS (2 + MAX_REMU_OS_TASKS + 0) +#endif +#define MAX_SEMAPHORES (13 + MAX_REMU_SEMAPHORES + BT_ADAPTER_ADD_SEMAPHORES) +#endif /* FF_BAT */ + +#define MAX_OSISRS 0 +#define MAX_COMMUNICATIONS MAX_OS_TASKS +#define MAX_POOL_GROUPS 7 +#define MAX_MEMORY_POOLS 7 + +#endif /* GPRSCONST_H */ + + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/frame/config/gprsdrv.c Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,117 @@ +/* ++----------------------------------------------------------------------------- +| Project : +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Driver Table for GPRS ++----------------------------------------------------------------------------- +*/ + +#ifndef __GPRSDRV_C__ +#define __GPRSDRV_C__ +#endif + +#ifndef _TARGET_ +#define NEW_ENTITY +#endif + +#ifdef _TARGET_ + #ifdef FF_TRACE_OVER_MTST + #define MTST_TRACE + #else + #define TI_TRACE + #endif +#endif + +#include "gdi.h" +#include "vsi.h" +#include "pei.h" +#include "gprsconst.h" +#include "frm_defs.h" +#include "frm_types.h" + +/*==== TYPES ======================================================*/ + + +/*==== CONSTANTS ==================================================*/ + +#if defined _TARGET_ && !defined PCON + #define TR_RCV_BUF_SIZE 1024 +#else + #define TR_RCV_BUF_SIZE 1024 +#endif + +#define TR_MAX_IND (TR_RCV_BUF_SIZE-1) + +/*==== EXTERNALS ==================================================*/ + +#ifdef TI_TRACE +extern USHORT TIF_Init ( USHORT DrvHandle, T_DRV_CB_FUNC CallbackFunc, + T_DRV_EXPORT const **DrvInfo ); +extern USHORT TR_Init ( USHORT DrvHandle, T_DRV_CB_FUNC CallbackFunc, + T_DRV_EXPORT const **DrvInfo ); +extern USHORT TITRC_Init ( USHORT DrvHandle, T_DRV_CB_FUNC CallbackFunc, + T_DRV_EXPORT const **DrvInfo ); +#else +extern USHORT TIF_Init ( USHORT DrvHandle, T_DRV_CB_FUNC CallbackFunc, + T_DRV_EXPORT const **DrvInfo ); +extern USHORT TR_Init ( USHORT DrvHandle, T_DRV_CB_FUNC CallbackFunc, + T_DRV_EXPORT const **DrvInfo ); +extern USHORT SER_Init ( USHORT DrvHandle, T_DRV_CB_FUNC CallbackFunc, + T_DRV_EXPORT const **DrvInfo ); +#endif +extern USHORT mux_Init ( USHORT DrvHandle, T_DRV_CB_FUNC CallbackFunc, + T_DRV_EXPORT const **DrvInfo ); +/*==== VARIABLES ==================================================*/ + +ULONG TR_RcvBufferSize = TR_RCV_BUF_SIZE; +ULONG TR_MaxInd = TR_MAX_IND; + +const T_DRV_LIST_ENTRY DrvList[] = +{ + { NULL, NULL, NULL, NULL }, +#ifdef TI_TRACE + #if defined _TARGET_ + { "TIF", TIF_Init, "RCV", NULL }, + #else + { "TIF", TIF_Init, "RCV", "ENABLE_PCON" }, + #endif + { "TR", TR_Init, NULL, NULL }, + { "TITRC",TITRC_Init, NULL, "" }, +#else + #ifdef MTST_TRACE + #if defined _TARGET_ + { "TIF", TIF_Init, "RCV", NULL }, + #else + { "TIF", TIF_Init, "RCV", "ENABLE_PCON" }, + #endif + { "TR", TR_Init, NULL, NULL }, + { "MUX", mux_Init, NULL, "" }, + #else + #if defined _TARGET_ + { "TIF", TIF_Init, "RCV", NULL }, + #else + { "TIF", TIF_Init, "RCV", "ENABLE_PCON" }, + #endif + { "TR", TR_Init, NULL, NULL }, + { "SER", SER_Init, NULL, "" }, + #endif +#endif + { NULL, NULL, NULL, NULL } +}; + +int vsi_o_trace (char *caller, ULONG tclass, char *text,...) +{ + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/condat3/frame/config/gprsinit.c Tue Sep 27 21:25:36 2016 +0000 @@ -0,0 +1,144 @@ +/* ++----------------------------------------------------------------------------- +| Project : +| Modul : ++----------------------------------------------------------------------------- +| Copyright 2002 Texas Instruments Berlin, AG +| All rights reserved. +| +| This file is confidential and a trade secret of Texas +| Instruments Berlin, AG +| The receipt of or possession of this file does not convey +| any rights to reproduce or disclose its contents or to +| manufacture, use, or sell anything it may describe, in +| whole, or in part, without the specific written consent of +| Texas Instruments Berlin, AG. ++----------------------------------------------------------------------------- +| Purpose : Nucleus Entry Function Application_Initialize() ++----------------------------------------------------------------------------- +*/ + +#ifndef _TARGET_ +#define NEW_ENTITY +#endif + +/*==== INCLUDES ===================================================*/ + +#ifdef _TARGET_ + #include "uart/serialswitch.h" +#endif + +#include "nucleus.h" +#include "typedefs.h" +#include "os.h" +#include "vsi.h" +#include "os_types.h" +#include "pcon.h" +#include "p_mem.h" + +/*==== CONSTANTS ==================================================*/ + +/*==== TYPES ======================================================*/ + +/*==== EXTERMALS ==================================================*/ + +#ifndef _TARGET_ +extern void GpInitTarget (void); +extern void Cust_Init_Layer1 (void); +extern void GpUnmaskInterrupts (void); +extern void GpInitExternalDevices (void); +#endif + +/*==== PROTOTYPES =================================================*/ + +short StartFrame (void); + +/*==== VARIABLES ==================================================*/ + +#ifndef _TARGET_ +extern T_PCON_PROPERTIES pcon_export; +T_PCON_PROPERTIES *pcon = &pcon_export; +#else +T_PCON_PROPERTIES *pcon = NULL; +#endif + +T_MEM_PROPERTIES *mem = NULL; + +/*==== FUNCTIONS ==================================================*/ + +#ifdef _TARGET_ + +void DummyCallback ( void ) +{ +} + +#endif +/* ++--------------------------------------------------------------------+ +| PROJECT : GSM-PS (6147) MODULE : GPRSINIT | +| STATE : code ROUTINE : Application_Initialize | ++--------------------------------------------------------------------+ + + PURPOSE : Main entry function for NUCLEUS + +*/ +/* + * NOTE: Application_Initalize() must not be used when compiling for target, + * because it is already defined in a TI lib (as of TI 5.1.1). + */ +#ifndef _TARGET_ +void Application_Initialize (void *first_available_memory) +{ + +#ifdef _TARGET_ + GpInitTarget (); + Cust_Init_Layer1 (); + GpInitExternalDevices (); + SER_tr_Init ( 0, 2, DummyCallback ); +#endif + + StartFrame(); + +#ifdef _TARGET_ + GpUnmaskInterrupts (); +#endif +} +#endif /* !_TARGET_ */ + +/* ++----------------------------------------------------------------------+ +| PROJECT : xxx MODULE : GPRSINIT | +| STATE : code ROUTINE : InitializeApplication | ++----------------------------------------------------------------------+ + + PURPOSE : General initialization function to be filled with + application specific initializations. Function is + called by the frame after creation of all tasks + prior to the starting of the tasks. + +*/ +void InitializeApplication ( void ) +{ + /* + * It has to defined if the allocated partition memory shall be + * initialized with a dedicated pattern. Select + * ENABLE_PARTITON_INIT or DISABLE_PARTITON_INIT + * and a pattern to be used for initialization + */ +#ifdef _TARGET_ + vsi_m_init ( DISABLE_PARTITON_INIT, (char)0x00 ); +#else + vsi_m_init ( ENABLE_PARTITON_INIT, (char)0x00 ); +#endif + +#ifdef _TARGET_ + /* + * The RTOS tick has to be set.Currently it can be set to + * SYSTEM_TICK_TDMA_FRAME for the TDMA frame system tick of 4.615ms + * or + * SYSTEM_TICK_10_MS for the 10ms tick used for UMTS + */ + os_set_tick ( SYSTEM_TICK_TDMA_FRAME ); +#endif +} +