esp32h2: add rtc clock support

This commit is contained in:
sly
2021-07-07 11:28:07 +08:00
committed by Shu Chen
parent 6ab495b4dc
commit 11dfd802e0
23 changed files with 1818 additions and 623 deletions

View File

@@ -17,12 +17,13 @@
#include "soc/rtc_cntl_struct.h"
#include "soc/rtc_cntl_reg.h"
#include "regi2c_ctrl.h"
#include "i2c_pmu.h"
#include "regi2c_brownout.h"
void brownout_hal_config(const brownout_hal_config_t *cfg)
{
REGI2C_WRITE_MASK(I2C_BOD, I2C_BOD_THRESHOLD, cfg->threshold);
REGI2C_WRITE_MASK(I2C_PMU, I2C_PMU_OC_DREF_LVDET, cfg->threshold);
typeof(RTCCNTL.brown_out) brown_out_reg = {
.close_flash_ena = cfg->flash_power_down,
.pd_rf_ena = cfg->rf_power_down,