// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #pragma once #include #include #include "esp_err.h" #ifdef __cplusplus extern "C" { #endif /** * @file PHY init parameters and API */ /** * @brief Structure holding PHY init parameters */ typedef struct { uint8_t params[128]; /*!< opaque PHY initialization parameters */ } esp_phy_init_data_t; /** * @brief Opaque PHY calibration data */ typedef struct { uint8_t version[4]; /*!< PHY version */ uint8_t mac[6]; /*!< The MAC address of the station */ uint8_t opaque[1894]; /*!< calibration data */ } esp_phy_calibration_data_t; typedef enum { PHY_RF_CAL_PARTIAL = 0x00000000, /*!< Do part of RF calibration. This should be used after power-on reset. */ PHY_RF_CAL_NONE = 0x00000001, /*!< Don't do any RF calibration. This mode is only suggested to be used after deep sleep reset. */ PHY_RF_CAL_FULL = 0x00000002 /*!< Do full RF calibration. Produces best results, but also consumes a lot of time and current. Suggested to be used once. */ } esp_phy_calibration_mode_t; /** * @brief Modules for modem sleep */ typedef enum{ MODEM_BLE_MODULE, //!< BLE controller used MODEM_CLASSIC_BT_MODULE, //!< Classic BT controller used MODEM_WIFI_STATION_MODULE, //!< Wi-Fi Station used MODEM_WIFI_SOFTAP_MODULE, //!< Wi-Fi SoftAP used MODEM_WIFI_SNIFFER_MODULE, //!< Wi-Fi Sniffer used MODEM_WIFI_NULL_MODULE, //!< Wi-Fi Null mode used MODEM_USER_MODULE, //!< User used MODEM_MODULE_COUNT //!< Number of items }modem_sleep_module_t; /** * @brief Module WIFI mask for medem sleep */ #define MODEM_BT_MASK ((1<