esp32h2: add rtc clock support
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user