mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
Merge branch 'refactor/split_bod_hal' into 'master'
refactor(bod): Move bod hal to pmu hal component Closes IDF-14104 See merge request espressif/esp-idf!44503
This commit is contained in:
@@ -21,6 +21,14 @@ if(CONFIG_SOC_PAU_SUPPORTED)
|
|||||||
list(APPEND srcs "${target}/pau_hal.c")
|
list(APPEND srcs "${target}/pau_hal.c")
|
||||||
endif()
|
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}
|
idf_component_register(SRCS ${srcs}
|
||||||
INCLUDE_DIRS ${public_include}
|
INCLUDE_DIRS ${public_include}
|
||||||
REQUIRES soc hal esp_rom
|
REQUIRES soc hal esp_rom
|
||||||
|
|||||||
-1
@@ -123,7 +123,6 @@ static inline void brownout_ll_clear_count(void)
|
|||||||
// Not supported on esp32
|
// Not supported on esp32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
-1
@@ -18,7 +18,6 @@
|
|||||||
#include "hal/regi2c_ctrl.h"
|
#include "hal/regi2c_ctrl.h"
|
||||||
#include "soc/regi2c_brownout.h"
|
#include "soc/regi2c_brownout.h"
|
||||||
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
VBAT_LL_CHARGER_UPVOLTAGE_INTR = BIT(27),
|
VBAT_LL_CHARGER_UPVOLTAGE_INTR = BIT(27),
|
||||||
VBAT_LL_CHARGER_UNDERVOLTAGE_INTR = BIT(28),
|
VBAT_LL_CHARGER_UNDERVOLTAGE_INTR = BIT(28),
|
||||||
+2
-3
@@ -19,7 +19,6 @@
|
|||||||
#include "hal/regi2c_ctrl.h"
|
#include "hal/regi2c_ctrl.h"
|
||||||
#include "soc/regi2c_brownout.h"
|
#include "soc/regi2c_brownout.h"
|
||||||
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
VBAT_LL_CHARGER_UPVOLTAGE_INTR = BIT(27),
|
VBAT_LL_CHARGER_UPVOLTAGE_INTR = BIT(27),
|
||||||
VBAT_LL_CHARGER_UNDERVOLTAGE_INTR = BIT(28),
|
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)
|
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;
|
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)
|
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;
|
LP_ANA_PERI.vddbat_charge_cntl.vddbat_charge_upvoltage_target = time_tick;
|
||||||
}
|
}
|
||||||
|
|
||||||
-1
@@ -127,7 +127,6 @@ static inline void brownout_ll_clear_count(void)
|
|||||||
RTCCNTL.brown_out.cnt_clr = 0;
|
RTCCNTL.brown_out.cnt_clr = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
-1
@@ -132,7 +132,6 @@ static inline void brownout_ll_clear_count(void)
|
|||||||
RTCCNTL.brown_out.cnt_clr = 0;
|
RTCCNTL.brown_out.cnt_clr = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
-1
@@ -36,7 +36,6 @@ typedef struct {
|
|||||||
*/
|
*/
|
||||||
void brownout_hal_config(const brownout_hal_config_t *cfg);
|
void brownout_hal_config(const brownout_hal_config_t *cfg);
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -47,8 +47,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(esp_tee_build)
|
if(esp_tee_build)
|
||||||
list(APPEND srcs "apm_hal.c"
|
list(APPEND srcs "apm_hal.c")
|
||||||
"brownout_hal.c")
|
|
||||||
|
|
||||||
if(CONFIG_SOC_AES_SUPPORTED)
|
if(CONFIG_SOC_AES_SUPPORTED)
|
||||||
list(APPEND srcs "aes_hal.c")
|
list(APPEND srcs "aes_hal.c")
|
||||||
@@ -124,14 +123,6 @@ elseif(NOT BOOTLOADER_BUILD)
|
|||||||
list(APPEND srcs "${target}/modem_clock_hal.c")
|
list(APPEND srcs "${target}/modem_clock_hal.c")
|
||||||
endif()
|
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)
|
if(CONFIG_SOC_SDIO_SLAVE_SUPPORTED)
|
||||||
list(APPEND srcs "sdio_slave_hal.c")
|
list(APPEND srcs "sdio_slave_hal.c")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user