Lines Matching full:attribute

26 void PF1550_SetChargerAttibute(pf1550_handle_t *handle, const pf1550_charger_attribute_t *attribute)  in PF1550_SetChargerAttibute()  argument
31 assert(attribute); in PF1550_SetChargerAttibute()
34 temp = (attribute->fastChargeCurrent_mA > 1000U) ? 1000U : attribute->fastChargeCurrent_mA; in PF1550_SetChargerAttibute()
35 temp = (attribute->fastChargeCurrent_mA < 100U) ? 100U : temp; in PF1550_SetChargerAttibute()
40 … temp = (attribute->fastChargeVoltage_uV > 4440000U) ? 4440000U : attribute->fastChargeVoltage_uV; in PF1550_SetChargerAttibute()
41 temp = (attribute->fastChargeVoltage_uV < 3500000U) ? 3500000U : temp; in PF1550_SetChargerAttibute()
46 …(void)PF1550_ModifyReg(handle, PF1550_CHG_TMR, 0x80U, ((attribute->preChargeTime_min <= 30U) ? 0x0… in PF1550_SetChargerAttibute()
49 temp = (attribute->fastChargeTime_hr > 14U) ? 14U : attribute->fastChargeTime_hr; in PF1550_SetChargerAttibute()
54 temp = (attribute->endOfChargeTime_min > 70U) ? 70U : attribute->endOfChargeTime_min; in PF1550_SetChargerAttibute()
59 if (attribute->endOfChargeCurrentThreshold_mA >= 50U) in PF1550_SetChargerAttibute()
63 else if (attribute->endOfChargeCurrentThreshold_mA >= 30U) in PF1550_SetChargerAttibute()
67 else if (attribute->endOfChargeCurrentThreshold_mA >= 20U) in PF1550_SetChargerAttibute()
71 else if (attribute->endOfChargeCurrentThreshold_mA >= 10U) in PF1550_SetChargerAttibute()
82 if (attribute->restartVoltageThreshold_uV == 0U) in PF1550_SetChargerAttibute()
88 …temp = (attribute->restartVoltageThreshold_uV > 200000U) ? 200000U : attribute->restartVoltageThre… in PF1550_SetChargerAttibute()
89 temp = (attribute->restartVoltageThreshold_uV < 100000U) ? 100000U : temp; in PF1550_SetChargerAttibute()
95 … temp = (attribute->miniSystemVoltage_uV > 4300000U) ? 4300000U : attribute->miniSystemVoltage_uV; in PF1550_SetChargerAttibute()
161 void PF1550_SetBatFETAttibute(pf1550_handle_t *handle, const pf1550_batFET_attribute_t *attribute) in PF1550_SetBatFETAttibute() argument
166 assert(attribute); in PF1550_SetBatFETAttibute()
169 if (attribute->overcurrentThreshold_mA == 0U) in PF1550_SetBatFETAttibute()
173 else if (attribute->overcurrentThreshold_mA >= 3200U) in PF1550_SetBatFETAttibute()
177 else if (attribute->overcurrentThreshold_mA >= 2800U) in PF1550_SetBatFETAttibute()
191 temp |= attribute->overcurrentProtectEnable ? 0x0U : 0x8U; in PF1550_SetBatFETAttibute()
192 temp |= attribute->overcurrentProtectEnableNoVbus ? 0x80U : 0x0U; in PF1550_SetBatFETAttibute()
201 temp |= attribute->overvoltageFaultProtectEnable ? 0x1U : 0x0U; in PF1550_SetBatFETAttibute()
202 temp |= attribute->watchDogFaultProtectEnable ? 0x2U : 0x0U; in PF1550_SetBatFETAttibute()
203 temp |= attribute->thermalFaultProtectEnable ? 0x4U : 0x0U; in PF1550_SetBatFETAttibute()
204 temp |= attribute->thermalShutdownProtectEnable ? 0x8U : 0x0U; in PF1550_SetBatFETAttibute()
205 temp |= attribute->timerFaultProtectEnable ? 0x10U : 0x0U; in PF1550_SetBatFETAttibute()
209 …F1550_SetPowerPathAttibute(pf1550_handle_t *handle, const pf1550_power_path_attribute_t *attribute) in PF1550_SetPowerPathAttibute() argument
214 assert(attribute); in PF1550_SetPowerPathAttibute()
217 if (attribute->vbusCurrentLimit_mA >= 1500U) in PF1550_SetPowerPathAttibute()
221 else if (attribute->vbusCurrentLimit_mA >= 1000U) in PF1550_SetPowerPathAttibute()
225 else if (attribute->vbusCurrentLimit_mA >= 200U) in PF1550_SetPowerPathAttibute()
227 temp = (attribute->vbusCurrentLimit_mA + 900U) / 100U; in PF1550_SetPowerPathAttibute()
229 else if (attribute->vbusCurrentLimit_mA >= 100U) in PF1550_SetPowerPathAttibute()
231 temp = (attribute->vbusCurrentLimit_mA + 350U) / 50U; in PF1550_SetPowerPathAttibute()
233 else if (attribute->vbusCurrentLimit_mA >= 10U) in PF1550_SetPowerPathAttibute()
235 temp = (attribute->vbusCurrentLimit_mA - 10U) / 5U; in PF1550_SetPowerPathAttibute()
245 temp = (attribute->vbusDpmVoltage_uV < 3900000U) ? 3900000U : attribute->vbusDpmVoltage_uV; in PF1550_SetPowerPathAttibute()
246 temp = (attribute->vbusDpmVoltage_uV > 4600000U) ? 4600000U : temp; in PF1550_SetPowerPathAttibute()
251 if (attribute->vbusDpmStopThreshold_uV < 250000U) in PF1550_SetPowerPathAttibute()
263 if (attribute->vbusOvDebounce_us < 1000U) in PF1550_SetPowerPathAttibute()
267 else if (attribute->vbusOvDebounce_us < 10000U) in PF1550_SetPowerPathAttibute()
278 if (attribute->vbus2vsysDebounce_us < 1000U) in PF1550_SetPowerPathAttibute()
282 else if (attribute->vbus2vsysDebounce_us < 10000U) in PF1550_SetPowerPathAttibute()
293 if (attribute->vbus2vsysThreashold_uV < 175000U) in PF1550_SetPowerPathAttibute()
304 if (attribute->usbPhyVoltage_uV < 4900000U) in PF1550_SetPowerPathAttibute()
315 if (attribute->vsysWakeupDelay_ms < 16U) in PF1550_SetPowerPathAttibute()
319 else if (attribute->vsysWakeupDelay_ms < 32U) in PF1550_SetPowerPathAttibute()
323 else if (attribute->vsysWakeupDelay_ms < 100U) in PF1550_SetPowerPathAttibute()
336 temp = attribute->usbPhyDischargerEnbale ? 0x1U : 0x0U; in PF1550_SetPowerPathAttibute()
337 temp |= attribute->usbPhyLdoEnable ? 0x4U : 0x0U; in PF1550_SetPowerPathAttibute()
341 void PF1550_SetThermalAttibute(pf1550_handle_t *handle, const pf1550_thermal_attribute_t *attribute) in PF1550_SetThermalAttibute() argument
346 assert(attribute); in PF1550_SetThermalAttibute()
349 (void)PF1550_ModifyReg(handle, PF1550_THM_REG_CNFG, 0x03U, (uint8_t)attribute->mode); in PF1550_SetThermalAttibute()
352 if (attribute->junctionThermalSetPoint_C < 95) in PF1550_SetThermalAttibute()
356 else if (attribute->junctionThermalSetPoint_C < 110) in PF1550_SetThermalAttibute()
368 temp = (attribute->thermalColdThreshold_C <= -10) ? (1U << 4U) : 0U; in PF1550_SetThermalAttibute()
372 temp = (attribute->thermalCoolThreshold_C <= 10) ? (1U << 1U) : 0U; in PF1550_SetThermalAttibute()
376 temp = (attribute->thermalWarmThreshold_C < 50) ? 0U : 1U; in PF1550_SetThermalAttibute()
380 temp = (attribute->thermalHotThreshold_C < 60) ? (1U << 5U) : 0U; in PF1550_SetThermalAttibute()
384 if (attribute->thermalVoltageAdjust_uV >= 200000U) in PF1550_SetThermalAttibute()
388 else if (attribute->thermalVoltageAdjust_uV >= 160000U) in PF1550_SetThermalAttibute()
392 else if (attribute->thermalVoltageAdjust_uV >= 100000U) in PF1550_SetThermalAttibute()
404 if (attribute->thermalCurrentAdjust_pct >= 100U) in PF1550_SetThermalAttibute()
408 else if (attribute->thermalCurrentAdjust_pct >= 75U) in PF1550_SetThermalAttibute()
412 else if (attribute->thermalCurrentAdjust_pct >= 50U) in PF1550_SetThermalAttibute()
424 temp = attribute->thermalFoldbackEnable ? (1U << 7U) : 0U; in PF1550_SetThermalAttibute()
435 void PF1550_SetLedAttibute(pf1550_handle_t *handle, const pf1550_led_attribute_t *attribute) in PF1550_SetLedAttibute() argument
440 assert(attribute); in PF1550_SetLedAttibute()
443 temp = (attribute->mode == kPF1550_LedMode_1) ? (1U << 4U) : 0x0U; in PF1550_SetLedAttibute()
447 temp = (attribute->pwmDuty_pct > 100U) ? 100U : attribute->pwmDuty_pct; in PF1550_SetLedAttibute()
452 if (attribute->pwmFrequency_mHz >= 256000U) in PF1550_SetLedAttibute()
456 else if (attribute->pwmFrequency_mHz >= 8000U) in PF1550_SetLedAttibute()
460 else if (attribute->pwmFrequency_mHz >= 1000U) in PF1550_SetLedAttibute()
471 temp = attribute->rampEnable ? 0x40U : 0x0U; in PF1550_SetLedAttibute()
475 temp = attribute->swCtrlEnable ? 0x20U : 0x0U; in PF1550_SetLedAttibute()