adc: improve power logic

This commit is contained in:
Armando
2023-01-09 17:10:04 +08:00
parent f9da48d94f
commit 5be3c21cfc
28 changed files with 480 additions and 249 deletions

View File

@@ -7,7 +7,7 @@
#include <stdbool.h>
#include "esp_attr.h"
#include "esp_private/regi2c_ctrl.h"
#include "esp_private/adc_share_hw_ctrl.h"
#include "esp_private/sar_periph_ctrl.h"
/*
* This file is used to override the hooks provided by the PHY lib for some system features.
@@ -33,9 +33,9 @@ void set_xpd_sar(bool en)
s_wifi_adc_xpd_flag = en;
if (en) {
adc_power_acquire();
sar_periph_ctrl_pwdet_power_acquire();
} else {
adc_power_release();
sar_periph_ctrl_pwdet_power_release();
}
}