-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refactor/improve_adc_power_maintanance_v4.4' into 'rele…
…ase/v4.4' adc: improve power logic (v4.4) See merge request espressif/esp-idf!23275
- Loading branch information
Showing
35 changed files
with
1,272 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
components/esp_hw_support/include/esp_private/sar_periph_ctrl.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/** | ||
* SAR related peripherals are interdependent. This file | ||
* provides a united control to these registers, as multiple | ||
* components require these controls. | ||
* | ||
* See target/sar_periph_ctrl.c to know involved peripherals | ||
*/ | ||
|
||
#pragma once | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* Initialise SAR related peripheral register settings | ||
* Should only be used when running into app stage | ||
*/ | ||
void sar_periph_ctrl_init(void); | ||
|
||
|
||
/*------------------------------------------------------------------------------ | ||
* ADC Power | ||
*----------------------------------------------------------------------------*/ | ||
/** | ||
* @brief Acquire the ADC oneshot mode power | ||
*/ | ||
void sar_periph_ctrl_adc_oneshot_power_acquire(void); | ||
|
||
/** | ||
* @brief Release the ADC oneshot mode power | ||
*/ | ||
void sar_periph_ctrl_adc_oneshot_power_release(void); | ||
|
||
/** | ||
* @brief Acquire the ADC continuous mode power | ||
*/ | ||
void sar_periph_ctrl_adc_continuous_power_acquire(void); | ||
|
||
/** | ||
* @brief Release the ADC ADC continuous mode power | ||
*/ | ||
void sar_periph_ctrl_adc_continuous_power_release(void); | ||
|
||
|
||
/*------------------------------------------------------------------------------ | ||
* PWDET Power | ||
*----------------------------------------------------------------------------*/ | ||
/** | ||
* @brief Acquire the PWDET Power | ||
*/ | ||
void sar_periph_ctrl_pwdet_power_acquire(void); | ||
|
||
/** | ||
* @brief Release the PWDET Power | ||
*/ | ||
void sar_periph_ctrl_pwdet_power_release(void); | ||
|
||
/** | ||
* @brief Enable SAR power when system wakes up | ||
*/ | ||
void sar_periph_ctrl_power_enable(void); | ||
|
||
/** | ||
* @brief Disable SAR power when system goes to sleep | ||
*/ | ||
void sar_periph_ctrl_power_disable(void); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.