esp_system: remove register level operations for timer wakeup

This commit is contained in:
Renz Bagaporo
2020-05-04 18:17:06 +08:00
parent 0b6ead74b5
commit 4f5135030f
3 changed files with 29 additions and 21 deletions

View File

@@ -25,6 +25,8 @@
#include "soc/nrx_reg.h"
#include "soc/fe_reg.h"
#include "soc/rtc.h"
#include "esp32s2/rom/ets_sys.h"
#include "hal/rtc_cntl_ll.h"
/**
* Configure whether certain peripherals are powered down in deep sleep
@@ -126,8 +128,7 @@ void rtc_sleep_init(rtc_sleep_config_t cfg)
void rtc_sleep_set_wakeup_time(uint64_t t)
{
WRITE_PERI_REG(RTC_CNTL_SLP_TIMER0_REG, t & UINT32_MAX);
WRITE_PERI_REG(RTC_CNTL_SLP_TIMER1_REG, t >> 32);
rtc_cntl_ll_set_wakeup_timer(t);
}
uint32_t rtc_sleep_start(uint32_t wakeup_opt, uint32_t reject_opt, uint32_t lslp_mem_inf_fpu)