testing code

This commit is contained in:
sharandac
2020-08-10 13:11:34 +02:00
parent 400fcbd622
commit cb3478f0d5
5 changed files with 30 additions and 0 deletions

View File

@@ -171,6 +171,11 @@ void pmu_loop( TTGOClass *ttgo ) {
*/
if ( xEventGroupGetBitsFromISR( pmu_event_handle ) & PMU_EVENT_AXP_INT ) {
setCpuFrequencyMhz(240);
if ( powermgm_get_event( POWERMGM_PMU_BATTERY | POWERMGM_PMU_BUTTON | POWERMGM_STANDBY_REQUEST ) ) {
ttgo->power->clearIRQ();
xEventGroupClearBits( pmu_event_handle, PMU_EVENT_AXP_INT );
return;
}
ttgo->power->readIRQ();
if (ttgo->power->isVbusPlugInIRQ()) {