mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-06-30 12:30:59 +02:00
Update IDF to f586f5e (#1296)
* Update BLE lib * Update IDF to f586f5e * Restructure Bluetooth Serial includes * Update esptool and gen_esp32part * Add partition scheme selection for menuconfig * Add partition scheme selection for Arduino IDE * Fix BLE example * Second attempt BLE fix * Add exceptions to PIO
This commit is contained in:
@ -46,6 +46,43 @@ typedef enum {
|
||||
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_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<<MODEM_BLE_MODULE) | \
|
||||
(1<<MODEM_CLASSIC_BT_MODULE))
|
||||
|
||||
/**
|
||||
* @brief Module WIFI mask for medem sleep
|
||||
*/
|
||||
#define MODEM_WIFI_MASK ((1<<MODEM_WIFI_STATION_MODULE) | \
|
||||
(1<<MODEM_WIFI_SOFTAP_MODULE) | \
|
||||
(1<<MODEM_WIFI_SNIFFER_MODULE))
|
||||
|
||||
/**
|
||||
* @brief Modules needing to call phy_rf_init
|
||||
*/
|
||||
typedef enum{
|
||||
PHY_BT_MODULE, //!< Bluetooth used
|
||||
PHY_WIFI_MODULE, //!< Wi-Fi used
|
||||
PHY_MODEM_MODULE, //!< Modem sleep used
|
||||
PHY_MODULE_COUNT //!< Number of items
|
||||
}phy_rf_module_t;
|
||||
|
||||
/**
|
||||
* @brief Get PHY init data
|
||||
*
|
||||
@ -130,8 +167,8 @@ esp_err_t esp_phy_store_cal_data_to_nvs(const esp_phy_calibration_data_t* cal_da
|
||||
* @return ESP_OK on success.
|
||||
* @return ESP_FAIL on fail.
|
||||
*/
|
||||
esp_err_t esp_phy_rf_init(const esp_phy_init_data_t* init_data,
|
||||
esp_phy_calibration_mode_t mode, esp_phy_calibration_data_t* calibration_data);
|
||||
esp_err_t esp_phy_rf_init(const esp_phy_init_data_t* init_data,esp_phy_calibration_mode_t mode,
|
||||
esp_phy_calibration_data_t* calibration_data, phy_rf_module_t module);
|
||||
|
||||
/**
|
||||
* @brief De-initialize PHY and RF module
|
||||
@ -142,12 +179,32 @@ esp_err_t esp_phy_rf_init(const esp_phy_init_data_t* init_data,
|
||||
*
|
||||
* @return ESP_OK on success.
|
||||
*/
|
||||
esp_err_t esp_phy_rf_deinit(void);
|
||||
esp_err_t esp_phy_rf_deinit(phy_rf_module_t module);
|
||||
|
||||
/**
|
||||
* @brief Load calibration data from NVS and initialize PHY and RF module
|
||||
*/
|
||||
void esp_phy_load_cal_and_init(void);
|
||||
void esp_phy_load_cal_and_init(phy_rf_module_t module);
|
||||
|
||||
/**
|
||||
* @brief Module requires to enter modem sleep
|
||||
*/
|
||||
esp_err_t esp_modem_sleep_enter(modem_sleep_module_t module);
|
||||
|
||||
/**
|
||||
* @brief Module requires to exit modem sleep
|
||||
*/
|
||||
esp_err_t esp_modem_sleep_exit(modem_sleep_module_t module);
|
||||
|
||||
/**
|
||||
* @brief Register module to make it be able to require to enter/exit modem sleep
|
||||
*/
|
||||
esp_err_t esp_modem_sleep_register(modem_sleep_module_t module);
|
||||
|
||||
/**
|
||||
* @brief De-register module from modem sleep list
|
||||
*/
|
||||
esp_err_t esp_modem_sleep_deregister(modem_sleep_module_t module);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Reference in New Issue
Block a user