esp-idf/components/hal/include/hal/pau_hal.h
Planck (Lu Zeyu) 333553caf2 fix(hal): check the public header files and fix violations
fix(hal/include): fix header violations in hal component
fix(hal/include): Move type definitions from `xx_hal.h` to `xx_types.h`
fix(hal/include): Move type definitions from `xx_hal.h` to `xx_types.h`
fix(hal/include): Add comment for a far away `#endif`
fix(hal/include): change scope for cpp guard
ci: Remove components/hal/ comment from public headers check exceptions
Add missing include macro sdkconfig.h for header files
Add missing include macro stdbool.h for header files
Add missing include macro stdint.h for header files
Add missing capability guard macro for header files
Add missing cpp guard macro for header files
Remove some useless include macros
Add some missing `inline` attribute for functions defined in header files
Remove components/hal/ from public headers check exceptions
fix(hal/include): fix invalid licenses
fix(hal/include): fix invalid licenses
fix(hal/include): add missing soc_caps.h
fix(hal): include soc_caps.h before cap macro is used
fix(hal): Remove unnecessary target check
fix(hal): fix header and macro problems
Add missing include macro
Remove loop dependency in hal
Add comment for far-away endif
fix(hal): Add missing soc_caps.h
ci: update check_copyright_ignore.txt
Change the sequence of `#include` macro, cpp guard macro
Change the wrap scope of capacity macro

fix(hal): Change position of C++ guard to pass test
2023-07-05 17:33:32 +08:00

119 lines
2.9 KiB
C

/*
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
// The HAL layer for PAU (Power Assist Unit)
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include "soc/soc_caps.h"
#if SOC_PAU_SUPPORTED
#include "hal/pau_ll.h"
#include "hal/pau_types.h"
typedef struct {
pau_dev_t *dev;
} pau_hal_context_t;
/**
* @brief Set regdma entry link address
*
* @param hal regdma hal context
* @param link_addr entry link address value
*/
void pau_hal_set_regdma_entry_link_addr(pau_hal_context_t *hal, pau_regdma_link_addr_t *link_addr);
#if SOC_PM_SUPPORT_PMU_MODEM_STATE
/**
* @brief Set regdma modem link address
*
* @param hal regdma hal context
* @param link_addr modem link address value
*/
#define pau_hal_set_regdma_modem_link_addr(hal, addr) pau_ll_set_regdma_wifimac_link_addr((hal)->dev, (addr))
/**
* @brief Start transmission on regdma modem link
*
* @param hal regdma hal context
* @param backup_or_restore false:restore true:backup
*/
void pau_hal_start_regdma_modem_link(pau_hal_context_t *hal, bool backup_or_restore);
/**
* @brief Stop transmission on regdma modem link
*
* @param hal regdma hal context
*/
void pau_hal_stop_regdma_modem_link(pau_hal_context_t *hal);
#endif
#if SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG
/**
* @brief Set regdma system link address
*
* @param hal regdma hal context
* @param link_addr main link address value
*/
#define pau_hal_set_regdma_system_link_addr(hal, addr) pau_ll_set_regdma_link0_addr(hal->dev, (addr))
/**
* @brief Start transmission on regdma system link
*
* @param hal regdma hal context
* @param backup_or_restore false:restore true:backup
*/
void pau_hal_start_regdma_system_link(pau_hal_context_t *hal, bool backup_or_restore);
/**
* @brief Stop transmission on regdma system link
*
* @param hal regdma hal context
*/
void pau_hal_stop_regdma_system_link(pau_hal_context_t *hal);
#endif
/**
* @brief Set regdma extra link address
*
* @param hal regdma hal context
* @param link_addr extra link address value
*/
#define pau_hal_set_regdma_extra_link_addr(hal, addr) pau_ll_set_regdma_link3_addr(hal->dev, (addr))
/**
* @brief Start transmission on regdma extra link
*
* @param hal regdma hal context
* @param backup_or_restore false:restore true:backup
*/
void pau_hal_start_regdma_extra_link(pau_hal_context_t *hal, bool backup_or_restore);
/**
* @brief Stop transmission on regdma extra link
*
* @param hal regdma hal context
*/
void pau_hal_stop_regdma_extra_link(pau_hal_context_t *hal);
#if SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG
/**
* @brief Enable or disable PAU module clock
*
* @param hal regdma hal context
*/
void pau_hal_regdma_clock_configure(pau_hal_context_t *hal, bool enable);
#endif
#endif
#ifdef __cplusplus
}
#endif