Ejemplo n.º 1
0
INT32 wmt_func_gps_on(P_WMT_IC_OPS pOps, P_WMT_GEN_CONF pConf)
{
	INT32 iRet = 0;
	iRet = wmt_func_gps_pre_on(pOps, pConf);
	if (0 == iRet) {
		iRet = wmt_func_gps_ctrl(FUNC_ON);
	}
	return iRet;
}
Ejemplo n.º 2
0
INT32 wmt_func_gps_on(P_WMT_IC_OPS pOps, P_WMT_GEN_CONF pConf)
{
    INT32 iRet = 0;
	UINT32 ctrlPa1;
	UINT32 ctrlPa2;
    iRet = wmt_func_gps_pre_on(pOps, pConf);
    if (0 == iRet)
    {
        iRet = wmt_func_gps_ctrl(FUNC_ON);
		if(!iRet)
		{
			osal_set_bit(WMT_GPS_ON,&gBtWifiGpsState);
			if((osal_test_bit(WMT_BT_ON,&gBtWifiGpsState)) || (osal_test_bit(WMT_WIFI_ON,&gBtWifiGpsState)))
			{
				//send msg to GPS native for sending de-sense CMD
				ctrlPa1 = 1;
				ctrlPa2 = 0;
				wmt_core_ctrl(WMT_CTRL_BGW_DESENSE_CTRL,&ctrlPa1,&ctrlPa2);
			}
		}
    }
    return iRet;
}
Ejemplo n.º 3
0
INT32 wmt_func_gps_on(P_WMT_IC_OPS pOps, P_WMT_GEN_CONF pConf)
{
	INT32 iRet = 0;
	UINT32 ctrlPa1;
	UINT32 ctrlPa2;
	UINT8 co_clock_type = (pConf->co_clock_flag & 0x0f);

	if ((co_clock_type) && (0 == pConf->wmt_gps_lna_enable)) {	/* use SOC external LNA */
		if (!osal_test_bit(WMT_FM_ON, &gGpsFmState)) {
			ctrlPa1 = GPS_PALDO;
			ctrlPa2 = PALDO_ON;
			wmt_core_ctrl(WMT_CTRL_SOC_PALDO_CTRL, &ctrlPa1, &ctrlPa2);
		} else {
			WMT_INFO_FUNC("LDO VCN28 has been turn on by FM\n");
		}
	}

	iRet = wmt_func_gps_pre_on(pOps, pConf);
	if (0 == iRet) {
		iRet = wmt_func_gps_ctrl(FUNC_ON);
		if (!iRet) {
			osal_set_bit(WMT_GPS_ON, &gBtWifiGpsState);
			if ((osal_test_bit(WMT_BT_ON, &gBtWifiGpsState))
			    || (osal_test_bit(WMT_WIFI_ON, &gBtWifiGpsState))) {
				/* send msg to GPS native for sending de-sense CMD */
				ctrlPa1 = 1;
				ctrlPa2 = 0;
				wmt_core_ctrl(WMT_CTRL_BGW_DESENSE_CTRL, &ctrlPa1, &ctrlPa2);
			}

			if ((co_clock_type) && (0 == pConf->wmt_gps_lna_enable))	/* use SOC external LNA */
				osal_set_bit(WMT_GPS_ON, &gGpsFmState);
		}
	}
	return iRet;
}