kopia lustrzana https://github.com/OpenRTX/OpenRTX
ttwrplus: add battery voltage readout
Add battery voltage readout through the XPowersLib library. TG-553pull/193/head
rodzic
82218aabce
commit
15f5477ae0
|
@ -82,7 +82,7 @@ void platform_terminate()
|
|||
|
||||
uint16_t platform_getVbat()
|
||||
{
|
||||
return 0;
|
||||
return pmu_getVbat();
|
||||
}
|
||||
|
||||
uint8_t platform_getMicLevel()
|
||||
|
|
|
@ -292,3 +292,8 @@ void pmu_init()
|
|||
val = PMU.getChargeTargetVoltage();
|
||||
printk("Setting Charge Target Voltage : %d\n", tableVoltage[val]);
|
||||
}
|
||||
|
||||
uint16_t pmu_getVbat()
|
||||
{
|
||||
return PMU.isBatteryConnect() ? PMU.getBattVoltage() : 0;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
void pmu_init();
|
||||
|
||||
uint16_t pmu_getVbat();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue