mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-06-30 04:21:00 +02:00
Major IDF and Arduino Update
WiFi and BlueTooth can now be started and stopped at will. basic functions added to esp32-hal to start and stop the BT radio SimpleBLE class added to show the most basic functionality Example to show how to switch between BT, WiFi or Both
This commit is contained in:
@ -25,6 +25,11 @@ extern "C" {
|
||||
*/
|
||||
esp_err_t coex_init(void);
|
||||
|
||||
/**
|
||||
* @brief De-init software coexist
|
||||
*/
|
||||
void coex_deinit(void);
|
||||
|
||||
/**
|
||||
* @brief Get software coexist enable or not
|
||||
*
|
||||
|
@ -164,6 +164,14 @@ void esp_deep_sleep_start() __attribute__((noreturn));
|
||||
* Call to this function is equivalent to a call to esp_deep_sleep_enable_timer_wakeup
|
||||
* followed by a call to esp_deep_sleep_start.
|
||||
*
|
||||
* esp_deep_sleep does not shut down WiFi, BT, and higher level protocol
|
||||
* connections gracefully.
|
||||
* Make sure relevant WiFi and BT stack functions are called to close any
|
||||
* connections and deinitialize the peripherals. These include:
|
||||
* - esp_bluedroid_disable
|
||||
* - esp_bt_controller_disable
|
||||
* - esp_wifi_stop
|
||||
*
|
||||
* This function does not return.
|
||||
*
|
||||
* @param time_in_us deep-sleep time, unit: microsecond
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "esp_err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -192,7 +193,7 @@ void esp_phy_release_init_data(const esp_phy_init_data_t* data);
|
||||
* mechanism for loading calibration data, disable
|
||||
* "Initialize PHY in startup code" option in menuconfig and call esp_phy_init
|
||||
* function from the application. For an example usage of esp_phy_init and
|
||||
* this function, see do_phy_init function in cpu_start.c
|
||||
* this function, see esp_phy_store_cal_data_to_nvs function in cpu_start.c
|
||||
*
|
||||
* @param out_cal_data pointer to calibration data structure to be filled with
|
||||
* loaded data.
|
||||
@ -220,28 +221,39 @@ esp_err_t esp_phy_load_cal_data_from_nvs(esp_phy_calibration_data_t* out_cal_dat
|
||||
esp_err_t esp_phy_store_cal_data_to_nvs(const esp_phy_calibration_data_t* cal_data);
|
||||
|
||||
/**
|
||||
* @brief Initialize PHY module
|
||||
* @brief Initialize PHY and RF module
|
||||
*
|
||||
* PHY module should be initialized in order to use WiFi or BT.
|
||||
* If "Initialize PHY in startup code" option is set in menuconfig,
|
||||
* this function will be called automatically before app_main is called,
|
||||
* using parameters obtained from esp_phy_get_init_data.
|
||||
*
|
||||
* Applications which don't need to enable PHY on every start up should
|
||||
* disable this menuconfig option and call esp_phy_init before calling
|
||||
* esp_wifi_init or esp_bt_controller_init. See do_phy_init function in
|
||||
* cpu_start.c for an example of using this function.
|
||||
* PHY and RF module should be initialized in order to use WiFi or BT.
|
||||
* Now PHY and RF initializing job is done automatically when start WiFi or BT. Users should not
|
||||
* call this API in their application.
|
||||
*
|
||||
* @param init_data PHY parameters. Default set of parameters can
|
||||
* be obtained by calling esp_phy_get_default_init_data
|
||||
* function.
|
||||
* @param mode Calibration mode (Full, partial, or no calibration)
|
||||
* @param[inout] calibration_data
|
||||
* @param is_sleep WiFi wakes up from sleep or not
|
||||
* @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, bool is_sleep);
|
||||
|
||||
/**
|
||||
* @brief De-initialize PHY and RF module
|
||||
*
|
||||
* PHY module should be de-initialized in order to shutdown WiFi or BT.
|
||||
* Now PHY and RF de-initializing job is done automatically when stop WiFi or BT. Users should not
|
||||
* call this API in their application.
|
||||
*
|
||||
* @return ESP_OK on success.
|
||||
*/
|
||||
esp_err_t esp_phy_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_deinit(void);
|
||||
|
||||
/**
|
||||
* @brief Load calibration data from NVS and initialize PHY and RF module
|
||||
*/
|
||||
void esp_phy_load_cal_and_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -130,6 +130,7 @@ esp_err_t esp_wifi_init(wifi_init_config_t *config);
|
||||
* Free all resource allocated in esp_wifi_init and stop WiFi task
|
||||
*
|
||||
* @attention 1. This API should be called if you want to remove WiFi driver from the system
|
||||
* @attention 2. This API can not be called yet and will be done in the future.
|
||||
*
|
||||
* @return ESP_OK: succeed
|
||||
*/
|
||||
|
@ -268,10 +268,10 @@
|
||||
* 2 1 extern level
|
||||
* 3 1 extern level
|
||||
* 4 1 extern level WBB
|
||||
* 5 1 extern level BT Controller
|
||||
* 5 1 extern level BT/BLE Controller
|
||||
* 6 1 timer FreeRTOS Tick(L1) FreeRTOS Tick(L1)
|
||||
* 7 1 software Reserved Reserved
|
||||
* 8 1 extern level BLE Controller
|
||||
* 8 1 extern level BT/BLE BB(RX/TX)
|
||||
* 9 1 extern level
|
||||
* 10 1 extern edge Internal Timer
|
||||
* 11 3 profiling
|
||||
|
Reference in New Issue
Block a user