mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
refactor(bod): Move brownout handling file from esp_system to esp_hw_support
This commit is contained in:
@@ -169,6 +169,10 @@ if(CONFIG_SOC_LCDCAM_CAM_SUPPORTED)
|
||||
list(APPEND srcs "${target_folder}/cam_periph.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_BOD_SUPPORTED)
|
||||
list(APPEND srcs "${target_folder}/power_supply_periph.c")
|
||||
endif()
|
||||
|
||||
idf_component_register(SRCS ${srcs}
|
||||
INCLUDE_DIRS ${includes}
|
||||
LDFRAGMENTS "linker.lf")
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "soc/power_supply_periph.h"
|
||||
|
||||
const power_supply_signal_conn_t power_supply_periph_signal = {
|
||||
.irq = ETS_RTC_CORE_INTR_SOURCE,
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "soc/power_supply_periph.h"
|
||||
|
||||
const power_supply_signal_conn_t power_supply_periph_signal = {
|
||||
.irq = ETS_RTC_CORE_INTR_SOURCE,
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "soc/power_supply_periph.h"
|
||||
|
||||
const power_supply_signal_conn_t power_supply_periph_signal = {
|
||||
.irq = ETS_RTC_CORE_INTR_SOURCE,
|
||||
};
|
||||
@@ -1215,10 +1215,6 @@ config SOC_LP_TIMER_BIT_WIDTH_HI
|
||||
int
|
||||
default 16
|
||||
|
||||
config SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_TIMER_GROUPS
|
||||
int
|
||||
default 2
|
||||
|
||||
@@ -485,7 +485,6 @@
|
||||
/*-------------------------- LP_TIMER CAPS ----------------------------------*/
|
||||
#define SOC_LP_TIMER_BIT_WIDTH_LO 32 // Bit width of lp_timer low part
|
||||
#define SOC_LP_TIMER_BIT_WIDTH_HI 16 // Bit width of lp_timer high part
|
||||
#define SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE 1 //LP timer and brownout detector share the interrupt source
|
||||
|
||||
/*--------------------------- TIMER GROUP CAPS ---------------------------------------*/
|
||||
#define SOC_TIMER_GROUPS (2)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "soc/power_supply_periph.h"
|
||||
|
||||
const power_supply_signal_conn_t power_supply_periph_signal = {
|
||||
.irq = ETS_LP_RTC_TIMER_INTR_SOURCE,
|
||||
};
|
||||
@@ -1155,10 +1155,6 @@ config SOC_LP_TIMER_BIT_WIDTH_HI
|
||||
int
|
||||
default 16
|
||||
|
||||
config SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_TIMER_GROUPS
|
||||
int
|
||||
default 2
|
||||
|
||||
@@ -450,7 +450,6 @@
|
||||
/*-------------------------- LP_TIMER CAPS ----------------------------------*/
|
||||
#define SOC_LP_TIMER_BIT_WIDTH_LO 32 // Bit width of lp_timer low part
|
||||
#define SOC_LP_TIMER_BIT_WIDTH_HI 16 // Bit width of lp_timer high part
|
||||
#define SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE 1 //LP timer and brownout detector share the interrupt source
|
||||
|
||||
/*--------------------------- TIMER GROUP CAPS ---------------------------------------*/
|
||||
#define SOC_TIMER_GROUPS (2)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "soc/power_supply_periph.h"
|
||||
|
||||
const power_supply_signal_conn_t power_supply_periph_signal = {
|
||||
.irq = ETS_LP_RTC_TIMER_INTR_SOURCE,
|
||||
};
|
||||
@@ -875,10 +875,6 @@ config SOC_LP_TIMER_BIT_WIDTH_HI
|
||||
int
|
||||
default 16
|
||||
|
||||
config SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_TIMER_GROUPS
|
||||
int
|
||||
default 2
|
||||
|
||||
@@ -363,7 +363,6 @@
|
||||
/*-------------------------- LP_TIMER CAPS ----------------------------------*/
|
||||
#define SOC_LP_TIMER_BIT_WIDTH_LO 32 // Bit width of lp_timer low part
|
||||
#define SOC_LP_TIMER_BIT_WIDTH_HI 16 // Bit width of lp_timer high part
|
||||
#define SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE 1 //LP timer and brownout detector share the interrupt source
|
||||
|
||||
/*--------------------------- TIMER GROUP CAPS ---------------------------------------*/
|
||||
#define SOC_TIMER_GROUPS (2)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "soc/power_supply_periph.h"
|
||||
|
||||
const power_supply_signal_conn_t power_supply_periph_signal = {
|
||||
.irq = ETS_LP_RTC_TIMER_INTR_SOURCE,
|
||||
};
|
||||
@@ -1155,10 +1155,6 @@ config SOC_LP_TIMER_BIT_WIDTH_HI
|
||||
int
|
||||
default 16
|
||||
|
||||
config SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_TIMER_GROUPS
|
||||
int
|
||||
default 2
|
||||
|
||||
@@ -447,7 +447,6 @@
|
||||
/*-------------------------- LP_TIMER CAPS ----------------------------------*/
|
||||
#define SOC_LP_TIMER_BIT_WIDTH_LO 32 // Bit width of lp_timer low part
|
||||
#define SOC_LP_TIMER_BIT_WIDTH_HI 16 // Bit width of lp_timer high part
|
||||
#define SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE 1 //LP timer and brownout detector share the interrupt source
|
||||
|
||||
/*--------------------------- TIMER GROUP CAPS ---------------------------------------*/
|
||||
#define SOC_TIMER_GROUPS (2)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "soc/power_supply_periph.h"
|
||||
|
||||
const power_supply_signal_conn_t power_supply_periph_signal = {
|
||||
.irq = ETS_LP_RTC_TIMER_INTR_SOURCE,
|
||||
};
|
||||
@@ -447,10 +447,6 @@ config SOC_LP_TIMER_BIT_WIDTH_HI
|
||||
int
|
||||
default 16
|
||||
|
||||
config SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_TIMER_GROUPS
|
||||
int
|
||||
default 2
|
||||
|
||||
@@ -429,7 +429,6 @@
|
||||
/*-------------------------- LP_TIMER CAPS ----------------------------------*/
|
||||
#define SOC_LP_TIMER_BIT_WIDTH_LO 32 // Bit width of lp_timer low part
|
||||
#define SOC_LP_TIMER_BIT_WIDTH_HI 16 // Bit width of lp_timer high part
|
||||
#define SOC_LP_TIMER_BOD_SHARE_INTR_SOURCE 1 //LP timer and brownout detector share the interrupt source
|
||||
|
||||
/*--------------------------- TIMER GROUP CAPS ---------------------------------------*/
|
||||
#define SOC_TIMER_GROUPS (2)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "soc/power_supply_periph.h"
|
||||
|
||||
const power_supply_signal_conn_t power_supply_periph_signal = {
|
||||
.irq = ETS_LP_RTC_TIMER_INTR_SOURCE,
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "soc/power_supply_periph.h"
|
||||
|
||||
const power_supply_signal_conn_t power_supply_periph_signal = {
|
||||
.irq = ETS_LP_ANAPERI_INTR_SOURCE,
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "soc/power_supply_periph.h"
|
||||
|
||||
const power_supply_signal_conn_t power_supply_periph_signal = {
|
||||
.irq = ETS_RTC_CORE_INTR_SOURCE,
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "soc/power_supply_periph.h"
|
||||
|
||||
const power_supply_signal_conn_t power_supply_periph_signal = {
|
||||
.irq = ETS_RTC_CORE_INTR_SOURCE,
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "soc/interrupts.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
const uint8_t irq;
|
||||
} power_supply_signal_conn_t;
|
||||
|
||||
extern const power_supply_signal_conn_t power_supply_periph_signal;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user