refactor(bod): Move bod hal to pmu hal component

This commit is contained in:
C.S.M
2025-12-24 11:43:14 +08:00
parent a65c83264f
commit f447fcdf98
19 changed files with 11 additions and 18 deletions

View File

@@ -1,42 +0,0 @@
/*
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*******************************************************************************
* NOTICE
* The hal is not public api, don't use in application code.
* See readme.md in hal/include/hal/readme.md
******************************************************************************/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
#include "soc/soc_caps.h"
typedef struct {
uint8_t threshold;
bool enabled;
bool reset_enabled;
bool flash_power_down;
bool rf_power_down;
} brownout_hal_config_t;
/**
* @brief Config brown out hal.
*
* @param cfg Pointer of brown out configuration structure.
*/
void brownout_hal_config(const brownout_hal_config_t *cfg);
#ifdef __cplusplus
}
#endif

View File

@@ -1,37 +0,0 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
uint32_t interrupt_mask; // interrupt mask.
uint16_t charger_resistor_value; // charger resistor value
bool enable_vbat_charger; // whether enable vbat charger comparator
uint8_t low_threshold; // low voltage threshold
uint8_t high_threshold; // high voltage threshold
uint8_t brownout_threshold; // brownout threshold
uint16_t undervoltage_filter_time; // under voltage filter time
uint16_t upvoltage_filter_time; // up voltage filter time
} vbat_hal_config_t;
/**
* @brief Config vbat hal.
*
* @param cfg Pointer of vbat configuration structure.
*/
void vbat_hal_config(const vbat_hal_config_t *cfg);
#ifdef __cplusplus
}
#endif