本文整理汇总了C++中GETARRAYNUM函数的典型用法代码示例。如果您正苦于以下问题:C++ GETARRAYNUM函数的具体用法?C++ GETARRAYNUM怎么用?C++ GETARRAYNUM使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GETARRAYNUM函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: charging_set_current
static kal_uint32 charging_set_current(void *data)
{
kal_uint32 status = STATUS_OK;
kal_uint32 set_chr_current;
kal_uint32 array_size;
kal_uint32 register_value;
kal_uint32 current_value = *(kal_uint32 *)data;
if(current_value <= CHARGE_CURRENT_350_00_MA)
{
fan5405_set_io_level(1);
}
else
{
fan5405_set_io_level(0);
array_size = GETARRAYNUM(CS_VTH);
set_chr_current = bmt_find_closest_level(CS_VTH, array_size, current_value);
register_value = charging_parameter_to_value(CS_VTH, array_size ,set_chr_current);
if(register_value > 6)
{
register_value = 6;
}
fan5405_set_iocharge(register_value);
}
return status;
}
开发者ID:Jlsmily,项目名称:android_kernel_meilan2,代码行数:26,代码来源:charging_hw_fan5405.c
示例2: charging_set_input_current
static kal_uint32 charging_set_input_current(void *data)
{
kal_uint32 status = STATUS_OK;
kal_uint32 current_value = *(kal_uint32 *)data;
kal_uint32 set_chr_current;
kal_uint32 array_size;
kal_uint32 register_value;
if(current_value >= CHARGE_CURRENT_2500_00_MA)
{
register_value = 0x6;
}
else if(current_value == CHARGE_CURRENT_1000_00_MA)
{
register_value = 0x4;
}
else
{
array_size = GETARRAYNUM(INPUT_CS_VTH);
set_chr_current = bmt_find_closest_level(INPUT_CS_VTH, array_size, current_value);
register_value = charging_parameter_to_value(INPUT_CS_VTH, array_size ,set_chr_current);
}
bq24261_set_in_limit(register_value);
return status;
}
开发者ID:djun,项目名称:m463,代码行数:27,代码来源:charging_hw_bq24261.c
示例3: charging_set_input_current
static kal_uint32 charging_set_input_current(void *data)
{
kal_uint32 status = STATUS_OK;
kal_uint32 set_chr_current;
kal_uint32 array_size;
kal_uint32 register_value;
if(*(kal_uint32 *)data > CHARGE_CURRENT_500_00_MA)
{
/*lenovo-sw weiweij modified for changing input current to 3A*/
register_value = 0x7;
/*lenovo-sw weiweij modified for changing input current to 3A end*/
}
/* else if(*data==CHARGE_CURRENT_MAX)
{
register_value = 0x6;
}*/
else
{
array_size = GETARRAYNUM(INPUT_CS_VTH);
set_chr_current = bmt_find_closest_level(INPUT_CS_VTH, array_size, *(kal_uint32 *)data);
register_value = charging_parameter_to_value(INPUT_CS_VTH, array_size ,set_chr_current);
}
bq24250_set_iinlim(register_value);
return status;
}
开发者ID:AudioGod,项目名称:MediaTek-HelioX10-Kernel,代码行数:28,代码来源:charging_hw_bq24250.c
示例4: charging_set_cv_voltage
static kal_uint32 charging_set_cv_voltage(void *data)
{
kal_uint32 status = STATUS_OK;
kal_uint16 register_value;
register_value = charging_parameter_to_value(VBAT_CV_VTH, GETARRAYNUM(VBAT_CV_VTH) ,*(kal_uint32 *)(data));
fan5405_set_oreg(register_value);
return status;
}
开发者ID:yangxianting,项目名称:mediatek,代码行数:10,代码来源:charging_hw_fan5405.c
示例5: charging_get_current
static kal_uint32 charging_get_current(void *data)
{
kal_uint32 status = STATUS_OK;
kal_uint32 array_size;
array_size = GETARRAYNUM(CS_VTH);
*(kal_uint32 *)data = bmt_find_closest_level(CS_VTH, array_size, *(kal_uint32 *)data);
return status;
}
开发者ID:JustAndroids,项目名称:ZTEBladeL2,代码行数:10,代码来源:charging_hw_6333.c
示例6: bmt_get_the_less_nearest_current
static DCL_STATUS bmt_get_the_less_nearest_current(void *data)
{
DCL_STATUS status = STATUS_OK;
DCL_UINT32 array_size;
array_size = GETARRAYNUM(chr_CS_VTH);
*(DCL_UINT32 *)data = bmt_find_closest_level(chr_CS_VTH, array_size, *(DCL_UINT32 *)data);
return status;
}
开发者ID:WayWingsDev,项目名称:testmywatch,代码行数:10,代码来源:bmt_bl_chr_setting.c
示例7: charging_set_cv_voltage
static kal_uint32 charging_set_cv_voltage(void *data)
{
kal_uint32 status = STATUS_OK;
kal_uint16 register_value;
static kal_int16 pre_register_value = -1;
register_value = charging_parameter_to_value(VBAT_CV_VTH, GETARRAYNUM(VBAT_CV_VTH) ,*(kal_uint32 *)(data));
#if 0
//bq24261_set_vbreg(0x14);
bq24261_set_vbreg(register_value);
#else
//PCB workaround
if(mt6325_upmu_get_swcid() == PMIC6325_E1_CID_CODE)
{
#if defined(CV_E1_INTERNAL)
bq24261_set_vbreg(0x19);
#else
bq24261_set_vbreg(0xF);
#endif
battery_xlog_printk(BAT_LOG_CRTI,"[charging_set_cv_voltage] set low CV by 6325 E1\n");
}
else
{
if(is_mt6311_exist())
{
if(mt6311_get_chip_id()==PMIC6311_E1_CID_CODE)
{
#if defined(CV_E1_INTERNAL)
bq24261_set_vbreg(0x19);
#else
bq24261_set_vbreg(0xF);
#endif
battery_xlog_printk(BAT_LOG_CRTI,"[charging_set_cv_voltage] set low CV by 6311 E1\n");
}
else
{
if (pre_register_value != register_value) {
battery_xlog_printk(BAT_LOG_CRTI,"[charging_set_cv_voltage] disable charging\n");
bq24261_set_dis_ce(1);
}
bq24261_set_vbreg(register_value);
if (pre_register_value != register_value)
bq24261_set_dis_ce(0);
pre_register_value = register_value;
}
}
else
{
bq24261_set_vbreg(register_value);
}
}
#endif
return status;
}
开发者ID:djun,项目名称:m463,代码行数:55,代码来源:charging_hw_bq24261.c
示例8: charging_get_current
static kal_uint32 charging_get_current(void *data)
{
kal_uint32 status = STATUS_OK;
kal_uint32 array_size;
kal_uint32 reg_value;
array_size = GETARRAYNUM(CS_VTH);
reg_value=pmic_get_register_value(PMIC_RG_CS_VTH);//RG_CS_VTH
*(kal_uint32 *)data = charging_value_to_parameter(CS_VTH,array_size,reg_value);
return status;
}
开发者ID:Jlsmily,项目名称:android_kernel_meilan2,代码行数:12,代码来源:charging_hw_pmic.c
示例9: charging_set_cv_voltage
static kal_uint32 charging_set_cv_voltage(void *data)
{
kal_uint32 status = STATUS_OK;
kal_uint16 register_value;
register_value = charging_parameter_to_value(VBAT_CV_VTH, GETARRAYNUM(VBAT_CV_VTH) ,*(kal_uint32 *)(data));
cv_voltage=VBAT_CV_VTH[register_value];
/*
#if 0
mt6325_upmu_set_rg_vbat_cv_vth(register_value);
#else
//PCB workaround
if(mt6325_upmu_get_swcid() == PMIC6325_E1_CID_CODE)
{
pmic_config_interface(0xEFE,0x0,0xF,1); // [4:1]: RG_VBAT_OV_VTH; Set charger OV=3.9V
pmic_config_interface(0xEF8,0x3,0x3F,0); // [5:0]: RG_VBAT_CV_VTH; Set charger CV=3.8V
battery_log(BAT_LOG_CRTI,"[charging_set_cv_voltage] set low CV by 6325 E1\n");
}
else
{
if(is_mt6311_exist())
{
if(mt6311_get_chip_id()==PMIC6311_E1_CID_CODE)
{
pmic_config_interface(0xEFE,0x0,0xF,1); // [4:1]: RG_VBAT_OV_VTH; Set charger OV=3.9V
pmic_config_interface(0xEF8,0x3,0x3F,0); // [5:0]: RG_VBAT_CV_VTH; Set charger CV=3.8V
battery_log(BAT_LOG_CRTI,"[charging_set_cv_voltage] set low CV by 6311 E1\n");
}
else
{
mt6325_upmu_set_rg_vbat_cv_vth(register_value);
}
}
else
{
mt6325_upmu_set_rg_vbat_cv_vth(register_value);
}
}
#endif
*/
pmic_set_register_value(PMIC_RG_VBAT_CV_VTH,register_value);
battery_log(BAT_LOG_CRTI,"[charging_set_cv_voltage] [0x%x]=0x%x, [0x%x]=0x%x\n",
0xf54, upmu_get_reg_value(0xf54),
0xf4e, upmu_get_reg_value(0xf4e)
);
return status;
}
开发者ID:Jlsmily,项目名称:android_kernel_meilan2,代码行数:52,代码来源:charging_hw_pmic.c
示例10: charging_get_current
static kal_uint32 charging_get_current(void *data)
{
kal_uint32 status = STATUS_OK;
kal_uint32 array_size;
kal_uint8 reg_value;
//Get current level
array_size = GETARRAYNUM(CS_VTH);
bq24261_read_interface(bq24261_CON4, ®_value, 0x1F, 3); //ICHG to BAT
*(kal_uint32 *)data = charging_value_to_parameter(CS_VTH,array_size,reg_value);
return status;
}
开发者ID:djun,项目名称:m463,代码行数:13,代码来源:charging_hw_bq24261.c
示例11: charging_get_current
static kal_uint32 charging_get_current(void *data)
{
kal_uint32 status = STATUS_OK;
kal_uint32 array_size;
kal_uint8 reg_value;
//Get current level
array_size = GETARRAYNUM(CS_VTH);
fan5405_read_interface(0x1, ®_value, 0x3, 0x6); //IINLIM
*(kal_uint32 *)data = charging_value_to_parameter(CS_VTH,array_size,reg_value);
return status;
}
开发者ID:yangxianting,项目名称:mediatek,代码行数:13,代码来源:charging_hw_fan5405.c
示例12: bmt_find_and_set_the_nearest_current
static DCL_STATUS bmt_find_and_set_the_nearest_current(void *data)
{
DCL_STATUS status = STATUS_OK;
DCL_UINT32 set_chr_current;
DCL_UINT32 array_size;
DCL_UINT16 register_value;
array_size = GETARRAYNUM(chr_CS_VTH);
set_chr_current = bmt_find_closest_level(chr_CS_VTH, array_size, *(DCL_UINT32 *)data);
register_value = bmt_parameter_to_value(chr_CS_VTH, array_size ,set_chr_current);
status = bmt_set_register_value(RG_CS_VTH_OFFSET,RG_CS_VTH_MASK,register_value<<RG_CS_VTH_SHIFT);
return status;
}
开发者ID:WayWingsDev,项目名称:testmywatch,代码行数:14,代码来源:bmt_bl_chr_setting.c
示例13: charging_set_current
static kal_uint32 charging_set_current(void *data)
{
kal_uint32 status = STATUS_OK;
kal_uint32 set_chr_current;
kal_uint32 array_size;
kal_uint32 register_value;
array_size = GETARRAYNUM(CS_VTH);
set_chr_current = bmt_find_closest_level(CS_VTH, array_size, *(kal_uint32 *)data);
register_value = charging_parameter_to_value(CS_VTH, array_size ,set_chr_current);
pmic_set_register_value(PMIC_RG_CS_VTH,register_value);
return status;
}
开发者ID:Jlsmily,项目名称:android_kernel_meilan2,代码行数:14,代码来源:charging_hw_pmic.c
示例14: charging_set_hv_threshold
static kal_uint32 charging_set_hv_threshold(void *data)
{
kal_uint32 status = STATUS_OK;
kal_uint32 set_hv_voltage;
kal_uint32 array_size;
kal_uint16 register_value;
kal_uint32 voltage = *(kal_uint32*)(data);
array_size = GETARRAYNUM(VCDT_HV_VTH);
set_hv_voltage = bmt_find_closest_level(VCDT_HV_VTH, array_size, voltage);
register_value = charging_parameter_to_value(VCDT_HV_VTH, array_size ,set_hv_voltage);
mt6325_upmu_set_rg_vcdt_hv_vth(register_value);
return status;
}
开发者ID:John677,项目名称:Kernal_k3note,代码行数:15,代码来源:charging_hw_bq24196.c
示例15: charging_set_current
static kal_uint32 charging_set_current(void *data)
{
kal_uint32 status = STATUS_OK;
kal_uint32 set_chr_current;
kal_uint32 array_size;
kal_uint32 register_value;
kal_uint32 current_value = *(kal_uint32 *)data;
array_size = GETARRAYNUM(CS_VTH);
set_chr_current = bmt_find_closest_level(CS_VTH, array_size, current_value);
register_value = charging_parameter_to_value(CS_VTH, array_size ,set_chr_current);
bq24196_set_ichg(register_value);
return status;
}
开发者ID:John677,项目名称:Kernal_k3note,代码行数:15,代码来源:charging_hw_bq24196.c
示例16: bmt_find_and_set_the_nearest_charger_high_voltage
static DCL_STATUS bmt_find_and_set_the_nearest_charger_high_voltage(void *data)
{
DCL_STATUS status = STATUS_OK;
DCL_UINT32 set_hv_voltage;
DCL_UINT32 array_size;
DCL_UINT16 register_value;
DCL_UINT32 voltage = *(DCL_UINT32*)(data);
array_size = GETARRAYNUM(chr_VCDT_HV_VTH);
set_hv_voltage = bmt_find_closest_level(chr_VCDT_HV_VTH, array_size, voltage);
register_value = bmt_parameter_to_value(chr_VCDT_HV_VTH, array_size ,set_hv_voltage);
bmt_set_register_value(RG_VCDT_HV_VTH_OFFSET,RG_VCDT_HV_VTH_MASK,register_value<<RG_VCDT_HV_VTH_SHIFT);
return status;
}
开发者ID:WayWingsDev,项目名称:testmywatch,代码行数:15,代码来源:bmt_bl_chr_setting.c
示例17: charging_set_input_current_bq24196
static kal_uint32 charging_set_input_current_bq24196(void *data)
{
kal_uint32 status = STATUS_OK;
kal_uint32 set_chr_current;
kal_uint32 array_size;
kal_uint32 register_value;
array_size = GETARRAYNUM(INPUT_CS_VTH_BQ24196);
set_chr_current = bmt_find_closest_level(INPUT_CS_VTH_BQ24196, array_size, *(kal_uint32 *)data);
register_value = charging_parameter_to_value(INPUT_CS_VTH_BQ24196, array_size ,set_chr_current);
bq24196_set_iinlim(register_value);
return status;
}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:15,代码来源:charging_hw_bq24196.c
示例18: charging_set_cv_voltage_bq24196
static kal_uint32 charging_set_cv_voltage_bq24196(void *data)
{
kal_uint32 status = STATUS_OK;
kal_uint16 register_value;
kal_uint32 cv_value = *(kal_uint32 *)(data);
if(cv_value == BATTERY_VOLT_04_200000_V)
{
//use nearest value
cv_value = 4208000;
}
register_value = charging_parameter_to_value(VBAT_CV_VTH_BQ24196, GETARRAYNUM(VBAT_CV_VTH_BQ24196), cv_value);
bq24196_set_vreg(register_value);
return status;
}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:16,代码来源:charging_hw_bq24196.c
示例19: charging_set_cv_voltage
static kal_uint32 charging_set_cv_voltage(void *data)
{
kal_uint32 status = STATUS_OK;
kal_uint16 register_value;
kal_uint32 cv_value = *(kal_uint32 *)(data);
#if defined(HIGH_BATTERY_VOLTAGE_SUPPORT)
//highest of voltage will be 4.3V, because powerpath limitation
cv_value = 4304000;
#else
//use nearest value, ncp1854 hit 4.2v level
cv_value = 4200000;
#endif
register_value = charging_parameter_to_value(VBAT_CV_VTH, GETARRAYNUM(VBAT_CV_VTH), cv_value);
ncp1854_set_ctrl_vbat(register_value);
return status;
}
开发者ID:vitek999,项目名称:android_kernel_lg_mm,代码行数:17,代码来源:charging_hw_ncp1854.c
示例20: charging_set_input_current
static kal_uint32 charging_set_input_current(void *data)
{
kal_uint32 status = STATUS_OK;
kal_uint32 set_chr_current;
kal_uint32 array_size;
kal_uint32 register_value;
//20130604, Quick charging by Tim
mt6333_set_rg_input_cc_reg(1);
array_size = GETARRAYNUM(INPUT_CS_VTH);
set_chr_current = bmt_find_closest_level(INPUT_CS_VTH, array_size, *(kal_uint32 *)data);
register_value = charging_parameter_to_value(INPUT_CS_VTH, array_size ,set_chr_current);
mt6333_set_rg_ich_sel(register_value);
return status;
}
开发者ID:JustAndroids,项目名称:ZTEBladeL2,代码行数:18,代码来源:charging_hw_6333.c
注:本文中的GETARRAYNUM函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论