如何使能一个RF card


参考文档 80-NE606-11_APPLICATION NOTE- NEW FEATURE FOR MANAGING RF CARDS高通pdf文档
一般来说,在rfc厂家文件中,在rfc_set_card中都会有一个相应的switch case,包含一系列初始化rf card
rfc_set_card在rfc_card_factory.cpp中,rfc_card_factory.cpp通过”RF Card Id“控制哪个rf  card的哪个特性可以被使用,见以下代码

boolean rfc_set_card (rf_hw_type rf_hw)
{
  static boolean rfc_initialized = FALSE;
  rfc_intf *temp_p = NULL;
  rfc_vreg_mgr *vreg_mgr_p = NULL;
  rfc_common_data *rfc_data = NULL;
  system_clock_enum sysclk = SYS_CLK_XO;
  .....
  rfc_factory(rf_hw, &vreg_mgr_p, &rfc_data);
      	switch
      	{
       	case RF_HW_WTR4905_CHINA_CT_4M:        //RF_HW_WTR4905_CHINA_CT_4M为RF Card Id,详见附录 1
       	*vreg_mgr_pp = rfc_vreg_mgr_wtr1605_sv::get_instance();
       	*rfc_data_pp = rfc_wtr4905_china_ct_4m_cmn_ag::get_instance(rf_hw);
        .....


编译MPSS的过程中,所有的RF card都会被编译链接,会使得生成文件比较大,比较繁琐。rfc厂家文件    可以选择行的编译连接某些文件解决了这一问题rf_factory函数中的factory就表示厂家的函数


Disable某个RF Card

①:最简单的方法是删除整个RFC文件夹,例如:删除\modem_proc\rfc_jolokia\rf_card\rfc_wtr4905_chile_3g整个文件夹,推荐此方法

②:如果不想删除哪个文件夹下的代码,不编译它

       在/modem_proc/rfc_jolokia/rf_card/rfc_wtr4905_china_cmcc_3m/build中,删除这一行 env.AddRfCard('RF_HW_WTR4905_CHINA_CMCC_3M', 'rfc_wtr4905_china_cmcc_3m_cmn_ag.h', 'rfc_wtr4905_china_cmcc_3m_cmn_ag')就可以删除rfc_wtr4905_china_cmcc_3m这个RFC Card。


增加一个RF Card

①  在/modem_proc/rfc_jolokia/rf_card/rfc_wtr4905_china_cmcc_3m/build中,删除这一行 env.AddRfCard('RF_HW_WTR4905_CHINA_CMCC_3M', 'rfc_wtr4905_china_cmcc_3m_cmn_ag.h', 'rfc_wtr4905_china_cmcc_3m_cmn_ag')

② 在/modem_proc/build/ms/dynrec.lst中增加如下代码

/*TEXT*/
__dynrec_text_start_rfc_43 = .;
*modem_proc/rfc_jolokia/rf_card/rfc_wtr4905_chile_3g/?*:(.text .text.* .roda    ta .rodata.*)
. = ALIGN(4K);
__dynrec_text_end_rfc_43 = .;

/*DATA*/ 
__dynrec_data_start_rfc_ = .;
*modem_proc/rfc_jolokia/rf_card//?*:(.data .data.*    )
. = ALIGN(4K);
__dynrec_data_end_rfc_ = .;







附录1
typedef enum {
  RF_HW_UNDEFINED                         = (uint8)0,
  RF_TARGET_NONE                          = RF_HW_UNDEFINED,
  RF_HW_WTR4905_CHINA_CMCC_3M             = (uint8)56,
  RF_HW_WTR4905_CHINA_CU_4M               = (uint8)57,
  RF_HW_WTR4905_CHINA_CT_4M               = (uint8)58,
  RF_HW_WTR4905_AMX                       = (uint8)59,
  RF_HW_WTR4905_OM                        = (uint8)60,
  RF_HW_WTR4905_NON_CA                    = (uint8)31,
  RF_HW_WTR4905_CHILE_SRLTE_V2            = (uint8)32,
  RF_HW_WTR4905_NA_V2                     = (uint8)33,
  RF_HW_WTR4905_CHILE_SR_SAWLESS_V2       = (uint8)36,
  RF_HW_WTR4905_JAPAN_V2                  = (uint8)37,
  RF_HW_WTR4905_CHILE_3G                  = (uint8)43,
  RF_HW_WTR4905_CHINA_V2                  = (uint8)151,
  RF_HW_WTR4905_NA_DLCA                   = (uint8)190,

  /* Add any new HW ID before this line */
  RF_HW_MAX,
  RF_HW_DEFAULT = RF_HW_MAX, /* Default card for Off-Target Builds */
  RF_HW_EFS_CARD                          = (uint8)191, /* EFS Card */

  /* The following definitions are not needed and will need to be removed  */
  RF_HW_WTR1605_SGLTE                     = RF_HW_MAX,
  RF_HW_WTR1605_SGLTE_DSDA                = RF_HW_MAX,
  RF_HW_WTR3925_TP130                     = RF_HW_MAX,
  RF_HW_WTR3925_TP130_2                   = RF_HW_MAX,
  RF_HW_WTR3925_TP130_2_CA                = RF_HW_MAX,  
  RF_HW_WTR3925_TP130_CA                  = RF_HW_MAX,
} rf_hw_type;


你可能感兴趣的:(嵌入式)