kopia lustrzana https://github.com/espressif/esp-idf
111 wiersze
2.8 KiB
C
111 wiersze
2.8 KiB
C
|
/*
|
||
|
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||
|
*
|
||
|
* SPDX-License-Identifier: Apache-2.0
|
||
|
*/
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include <stdint.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <esp_types.h>
|
||
|
#include "soc/pmu_struct.h"
|
||
|
#include "hal/pmu_hal.h"
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
extern "C" {
|
||
|
#endif
|
||
|
|
||
|
typedef struct {
|
||
|
pmu_hp_dig_power_reg_t dig_power;
|
||
|
pmu_hp_clk_power_reg_t clk_power;
|
||
|
pmu_hp_xtal_reg_t xtal;
|
||
|
} pmu_hp_system_power_param_t;
|
||
|
|
||
|
const pmu_hp_system_power_param_t * pmu_hp_system_power_param_default(pmu_hp_mode_t mode);
|
||
|
|
||
|
typedef struct {
|
||
|
uint32_t icg_func;
|
||
|
uint32_t icg_apb;
|
||
|
pmu_hp_icg_modem_reg_t icg_modem;
|
||
|
pmu_hp_sysclk_reg_t sysclk;
|
||
|
} pmu_hp_system_clock_param_t;
|
||
|
|
||
|
const pmu_hp_system_clock_param_t * pmu_hp_system_clock_param_default(pmu_hp_mode_t mode);
|
||
|
|
||
|
typedef struct {
|
||
|
pmu_hp_sys_cntl_reg_t syscntl;
|
||
|
} pmu_hp_system_digital_param_t;
|
||
|
|
||
|
const pmu_hp_system_digital_param_t * pmu_hp_system_digital_param_default(pmu_hp_mode_t mode);
|
||
|
|
||
|
typedef struct {
|
||
|
pmu_hp_bias_reg_t bias;
|
||
|
pmu_hp_regulator0_reg_t regulator0;
|
||
|
pmu_hp_regulator1_reg_t regulator1;
|
||
|
} pmu_hp_system_analog_param_t;
|
||
|
|
||
|
const pmu_hp_system_analog_param_t * pmu_hp_system_analog_param_default(pmu_hp_mode_t mode);
|
||
|
|
||
|
typedef struct {
|
||
|
pmu_hp_backup_reg_t retention;
|
||
|
uint32_t backup_clk;
|
||
|
} pmu_hp_system_retention_param_t;
|
||
|
|
||
|
const pmu_hp_system_retention_param_t * pmu_hp_system_retention_param_default(pmu_hp_mode_t mode);
|
||
|
|
||
|
typedef struct {
|
||
|
pmu_lp_dig_power_reg_t dig_power;
|
||
|
pmu_lp_clk_power_reg_t clk_power;
|
||
|
pmu_lp_xtal_reg_t xtal;
|
||
|
} pmu_lp_system_power_param_t;
|
||
|
|
||
|
const pmu_lp_system_power_param_t * pmu_lp_system_power_param_default(pmu_lp_mode_t mode);
|
||
|
|
||
|
typedef struct {
|
||
|
pmu_lp_bias_reg_t bias;
|
||
|
pmu_lp_regulator0_reg_t regulator0;
|
||
|
pmu_lp_regulator1_reg_t regulator1;
|
||
|
} pmu_lp_system_analog_param_t;
|
||
|
|
||
|
const pmu_lp_system_analog_param_t * pmu_lp_system_analog_param_default(pmu_lp_mode_t mode);
|
||
|
|
||
|
|
||
|
typedef struct {
|
||
|
struct {
|
||
|
pmu_hp_power_t dig_power;
|
||
|
pmu_hp_power_t clk_power;
|
||
|
pmu_hp_power_t xtal;
|
||
|
} hp_sys;
|
||
|
struct {
|
||
|
pmu_lp_power_t dig_power;
|
||
|
pmu_lp_power_t clk_power;
|
||
|
pmu_lp_power_t xtal;
|
||
|
} lp_sys[PMU_MODE_LP_MAX];
|
||
|
} pmu_sleep_power_config_t;
|
||
|
|
||
|
typedef struct {
|
||
|
struct {
|
||
|
pmu_hp_analog_t analog;
|
||
|
} hp_sys;
|
||
|
struct {
|
||
|
pmu_lp_analog_t analog;
|
||
|
} lp_sys[PMU_MODE_LP_MAX];
|
||
|
} pmu_sleep_analog_config_t;
|
||
|
|
||
|
typedef struct {
|
||
|
pmu_hp_param_t hp_sys;
|
||
|
pmu_lp_param_t lp_sys;
|
||
|
pmu_hp_lp_param_t hp_lp;
|
||
|
} pmu_sleep_param_config_t;
|
||
|
|
||
|
typedef struct {
|
||
|
pmu_sleep_power_config_t power;
|
||
|
pmu_sleep_analog_config_t analog;
|
||
|
pmu_sleep_param_config_t param;
|
||
|
} pmu_sleep_config_t;
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
}
|
||
|
#endif
|