change(esp_hw_support): wrapper sleep dcdc/ldo ops with ll

This commit is contained in:
wuzhenghui
2025-02-12 17:27:15 +08:00
parent 367fda4447
commit 7147d7b366
4 changed files with 28 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -663,16 +663,27 @@ FORCE_INLINE_ATTR uint32_t pmu_ll_hp_get_digital_power_up_wait_cycle(pmu_dev_t *
return hw->power.wait_timer0.powerup_timer;
}
FORCE_INLINE_ATTR void pmu_ll_set_dcdc_force_power_up(pmu_dev_t *hw, bool fpu)
FORCE_INLINE_ATTR void pmu_ll_set_dcdc_switch_force_power_up(pmu_dev_t *hw, bool fpu)
{
hw->power.dcdc_switch.force_pd = 0;
hw->power.dcdc_switch.force_pu = fpu;
}
FORCE_INLINE_ATTR void pmu_ll_set_dcdc_force_power_down(pmu_dev_t *hw, bool fpd)
FORCE_INLINE_ATTR void pmu_ll_set_dcdc_switch_force_power_down(pmu_dev_t *hw, bool fpd)
{
hw->power.dcdc_switch.force_pu = 0;
hw->power.dcdc_switch.force_pd = fpd;
}
FORCE_INLINE_ATTR void pmu_ll_set_dcdc_en(pmu_dev_t *hw, bool en)
{
if (en) {
hw->dcm_ctrl.on_req = 1;
} else {
hw->dcm_ctrl.off_req = 1;
}
}
/**
* @brief Get ext1 wakeup source status
* @return The lower 8 bits of the returned value are the bitmap of