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 | * l4c_eq_msg.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 _L4C_EQ_MSG_H |
| 65 | #define _L4C_EQ_MSG_H |
| 66 | |
| 67 | #include "keypad_sw.h" |
| 68 | #include "kal_general_types.h" |
| 69 | #include "kal_public_defs.h" |
| 70 | #include "ps_public_struct.h" |
| 71 | #include "uem_at_cmd.h" |
| 72 | |
| 73 | extern void l4cuem_power_on_ind(kal_uint8 poweron_mode, kal_uint8 battery_level); |
| 74 | |
| 75 | extern void l4cuem_audio_play_finish_ind(kal_uint8 result, kal_uint16 identifier); |
| 76 | |
| 77 | extern void l4cuem_gpio_detect_ind(kal_uint8 gpio_device, kal_bool on_off); |
| 78 | |
| 79 | extern void l4cuem_alarm_detect_ind(rtc_format_struct *rtc_time); |
| 80 | |
| 81 | extern void l4cuem_rtc_period_ind(kal_uint8 rtc_type, rtc_format_struct *rtc_time); |
| 82 | |
| 83 | extern void l4cuem_keypad_detect_ind(kal_bool(*drv_get_key_func) (kbd_data *)); |
| 84 | |
| 85 | extern void l4cuem_battery_status_ind(kal_uint8 battery_status, kal_uint8 battery_voltage); |
| 86 | |
| 87 | extern void l4cuem_get_adc_all_channel_ind( |
| 88 | kal_int32 vbat, |
| 89 | kal_int32 bat_temp, |
| 90 | kal_int32 vaux, |
| 91 | kal_int32 charge_current, |
| 92 | kal_int32 vcharger); |
| 93 | |
| 94 | extern void l4cuem_startup_cnf_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 95 | |
| 96 | extern void l4cuem_audio_play_by_name_cnf_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 97 | |
| 98 | extern void l4cuem_audio_stop_by_name_cnf_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 99 | |
| 100 | extern void l4cuem_audio_play_by_string_cnf_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 101 | |
| 102 | extern void l4cuem_audio_stop_by_string_cnf_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 103 | |
| 104 | extern void l4cuem_get_audio_profile_cnf_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 105 | |
| 106 | extern void l4cuem_get_volume_cnf_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 107 | |
| 108 | extern void l4cuem_get_gain_cnf_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 109 | |
| 110 | extern void l4cuem_get_audio_param_cnf_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 111 | |
| 112 | extern void l4cuem_get_audio_wb_param_cnf_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 113 | |
| 114 | extern void l4cuem_set_audio_wb_param_cnf_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 115 | |
| 116 | extern void l4cuem_set_audio_profile_cnf_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 117 | |
| 118 | extern void l4cuem_set_audio_param_cnf_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 119 | |
| 120 | extern void l4cuem_set_hw_level_cnf_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 121 | |
| 122 | extern void l4c_keypad_input_press_hdlr(void); |
| 123 | |
| 124 | extern void l4c_keypad_input_pause_hdlr(void); |
| 125 | |
| 126 | extern void l4c_keypad_input_long_press_hdlr(void); |
| 127 | |
| 128 | extern void l4c_keypad_input_repeat_hdlr(void); |
| 129 | |
| 130 | extern void l4cuem_usbdetect_ind(kal_uint8 action); |
| 131 | |
| 132 | extern void l4cuem_usb_power_on_ind(void); |
| 133 | |
| 134 | extern void l4c_eq_get_calibration_flag_rsp(kal_uint8 cal_flag); |
| 135 | |
| 136 | extern void l4c_eq_get_calibration_data_rsp(kal_uint8 cal_data); |
| 137 | |
| 138 | extern void l4cuem_at_ef_port_setting_result_rrsp(l4cuem_at_ef_port_mode_enum mode, kal_bool result); |
| 139 | |
| 140 | #define l4c_equeue_onekey_to_kbdbuffer(_event,_key) \ |
| 141 | { \ |
| 142 | l4c_kbd_buffer.kbd_data_buffer[l4c_kbd_buffer.kbd_data_buffer_windex].Keyevent = _event; \ |
| 143 | l4c_kbd_buffer.kbd_data_buffer[l4c_kbd_buffer.kbd_data_buffer_windex].Keydata[0] = _key; \ |
| 144 | l4c_kbd_buffer.kbd_data_buffer_windex++; \ |
| 145 | l4c_kbd_buffer.kbd_data_buffer_windex &= (kbd_buffer_size-1); \ |
| 146 | if(l4c_kbd_buffer.kbd_data_buffer_windex==l4c_kbd_buffer.kbd_data_buffer_rindex) \ |
| 147 | { \ |
| 148 | l4c_kbd_buffer.kbd_data_buffer_windex--; \ |
| 149 | l4c_kbd_buffer.kbd_data_buffer_windex &= (kbd_buffer_size-1); \ |
| 150 | while(l4c_kbd_buffer.kbd_data_buffer[l4c_kbd_buffer.kbd_data_buffer_windex].Keyevent != kbd_onekey_press)\ |
| 151 | { \ |
| 152 | l4c_kbd_buffer.kbd_data_buffer_windex--; \ |
| 153 | l4c_kbd_buffer.kbd_data_buffer_windex &= (kbd_buffer_size-1); \ |
| 154 | } \ |
| 155 | } \ |
| 156 | } |
| 157 | |
| 158 | #define l4c_dequeue_onekey_from_kbdbuffer(_event,_key) \ |
| 159 | { \ |
| 160 | _event = l4c_kbd_buffer.kbd_data_buffer[l4c_kbd_buffer.kbd_data_buffer_rindex].Keyevent;\ |
| 161 | _key = l4c_kbd_buffer.kbd_data_buffer[l4c_kbd_buffer.kbd_data_buffer_rindex].Keydata[0];\ |
| 162 | l4c_kbd_buffer.kbd_data_buffer_rindex++; \ |
| 163 | l4c_kbd_buffer.kbd_data_buffer_rindex &= (kbd_buffer_size-1); \ |
| 164 | } |
| 165 | |
| 166 | #define l4c_clear_kbdbuffer() \ |
| 167 | { \ |
| 168 | kal_mem_set(l4c_kbd_buffer.kbd_data_buffer, 0xff, sizeof(kbd_data)* kbd_buffer_size);\ |
| 169 | l4c_kbd_buffer.kbd_data_buffer_windex = 0 ; \ |
| 170 | l4c_kbd_buffer.kbd_data_buffer_rindex = 0 ; \ |
| 171 | } |
| 172 | |
| 173 | extern void l4cuem_leave_precharge_ind(void); |
| 174 | |
| 175 | extern void l4cuem_pmic_config_cnf(kal_uint8 src_id, kal_uint8 request_type, pmic_config_param_struct request); |
| 176 | |
| 177 | extern void l4cuem_rf_test_gsm_cnf(kal_uint8 src_id, kal_uint8 request_type, rf_test_gsm_param_struct request); |
| 178 | |
| 179 | extern void l4cuem_fm_radio_config_cnf(kal_uint8 src_id, kal_uint8 request_type, fm_radio_config_param_struct request); |
| 180 | |
| 181 | #if defined(__WIFI_SUPPORT__) |
| 182 | extern void l4cuem_rf_test_wifi_cnf(kal_uint8 src_id, kal_uint8 request_type, rf_test_wifi_param_struct request); |
| 183 | #endif |
| 184 | |
| 185 | extern void l4c_l1_query_cal_data_dl_status_cnf_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 186 | |
| 187 | #ifdef __LTE_RAT__ |
| 188 | extern void l4cel1_rx_rssi_verify_ind_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 189 | extern void l4c_eq_rf_test_lte_cnf_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 190 | extern void l4cel1_b3_info_cnf_hdlr(local_para_struct *local_para_ptr, peer_buff_struct *peer_buff_ptr); |
| 191 | #endif |
| 192 | |
| 193 | #endif /* _L4C_EQ_MSG_H */ /* l4c_eq_msg.h */ |
| 194 | |