mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
refactor(pmu): move PMU calibration efuse getters from efuse_ll.h to pmu_ll.h
Move the PMU internal voltage calibration related efuse read LL functions from efuse_ll.h into pmu_ll.h, renaming them with the pmu_ll prefix. efuse_ll.h should only contain efuse controller or system-global functions; other modules' private efuse bits belong to their own LL layer. Affected chips: esp32c5, esp32c6, esp32c61, esp32h2, esp32h4, esp32p4. Moved functions (renamed efuse_ll_get_* -> pmu_ll_get_*): - get_active_hp_dbias, get_active_lp_dbias - get_dbias_vol_gap - get_lslp_dbg, get_dslp_dbg (where present) - get_lslp_hp_dbias, get_dslp_lp_dbias (where present) - get_dslp_dbias (esp32h2)
This commit is contained in:
@@ -16,11 +16,47 @@
|
||||
#include "soc/pmu_struct.h"
|
||||
#include "hal/pmu_types.h"
|
||||
#include "hal/misc.h"
|
||||
#include "soc/efuse_struct.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
__attribute__((always_inline)) static inline uint32_t pmu_ll_get_active_hp_dbias(void)
|
||||
{
|
||||
return EFUSE.rd_mac_sys3.active_hp_dbias;
|
||||
}
|
||||
|
||||
__attribute__((always_inline)) static inline uint32_t pmu_ll_get_active_lp_dbias(void)
|
||||
{
|
||||
return EFUSE.rd_mac_sys3.active_lp_dbias;
|
||||
}
|
||||
|
||||
__attribute__((always_inline)) static inline uint32_t pmu_ll_get_lslp_dbg(void)
|
||||
{
|
||||
return EFUSE.rd_mac_sys3.lslp_hp_dbg;
|
||||
}
|
||||
|
||||
__attribute__((always_inline)) static inline uint32_t pmu_ll_get_lslp_hp_dbias(void)
|
||||
{
|
||||
return EFUSE.rd_mac_sys3.lslp_hp_dbias;
|
||||
}
|
||||
|
||||
__attribute__((always_inline)) static inline uint32_t pmu_ll_get_dslp_dbg(void)
|
||||
{
|
||||
return EFUSE.rd_mac_sys3.dslp_lp_dbg;
|
||||
}
|
||||
|
||||
__attribute__((always_inline)) static inline uint32_t pmu_ll_get_dslp_lp_dbias(void)
|
||||
{
|
||||
return (EFUSE.rd_mac_sys4.dslp_lp_dbias_1 << 4) | EFUSE.rd_mac_sys3.dslp_lp_dbias;
|
||||
}
|
||||
|
||||
__attribute__((always_inline)) static inline int32_t pmu_ll_get_dbias_vol_gap(void)
|
||||
{
|
||||
return EFUSE.rd_mac_sys4.lp_hp_dbias_vol_gap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the power domain that needs to be powered down in the digital power
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user