mirror of
https://github.com/espressif/esp-idf.git
synced 2026-07-23 03:13:01 +03:00
refactor(bod): Move bod hal to pmu hal component
This commit is contained in:
@@ -21,6 +21,14 @@ if(CONFIG_SOC_PAU_SUPPORTED)
|
||||
list(APPEND srcs "${target}/pau_hal.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_BOD_SUPPORTED)
|
||||
list(APPEND srcs "brownout_hal.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_VBAT_SUPPORTED)
|
||||
list(APPEND srcs "vbat_hal.c")
|
||||
endif()
|
||||
|
||||
idf_component_register(SRCS ${srcs}
|
||||
INCLUDE_DIRS ${public_include}
|
||||
REQUIRES soc hal esp_rom
|
||||
|
||||
@@ -123,7 +123,6 @@ static inline void brownout_ll_clear_count(void)
|
||||
// Not supported on esp32
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "hal/regi2c_ctrl.h"
|
||||
#include "soc/regi2c_brownout.h"
|
||||
|
||||
|
||||
typedef enum {
|
||||
VBAT_LL_CHARGER_UPVOLTAGE_INTR = BIT(27),
|
||||
VBAT_LL_CHARGER_UNDERVOLTAGE_INTR = BIT(28),
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "hal/regi2c_ctrl.h"
|
||||
#include "soc/regi2c_brownout.h"
|
||||
|
||||
|
||||
typedef enum {
|
||||
VBAT_LL_CHARGER_UPVOLTAGE_INTR = BIT(27),
|
||||
VBAT_LL_CHARGER_UNDERVOLTAGE_INTR = BIT(28),
|
||||
@@ -73,7 +72,7 @@ static inline void vbat_ll_enable_charger_comparator(bool enable)
|
||||
*/
|
||||
static inline void vbat_ll_set_undervoltage_filter_time(uint32_t time_tick)
|
||||
{
|
||||
HAL_ASSERT(time_tick < (2<<10));
|
||||
HAL_ASSERT(time_tick < (2 << 10));
|
||||
LP_ANA_PERI.vddbat_charge_cntl.vddbat_charge_undervoltage_target = time_tick;
|
||||
}
|
||||
|
||||
@@ -84,7 +83,7 @@ static inline void vbat_ll_set_undervoltage_filter_time(uint32_t time_tick)
|
||||
*/
|
||||
static inline void vbat_ll_set_upvoltage_filter_time(uint32_t time_tick)
|
||||
{
|
||||
HAL_ASSERT(time_tick < (2<<10));
|
||||
HAL_ASSERT(time_tick < (2 << 10));
|
||||
LP_ANA_PERI.vddbat_charge_cntl.vddbat_charge_upvoltage_target = time_tick;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,6 @@ static inline void brownout_ll_clear_count(void)
|
||||
RTCCNTL.brown_out.cnt_clr = 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -132,7 +132,6 @@ static inline void brownout_ll_clear_count(void)
|
||||
RTCCNTL.brown_out.cnt_clr = 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -36,7 +36,6 @@ typedef struct {
|
||||
*/
|
||||
void brownout_hal_config(const brownout_hal_config_t *cfg);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -47,8 +47,7 @@ else()
|
||||
endif()
|
||||
|
||||
if(esp_tee_build)
|
||||
list(APPEND srcs "apm_hal.c"
|
||||
"brownout_hal.c")
|
||||
list(APPEND srcs "apm_hal.c")
|
||||
|
||||
if(CONFIG_SOC_AES_SUPPORTED)
|
||||
list(APPEND srcs "aes_hal.c")
|
||||
@@ -124,14 +123,6 @@ elseif(NOT BOOTLOADER_BUILD)
|
||||
list(APPEND srcs "${target}/modem_clock_hal.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_BOD_SUPPORTED)
|
||||
list(APPEND srcs "brownout_hal.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_VBAT_SUPPORTED)
|
||||
list(APPEND srcs "vbat_hal.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_SDIO_SLAVE_SUPPORTED)
|
||||
list(APPEND srcs "sdio_slave_hal.c")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user