Exemplo n.º 1
0
bool LGE_FacReadImei(unsigned int imeiNum, unsigned char *imei)
{
    if (imeiNum == 1)
    {
        //                                                                                 
        return _LGE_GENERIC_READ_FUN(imei, LGE_FAC_IMEI_IDX, LGE_FAC_IMEI_SIZE);
    }
    else if(imeiNum == 2)
    {
        //                                                                                     
        return _LGE_GENERIC_READ_FUN(imei, LGE_FAC_IMEI2_IDX, LGE_FAC_IMEI_SIZE);
    }
    else if(imeiNum == 3)
    {
        //                                                                                     
        return _LGE_GENERIC_READ_FUN(imei, LGE_FAC_IMEI3_IDX, LGE_FAC_IMEI_SIZE);
    }
    else if(imeiNum == 4)
    {
        //                                                                                     
        return _LGE_GENERIC_READ_FUN(imei, LGE_FAC_IMEI4_IDX, LGE_FAC_IMEI_SIZE);
    }
}
Exemplo n.º 2
0
bool LGE_FacReadOneBinaryHWInfo(unsigned char *data)
{
    bool result = 0;

    result = _LGE_GENERIC_READ_FUN(data, LGE_ONE_BINARY_HWINFO_IDX, LGE_ONE_BINARY_HWINFO_SIZE);

    if( result == 1 )
    {
        printk("jjm_debug : LGE_FacReadOneBinaryHWInfo Success! : OneBinaryHWInfo=%s\n", data);
    }
	else
	{
		printk("jjm_debug : LGE_FacReadOneBinaryHWInfo Fail!");
	}

    return result;
}
Exemplo n.º 3
0
bool LGE_FacReadSVN_SBP (unsigned char *svn)
{
	bool result = 0;

	result = _LGE_GENERIC_READ_FUN (svn, LGE_FAC_IMEI_SVN_IDX, LGE_FAC_IMEI_SVN_SIZE);

	if( result == 1 )
	{
		printk("jjm_debug : LGE_FacReadSVN_SBP Success! : svn=%s\n", svn);
	}
	else
	{
		printk("jjm_debug : LGE_FacReadSVN_SBP : misc2 Read Error\n");
		return 0;
	}

	return 1;
}
Exemplo n.º 4
0
/* sbp_interface */
bool LGE_FacReadNetworkCode_SBP(FactoryNetworkCode *networkCode, unsigned short networkCodeListNum, unsigned int length)
{
	int i = 0;
	bool result;
	char *temp_buf = NULL;

	if (length != LGE_FAC_NETWORK_CODE_SIZE_SBP)
	{
		printk("jjm_debug : Mismatch FactoryNetworkCode Structures!\n");
		return 0;
	}

	temp_buf = (char *)kmalloc(LGE_FAC_NETWORK_CODE_SIZE_SBP, GFP_KERNEL);

	if (temp_buf == NULL)
	{
		printk("jjm_debug : LGE_FacReadNetworkCode2 : temp_buf alloc failed!\n");
		return 0;
	}

	if (( networkCode == 0) ||(networkCodeListNum > LGE_FAC_MAX_NTCODE_COUNT_SBP ))
	{
		printk("jjm_debug : networkCodeListNum is wrong! networkCodeList = %d\n", networkCodeListNum);
		return 0;
	}

	result = _LGE_GENERIC_READ_FUN(temp_buf, LGE_FAC_NETWORK_CODE_IDX01, (sizeof(FactoryNetworkCode) * networkCodeListNum));

	if( result != 1 )
	{
		printk("jjm_debug : misc2 Read Error\n");
		kfree(temp_buf);
		return 0;
	}

	for(i = 0; i < LGE_FAC_MAX_NTCODE_COUNT_SBP; i++)
	{
		memcpy(&networkCode[i], &temp_buf[sizeof(FactoryNetworkCode)*i], sizeof(FactoryNetworkCode));
	}

	kfree(temp_buf);

	return 1;
}
Exemplo n.º 5
0
bool LGE_FacReadSimLockType(unsigned char *simLockType)
{
    //                                                                                                   
    return _LGE_GENERIC_READ_FUN(simLockType, LGE_FAC_SIMLOCK_TYPE_IDX, LGE_FAC_SIMLOCK_TYPE_SIZE);
}
Exemplo n.º 6
0
bool LGE_FacReadBtAddr(unsigned char *btAddr)
{
    return _LGE_GENERIC_READ_FUN(btAddr, LGE_FAC_BT_ADDR_OFFSET, LGE_FAC_BT_ADDR_LEN);
}
Exemplo n.º 7
0
bool LGE_FacReadBtAddr(unsigned char *btAddr)
{
    //                                                                                  
    return _LGE_GENERIC_READ_FUN(btAddr, LGE_FAC_BT_IDX, LGE_FAC_BT_SIZE);
}
Exemplo n.º 8
0
bool LGE_FacReadSimLockType(unsigned char *simLockType)
{
    return _LGE_GENERIC_READ_FUN(simLockType, LGE_FAC_SIM_LOCK_TYPE_OFFSET, LGE_FAC_SIM_LOCK_TYPE_LEN);
}
Exemplo n.º 9
0
bool LGE_FacReadPid(unsigned char *pid)
{
    //                                                                       
    return _LGE_GENERIC_READ_FUN(pid, LGE_FAC_PID_IDX, LGE_FAC_PID_SIZE);
}
Exemplo n.º 10
0
bool LGE_FacReadFusgFlag(unsigned char *fusgFlag)
{
    //                                                                                        
    return _LGE_GENERIC_READ_FUN(fusgFlag, LGE_FAC_FUSG_FLAG_IDX, LGE_FAC_FUSG_FLAG_SIZE);
}
Exemplo n.º 11
0
bool LGE_FacReadUnlockFailCount(unsigned char simLockType, unsigned char *failCount)
{
    //                                                                                                         
    return _LGE_GENERIC_READ_FUN(failCount, LGE_FAC_UNLOCKCODE_FAIL_COUNT_IDX, LGE_FAC_UNLOCKCODE_FAIL_COUNT_SIZE);

}
Exemplo n.º 12
0
bool LGE_FacReadPid(unsigned char *pid)
{
    return _LGE_GENERIC_READ_FUN(pid, LGE_FAC_PID_OFFSET, LGE_FAC_PID_LEN);
}
Exemplo n.º 13
0
bool LGE_FacReadDataVersion(unsigned char *dataVersion)
{
    return _LGE_GENERIC_READ_FUN(dataVersion, LGE_FAC_DATA_VERSION_OFFSET, LGE_FAC_DATA_VERSION_LEN);
}
Exemplo n.º 14
0
bool LGE_FacReadFusgFlag(unsigned char *fusgFlag)
{
    return _LGE_GENERIC_READ_FUN(fusgFlag, LGE_FAC_FUSG_FLAG_OFFSET, LGE_FAC_FUSG_FLAG_LEN);
}
Exemplo n.º 15
0
bool LGE_FacReadNetworkCode(FactoryNetworkCode * networkCode, unsigned short networkCodeListNum)
{
    return _LGE_GENERIC_READ_FUN((unsigned char *)networkCode, LGE_FAC_NETWORK_CODE_OFFSET, LGE_FAC_NETWORK_CODE_LEN);

}
Exemplo n.º 16
0
bool LGE_FacReadUnlockFailCount(unsigned char simLockType, unsigned char *failCount)
{
    return _LGE_GENERIC_READ_FUN(failCount, LGE_FAC_UNLOCK_FAIL_COUNT_OFFSET, LGE_FAC_UNLOCK_FAIL_COUNT_LEN);

}
Exemplo n.º 17
0
bool LGE_FacReadUnlockCodeVerifyFailCount(unsigned char *failCount)
{
    return _LGE_GENERIC_READ_FUN(failCount, LGE_FAC_UNLOCK_CODE_VERIFY_FAIL_COUNT_OFFSET, LGE_FAC_UNLOCK_CODE_VERIFY_FAIL_COUNT_LEN);
}
Exemplo n.º 18
0
bool LGE_FacReadNetworkCodeListNum(unsigned short *networkCodeListNum)
{
    return _LGE_GENERIC_READ_FUN((unsigned char *)networkCodeListNum, LGE_FAC_NETWORK_CODE_LIST_NUM_OFFSET, LGE_FAC_NETWORK_CODE_LIST_NUM_LEN);
}
Exemplo n.º 19
0
bool LGE_FacReadNetworkCodeListNum(unsigned short *networkCodeListNum)
{
    //                                                                                                                          
    return _LGE_GENERIC_READ_FUN(networkCodeListNum, LGE_FAC_NETWORK_CODE_LIST_IDX, LGE_FAC_NETWORK_CODE_LIST_SIZE);
}
Exemplo n.º 20
0
bool LGE_FacReadUnlockCodeVerifyFailCount(unsigned char *failCount)
{
    //                                                                                                                                 
    return _LGE_GENERIC_READ_FUN(failCount, LGE_FAC_UNLOCKCODE_VERIFY_FAIL_IDX, LGE_FAC_UNLOCKCODE_VERIFY_FAIL_SIZE);
}
Exemplo n.º 21
0
bool LGE_FacReadFactoryResetStatusFlag(unsigned char *factoryResetFlag)
{
    //                                                                                                        
    return _LGE_GENERIC_READ_FUN(factoryResetFlag, LGE_FAC_FACTORY_RESET_IDX, LGE_FAC_FACTORY_RESET_SIZE);
}
Exemplo n.º 22
0
bool LGE_FacReadNetworkCode(FactoryNetworkCode * networkCode, unsigned short networkCodeListNum)
{
    //                                                                                                 
    return _LGE_GENERIC_READ_FUN(networkCode, LGE_FAC_NETWORK_CODE_IDX, LGE_FAC_NETWORK_CODE_SIZE);

}
Exemplo n.º 23
0
bool LGE_FacReadWifiMacAddr(unsigned char *wifiMacAddr)
{
    return _LGE_GENERIC_READ_FUN(wifiMacAddr, LGE_FAC_WIFI_MAC_ADDR_OFFSET, LGE_FAC_WIFI_MAC_ADDR_LEN);
}
Exemplo n.º 24
0
bool LGE_FacReadDataVersion(unsigned char *dataVersion)
{
    //                                                                                                 
    return _LGE_GENERIC_READ_FUN(dataVersion, LGE_FAC_DATA_VER_IDX, LGE_FAC_DATA_VER_SIZE);
}
Exemplo n.º 25
0
bool LGE_FacReadWifiMacAddr(unsigned char *wifiMacAddr)
{
    //                                                                                                   
    return _LGE_GENERIC_READ_FUN(wifiMacAddr, LGE_FAC_WIFI_IDX, LGE_FAC_WIFI_SIZE);
}
Exemplo n.º 26
0
bool LGE_FacReadQEMFlag(unsigned char *qemFlag)
{
    //                                                                           
    return _LGE_GENERIC_READ_FUN(qemFlag, LGE_FAC_QEM_IDX, LGE_FAC_QEM_SIZE);
}
Exemplo n.º 27
0
bool LGE_FacReadImei(unsigned char imei_type, unsigned char *imei)
{
    if(imei_mapping_table[imei_type]==LGE_FAC_IMEI_ENDMARK) return false;

    return _LGE_GENERIC_READ_FUN(imei, imei_mapping_table[imei_type], LGE_FAC_IMEI_LEN);
}
Exemplo n.º 28
0
bool LGE_FacReadLCDCalibration(unsigned char *lcd_kcal)
{
    return _LGE_GENERIC_READ_FUN(lcd_kcal, LGE_FAC_LCD_CALIBRATION_IDX, LGE_FAC_LCD_CALIBRATION_SIZE);
}
Exemplo n.º 29
0
bool LGE_FacReadAccelerometerCalibration(unsigned char *accel_cal_val)
{
    return _LGE_GENERIC_READ_FUN(accel_cal_val, LGE_FAC_ACCELEROMETER_CALIBRATION_IDX, LGE_FAC_ACCELEROMETER_CALIBRATION_SIZE);
}