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) 2016 |
| 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 | * |
| 38 | * Filename: |
| 39 | * --------- |
| 40 | * rcptxagc.h |
| 41 | * |
| 42 | * Project: |
| 43 | * -------- |
| 44 | * C2K |
| 45 | * |
| 46 | * Description: |
| 47 | * ------------ |
| 48 | * global definition of RxAGC in Slot Tick. |
| 49 | * |
| 50 | * Author: |
| 51 | * ------- |
| 52 | * |
| 53 | * |
| 54 | *============================================================================== |
| 55 | * HISTORY |
| 56 | * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| 57 | *------------------------------------------------------------------------------ |
| 58 | * |
| 59 | * |
| 60 | *------------------------------------------------------------------------------ |
| 61 | * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| 62 | *============================================================================== |
| 63 | *******************************************************************************/ |
| 64 | |
| 65 | #ifndef _RCP_TXAGC_H_ |
| 66 | #define _RCP_TXAGC_H_ |
| 67 | |
| 68 | #include "sysapi.h" |
| 69 | #include "evl1shtxagc.h" |
| 70 | |
| 71 | /* define the close loop RPC step set structure */ |
| 72 | typedef struct TxAgcClosedLoopRpcStepSetEvtTag |
| 73 | { |
| 74 | kal_uint8 RpcStep; /* 00: 0.5dB, 01: 1dB, all other values: invalid */ |
| 75 | } TxAgcClosedLoopRpcStepSetEvtT; |
| 76 | |
| 77 | /* define the CMU RETAP flag set structure */ |
| 78 | typedef struct TxAgcCmuRetapFlagSetEvtTag |
| 79 | { |
| 80 | kal_bool CmuRetapFlag; |
| 81 | } TxAgcCmuRetapFlagSetEvtT; |
| 82 | |
| 83 | typedef struct |
| 84 | { |
| 85 | /* TX AGC control type, |
| 86 | 0: stop sw txagc, |
| 87 | 1: start sw txagc, |
| 88 | 2: obtain current request power */ |
| 89 | kal_uint8 CtrlType; |
| 90 | |
| 91 | /* Tx slot */ |
| 92 | kal_uint8 TxSlot; |
| 93 | |
| 94 | /* Access/ Traffic channel */ |
| 95 | TxAgcChanTypeE ChanType; |
| 96 | |
| 97 | /* PHY subtype */ |
| 98 | TxAgcPhySubTypeE PhySubType; |
| 99 | |
| 100 | /* Power reference used for open loop estimation in 1/64dBm@S9.6 unit.*/ |
| 101 | kal_int16 PowerBase; /* Q6 dB */ |
| 102 | |
| 103 | /* Bit0: trans ind TRUE/FALSE, |
| 104 | Bit8: Close loop parameters enable/disable */ |
| 105 | kal_uint16 TestBmp; |
| 106 | |
| 107 | /* close loop step up size in 1/64dB@S2.6 unit */ |
| 108 | kal_int16 ClStepUp; |
| 109 | |
| 110 | /* close loop step down size in 1/64dB@S2.6 unit */ |
| 111 | kal_int16 ClStepDown; |
| 112 | |
| 113 | /* close loop adjustment limited in 1/64dB@S8.6 unit */ |
| 114 | kal_int16 ClAdjMax; |
| 115 | |
| 116 | /* close loop adjustment limited in 1/64dB@S8.6 unit */ |
| 117 | kal_int16 ClAdjMin; |
| 118 | |
| 119 | /* maximum transmit power adjustment in 1/64dB@S5.6 unit, set zero |
| 120 | if not use it */ |
| 121 | kal_int16 MaxPwrAdj; |
| 122 | |
| 123 | /* RPC bit in SW mode with U2.0 unit*/ |
| 124 | kal_uint16 RpcBitSw; /* Q6 dB */ |
| 125 | |
| 126 | /* KS value in SW mode with S6.6 unit*/ |
| 127 | kal_int16 KsValueSw; /* Q6 dB */ |
| 128 | |
| 129 | /* Reserved */ |
| 130 | kal_uint16 Reserved; |
| 131 | |
| 132 | } TxAgcCtrlEvtT; |
| 133 | |
| 134 | /* define the power information report structure */ |
| 135 | typedef struct |
| 136 | { |
| 137 | kal_int16 openLoopRxPwr; /* The RxPwr after each access probe */ |
| 138 | kal_int16 TxPilotPwr; /* The final "clipped" pilot pwr after each access probe */ |
| 139 | kal_int16 KsAdj; |
| 140 | } RcpRtcPwrRefParamMsgT; |
| 141 | |
| 142 | /** MSG_ID_RCP_TXAGC_RTC_PWR_REF_PARAM_MSG |
| 143 | */ |
| 144 | typedef struct |
| 145 | { |
| 146 | LOCAL_PARA_HDR |
| 147 | RcpRtcPwrRefParamMsgT Msg; |
| 148 | } rcp_txagc_rtc_pwr_ref_param_msg_struct; |
| 149 | |
| 150 | /*---------------------------------------------------------------------------- |
| 151 | Global Defines And Macros |
| 152 | ----------------------------------------------------------------------------*/ |
| 153 | extern void TxAgcInit(); |
| 154 | extern kal_int16 RcpTxAgcGetCurrRxPwr(); |
| 155 | extern kal_int16 RcpTxAgcGetMaxTxPwr(); |
| 156 | extern kal_int16 RcpTxAgcGetAvailTxPwr(); |
| 157 | extern void RcpTxAgcClosedLoopRpcStepSet(kal_uint8 RpcStep); |
| 158 | extern void RcpTxAgcCMURetapFlagSet(kal_bool CmuRetapFlag); |
| 159 | /***************************************************************************** |
| 160 | * End of File |
| 161 | *****************************************************************************/ |
| 162 | #endif |
| 163 | |