mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-11 15:21:21 +00:00
adc: improve power logic
This commit is contained in:
@@ -48,10 +48,13 @@ typedef enum {
|
||||
static inline void sar_ctrl_ll_set_power_mode(sar_ctrl_ll_power_t mode)
|
||||
{
|
||||
if (mode == SAR_CTRL_LL_POWER_FSM) {
|
||||
SENS.sar_peri_clk_gate_conf.saradc_clk_en = 1;
|
||||
SENS.sar_power_xpd_sar.force_xpd_sar = 0x0;
|
||||
} else if (mode == SAR_CTRL_LL_POWER_ON) {
|
||||
SENS.sar_peri_clk_gate_conf.saradc_clk_en = 1;
|
||||
SENS.sar_power_xpd_sar.force_xpd_sar = 0x3;
|
||||
} else {
|
||||
SENS.sar_peri_clk_gate_conf.saradc_clk_en = 0;
|
||||
SENS.sar_power_xpd_sar.force_xpd_sar = 0x2;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user