MCPcopy Create free account
hub / github.com/BruceDevices/firmware / GetBatCurrent

Method GetBatCurrent

lib/utility/AXP192.cpp:349–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347}
348
349float AXP192::GetBatCurrent() {
350 float ADCLSB = 0.5;
351 uint16_t CurrentIn = Read13Bit(0x7A);
352 uint16_t CurrentOut = Read13Bit(0x7C);
353 return (CurrentIn - CurrentOut) * ADCLSB;
354}
355
356float AXP192::GetVinVoltage() {
357 float ADCLSB = 1.7 / 1000.0;

Callers 1

isChargingFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected