rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 1 | /***************************************************************************** |
| 2 | * Copyright Statement: |
| 3 | * -------------------- |
| 4 | * This software is protected by Copyright and the information contained |
| 5 | * herein is confidential. The software may not be copied and the information |
| 6 | * contained herein may not be used or disclosed except with the written |
| 7 | * permission of MediaTek Inc. (C) 2005 |
| 8 | * |
| 9 | * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES |
| 10 | * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") |
| 11 | * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON |
| 12 | * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, |
| 13 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF |
| 14 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. |
| 15 | * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE |
| 16 | * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR |
| 17 | * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH |
| 18 | * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO |
| 19 | * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S |
| 20 | * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. |
| 21 | * |
| 22 | * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE |
| 23 | * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, |
| 24 | * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, |
| 25 | * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO |
| 26 | * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. |
| 27 | * |
| 28 | * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE |
| 29 | * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF |
| 30 | * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND |
| 31 | * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER |
| 32 | * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). |
| 33 | * |
| 34 | *****************************************************************************/ |
| 35 | |
| 36 | /******************************************************************************* |
| 37 | * Filename: |
| 38 | * --------- |
| 39 | * rmmi_context.h |
| 40 | * |
| 41 | * Project: |
| 42 | * -------- |
| 43 | * MT6208 |
| 44 | * |
| 45 | * Description: |
| 46 | * ------------ |
| 47 | * This file is intends for �K. |
| 48 | * |
| 49 | * Author: |
| 50 | * ------- |
| 51 | * ------- |
| 52 | * |
| 53 | *******************************************************************************/ |
| 54 | |
| 55 | /******************************************************************************** |
| 56 | * Copyright Statement: |
| 57 | * -------------------- |
| 58 | * |
| 59 | * This product has been developed using a protocol stack |
| 60 | * developed by Sasken Communication Technologies Limited. |
| 61 | * |
| 62 | ********************************************************************************/ |
| 63 | |
| 64 | #ifndef _RMMI_CONTEXT_H |
| 65 | #define _RMMI_CONTEXT_H |
| 66 | |
| 67 | #include "l4c_common_enum.h" |
| 68 | |
| 69 | |
| 70 | #include "ps2sat_struct.h" |
| 71 | #include "ps_public_struct.h" |
| 72 | #include "l3_inc_enums.h" |
| 73 | #include "as2l4c_struct.h" |
| 74 | #include "rmmi_common_enum.h" |
| 75 | #include "fs_type.h" |
| 76 | |
| 77 | #include "kal_general_types.h" |
| 78 | #include "cmux_vp_num.h" |
| 79 | #include "ps_public_enum.h" |
| 80 | #include "kal_public_api.h" |
| 81 | |
| 82 | #include "l4c2phb_struct.h" |
| 83 | #include "l4c_aux_struct.h" |
| 84 | |
| 85 | #include "med_struct.h" |
| 86 | #include "l4crac_enums.h" |
| 87 | |
| 88 | #include "sim_public_enum.h" |
| 89 | #include "rmmi_struct.h" |
| 90 | #include "smu_common_enums.h" |
| 91 | #include "kal_public_defs.h" |
| 92 | #include "c2k_irat_msg_struct.h" |
| 93 | |
| 94 | /* CONSTANTS */ |
| 95 | |
| 96 | #define NULL_TERM '\0' /* string termination */ |
| 97 | #define INVALID_ENUM 255 /* invalid enum value */ |
| 98 | |
| 99 | #define RMMI_PTR rmmi_ptr_g |
| 100 | #define RMMI_COMM_PTR rmmi_common_ptr_g |
| 101 | |
| 102 | #define rmmi_skip_spaces(source_string_ptr) \ |
| 103 | while( source_string_ptr->string_ptr[ source_string_ptr->index ] \ |
| 104 | == RMMI_SPACE ) \ |
| 105 | { \ |
| 106 | source_string_ptr->index++; \ |
| 107 | } |
| 108 | //030617 mtk00468 add for skip unused character before character a |
| 109 | #define rmmi_skip_none_a(source_string_ptr, length) \ |
| 110 | while( (source_string_ptr->index < length) && !((source_string_ptr->string_ptr[ source_string_ptr->index ] == RMMI_CHAR_A) ||\ |
| 111 | (source_string_ptr->string_ptr[ source_string_ptr->index ] == rmmi_char_a)) ) \ |
| 112 | { \ |
| 113 | source_string_ptr->index++; \ |
| 114 | } |
| 115 | |
| 116 | #define RMMI_IS_LOWER( alpha_char ) \ |
| 117 | ( ( (alpha_char >= rmmi_char_a) && (alpha_char <= rmmi_char_z) ) ? 1 : 0 ) |
| 118 | |
| 119 | #define RMMI_IS_UPPER( alpha_char ) \ |
| 120 | ( ( (alpha_char >= RMMI_CHAR_A) && (alpha_char <= RMMI_CHAR_Z) ) ? 1 : 0 ) |
| 121 | |
| 122 | #define RMMI_IS_HEX_ALPHA( alpha_char ) \ |
| 123 | ( ( (alpha_char >= RMMI_CHAR_A) && (alpha_char <= RMMI_CHAR_F) ) ? 1 : 0 ) |
| 124 | |
| 125 | #define RMMI_IS_HEX_ALPHA_CASE_INSENSITIVE( alpha_char ) \ |
| 126 | ( ( ((alpha_char >= RMMI_CHAR_A) && (alpha_char <= RMMI_CHAR_F)) || ((alpha_char >= rmmi_char_a) && (alpha_char <= rmmi_char_f)) ) ? 1 : 0 ) |
| 127 | |
| 128 | #define RMMI_IS_NUMBER( alpha_char ) \ |
| 129 | ( ( (alpha_char >= RMMI_CHAR_0) && (alpha_char <= RMMI_CHAR_9) ) ? 1 : 0 ) |
| 130 | |
| 131 | #define RMMI_IS_ALPHA( alpha_char ) \ |
| 132 | ( ( RMMI_IS_UPPER(alpha_char) || RMMI_IS_LOWER(alpha_char) ) ? 1 : 0 ) |
| 133 | |
| 134 | #define RMMI_IS_SYMBOL( alpha_char ) \ |
| 135 | ( ( (alpha_char == RMMI_CHAR_PLUS) || (alpha_char == RMMI_CHAR_STAR) || \ |
| 136 | (alpha_char == RMMI_CHAR_POUND) || (alpha_char == RMMI_COMMA) || \ |
| 137 | (alpha_char == RMMI_CHAR_DOT) || (alpha_char == RMMI_FORWARD_SLASH) || \ |
| 138 | (alpha_char == RMMI_COLON) || (alpha_char == RMMI_HAT) || \ |
| 139 | (alpha_char == RMMI_CHAR_MINUS) || \ |
| 140 | (alpha_char == RMMI_L_SQ_BRACKET) || \ |
| 141 | (alpha_char == RMMI_R_SQ_BRACKET) || \ |
| 142 | (alpha_char == RMMI_L_ANGLE_BRACKET) || \ |
| 143 | (alpha_char == RMMI_CHAR_ULINE) || \ |
| 144 | (alpha_char == RMMI_SPACE) || \ |
| 145 | (alpha_char == RMMI_SEMICOLON) || \ |
| 146 | (alpha_char == RMMI_R_ANGLE_BRACKET) \ |
| 147 | ) ? 1 : 0 ) |
| 148 | |
| 149 | #define RMMI_IS_EXT_CHAR( alpha_char ) \ |
| 150 | (((alpha_char == RMMI_HAT)||(alpha_char == RMMI_CHAR_TILDE)||(alpha_char == RMMI_EURO)||\ |
| 151 | (alpha_char == RMMI_L_SQ_BRACKET) || (alpha_char == RMMI_R_SQ_BRACKET) || \ |
| 152 | (alpha_char == RMMI_L_CURLY_BRACKET) || (alpha_char == RMMI_R_CURLY_BRACKET) || \ |
| 153 | (alpha_char == RMMI_CHAR_REVERSE_SOLIDUS) ||(alpha_char == RMMI_CHAR_VERTICAL_LINE) \ |
| 154 | ) ? 1 : 0 ) |
| 155 | |
| 156 | |
| 157 | #define RMMI_MAX_BIT_MASK_SIZE (RMMI_MAX_CHANNEL_NUMBER + 7) / 8 |
| 158 | #define RMMI_MAX_BIT_MASK_SIZE_CRLA ((MAX_SOURCE_NUM + 7) / 8) /* refer to l4c total source id */ |
| 159 | |
| 160 | //#if !defined(__MTK_TARGET__) && defined(__RMMI_UT__) |
| 161 | //#define RMMI_UART_GetOwnerID(port) rmmi_current_mod_id |
| 162 | //#endif |
| 163 | |
| 164 | |
| 165 | typedef kal_bool(*UART_TRANS_FUNC_PTR) (kal_uint8); |
| 166 | |
| 167 | typedef kal_uint8 RMMI_UART_FLAG[RMMI_MAX_BIT_MASK_SIZE]; |
| 168 | |
| 169 | |
| 170 | typedef struct rmmi_single_cmd_struct |
| 171 | { |
| 172 | kal_uint16 cmd_code; /* rmmi_extended_cmd_id_enum */ |
| 173 | kal_uint8 cmd_mode; /* rmmi_cmd_mode_enum */ |
| 174 | } rmmi_single_cmd_struct; |
| 175 | |
| 176 | typedef struct basic_cmd_struct |
| 177 | { |
| 178 | kal_uint8 cmd_code; /* rmmi_basic_cmd_id_enum */ |
| 179 | kal_uint8 cmd_mode; /* rmmi_cmd_mode_enum */ |
| 180 | |
| 181 | kal_bool is_this_node_used; |
| 182 | kal_uint8 value; |
| 183 | |
| 184 | struct basic_cmd_struct *next_ptr; |
| 185 | } rmmi_multiple_basic_cmd_struct; |
| 186 | |
| 187 | typedef struct rmmi_cmd_struct |
| 188 | { |
| 189 | kal_uint8 which_present; /* rmmi_cmd_type_enum */ |
| 190 | |
| 191 | rmmi_single_cmd_struct single_cmd; |
| 192 | rmmi_multiple_basic_cmd_struct multiple_cmd; //not used now |
| 193 | } rmmi_cmd_struct; |
| 194 | |
| 195 | typedef struct |
| 196 | { |
| 197 | kal_uint8 s0; /* auto answer */ |
| 198 | kal_uint8 s2; /* escape character (+++) */ |
| 199 | kal_uint8 s3; /* CR 0x0d*/ |
| 200 | kal_uint8 s4; /* LF 0x0a*/ |
| 201 | kal_uint8 s5; /* backspace */ |
| 202 | kal_uint8 s6; /* pause before dialing */ |
| 203 | kal_uint8 s7; /* connect timeout */ |
| 204 | kal_uint8 s8; /* , pause time */ |
| 205 | kal_uint8 s10; /* disconnect timeout */ |
| 206 | kal_uint8 s32; /* XON character */ |
| 207 | kal_uint8 s33; /* XOFF character */ |
| 208 | kal_uint8 s95; |
| 209 | |
| 210 | } rmmi_s_register_struct; |
| 211 | |
| 212 | typedef struct uart_queue_struct |
| 213 | { |
| 214 | kal_uint16 head; |
| 215 | kal_uint16 length; |
| 216 | kal_uint8 data[MAX_DATA_QUEUE_LENGTH]; |
| 217 | |
| 218 | } rmmi_uart_queue_struct; |
| 219 | |
| 220 | typedef struct |
| 221 | { |
| 222 | kal_uint16 head; |
| 223 | kal_uint16 length; |
| 224 | kal_uint8 data[MAX_DATA_QUEUE_LENGTH]; |
| 225 | |
| 226 | } rmmi_uart_output_queue_struct; |
| 227 | |
| 228 | typedef struct |
| 229 | { |
| 230 | |
| 231 | kal_bool sat_in_menu; |
| 232 | kal_bool sat_in_process; |
| 233 | kal_bool sat_normal_standby; |
| 234 | kal_bool sat_ready; |
| 235 | kal_uint8 sat_input_type; |
| 236 | kal_uint8 sat_input_reveal; |
| 237 | kal_uint8 sat_input_min_len; |
| 238 | kal_uint8 sat_input_max_len; |
| 239 | kal_bool sat_redial; |
| 240 | kal_bool sat_redial_count; |
| 241 | kal_uint32 sat_duration; |
| 242 | |
| 243 | } rmmi_SAT_info_struct; |
| 244 | |
| 245 | typedef struct rmmi_cind_struct |
| 246 | { |
| 247 | kal_uint8 battchg; |
| 248 | kal_uint8 signal; |
| 249 | kal_uint8 service; |
| 250 | kal_uint8 message; |
| 251 | kal_uint8 call; |
| 252 | kal_uint8 roam; |
| 253 | kal_uint8 smsfull; |
| 254 | kal_uint8 callsetup; |
| 255 | kal_uint8 callheld; //for BT HF 1.5 |
| 256 | } rmmi_cind_struct; |
| 257 | |
| 258 | typedef struct rmmi_reg_state_struct |
| 259 | { |
| 260 | kal_uint64 cell_id; // for +CREG and +CGREG and +CEREG, high 16 bits for RNC id, low 16 bits for cell_id |
| 261 | kal_uint32 lac_or_tac_value; // for +CREG and +CGREG and +CEREG |
| 262 | kal_uint8 rac_value; // for +CGREG |
| 263 | kal_uint8 act; //[MAUI_01360129] |
| 264 | kal_uint8 state; //for +CREG and +CGREG and +CEREG |
| 265 | kal_uint8 cause_type; |
| 266 | kal_uint8 cause; |
| 267 | data_speed_support_enum cell_data_speed_support; |
| 268 | |
| 269 | kal_uint8 plmn_id[MAX_PLMN_LEN+1]; |
| 270 | kal_bool is_hplmn; |
| 271 | |
| 272 | kal_bool is_csg_cell; |
| 273 | csg_info_struct csg_info; |
| 274 | kal_uint8 csg_state; //for +ECSG |
| 275 | kal_uint8 scell_number_dl; |
| 276 | kal_uint8 scell_number_ul; |
| 277 | kal_uint8 vgmm_allowed_nssai_length; /* Number of bytes in allowed NSSAI */ |
| 278 | kal_uint8 vgmm_allowed_nssai[MAX_LEN_OF_ALL_ALLOWED_NSSAI]; /* Allowed NSSAI */ |
| 279 | } rmmi_reg_state_struct; |
| 280 | |
| 281 | #ifdef __TC01__ |
| 282 | typedef struct rmmi_report_reg_state_struct |
| 283 | { |
| 284 | rmmi_reg_state_enum reg_state; |
| 285 | kal_uint16 lac_or_tac_value; |
| 286 | kal_uint32 cell_id; |
| 287 | kal_uint8 act; |
| 288 | kal_uint16 cause; |
| 289 | kal_uint8 rac; |
| 290 | } rmmi_report_reg_state_struct; |
| 291 | |
| 292 | typedef struct rmmi_report_reg_to_ap_struct |
| 293 | { |
| 294 | rmmi_report_reg_state_struct cs_reg_status; |
| 295 | rmmi_report_reg_state_struct ps_reg_status; |
| 296 | kal_bool report_creg; |
| 297 | kal_bool report_cgreg; |
| 298 | } rmmi_report_reg_to_ap_struct; /* for reporing CREG/CGREG/CEREG reject cause to AP */ |
| 299 | #endif |
| 300 | typedef struct rmmi_ims_reg_state_struct |
| 301 | { |
| 302 | kal_uint8 reg_info; |
| 303 | kal_uint32 ext_info; |
| 304 | } rmmi_ims_reg_state_struct; |
| 305 | |
| 306 | typedef struct |
| 307 | { |
| 308 | l4c_phb_entry_struct entry; |
| 309 | l4c_number_struct num[3]; |
| 310 | phb_sne_struct sne; |
| 311 | phb_email_struct email; |
| 312 | } rmmi_phb_cpbw_struct; |
| 313 | |
| 314 | typedef struct rmmi_clip_info_struct |
| 315 | { |
| 316 | kal_uint8 number[MAX_CC_ADDR_LEN]; //MAX_CC_ADDR_LEN |
| 317 | kal_uint8 type; |
| 318 | kal_uint8 subaddr[MAX_CC_SUB_ADDR_LEN]; //MAX_CC_SUB_ADDR_LEN |
| 319 | kal_uint8 satype; |
| 320 | kal_uint8 cli_validity; |
| 321 | } rmmi_clip_info_struct; |
| 322 | |
| 323 | typedef struct rmmi_cnap_info_struct |
| 324 | { |
| 325 | kal_uint8 valid; |
| 326 | kal_uint8 len; |
| 327 | kal_uint8 dcs; |
| 328 | kal_uint8 cni_validity; |
| 329 | kal_uint8 str[MAX_CHAR_CNAP * 2+1]; |
| 330 | } rmmi_cnap_info_struct; |
| 331 | |
| 332 | typedef struct rmmi_cbst_struct |
| 333 | { |
| 334 | kal_uint8 speed; |
| 335 | kal_uint8 name; |
| 336 | kal_uint8 ce; |
| 337 | } rmmi_cbst_struct; |
| 338 | |
| 339 | typedef struct rmmi_crlp_strnct |
| 340 | { |
| 341 | kal_uint8 iws; |
| 342 | kal_uint8 mws; |
| 343 | kal_uint8 T1; |
| 344 | kal_uint8 N2; |
| 345 | } rmmi_crlp_strnct; |
| 346 | |
| 347 | typedef struct rmmi_profile_struct |
| 348 | { |
| 349 | rmmi_s_register_struct s_reg; |
| 350 | rmmi_cbst_struct rmmi_cbst; |
| 351 | rmmi_crlp_strnct rmmi_crlp; |
| 352 | kal_uint8 rmmi_ciwf; |
| 353 | kal_uint8 rmmi_atv; |
| 354 | kal_uint8 rmmi_ate; |
| 355 | kal_uint8 rmmi_atq; |
| 356 | kal_uint8 rmmi_atx; |
| 357 | kal_uint8 rmmi_atw; |
| 358 | kal_uint8 rmmi_atampC; |
| 359 | kal_uint8 rmmi_atampD; |
| 360 | kal_uint8 rmmi_atampK; |
| 361 | } rmmi_profile_struct; |
| 362 | |
| 363 | typedef struct |
| 364 | { |
| 365 | kal_uint8 reason; |
| 366 | kal_uint8 mode; |
| 367 | kal_uint8 timer; |
| 368 | l4c_number_struct dest_buffer; |
| 369 | l4c_sub_addr_struct sub_dest_buffer; |
| 370 | kal_bool sub_addr_flag; |
| 371 | } ccfc_req_param_struct; /* for remembering params of AT+CFCC */ |
| 372 | |
| 373 | typedef struct |
| 374 | { |
| 375 | kal_uint8 mode; |
| 376 | } ccwa_req_param_struct; /* for remembering params of AT+CCWA */ |
| 377 | |
| 378 | typedef struct |
| 379 | { |
| 380 | kal_uint8 reason; |
| 381 | kal_uint8 mode; |
| 382 | kal_uint8 passwd[4]; |
| 383 | } clck_ss_req_param_struct; /* for remembering params of AT+CLCK */ |
| 384 | |
| 385 | typedef struct rmmi_transfer_struct |
| 386 | { |
| 387 | module_type dest_mod; |
| 388 | UART_PORT port; |
| 389 | } rmmi_transfer_struct; |
| 390 | |
| 391 | typedef struct { |
| 392 | kal_bool utran_fdd; |
| 393 | kal_bool utran_tdd_lcr; |
| 394 | kal_bool eutran_fdd; |
| 395 | kal_bool eutran_tdd; |
| 396 | kal_bool nr_fdd; |
| 397 | kal_bool nr_tdd; |
| 398 | mode_switch_cause_enum cause; |
| 399 | } rmmi_ecsra_setting_struct; |
| 400 | |
| 401 | #ifdef __TC01__ |
| 402 | typedef struct { |
| 403 | kal_bool is_excuted; |
| 404 | kal_bool is_abnormal; |
| 405 | kal_uint16 usid[10]; |
| 406 | kal_uint16 pid[10]; |
| 407 | kal_uint16 mid[10]; |
| 408 | } rmmi_mipi_hw_info_ind_struct; |
| 409 | #endif |
| 410 | |
| 411 | |
| 412 | typedef struct rmmi_etwmode_setting_struct |
| 413 | { |
| 414 | kal_uint8 lg_wg; |
| 415 | } rmmi_etwmode_setting_struct; |
| 416 | |
| 417 | |
| 418 | typedef struct rmmi_camped_cell_id_struct |
| 419 | { |
| 420 | rat_enum rat; |
| 421 | rat_duplex_type_enum duplex_type; |
| 422 | plmn_id_struct plmn_id; |
| 423 | kal_uint8 la_code[2]; |
| 424 | kal_uint8 ta_code[3]; |
| 425 | kal_uint64 cell_id; |
| 426 | } rmmi_camped_cell_id_struct; |
| 427 | |
| 428 | typedef struct rmmi_eind_invalid_sim_info_struct |
| 429 | { |
| 430 | l4c_rac_response_enum prev_cs_status; |
| 431 | l4c_rac_gprs_status_enum prev_ps_status; |
| 432 | kal_uint8 prev_cause; |
| 433 | kal_uint8 prev_oper[MAX_PLMN_LEN+1]; |
| 434 | }rmmi_eind_invalid_sim_info_struct; |
| 435 | |
| 436 | typedef struct rmmi_ims_emergency_support_struct |
| 437 | { |
| 438 | kal_uint8 rat_type; |
| 439 | kal_bool ims_emergency_support; |
| 440 | } rmmi_ims_emergency_support_struct; |
| 441 | |
| 442 | typedef struct rmmi_rsp_mode_struct |
| 443 | { |
| 444 | kal_uint8 echo_flag[RMMI_MAX_BIT_MASK_SIZE]; /* rmmi_cmd_echo_enum */ |
| 445 | kal_uint8 suppress_flag; /* rmmi_result_code_suppress_enum */ |
| 446 | kal_uint8 format; /* rmmi_result_code_format */ |
| 447 | kal_uint8 ext_result_code; |
| 448 | } rmmi_rsp_mode_struct; |
| 449 | |
| 450 | /* this structure is used to let custom config the rmmi default setting*/ |
| 451 | typedef struct{ |
| 452 | rmmi_rsp_mode_struct rsp_mode; |
| 453 | kal_uint8 error_report_mode; // /* +CMEE <mode>: rmmi_error_report_mode_enum */ |
| 454 | kal_uint8 char_set; //+CSCS |
| 455 | kal_uint8 plmn_format; |
| 456 | kal_uint8 cops_mode; |
| 457 | kal_uint8 CPOL_plmn_format; |
| 458 | kal_uint8 cmec_keyp; |
| 459 | kal_uint8 cmec_disp; |
| 460 | kal_uint8 cmec_ind; |
| 461 | kal_bool clae_mode; // we save clae mode in rmmi context |
| 462 | kal_bool csdh_show; //mtk00714: for +CSDH , hide/show detail Text mode parameters. |
| 463 | kal_uint8 cvhu_mode; //MAUI_02862643, mtk02285, support CVHU=1 to ignore ATH |
| 464 | rmmi_report_mode_struct report_mode; |
| 465 | rmmi_op01_report_mode_struct op01_report_mode; |
| 466 | #ifdef __PLMN_LIST_WITH_LAC__ |
| 467 | kal_bool list_plmn_with_lac; //print LAC for +COPS=? response |
| 468 | #endif |
| 469 | } rmmi_custom_context_struct; |
| 470 | |
| 471 | typedef struct |
| 472 | { |
| 473 | ca_state_enum ca_state; |
| 474 | kal_uint8 pcell_bw; |
| 475 | kal_uint8 scell_bw[4]; |
| 476 | kal_uint16 pcell_band; |
| 477 | kal_uint16 scell_band[4]; |
| 478 | } rmmi_ca_info_struct; |
| 479 | #ifdef __RF_SCAN_FOR_DESENSE_TEST__ |
| 480 | typedef struct |
| 481 | { |
| 482 | kal_uint8 src_id; |
| 483 | kal_uint8 rat_type; |
| 484 | kal_uint8 repeat_times; |
| 485 | kal_uint8 num_of_rssi_ind; |
| 486 | kal_int64 eRssi[2]; |
| 487 | } rmmi_rfscan_req_struct; |
| 488 | #endif /*__RF_SCAN_FOR_DESENSE_TEST__*/ |
| 489 | |
| 490 | typedef struct rmmi_nw_rej_cause_attemp_counter_struct |
| 491 | { |
| 492 | mm_cause_enum mm_lu_rej_cause; |
| 493 | mm_cause_enum attach_rej_cause; |
| 494 | mm_cause_enum reg_update_rej_cause; // the reject cause of gmm rau, emm tau, vgmm reg update |
| 495 | kal_uint8 mm_lu_attempt_counter; |
| 496 | kal_uint8 attach_attempt_counter; |
| 497 | kal_uint8 reg_update_attempt_counter; // the attempt counter of gmm rau, emm tau, vgmm reg update |
| 498 | mm_cause_enum service_rej_cause; |
| 499 | kal_uint8 auth_rej_cause; |
| 500 | esm_cause_enum esm_rej_cause; |
| 501 | rmmi_proc_result_type_enum proc_result; |
| 502 | nas_proc_enum nas_proc; |
rjw | 8e44aab | 2022-11-30 16:42:16 +0800 | [diff] [blame] | 503 | plmn_id_struct plmn_id; |
rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 504 | } rmmi_nw_rej_cause_attemp_counter_struct; |
| 505 | |
| 506 | #if defined(__CDMA2000_RAT__) |
| 507 | |
| 508 | typedef struct |
| 509 | { |
| 510 | kal_bool is_serving_cell; |
| 511 | kal_uint8 num_of_cell; /* 1: serving cell, 0: no serving cell */ |
| 512 | kal_uint16 nid; |
| 513 | kal_uint16 sid; |
| 514 | kal_uint16 bs_id; |
| 515 | kal_int32 bs_long; |
| 516 | kal_int32 bs_lat; |
| 517 | kal_int16 rssi_1xRTT; |
| 518 | kal_int16 ecio_1xRTT; |
| 519 | kal_uint8 rssi_EVDO; |
| 520 | kal_int16 ecio_EVDO; |
| 521 | kal_uint16 sinr_EVDO; |
| 522 | } rmmi_c2k_cell_info_struct; |
| 523 | |
| 524 | #endif |
| 525 | |
| 526 | #ifdef __ARFCN_TO_CAMERA_SUPPORT__ |
| 527 | #ifdef __MTK_TARGET__ |
| 528 | PRAGMA_BEGIN_PACK_STRUCT |
| 529 | #endif |
| 530 | typedef struct |
| 531 | { |
| 532 | kal_uint8 simid; |
| 533 | kal_uint8 rat; |
| 534 | kal_uint8 num_of_arfcn; /* MAX supported is 8*/ |
| 535 | //kal_uint8 reserved; /* For 4 byte allignment*/ |
| 536 | kal_uint32 arfcn[L4C_MAX_ARFCN_SUPPORTED]; |
| 537 | kal_uint16 band[L4C_MAX_ARFCN_SUPPORTED]; |
| 538 | kal_uint8 is_connected; |
| 539 | kal_uint8 is_main_sim; |
| 540 | } rmmi_camera_arfcn_info_struct; |
| 541 | #ifdef __MTK_TARGET__ |
| 542 | PRAGMA_END_PACK_STRUCT |
| 543 | #endif |
| 544 | #endif |
| 545 | |
| 546 | #ifdef __EPSFB_SUPPORT__ |
| 547 | typedef struct |
| 548 | { |
| 549 | call_status_enum call_status; |
| 550 | rmmi_epsfb_state_enum state; |
| 551 | rmmi_epsfb_type_enum type; |
| 552 | } rmmi_epsfb_info_struct; |
| 553 | #endif |
| 554 | |
| 555 | typedef struct |
| 556 | { |
| 557 | kal_uint8 mcc[4]; |
| 558 | kal_uint8 mnc[4]; |
| 559 | rat_enum rat; |
| 560 | } rmmi_eopsu_info_struct; |
| 561 | |
| 562 | typedef struct |
| 563 | { |
| 564 | l4c_data_speed_support_enum eAct; |
| 565 | kal_uint16 rlc_latency_in_ms; |
| 566 | } rmmi_latency_info_struct; |
| 567 | |
| 568 | typedef struct |
| 569 | { |
| 570 | kal_bool display_5guw; |
| 571 | kal_bool on_n77_band; |
| 572 | kal_bool on_fr2_band; |
| 573 | kal_bool is_5guw_allowed; |
| 574 | } rmmi_e5guw_info_struct; |
| 575 | |
| 576 | typedef struct rmmi_common_context_struct |
| 577 | { |
| 578 | #if 0 //#ifdef __CMUX_SUPPORT__ |
| 579 | /* under construction !*/ |
| 580 | /* under construction !*/ |
| 581 | #endif /* __CMUX_SUPPORT__ */ |
| 582 | |
| 583 | #ifdef __BT_SUPPORT__ |
| 584 | kal_uint8 rmmi_hf_src; |
| 585 | kal_bool hf_urc_report_flag; |
| 586 | #endif |
| 587 | |
| 588 | RMMI_UART_FLAG isAtdAction_flag; /* mtk00714 20040412 : remember ATD this action after setup_cnf */ |
| 589 | RMMI_UART_FLAG isAtdAbort_flag; /* mtk01616 070323 to know it's a Atd abort by any character */ |
| 590 | |
| 591 | #if defined(__CMUX_MODEM_STATUS_SUPPORT__) |
| 592 | RMMI_UART_FLAG isDSRAbort_flag; |
| 593 | #endif |
| 594 | |
| 595 | #ifdef SYNCML_DM_SUPPORT |
| 596 | kal_bool lock_atci; |
| 597 | #endif |
| 598 | #if defined(__GEMINI__) |
| 599 | rmmi_sim_uart_setting_enum sim_uart_setting; |
| 600 | sim_interface_enum rmmi_uart_owner[RMMI_MAX_CHANNEL_NUMBER]; |
| 601 | #endif |
| 602 | RMMI_UART_FLAG uart_plugout; |
| 603 | RMMI_UART_FLAG uart_stop_send_flag; |
| 604 | RMMI_UART_FLAG is_multi_cmd; |
| 605 | RMMI_UART_FLAG multi_cmd_error; // this flag using to verify if error occur , we should abort command processor |
| 606 | RMMI_UART_FLAG is_sms_cmd; //using to cehck string is sms command and send " > " to DTE |
| 607 | |
| 608 | kal_uint8 source[RMMI_MAX_CHANNEL_NUMBER]; |
| 609 | kal_uint8 port[RMMI_MAX_CHANNEL_NUMBER]; |
| 610 | kal_uint8 uart_port_value; /* this value store the default value form NVRAM */ |
| 611 | rmmi_transfer_struct transfer; |
| 612 | |
| 613 | // TODO: reduce uart input/output queue size, only keeps for agps and SCP port |
| 614 | rmmi_uart_queue_struct uart_input_queue[RMMI_CHANEEL_ID_MAX]; |
| 615 | rmmi_uart_queue_struct uart_output_queue[RMMI_CHANEEL_ID_MAX]; |
| 616 | kal_uint8 multi_cmd_string[RMMI_MAX_CHANNEL_NUMBER][MAX_MULTIPLE_CMD_INFO_LEN]; |
| 617 | |
| 618 | #ifdef __TC01__ |
| 619 | kal_uint8 gkpd_flag; |
| 620 | kal_uint8 gkpd_buffer[20]; |
| 621 | kal_uint16 gkpd_count; |
| 622 | kal_uint8 *gkpd_windex; |
| 623 | kal_uint8 *gkpd_rindex; |
| 624 | kal_uint32 gkpd_current_rindex; |
| 625 | kal_uint16 gkpd_rindex_count; |
| 626 | kal_uint8 mpt_flag; |
| 627 | #endif |
| 628 | |
| 629 | kal_uint8 etstlp_port[2]; //for tst_port_ps and tst_port_l1 |
| 630 | |
| 631 | kal_uint8 gsm_tx_pwr_reduction_tbl[4][2][4]; |
| 632 | kal_uint8 umts_tx_pwr_reduction_tbl[20][2]; |
| 633 | |
| 634 | kal_uint8 gsm_tx_pwr_reduction_tbl_tas[4][2][4]; |
| 635 | kal_uint8 umts_tx_pwr_reduction_tbl_tas[20][2]; |
| 636 | |
| 637 | kal_uint8 is_rrm_test; // work around for RRM test, EMM need special power off without sending detach |
| 638 | |
| 639 | #ifndef __MTK_TARGET__ |
| 640 | kal_uint8 ut_uart_input[MAX_UT_UART_LENGTH]; |
| 641 | kal_uint16 ut_uart_input_len; |
| 642 | #endif |
| 643 | kal_uint8 rms_state; |
| 644 | |
| 645 | kal_uint8 is_dongle_mode; |
| 646 | |
| 647 | #ifdef __TC10__ // CCLK |
| 648 | rmmi_nitz_time_struct nitz_time; |
| 649 | #endif |
| 650 | |
| 651 | } rmmi_common_context_struct; |
| 652 | |
| 653 | typedef struct rmmi_context_struct |
| 654 | { |
| 655 | /*************************************************************************/ |
| 656 | /* Below context are placed in the front of RMMI context */ |
| 657 | /* to increase immediate offset access , to reduce ROM size */ |
| 658 | /* Please KEEP the position for the following frequent used variables */ |
| 659 | /*************************************************************************/ |
| 660 | kal_uint8 current_src; |
| 661 | |
| 662 | kal_uint8 char_set; //+CSCS |
| 663 | kal_bool is_ucm_action; |
| 664 | kal_uint16 cmee_err; // error value for +CME:<err> |
| 665 | kal_bool uart_in_data_mode; |
| 666 | kal_uint8 online_cmd_state; |
| 667 | |
| 668 | kal_bool ats0_auto_answer; //mtk01616_070707 add this to prevent print OK for auto answer |
| 669 | #ifdef __UCM_SUPPORT__ |
| 670 | kal_bool is_ata_action; //mtk01616_070707 add this to handle ATA result code |
| 671 | kal_bool is_compound_action; //MAUI_02016224 |
| 672 | #endif |
| 673 | |
| 674 | /* use to check if sim verified */ |
| 675 | kal_bool command_allow; // using to keep if password required, only some AT command can access when pin puk or ph_sim pending |
| 676 | kal_uint16 cmd_error_cause; // SMU saves command not allow cause for +cme error value to TA |
| 677 | |
| 678 | rmmi_s_register_struct s_reg; |
| 679 | void *arg_list[RMMI_MAX_ARG_NUM]; |
| 680 | |
| 681 | rmmi_rsp_mode_struct rsp_mode; |
| 682 | rmmi_cind_struct indicators; // for +CIND and +CMER |
| 683 | rmmi_report_mode_struct report_mode; |
| 684 | rmmi_reg_state_struct cs_register_status; //registration status for +CREG |
| 685 | #ifdef __MOD_TCM__ |
| 686 | rmmi_reg_state_struct ps_register_status; //registration status for +CGREG |
| 687 | l4c_data_bearer_capablility_enum psbearer_param2; //the last reported <bearer_capability> in +PSBEARER |
| 688 | kal_bool l4c_ps_is_sent_to_current_src ; // If KAL_FALSE, send MSG to URC channel |
| 689 | kal_uint8 l4c_ps_embed_msg_src; |
| 690 | #endif |
| 691 | |
| 692 | rmmi_eopsu_info_struct eopsu_info; |
| 693 | rmmi_latency_info_struct latency_info; |
| 694 | rmmi_e5guw_info_struct e5guw_info; |
| 695 | |
| 696 | #ifdef __L4C_GPRS_UT__ |
| 697 | ps_cause_enum cause; |
| 698 | #endif |
| 699 | |
| 700 | rmmi_ecc_number_list_struct ecc_number; /* to store ECC number from network, related to +CEN */ |
| 701 | |
| 702 | /***********************************************************************/ |
| 703 | /* Above context are placed in the front of L4C context */ |
| 704 | /* to increase immediate offset access , to reduce ROM size */ |
| 705 | /* Please try to KEEP the position for these frequent used variables */ |
| 706 | /***********************************************************************/ |
| 707 | |
| 708 | //#ifdef __IMS_SUPPORT__ |
| 709 | rmmi_ims_reg_state_struct ims_register_status; |
| 710 | kal_uint8 imsvops_indication; // IMS Voice over PS session indication |
| 711 | kal_uint8 emb_Iu_supp; // Emergency bearer services support indicator for Iu mode |
| 712 | kal_uint8 emb_S1_supp; // Emergency bearer services support indicator for S1 mode |
| 713 | //#endif |
| 714 | |
| 715 | /* settings */ |
| 716 | kal_uint8 em_enable; //mtk00468 add for using to keep the em enable or disable engineer mode information |
| 717 | kal_uint8 date_aux_mode; // this variable using for +CSDF to keep in local |
| 718 | kal_uint8 cring_type; //mtk00714 add for +CRC (remember cring_type for rmmi_ring_repeat_hdlr) |
| 719 | kal_uint8 error_report_mode; // /* +CMEE <mode>: rmmi_error_report_mode_enum */ |
| 720 | kal_uint8 plmn_format; |
| 721 | kal_uint8 last_plmn_format; /* be used to restore format if AT+COPS return error */ |
| 722 | #ifdef __PLMN_LIST_WITH_LAC__ |
| 723 | kal_bool list_plmn_with_lac; //print LAC for +COPS=? response |
| 724 | #endif |
| 725 | kal_uint8 cops_mode; |
| 726 | kal_uint8 cops_rat_mode; |
| 727 | endc_search_enum cops_endc_search_mode; |
| 728 | kal_uint8 CPOL_plmn_format; |
| 729 | kal_uint8 smsal_bfr; /* +CNMI : <bfr> */ |
| 730 | kal_uint8 CNMI_mode; // +CNMI: <mode>: result code mode |
| 731 | //kal_uint16 max_plmn_list_len; //+CPOL ? |
| 732 | kal_bool cb_mode; |
| 733 | kal_bool csdh_show; //mtk00714: for +CSDH , hide/show detail Text mode parameters. |
| 734 | kal_bool clae_mode; // we save clae mode in rmmi context |
| 735 | kal_bool cmut_mode; // we save clae mode in rmmi context |
| 736 | kal_uint8 preferred_lang; |
| 737 | kal_uint8 ring_count; // for ATS0 |
| 738 | rmmi_clip_info_struct clip_info; |
| 739 | rmmi_cnap_info_struct cnap_info; |
| 740 | kal_uint8 casp_soundID; //for +CASP proprietary command , timeout hdlr parameter. |
| 741 | //kal_bool is_gprs_data_dialing; /* ATH is not allowed to hangup existed voice call after dialup failed */ //mtk02285, 201003, 6251_ram |
| 742 | #ifdef __MOD_TCM__ |
| 743 | kal_uint8 cgatt_last_action; /* mtk00714 20040611 add to avoid continuos at+cgatt=0 or at+cgatt=1 */ |
| 744 | #endif //mtk02285, 201003, 6251_ram |
| 745 | kal_uint16 cpbr_range[2]; |
| 746 | kal_uint16 phb_del_index; |
| 747 | kal_uint8 phb_del_storage; |
| 748 | kal_uint8 cpbr_ln_base_index; |
| 749 | |
| 750 | kal_uint8 ecpbr_num_index; |
| 751 | kal_uint8 ecpbr_entry_found; |
| 752 | l4_name_struct ecpbr_alphaId; |
| 753 | |
| 754 | kal_uint8 ecpbw_num_index; |
| 755 | kal_uint8 ecpbw_email_write; |
| 756 | kal_uint16 ecpbw_record_index; |
| 757 | kal_uint8 ecpbw_is_delete; |
| 758 | rmmi_phb_cpbw_struct *ecpbw_entry_ptr; |
| 759 | |
| 760 | rmmi_op01_report_mode_struct op01_report_mode; |
| 761 | |
| 762 | kal_bool is_cpbw_phb_fdn; |
| 763 | |
| 764 | l4c_source_id_enum online_cmd_state_src_id; //MAUI_01652672, mtk02285, 20090324 |
| 765 | |
| 766 | #ifdef __IRDA_SUPPORT__ |
| 767 | //kal_uint8 ppp_nsapi; //mtk02285, 201003, 6251_ram |
| 768 | #endif |
| 769 | |
| 770 | #ifdef __SAT__ |
| 771 | kal_bool sat_icon_displayed; //mtk00924: display icon for STK SMS, SS, USSD, DTMF |
| 772 | #endif |
| 773 | |
| 774 | kal_uint8 except_src; //for unsolicited code, but don't send it to this src. ex. MT data call, don't send RING to bt hs |
| 775 | kal_uint8 imei_action; //rmmi_imei_action_enum |
| 776 | kal_uint8 rmmi_atd_mem; //mtk01616_090116 :rmmi_mem_dial_enum |
| 777 | kal_uint16 action_cmd; //rmmi_extended_cmd_id_enum |
| 778 | #ifdef __BT_SUPPORT__ |
| 779 | kal_uint8 last_reported_ciev_signal; //hong_rx_level |
| 780 | kal_bool send_ciev_callheld; //mtk01616_090923: explictly to send +CIEV:<callheld> even the status is not changed |
| 781 | #endif |
| 782 | kal_uint8 ath_for_dialup; //mtk01616_080923: ATH is for dialup failure, we use this to prevent ATH to disconnect call |
| 783 | kal_uint8 last_number_dialed[MAX_CC_ADDR_LEN];//atdL last number dialed |
| 784 | |
| 785 | #if 0 //__CTM_SUPPORT__ |
| 786 | /* under construction !*/ |
| 787 | #endif |
| 788 | |
| 789 | kal_uint8 em_volume_level; |
| 790 | kal_uint8 em_volume_type; |
| 791 | kal_uint8 em_audio_type; |
| 792 | kal_uint8 em_audio_gain; |
| 793 | kal_uint8 em_audio_mode; |
| 794 | kal_uint8 em_eadp_action; |
| 795 | |
| 796 | /* Context for AT+EAPS */ |
| 797 | kal_uint8 eaps_action; |
| 798 | kal_uint8 eaps_para1; |
| 799 | kal_uint8 eaps_para2; |
| 800 | kal_uint8 eaps_para3; |
| 801 | void* eaps_audio_param; |
| 802 | |
| 803 | #ifdef __VOIP__ |
| 804 | kal_bool cm_cmd_approve; //Send Call Management command to MMI to get approval |
| 805 | void *string_ptr; |
| 806 | void *node_ptr; |
| 807 | void *id; |
| 808 | #endif /* __VOIP__ */ |
| 809 | kal_uint8 poweroff_src_id; |
| 810 | kal_uint8 is_spn_valid; |
| 811 | kal_uint8 spn[LEN_OF_SPN]; |
| 812 | |
| 813 | kal_uint32 eind_ready_flag; |
| 814 | kal_uint8 vgr_gain; |
| 815 | kal_uint8 vgt_gain; |
| 816 | |
| 817 | kal_uint16 last_executed_P2_fail; //[MAUI_01292349] mtk02480l 27.007: +CPIN? return PIN2/PUK2 if previous command execured authentication failure, i.e. cmee_err= 17/18 |
| 818 | |
| 819 | #if defined(__MODEM_EM_MODE__) |
| 820 | kal_uint8 em_src_id; // used to remember EM request src_id |
| 821 | #endif |
| 822 | |
| 823 | #ifdef __GATI_ENABLE__ |
| 824 | gati_mod_src_struct gati_mod_src_table[GATI_MAX_MODULE_COUNT]; /* The table which record the relation of module to src_id and its control status */ |
| 825 | kal_uint8 gati_binary_mode_module[MAX_SOURCE_NUM]; /* The module id that active the binary mode for specific source id */ |
| 826 | kal_uint32 gati_stop_read_data_from_uart; /* The bit map to specify which src_id is now stop receiving data from the UART */ |
| 827 | kal_uint32 gati_pending_rtr_ind; /* The bit map to specify if there are rtr indication from the UART during the ATCI stop receiving data from the UART */ |
| 828 | gati_buffer_struct gati_buffer; /* The buffer will be used when the mode is in the binary mode and there is some data from other module which does not active the binary mode. */ |
| 829 | kal_uint8 gati_buffer_count; |
| 830 | /* The following variables are temp ones used to transmit informations between functions */ |
| 831 | kal_bool gati_write_allow_flag; /* This flag is used to allow the writing action for the owner of the binary mode */ |
| 832 | kal_uint16 gati_actual_write; /* This variable is used to get the actual write size to the output queue in the rmmi_uart_write_data */ |
| 833 | kal_uint8 gati_data_type; /* This variable is used to know if the data type is integrity or not */ |
| 834 | #endif |
| 835 | |
| 836 | kal_uint8 cmec_keyp; |
| 837 | kal_uint8 cmec_disp; |
| 838 | kal_uint8 cmec_ind; |
| 839 | |
| 840 | l4c_nbr_cell_info_ind_struct nbr_info; |
| 841 | l4c_endc_nbr_cell_info_struct endc_nbr_cell_info; |
| 842 | |
| 843 | kal_uint8 is_emgr; |
| 844 | |
| 845 | #if !defined(__SLIM_AT__) |
| 846 | kal_uint8 ccfc_combi_classx; //original <classx> given by AT+CFCC |
| 847 | // each bit is for each classx. (TS or BS) |
| 848 | // 1: we need to make req for this bs_code / 0: ignored |
| 849 | //use bit operation |
| 850 | kal_uint8 ccfc_current_class; //the class of current req |
| 851 | ccfc_req_param_struct ccfc_req_param; //stores other req parameter information |
| 852 | kal_bool ccfc_result; |
| 853 | |
| 854 | kal_uint8 clck_ss_combi_classx; //original <classx> given by AT+CLCK |
| 855 | // each bit is for each classx. (TS or BS) |
| 856 | // 1: we need to make req for this bs_code / 0: ignored |
| 857 | //use bit operation |
| 858 | kal_uint8 clck_ss_current_class; //the class of current req |
| 859 | clck_ss_req_param_struct clck_ss_req_param; //stores other req parameter information |
| 860 | kal_bool clck_ss_result; |
| 861 | smu_security_type_enum clck_sml_type; //for at+clck to query SML status |
| 862 | #endif |
| 863 | |
| 864 | kal_uint8 ccwa_combi_classx; //original <classx> given by AT+CCWA |
| 865 | // each bit is for each classx. (TS or BS) |
| 866 | // 1: we need to make req for this bs_code / 0: ignored |
| 867 | //use bit operation |
| 868 | kal_uint8 ccwa_current_class; //the class of current req |
| 869 | ccwa_req_param_struct ccwa_req_param; //stores other req parameter information |
| 870 | kal_bool ccwa_result; |
| 871 | kal_uint8 cvhu_mode; //MAUI_02862643, mtk02285, support CVHU=1 to ignore ATH |
| 872 | |
| 873 | #if !defined(__ULC_AT__) |
| 874 | rmmi_profile_struct rmmi_default_profile; |
| 875 | rmmi_profile_struct rmmi_user_profile; |
| 876 | rmmi_profile_struct rmmi_current_profile; |
| 877 | #endif |
| 878 | |
| 879 | rmmi_uart_queue_struct CNMI_ResultCodeBuffer; //for +CNMI, SMSAL_ONE_MSG_LEN = 160 |
| 880 | kal_uint8 cmd_mode; |
| 881 | kal_uint8 cpbf_findtext[30]; |
| 882 | |
| 883 | #ifdef __SAT__ |
| 884 | #ifdef __SATCB__ |
| 885 | rmmi_uart_queue_struct sat_output_queue; //mtk00714 add for SAT using |
| 886 | kal_bool IsSATcommand; //check if SATCommand |
| 887 | kal_bool IsSATresponse; //use to check if SAT response |
| 888 | void *SAT_rsp_ptr; |
| 889 | #endif |
| 890 | #endif /* __SAT__ */ |
| 891 | |
| 892 | #ifdef __CMUX_SUPPORT__ |
| 893 | kal_uint8 rmmi_data_channel_src; |
| 894 | kal_uint8 rmmi_urc_channel_src; |
| 895 | kal_uint8 rmmi_urc_2_channel_src; |
| 896 | #ifdef __TC01_IMS_SUPPORT__ |
| 897 | kal_uint8 rmmi_urc_3_channel_src; |
| 898 | #endif |
| 899 | #endif |
| 900 | |
| 901 | #if defined(__AT_IPR_WRITE_FS_SUPPORT__) |
| 902 | kal_uint32 atipr_rate; |
| 903 | #endif |
| 904 | |
| 905 | kal_uint8 csp_plmn_mode; |
| 906 | |
| 907 | #if defined(__MESSAGE_BASED_AT_SUPPORT__) |
| 908 | kal_bool msg_based_at_enable; |
| 909 | #endif |
| 910 | |
| 911 | kal_uint8 ats0_src_id; //MAUI_02743662 for saving ATS0 auto answer source id |
| 912 | |
| 913 | kal_uint8 cpls_selected; |
| 914 | |
| 915 | #if 0 //move to ATP |
| 916 | #if defined(__DUAL_TALK_MODEM_SUPPORT__) |
| 917 | /* under construction !*/ |
| 918 | #endif |
| 919 | #endif |
| 920 | |
| 921 | #if defined(__SYSSEL_SUPPORT__) |
| 922 | kal_uint8 syssel_band; |
| 923 | #endif |
| 924 | |
| 925 | #ifdef __ACMT_SUPPORT__ |
| 926 | kal_uint8 eacmt_mode; |
| 927 | #endif |
| 928 | |
| 929 | #if defined(__REPORT_AVAILABLE_PLMN__) |
| 930 | kal_uint8 ecops_mode; |
| 931 | #endif |
| 932 | |
| 933 | #if defined(__2STAGE_NW_SELECTION__) |
| 934 | kal_uint8 emsr_mode; |
| 935 | #endif |
| 936 | |
| 937 | kal_uint8 is_crla[RMMI_MAX_BIT_MASK_SIZE_CRLA]; |
| 938 | |
| 939 | #ifndef __UCM_SUPPORT__ |
| 940 | /* This flag is to indicate ATH is redirected to l4c_cc_exe_chld_req() |
| 941 | * The response is printed in l4c_cc_exe_chld_req() or after CRSS_CNF |
| 942 | * So rmmi_basic_cmd_processor() shall not print again. |
| 943 | * Please refer to ALPS00649564. |
| 944 | */ |
| 945 | kal_uint8 ath_to_chld; |
| 946 | #endif |
| 947 | |
| 948 | //move to ATP_IO module_type tst_inject_mod; // To record which module sent the tst_inject_string |
| 949 | |
| 950 | #if 0 //#ifdef __IMS_SUPPORT__ |
| 951 | /* under construction !*/ |
| 952 | #endif |
| 953 | |
| 954 | #if defined(__CDMA2000_RAT__) |
| 955 | |
| 956 | kal_uint8 emdstatus_md_config; |
| 957 | kal_uint8 emdstatus_sim_config; |
| 958 | kal_uint8 emdstatus_fv; // flow version |
| 959 | kal_uint8 emdstatus_srcid; |
| 960 | rmmi_c2k_cell_info_struct c2k_cell_info; |
| 961 | kal_bool enable_c2k_ecell; |
| 962 | #endif |
| 963 | #if defined(__REPORT_AVAILABLE_PLMN__) |
| 964 | kal_uint8 number_of_available_plmn_id; |
| 965 | kal_uint8 available_plmn_id[MAX_PLMN_LIST_LEN][MAX_PLMN_NUMERIC_NAME_LEN]; |
| 966 | #endif |
| 967 | |
| 968 | kal_bool data_enabled_setting; // set to 1 if data is enabled in AP |
| 969 | kal_bool data_roaming_setting; // set to 1 if data roaming is enabled in AP |
| 970 | /* context used for +ECSRA */ |
| 971 | rmmi_ecsra_setting_struct last_ecsra; |
| 972 | |
| 973 | /* context used for +CSCON */ |
| 974 | rmmi_cscon_mode_enum cscon_mode[4]; |
| 975 | rmmi_cscon_state_enum cscon_state[4]; |
| 976 | rmmi_cscon_access_enum cscon_access[4]; |
| 977 | rmmi_cscon_core_network_enum cscon_core_network[4]; // only use array element 2 and 3 for LTE and NR |
| 978 | kal_uint8 cscon_latest_rat_index; |
| 979 | |
| 980 | |
| 981 | #ifdef __HIF_CCISM_SCP_SUPPORT__ |
| 982 | kal_uint32 scp_prev_cell_id; |
| 983 | kal_uint16 scp_prev_cell_rssi; |
| 984 | #endif |
| 985 | signal_modulation_enum modulation; |
| 986 | rmmi_camped_cell_id_struct camped_cell_id_info; //for +ECMPCID |
| 987 | |
| 988 | /* context for +EUEDRX */ |
| 989 | kal_uint16 drx_value; |
| 990 | |
| 991 | /* context for +EC2KCELL */ |
| 992 | irat_ps_type_enum access_type; |
| 993 | kal_uint16 sid; |
| 994 | kal_uint16 nid; |
| 995 | kal_uint8 pzid; |
| 996 | kal_uint16 base_id; |
| 997 | kal_uint32 sector_id[4]; |
| 998 | kal_uint8 subnet_length; |
| 999 | kal_uint8 carrier_id[7]; |
| 1000 | #ifdef __CSG_SUPPORT__ |
| 1001 | kal_uint8 hnb_name[MAX_HNB_NAME_LEN*2+1]; |
| 1002 | kal_uint8 hnb_name_length; |
| 1003 | #endif |
| 1004 | #ifdef __TC01__ |
| 1005 | kal_uint8 rssi_ind_src_id; |
| 1006 | #endif |
| 1007 | |
| 1008 | /* context for +ERAT */ |
| 1009 | kal_uint8 erat_lock; |
| 1010 | kal_uint8 is_no_saved; // while it is ture, the rat mode will no be saved to NVRAM. |
| 1011 | |
| 1012 | kal_bool is_ssac_barring_for_voice; |
| 1013 | kal_uint8 evzwapfcia_mode; |
| 1014 | #if defined(__GEMINI__) || defined(__L4C_GPRS_UT__) |
| 1015 | kal_uint8 edallow_mode; |
| 1016 | #endif |
| 1017 | kal_uint8 is_vops_supported; // init value should be 0xff |
| 1018 | |
| 1019 | plmn_id_rat_struct saved_plmn_for_volte_hys; |
| 1020 | |
| 1021 | kal_bool is_registered_on_eHRPD; |
| 1022 | rat_enum eimsps_rat; |
| 1023 | kal_uint8 eimsps_type; |
| 1024 | rmmi_eind_invalid_sim_info_struct eind_invalid_sim_info; |
| 1025 | |
| 1026 | rmmi_etwmode_setting_struct etwmode_setting; |
| 1027 | |
| 1028 | kal_uint8 enwbdinfo_mode; |
| 1029 | kal_uint16 lte_bandwidthInfo; |
| 1030 | |
| 1031 | kal_uint8 scell_number_dl; |
| 1032 | /* context used for +EAPC */ |
| 1033 | kal_uint8 current_apc_feature_type; |
| 1034 | kal_bool current_report_mode; |
| 1035 | kal_uint16 current_report_period; |
| 1036 | kal_uint8 new_apc_feature_type; |
| 1037 | kal_bool new_report_mode; |
| 1038 | kal_uint16 new_report_period; |
| 1039 | kal_uint8 scell_number_ul; |
| 1040 | kal_uint8 ps_conn_status; |
| 1041 | kal_uint16 pcell_band; // for +EPCELLINFO |
| 1042 | |
| 1043 | gprs_traffic_channel_status_enum gprs_traffic_channel_status; |
| 1044 | |
| 1045 | #ifdef __IMS_SUPPORT__ |
| 1046 | rmmi_ims_emergency_support_struct eimsess_info; |
| 1047 | #endif |
| 1048 | |
| 1049 | rmmi_ca_info_struct ecainfo; // for +ECAINFO URC |
| 1050 | kal_uint8 ctmcall_mode; |
| 1051 | |
| 1052 | kal_bool enable_ecell_ext3_ext4; |
| 1053 | kal_bool enable_ecell_ssbid_info; |
| 1054 | |
| 1055 | kal_uint8 emro_lte_game_ho; |
| 1056 | |
| 1057 | kal_uint8 is_dsda_allowed; |
| 1058 | |
| 1059 | kal_uint8 cirepi_ind; |
| 1060 | kal_uint8 cnems1_ind; |
| 1061 | kal_uint8 cnemiu_ind; |
| 1062 | #ifdef __RF_SCAN_FOR_DESENSE_TEST__ |
| 1063 | rmmi_rfscan_req_struct rfscan_req; // for +ERFSCAN RSSI URC |
| 1064 | #endif /*__RF_SCAN_FOR_DESENSE_TEST__*/ |
| 1065 | |
| 1066 | kal_int16 sar_scenario_index; |
| 1067 | kal_int16 dat_scenario_index; |
| 1068 | kal_int16 sar_operator_index; |
| 1069 | #ifdef __EPSFB_SUPPORT__ |
| 1070 | rmmi_epsfb_info_struct epsfb_info; |
| 1071 | #endif |
| 1072 | #if defined(__TC01__) && defined(__RMMI_EXTEND_CUSTOM_CMD__) |
| 1073 | kal_uint8 cust_cmd_src_id; |
| 1074 | #endif |
| 1075 | #ifdef __ARFCN_TO_CAMERA_SUPPORT__ |
| 1076 | rmmi_camera_arfcn_info_struct last_reported_arfcn; |
| 1077 | #endif |
| 1078 | |
| 1079 | #ifdef __TC01__ |
| 1080 | rmmi_report_reg_to_ap_struct report_reg_state; |
| 1081 | kal_uint8 ltecall_flag; /* at%ltecall */ |
| 1082 | #endif |
| 1083 | |
| 1084 | #ifdef __TC01_CALIBRATION__ |
| 1085 | /* MUSE - ALPS01539170 */ |
| 1086 | /* Check the flag for calibration verification to prevent */ |
| 1087 | /* frequent access to NVRAM when the user input AT%CALDT */ |
| 1088 | kal_uint8 caldt_check; |
| 1089 | #endif |
| 1090 | |
| 1091 | #if defined(__TC01__) && defined(__SIM_HOT_SWAP_SUPPORT__) |
| 1092 | kal_bool sim_replaced; // to indicate SIM is replaced for hot swap |
| 1093 | kal_bool sim_plugout; |
| 1094 | kal_bool sim_first_inserted; |
| 1095 | kal_bool sim_mapping_happened; |
| 1096 | #endif |
| 1097 | |
| 1098 | #ifdef __TC01__ /* for +ESIMCEP */ |
| 1099 | kal_uint8 mnc_length; |
| 1100 | kal_bool is_valid_gid1; |
| 1101 | kal_uint8 number_of_gid1; |
| 1102 | kal_uint8 gid1[20]; |
| 1103 | kal_bool is_valid_gid2; |
| 1104 | kal_uint8 number_of_gid2; |
| 1105 | kal_uint8 gid2[20]; |
| 1106 | #endif |
| 1107 | |
| 1108 | #if defined(__TC01__) |
| 1109 | /*ALPS03746765 & ALPS03743116*/ |
| 1110 | kal_uint8 sim_status_ind; |
| 1111 | #endif |
| 1112 | |
| 1113 | #ifdef __TC01__ |
| 1114 | rmmi_mipi_hw_info_ind_struct mipi_result; |
| 1115 | #endif |
| 1116 | |
| 1117 | #if defined(__VSIM__) && defined(__TC01__) && defined(__FEATURE_TC01_SIMOFF_EXTENTION__) && defined(__MDVSIM__) |
| 1118 | kal_uint8 switch_on; |
| 1119 | #endif/*#if defined(__VSIM__) && defined(__TC01__) && defined(__FEATURE_TC01_SIMOFF_EXTENTION__) && defined(__MDVSIM__)*/ |
| 1120 | |
| 1121 | #ifdef __SAR_SENSOR_TX_DETECTION_SUPPORT__ |
| 1122 | /* TX Power Reduction*/ |
| 1123 | kal_uint8 sar_tx_power_red_event; |
| 1124 | kal_int16 sar_scenario; |
| 1125 | #endif /* __SAR_SENSOR_TX_DETECTION_SUPPORT__ */ |
| 1126 | kal_uint8 channel_lock_mode; |
| 1127 | |
| 1128 | rmmi_nw_rej_cause_attemp_counter_struct nw_rej_cause_attemp_counter; |
| 1129 | |
| 1130 | /* network pyhsical configuration info*/ |
| 1131 | kal_bool dl256qam_configured; |
| 1132 | kal_bool mimo_fourlayer_configured; |
| 1133 | |
| 1134 | kal_uint8 *ecpbw_string_ptr; |
| 1135 | kal_uint16 ecpbw_string_index; |
| 1136 | |
| 1137 | kal_uint8 csg_list_mode; |
| 1138 | |
| 1139 | kal_uint32 rmmi_current_operator; |
| 1140 | |
| 1141 | kal_bool standard_cscon_support; |
| 1142 | |
| 1143 | kal_uint8 is_acb_skip_for_mmtel_voice; |
| 1144 | kal_bool is_acb_skip_for_mmtel_video; |
| 1145 | |
yu.dong | e372c32 | 2023-08-30 20:25:04 -0700 | [diff] [blame] | 1146 | /* For CSCON duplicate detection */ |
| 1147 | rmmi_cscon_mode_enum last_cscon_mode; |
| 1148 | rmmi_cscon_state_enum last_cscon_state; |
| 1149 | rmmi_cscon_access_enum last_cscon_access; |
| 1150 | rmmi_cscon_core_network_enum last_cscon_core_network; |
rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 1151 | } rmmi_context_struct; |
| 1152 | |
| 1153 | typedef struct rmmi_string_struct |
| 1154 | { |
| 1155 | kal_uint16 index; |
| 1156 | kal_uint8 *string_ptr; |
| 1157 | kal_uint8 *ip_string; |
| 1158 | l4c_source_id_enum src_id; // DEREK |
| 1159 | kal_uint8 cmd_mode; |
| 1160 | kal_uint8 cmd_class; |
| 1161 | kal_uint16 cmd_index; //rmmi_extended_cmd_id_enum |
| 1162 | kal_uint16 cmd_row_index; |
| 1163 | rmmi_extend_symbol_hash_enum symbol_hash; |
| 1164 | } rmmi_string_struct; |
| 1165 | |
| 1166 | #ifdef __SAT__ |
| 1167 | |
| 1168 | typedef enum |
| 1169 | { |
| 1170 | RMMI_TIM_MOD_NONE, |
| 1171 | RMMI_TIM_MOD_SAT_DSPL_TEXT, |
| 1172 | RMMI_TIM_MOD_SAT_PLAY_TONE, |
| 1173 | RMMI_TIM_MOD_SAT_REDIAL, |
| 1174 | RMMI_TIM_MOD_SAT_NOTICE, |
| 1175 | RMMI_TIM_MOD_SAT_MMI_INFO, |
| 1176 | RMMI_NUM_OF_TIMER_MOD |
| 1177 | } |
| 1178 | rmmi_timer_mod_enum; |
| 1179 | |
| 1180 | typedef struct |
| 1181 | { |
| 1182 | eventid timer_id; |
| 1183 | kal_uint8 time; |
| 1184 | kal_bool timer_on; |
| 1185 | } rmmi_sat_timer_struct; |
| 1186 | |
| 1187 | /* SAT */ |
| 1188 | #define SAT_SIG_SETUP_MENU_SHOW 70 |
| 1189 | #define SAT_SIG_SELECT_ITEM_SHOW 71 |
| 1190 | #define SAT_SIG_DSPL_TXT_SHOW 72 |
| 1191 | #define SAT_SIG_GET_INKEY_SHOW 73 |
| 1192 | #define SAT_SIG_GET_INPUT_SHOW 74 |
| 1193 | #define SAT_SIG_PLAY_TONE_SHOW 75 |
| 1194 | #define SAT_SIG_SETUP_CALL_SHOW 76 |
| 1195 | //#define SAT_SIG_SETUP_CALL_REQ_SHOW 77 |
| 1196 | //#define SAT_SIG_SETUP_CALL_RES_SHOW 78 |
| 1197 | //#define SAT_SIG_REDIAL_SHOW 79 |
| 1198 | #define SAT_SIG_SEND_SMS_SHOW 80 |
| 1199 | #define SAT_SIG_SEND_SS_SHOW 81 |
| 1200 | #define SAT_SIG_SEND_USSD_SHOW 82 |
| 1201 | #define SAT_SIG_MMI_INFO_SHOW 83 |
| 1202 | //#define SAT_SIG_NOTICE_SHOW 85 |
| 1203 | |
| 1204 | #define RMMI_SAT_SIG_SETUP_CALL_REQ 16 |
| 1205 | #define RMMI_SAT_SIG_SEND_SS_REQ 17 |
| 1206 | #define RMMI_SAT_SIG_SEND_USSD_REQ 18 |
| 1207 | #define RMMI_SAT_SIG_SEND_SMS_REQ 19 |
| 1208 | #define RMMI_SAT_SIG_PLAY_TONE_RES 32 |
| 1209 | #define RMMI_SAT_SIG_DSPL_TEXT_RES 33 |
| 1210 | #define RMMI_SAT_SIG_GET_INKEY_RES 34 |
| 1211 | #define RMMI_SAT_SIG_GET_INPUT_RES 35 |
| 1212 | #define RMMI_SAT_SIG_SELECT_ITEM_RES 36 |
| 1213 | #define RMMI_SAT_SIG_MENU_SELECT_REQ 37 |
| 1214 | #define RMMI_SAT_SIG_START_SAT 80 |
| 1215 | #define RMMI_SAT_SIG_SETUP_CALL_REDIAL 88 |
| 1216 | |
| 1217 | typedef struct |
| 1218 | { |
| 1219 | kal_uint8 item_len; |
| 1220 | kal_uint8 item_dcs; |
| 1221 | kal_uint8 item_id; |
| 1222 | kal_uint8 *item_data; |
| 1223 | } |
| 1224 | rmmi_sat_menu_item_struct; |
| 1225 | |
| 1226 | typedef struct |
| 1227 | { |
| 1228 | kal_uint8 is_help_info_available; |
| 1229 | kal_uint8 cmd_detail[5]; |
| 1230 | kal_uint8 alpha_id_len; |
| 1231 | kal_uint8 *alpha_id; |
| 1232 | kal_uint8 dcs_of_alpha_id; |
| 1233 | kal_uint8 num_of_item; |
| 1234 | rmmi_sat_menu_item_struct *menu_items; |
| 1235 | } |
| 1236 | rmmi_sat_main_menu_struct; |
| 1237 | |
| 1238 | typedef struct |
| 1239 | { |
| 1240 | kal_uint8 cmd_detail[5]; |
| 1241 | kal_uint8 is_help_info_available; |
| 1242 | kal_uint8 is_item_id_available; |
| 1243 | kal_uint8 item_id; |
| 1244 | kal_uint8 alpha_id_len; |
| 1245 | kal_uint8 *alpha_id; |
| 1246 | kal_uint8 dcs_of_alpha_id; |
| 1247 | kal_uint8 num_of_item; |
| 1248 | rmmi_sat_menu_item_struct *menu_items; |
| 1249 | } |
| 1250 | rmmi_sat_sub_menu_struct; |
| 1251 | |
| 1252 | typedef struct |
| 1253 | { |
| 1254 | kal_uint8 cmd_detail[5]; |
| 1255 | kal_uint8 priority; |
| 1256 | kal_uint8 clear_text_type; |
| 1257 | kal_uint8 immediate_res; |
| 1258 | kal_uint16 no_text_string; |
| 1259 | kal_uint8 *text_string; |
| 1260 | kal_uint8 dcs_of_text_string; |
| 1261 | } |
| 1262 | rmmi_sat_dspl_text_struct; |
| 1263 | |
| 1264 | typedef struct |
| 1265 | { |
| 1266 | kal_uint8 cmd_detail[5]; |
| 1267 | kal_uint8 is_help_info_available; |
| 1268 | kal_uint8 type_of_input; |
| 1269 | kal_uint16 no_text_string; |
| 1270 | kal_uint8 *text_string; |
| 1271 | kal_uint8 dcs_of_text_string; |
| 1272 | } |
| 1273 | rmmi_sat_get_inkey_struct; |
| 1274 | |
| 1275 | typedef struct |
| 1276 | { |
| 1277 | kal_uint8 cmd_detail[5]; |
| 1278 | kal_uint8 is_help_info_available; |
| 1279 | kal_uint8 type_of_input; |
| 1280 | kal_uint8 is_input_revealed_to_user; |
| 1281 | kal_uint8 len_of_min_input; |
| 1282 | kal_uint8 len_of_max_input; |
| 1283 | |
| 1284 | kal_uint16 no_text_string; |
| 1285 | kal_uint8 *text_string; |
| 1286 | kal_uint8 dcs_of_text_string; |
| 1287 | kal_uint16 no_default_text; |
| 1288 | kal_uint8 *default_text; |
| 1289 | kal_uint8 dcs_of_default_text; |
| 1290 | } |
| 1291 | rmmi_sat_get_input_struct; |
| 1292 | |
| 1293 | typedef struct |
| 1294 | { |
| 1295 | kal_uint8 cmd_detail[5]; |
| 1296 | kal_uint8 tone_id; |
| 1297 | kal_uint32 duration; |
| 1298 | kal_uint8 no_alpha_id; |
| 1299 | kal_uint8 *alpha_id; |
| 1300 | kal_uint8 dcs_of_alpha_id; |
| 1301 | |
| 1302 | } |
| 1303 | rmmi_sat_play_tone_struct; |
| 1304 | |
| 1305 | typedef struct |
| 1306 | { |
| 1307 | kal_uint8 cmd_detail[5]; |
| 1308 | kal_uint8 mmi_info_type; |
| 1309 | kal_uint8 no_alpha_id; |
| 1310 | kal_uint8 *alpha_id; |
| 1311 | kal_uint8 dcs_of_alpha_id; |
| 1312 | } |
| 1313 | rmmi_sat_mmi_info_struct; |
| 1314 | |
| 1315 | typedef struct |
| 1316 | { |
| 1317 | kal_uint8 cmd_detail[5]; |
| 1318 | kal_uint8 condition; |
| 1319 | kal_uint32 duration; |
| 1320 | |
| 1321 | kal_uint8 no_alpha_id1; |
| 1322 | kal_uint8 *alpha_id1; |
| 1323 | kal_uint8 dcs_of_alpha_id1; |
| 1324 | kal_uint8 no_alpha_id2; |
| 1325 | kal_uint8 *alpha_id2; |
| 1326 | kal_uint8 dcs_of_alpha_id2; |
| 1327 | |
| 1328 | kal_uint8 size_of_ccp; |
| 1329 | kal_uint8 ccp[MAX_SAT_SIZE_OF_CCP]; |
| 1330 | kal_uint8 size_of_subaddr; |
| 1331 | kal_uint8 subaddr[MAX_SIM_SUB_ADDR_BCD_LEN]; |
| 1332 | |
| 1333 | kal_uint8 no_addr; |
| 1334 | kal_uint8 *addr; |
| 1335 | } |
| 1336 | rmmi_sat_setup_call_struct; |
| 1337 | |
| 1338 | typedef struct |
| 1339 | { |
| 1340 | kal_uint8 cmd_detail[5]; |
| 1341 | kal_uint8 is_sms_packed_required; |
| 1342 | kal_uint8 size_of_addr; |
| 1343 | kal_uint8 addr[MAX_SIM_ADDR_LEN]; //mtk02514_081216 |
| 1344 | kal_uint8 no_alpha_id; |
| 1345 | kal_uint8 *alpha_id; |
| 1346 | kal_uint8 dcs_of_alpha_id; |
| 1347 | kal_uint8 no_sms_tpdu; |
| 1348 | kal_uint8 *sms_tpdu; |
| 1349 | } |
| 1350 | rmmi_sat_send_sms_struct; |
| 1351 | |
| 1352 | typedef struct |
| 1353 | { |
| 1354 | kal_uint8 cmd_detail[5]; |
| 1355 | kal_uint8 no_alpha_id; |
| 1356 | kal_uint8 *alpha_id; |
| 1357 | kal_uint8 dcs_of_alpha_id; |
| 1358 | kal_uint8 no_ss_string; |
| 1359 | kal_uint8 *ss_string; |
| 1360 | } |
| 1361 | rmmi_sat_send_ss_struct; |
| 1362 | |
| 1363 | typedef struct |
| 1364 | { |
| 1365 | kal_uint8 cmd_detail[5]; |
| 1366 | kal_uint8 no_alpha_id; |
| 1367 | kal_uint8 *alpha_id; |
| 1368 | kal_uint8 dcs_of_alpha_id; |
| 1369 | kal_uint8 no_ussd_string; |
| 1370 | kal_uint8 *ussd_string; |
| 1371 | kal_uint8 dcs_of_ussd_string; |
| 1372 | } |
| 1373 | rmmi_sat_send_ussd_struct; |
| 1374 | |
| 1375 | /* TYPES */ |
| 1376 | |
| 1377 | typedef enum |
| 1378 | { |
| 1379 | RMMI_VTS_SPEECH_IN = 0, |
| 1380 | RMMI_VTS_SPEECH_OUT = 1, |
| 1381 | RMMI_VTS_KEY_BEEP = 2, |
| 1382 | RMMI_VTS_DTMF_TONE = 3, |
| 1383 | RMMI_VTS_RINGER = 4, |
| 1384 | RMMI_VTS_MEDIA = 5, |
| 1385 | RMMI_NUM_OF_VTS_TYPE |
| 1386 | } |
| 1387 | rmmi_vts_type_enum; |
| 1388 | |
| 1389 | typedef enum |
| 1390 | { |
| 1391 | RMMI_VTS_PLAY_CRESCENDO = 0, /* Play sound for crescendo. */ |
| 1392 | RMMI_VTS_PLAY_INFINITE = 1, /* Play sound for infinite. */ |
| 1393 | RMMI_VTS_PLAY_ONCE = 2, /* Play sound for once. */ |
| 1394 | RMMI_VTS_PLAY_DESCENDO = 3, /* Play sound for descendo. */ |
| 1395 | RMMI_VTS_PLAY_OFF = 4, /* stop sound */ |
| 1396 | RMMI_NUM_OF_VTS_PLAY_MODE |
| 1397 | } |
| 1398 | rmmi_vts_play_mode_enum; |
| 1399 | |
| 1400 | #endif /* __SAT__ */ |
| 1401 | |
| 1402 | typedef struct |
| 1403 | { |
| 1404 | kal_uint8 err_string[RMMI_MAX_ERR_STR_LEN]; |
| 1405 | } rmmi_error_msg_struct; |
| 1406 | |
| 1407 | //RMMI_UT --- |
| 1408 | #define ATCI_MAX_UT_IO_LENGTH 1024 |
| 1409 | #define ATCI_MAX_UT_CMD_STRING_LENGTH 100 |
| 1410 | #define ATCI_MAX_UT_AT_PARAMETER_NUMBER 20 |
| 1411 | #define ATCI_MAX_UT_AT_PARAMETER_STRING_LENGTH 100 |
| 1412 | |
| 1413 | typedef struct |
| 1414 | { |
| 1415 | LOCAL_PARA_HDR |
| 1416 | kal_uint8 src_id; |
| 1417 | kal_uint8 port; |
| 1418 | kal_uint8 string[ATCI_MAX_UT_IO_LENGTH]; |
| 1419 | kal_bool stuff; |
| 1420 | } atci_ut_rmmi_input_string_struct; // MSG_ID_ATCI_UT_RMMI_INPUT_STRING |
| 1421 | |
| 1422 | typedef struct |
| 1423 | { |
| 1424 | LOCAL_PARA_HDR |
| 1425 | kal_uint8 src_id; |
| 1426 | kal_uint8 port; |
| 1427 | kal_uint8 string[ATCI_MAX_UT_IO_LENGTH]; |
| 1428 | kal_bool stuff; |
| 1429 | } atci_ut_rmmi_output_string_struct; // MSG_ID_ATCI_UT_RMMI_OUTPUT_STRING |
| 1430 | |
| 1431 | typedef struct |
| 1432 | { |
| 1433 | kal_uint8 para_string[ATCI_MAX_UT_AT_PARAMETER_STRING_LENGTH]; |
| 1434 | } atci_ut_rmmi_input_expanded_at_parameter_struct; |
| 1435 | |
| 1436 | typedef struct |
| 1437 | { |
| 1438 | LOCAL_PARA_HDR |
| 1439 | kal_uint8 src_id; |
| 1440 | kal_uint8 port; |
| 1441 | kal_uint8 cmd_string[ATCI_MAX_UT_CMD_STRING_LENGTH]; |
| 1442 | atci_ut_rmmi_input_expanded_at_parameter_struct para[ATCI_MAX_UT_AT_PARAMETER_NUMBER]; |
| 1443 | } atci_ut_rmmi_input_expanded_at_string_struct; //MSG_ID_ATCI_UT_RMMI_INPUT_EXPANDED_AT_STRING |
| 1444 | |
| 1445 | |
| 1446 | typedef struct |
| 1447 | { |
| 1448 | LOCAL_PARA_HDR |
| 1449 | kal_uint8 src_id; |
| 1450 | kal_uint8 cid; |
| 1451 | l4c_action_enum action; |
| 1452 | } atci_ut_check_l4c_context_info_struct; // MSG_ID_ATCI_UT_CHECK_L4C_CONTEXT_INFO |
| 1453 | |
| 1454 | |
| 1455 | //--- RMMI_UT |
| 1456 | |
| 1457 | typedef void (*RMMI_EXT_CMD_FUNCTION) (rmmi_string_struct *source_string_ptr); |
| 1458 | |
| 1459 | typedef kal_bool(*RMMI_BASIC_CMD_FUNCTION) |
| 1460 | (rmmi_string_struct *source_string_ptr, rmmi_multiple_basic_cmd_struct *head_node_ptr, rmmi_err_id_enum *err_id); |
| 1461 | |
| 1462 | typedef void (*RMMI_IND_FUNCTION) (); |
| 1463 | |
| 1464 | |
| 1465 | extern rmmi_context_struct *rmmi_ptr_g; |
| 1466 | extern rmmi_common_context_struct *rmmi_common_ptr_g; |
| 1467 | extern module_type rmmi_current_mod_id; |
| 1468 | extern rmmi_context_struct rmmi_cntxt_g[RMMI_MAX_SIM_NUM]; |
| 1469 | #if defined(__ATCMD_ONOFF_CHECK__) |
| 1470 | extern kal_bool rmmi_check_at_enable; |
| 1471 | #endif |
| 1472 | |
| 1473 | #if defined(__DUAL_TALK_MODEM_SUPPORT__) |
| 1474 | typedef struct |
| 1475 | { |
| 1476 | kal_uint8 speech_mode; |
| 1477 | kal_uint8 rat_mode; |
| 1478 | } rmmi_spc_espeech_param_struct; |
| 1479 | |
| 1480 | typedef struct |
| 1481 | { |
| 1482 | kal_uint8 sidetone; |
| 1483 | } rmmi_spc_esstv_param_struct; |
| 1484 | |
| 1485 | typedef struct |
| 1486 | { |
| 1487 | kal_uint8 tone_id; |
| 1488 | } rmmi_spc_edtp_param_struct; |
| 1489 | |
| 1490 | typedef struct |
| 1491 | { |
| 1492 | kal_uint8 esetdev_mode; |
| 1493 | kal_uint8 src_dev; |
| 1494 | } rmmi_spc_esetdev_param_struct; |
| 1495 | |
| 1496 | typedef struct |
| 1497 | { |
| 1498 | kal_uint8 volume; |
| 1499 | kal_uint8 gain_id; |
| 1500 | } rmmi_spc_esov_param_struct; |
| 1501 | |
| 1502 | typedef struct |
| 1503 | { |
| 1504 | kal_uint8 mic_volume; |
| 1505 | } rmmi_spc_esmv_param_struct; |
| 1506 | |
| 1507 | typedef struct |
| 1508 | { |
| 1509 | kal_uint8 mode; |
| 1510 | } rmmi_spc_essma_param_struct; |
| 1511 | |
| 1512 | typedef union |
| 1513 | { |
| 1514 | rmmi_spc_espeech_param_struct *espeech_param; |
| 1515 | rmmi_spc_esstv_param_struct *esstv_param; |
| 1516 | rmmi_spc_edtp_param_struct *edtp_param; |
| 1517 | rmmi_spc_esetdev_param_struct *esetdev_param; |
| 1518 | rmmi_spc_esov_param_struct *esov_param; |
| 1519 | rmmi_spc_esmv_param_struct *esmv_param; |
| 1520 | rmmi_spc_essma_param_struct *essma_param; |
| 1521 | } rmmi_spc_param_union; |
| 1522 | #endif /* __DUAL_TALK_MODEM_SUPPORT__ */ |
| 1523 | |
| 1524 | typedef struct |
| 1525 | { |
| 1526 | kal_uint8* sensor_name; |
| 1527 | kal_uint8* sensor_data; |
| 1528 | } rmmi_tty_port_read_data_struct; |
| 1529 | |
| 1530 | #endif /* _RMMI_CONTEXT_H */ |
| 1531 | |