Skip to content
Snippets Groups Projects
Commit 778c7a89 authored by Sandeep Mistry's avatar Sandeep Mistry Committed by Cristian Maglie
Browse files

Disable charging in the bootloader

parent a65838b4
No related branches found
No related tags found
No related merge requests found
......@@ -613,11 +613,22 @@ bool setChargeVoltage(uint16_t voltage) {
return 1; // value was written successfully
}
bool disableCharge()
{
uint8_t DATA = readRegister(POWERON_CONFIG_REGISTER);
uint8_t mask = DATA & 0b11001111;
writeRegister(POWERON_CONFIG_REGISTER, mask);
return 1;
}
void apply_pmic_newdefaults()
{
disableWatchdog();
//disableDPDM();
disableCharge();
setInputVoltageLimit(4360); // default
setInputCurrentLimit(900); // 900mA
setChargeCurrent(0,0,0,0,0,0); // 512mA
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment