esp-idf/components/esp_hw_support/include/esp_private/periph_ctrl.h

80 wiersze
2.2 KiB
C

/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "soc/periph_defs.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Enable peripheral module by un-gating the clock and de-asserting the reset signal.
*
* @param[in] periph Peripheral module
*
* @note If @c periph_module_enable() is called a number of times,
* @c periph_module_disable() has to be called the same number of times,
* in order to put the peripheral into disabled state.
*/
void periph_module_enable(periph_module_t periph);
/**
* @brief Disable peripheral module by gating the clock and asserting the reset signal.
*
* @param[in] periph Peripheral module
*
* @note If @c periph_module_enable() is called a number of times,
* @c periph_module_disable() has to be called the same number of times,
* in order to put the peripheral into disabled state.
*/
void periph_module_disable(periph_module_t periph);
/**
* @brief Reset peripheral module by asserting and de-asserting the reset signal.
*
* @param[in] periph Peripheral module
*
* @note Calling this function does not enable or disable the clock for the module.
*/
void periph_module_reset(periph_module_t periph);
/**
* @brief Enable Wi-Fi and BT common module
*
* @note If @c wifi_bt_common_module_enable() is called a number of times,
* @c wifi_bt_common_module_disable() has to be called the same number of times,
* in order to put the peripheral into disabled state.
*/
void wifi_bt_common_module_enable(void);
/**
* @brief Disable Wi-Fi and BT common module
*
* @note If @c wifi_bt_common_module_enable() is called a number of times,
* @c wifi_bt_common_module_disable() has to be called the same number of times,
* in order to put the peripheral into disabled state.
*/
void wifi_bt_common_module_disable(void);
/**
* @brief Enable Wi-Fi module
*
* @note Calling this function will only enable Wi-Fi module.
*/
void wifi_module_enable(void);
/**
* @brief Disable Wi-Fi module
*
* @note Calling this function will only disable Wi-Fi module.
*/
void wifi_module_disable(void);
#ifdef __cplusplus
}
#endif