improved task synchronization
This commit is contained in:
@@ -62,7 +62,7 @@ void powermgm_loop( TTGOClass *ttgo ) {
|
||||
// if we are in standby, wake up
|
||||
if ( powermgm_get_event( POWERMGM_STANDBY ) ) {
|
||||
powermgm_clear_event( POWERMGM_STANDBY );
|
||||
ttgo->power->setDCDC3Voltage( 3000 );
|
||||
ttgo->power->setDCDC3Voltage( 3300 );
|
||||
ttgo->openBL();
|
||||
ttgo->displayWakeup();
|
||||
ttgo->bl->adjust( 0 );
|
||||
@@ -81,12 +81,12 @@ void powermgm_loop( TTGOClass *ttgo ) {
|
||||
ttgo->displaySleep();
|
||||
ttgo->closeBL();
|
||||
if ( powermgm_get_event( POWERMGM_WIFI_ACTIVE ) ) wifictl_off();
|
||||
while( powermgm_get_event( POWERMGM_WIFI_ACTIVE | POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ON_REQUEST | POWERMGM_WIFI_SCAN ) ) {}
|
||||
while( powermgm_get_event( POWERMGM_WIFI_ACTIVE | POWERMGM_WIFI_CONNECTED | POWERMGM_WIFI_OFF_REQUEST | POWERMGM_WIFI_ON_REQUEST | POWERMGM_WIFI_SCAN ) ) { yield(); }
|
||||
ttgo->stopLvglTick();
|
||||
if ( bma_get_config( BMA_STEPCOUNTER ) )
|
||||
ttgo->bma->enableStepCountInterrupt( false );
|
||||
powermgm_set_event( POWERMGM_STANDBY );
|
||||
ttgo->power->setDCDC3Voltage( 2600 );
|
||||
ttgo->power->setDCDC3Voltage( 3000 );
|
||||
setCpuFrequencyMhz( 10 );
|
||||
gpio_wakeup_enable ((gpio_num_t)AXP202_INT, GPIO_INTR_LOW_LEVEL);
|
||||
gpio_wakeup_enable ((gpio_num_t)BMA423_INT1, GPIO_INTR_HIGH_LEVEL);
|
||||
|
||||
Reference in New Issue
Block a user