Ejemplo n.º 1
0
INT32 wmt_func_gps_off(P_WMT_IC_OPS pOps, P_WMT_GEN_CONF pConf)
{
    INT32 iRet = 0;
	UINT32 ctrlPa1 = 0;
	UINT32 ctrlPa2 = 0;
	
    iRet = wmt_func_gps_pre_off(pOps, pConf);
    if (0 == iRet)
    {
        iRet = wmt_func_gps_ctrl(FUNC_OFF);
		if(!iRet)
		{
				osal_clear_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 stop sending de-sense CMD
					ctrlPa1 = 0;
					ctrlPa2 = 0;
					wmt_core_ctrl(WMT_CTRL_BGW_DESENSE_CTRL,&ctrlPa1,&ctrlPa2);
				}
		}
    }
    return iRet;

}
Ejemplo n.º 2
0
INT32 wmt_func_gps_off(P_WMT_IC_OPS pOps, P_WMT_GEN_CONF pConf)
{
	INT32 iRet = 0;
	iRet = wmt_func_gps_pre_off(pOps, pConf);
	if (0 == iRet) {
		iRet = wmt_func_gps_ctrl(FUNC_OFF);
	}
	return iRet;

}
Ejemplo n.º 3
0
INT32 wmt_func_gps_off(P_WMT_IC_OPS pOps, P_WMT_GEN_CONF pConf)
{
	INT32 iRet = 0;
	UINT32 ctrlPa1 = 0;
	UINT32 ctrlPa2 = 0;
	UINT8 co_clock_type = (pConf->co_clock_flag & 0x0f);

	iRet = wmt_func_gps_pre_off(pOps, pConf);
	if (0 == iRet) {
		iRet = wmt_func_gps_ctrl(FUNC_OFF);
		if (!iRet) {
			osal_clear_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 stop sending de-sense CMD */
				ctrlPa1 = 0;
				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 */
		if (osal_test_bit(WMT_FM_ON, &gGpsFmState))
			WMT_INFO_FUNC("FM is still on, do not turn off LDO VCN28\n");
		else {
			ctrlPa1 = GPS_PALDO;
			ctrlPa2 = PALDO_OFF;
			wmt_core_ctrl(WMT_CTRL_SOC_PALDO_CTRL, &ctrlPa1, &ctrlPa2);
		}

		osal_clear_bit(WMT_GPS_ON, &gGpsFmState);
	}

	return iRet;

}