mt6140_common.h
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:8k
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2005
- *
- * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
- * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
- * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
- * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
- * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
- * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
- * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
- * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
- * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
- * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
- *
- * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
- * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
- * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
- * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
- * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
- *
- * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
- * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
- * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
- * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
- * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * mt6140_common.h
- *
- * Project:
- * --------
- * Maui META APP
- *
- * Description:
- * ------------
- * MT6140 chip common header
- *
- * Author:
- * -------
- * Andy Ueng (mtk00490)
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * $Revision$
- * $Modtime$
- * $Log$
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- #ifndef _MT6140_COMMON_H_
- #define _MT6140_COMMON_H_
- #ifndef META_DLL_H
- #include "meta.h"
- #endif
- /*---------------------------------------------------------------------------*/
- // register read
- //#define ADDR_MT6139_AUXOUT_CW2 0x0000012F // Acode
- //#define ADDR_MT6139_AUXOUT_CW8 0x0000018F // BCCODEI
- //#define ADDR_MT6139_AUXOUT_CW9 0x0000019F // BCCODEQ
- //#define ADDR_MT6139_AUXOUT_AMCODE 0x000001AF
- //#define ADDR_MT6139_AUXOUT_CW7 0x0000017F // AUTO_CAL
- // register write
- #define ADDR_MT6140_CW0 0x00
- #define ADDR_MT6140_CW1 0x01
- #define ADDR_MT6140_CW2 0x02
- #define ADDR_MT6140_CW3 0x03
- #define ADDR_MT6140_CW4 0x04
- #define ADDR_MT6140_CW5 0x05
- #define ADDR_MT6140_CW6 0x06
- #define ADDR_MT6140_CW7 0x07
- #define ADDR_MT6140_CW8 0x08
- #define ADDR_MT6140_CW9 0x09
- #define ADDR_MT6140_CW10 0x0A
- #define ADDR_MT6140_CW11 0x0B
- #define ADDR_MT6140_CW12 0x0C
- #define ADDR_MT6140_CW15 0x0F
- #define ADDR_MT6140_AUXOUT_CW0 0x0000010F
- #define ADDR_MT6140_AUXOUT_CW1 0x0000011F
- #define ADDR_MT6140_AUXOUT_CW2 0x0000012F
- #define ADDR_MT6140_AUXOUT_CW3 0x0000013F
- #define ADDR_MT6140_AUXOUT_CW4 0x0000014F
- #define ADDR_MT6140_AUXOUT_CW5 0x0000015F
- #define ADDR_MT6140_AUXOUT_CW6 0x0000016F
- #define ADDR_MT6140_AUXOUT_CW7 0x0000017F
- #define ADDR_MT6140_AUXOUT_CW8 0x0000018F
- #define ADDR_MT6140_AUXOUT_CW9 0x0000019F
- #define ADDR_MT6140_AUXOUT_CW10 0x000001AF
- #define ADDR_MT6140_AUXOUT_CW11 0x000001BF
- #define ADDR_MT6140_AUXOUT_CW15 0x000001FF
- #define MT6140_CW0_AFC_LEN 6
- #define MT6140_CW0_SYNCP_LEN 2
- #define MT6140_CW1_BAND_LEN 2
- #define MT6140_CW1_N_INTEGER_LEN 7
- #define MT6140_CW1_N_FRACTION_LEN 8
- #define MT6140_CW2_DC_DAC_AI_LEN 6
- #define MT6140_CW2_DC_DAC_AQ_LEN 6
- #define MT6140_CW2_MODE_LEN 3
- #define MT6140_CW2_GAIN_TABLE_LEN 6
- #define MT6140_CW4_CAL_DELAY_LEN 2
- #define MT6140_CW4_VCO_VSET_LEN 2
- #define MT6140_CW4_CAL_MODE_LEN 2
- #define MT6140_CW4_SYN_PFD_LEN 2
- #define MT6140_CW5_RESB_LEN 5
- #define MT6140_CW5_RES_LEN 5
- #define MT6140_CW6_VCO_SCA_LEN 7
- #define MT6140_CW7_LO_VSW_G_LEN 3
- #define MT6140_CW7_LO_VSW_D_LEN 3
- #define MT6140_CW7_RX_GAIN_LEN 8
- #define MT6140_CW8_DC_DAC_BI_LEN 7
- #define MT6140_CW8_DC_DAC_CI_LEN 7
- #define MT6140_CW9_DC_DAC_BQ_LEN 7
- #define MT6140_CW9_DC_DAC_CQ_LEN 7
- #define MT6140_CW10_AM_DACI_LEN 8
- #define MT6140_CW10_AM_DACQ_LEN 8
- #define MT6140_CW11_TXVAPC_LEN 2
- #define MT6140_CW11_TXITC_LEN 3
- #define MT6140_CW15_AUXOUT_SELECTION_LEN 7
- #define MT6140_CW15_ADDRESS_DATA_OUT_LEN 4
- // CW2 mode
- //#define MODE_MT6139_CW2_STAND_BY 0x02
- //#define MODE_MT6139_CW2_RX 0x03
- //#define MODE_MT6139_CW2_RX_AM_CAL 0x06
- /*---------------------------------------------------------------------------*/
- typedef struct
- {
- unsigned char uc_por;
- unsigned char uc_gpo;
- unsigned char uc_tx_mod_bpi;
- unsigned char uc_vcosel;
- unsigned char uc_afc;
- unsigned char uc_flt;
- unsigned char uc_dien;
- unsigned char uc_synpw;
- unsigned char uc_syncp;
- }S_MT6140_CW0;
- typedef struct
- {
- unsigned char uc_trx;
- unsigned char uc_band;
- unsigned char uc_bufmode;
- unsigned char uc_n_integer;
- unsigned char uc_n_fraction;
- }S_MT6140_CW1;
- typedef struct
- {
- unsigned char uc_dc_dac_ai;
- unsigned char uc_dc_dac_aq;
- unsigned char uc_auto_cal; // only for MT6139C above
- unsigned char uc_mode;
- unsigned char uc_gain_table;
- }S_MT6140_CW2;
- typedef struct
- {
- unsigned char uc_t_clk;
- unsigned char uc_t_latch;
- unsigned char uc_vco_bufp;
- unsigned char uc_monitor;
- unsigned char uc_sio5;
- unsigned char uc_vco_sca;
- unsigned char uc_vcoset;
- }S_MT6140_CW6;
- typedef struct
- {
- unsigned char uc_rx_ctrl_sw3;
- unsigned char uc_rx_ctrl_sw2;
- unsigned char uc_rx_ctrl_sw1;
- unsigned char uc_rx_ctrl_swb;
- unsigned char uc_rx_ctrl_swa;
- unsigned char uc_rx_ctrl_swen;
- unsigned char uc_dc_dac_bi;
- unsigned char uc_dc_dac_ci;
- }S_MT6140_CW8;
- typedef struct
- {
- unsigned char uc_am_daci;
- unsigned char uc_am_dacq;
- }S_MT6140_CW10;
- typedef struct
- {
- unsigned char uc_auxout_selection;
- unsigned char uc_address_data_out;
- }S_MT6140_CW15;
- #endif