| 347 | } |
| 348 | |
| 349 | float 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 | |
| 356 | float AXP192::GetVinVoltage() { |
| 357 | float ADCLSB = 1.7 / 1000.0; |