Update ESP-IDF da2116f + esp32-camera f8f26ab + BLE b232e7f (#2194)

* ESP-IDF da2116f + esp32-camera f8f26ab +BLE b232e7f

* Fix fail compilation due to missing cpp guard
This commit is contained in:
Me No Dev
2018-12-15 17:38:34 +01:00
committed by GitHub
parent 1289f4be4b
commit 6f6ee98188
120 changed files with 760 additions and 17 deletions

View File

@ -156,6 +156,18 @@ 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 Erase PHY calibration data which is stored in the NVS
*
* This is a function which can be used to trigger full calibration as a last-resort remedy
* if partial calibration is used. It can be called in the application based on some conditions
* (e.g. an option provided in some diagnostic mode).
*
* @return ESP_OK on success
* @return others on fail. Please refer to NVS API return value error number.
*/
esp_err_t esp_phy_erase_cal_data_in_nvs(void);
/**
* @brief Initialize PHY and RF module
*
@ -214,6 +226,12 @@ esp_err_t esp_modem_sleep_register(modem_sleep_module_t module);
*/
esp_err_t esp_modem_sleep_deregister(modem_sleep_module_t module);
/**
* @brief Get the time stamp when PHY/RF was switched on
* @return return 0 if PHY/RF is never switched on. Otherwise return time in
* microsecond since boot when phy/rf was last switched on
*/
int64_t esp_phy_rf_get_on_ts(void);
#ifdef __cplusplus
}
#endif

View File

@ -46,6 +46,40 @@ typedef struct {
void *storage; /**< storage for FreeRTOS queue */
} wifi_static_queue_t;
/**
* @brief WiFi log level
*
*/
typedef enum {
WIFI_LOG_ERROR = 0, /*enabled by default*/
WIFI_LOG_WARNING, /*enabled by default*/
WIFI_LOG_INFO, /*enabled by default*/
WIFI_LOG_DEBUG, /*can be set in menuconfig*/
WIFI_LOG_VERBOSE, /*can be set in menuconfig*/
} wifi_log_level_t;
/**
* @brief WiFi log module definition
*
*/
typedef enum {
WIFI_LOG_MODULE_ALL = 0, /*all log modules */
WIFI_LOG_MODULE_WIFI, /*logs related to WiFi*/
WIFI_LOG_MODULE_COEX, /*logs related to WiFi and BT(or BLE) coexist*/
WIFI_LOG_MODULE_MESH, /*logs related to Mesh*/
} wifi_log_module_t;
/**
* @brief WiFi log submodule definition
*
*/
#define WIFI_LOG_SUBMODULE_ALL (0) /*all log submodules*/
#define WIFI_LOG_SUBMODULE_INIT (1) /*logs related to initialization*/
#define WIFI_LOG_SUBMODULE_IOCTL (1<<1) /*logs related to API calling*/
#define WIFI_LOG_SUBMODULE_CONN (1<<2) /*logs related to connecting*/
#define WIFI_LOG_SUBMODULE_SCAN (1<<3) /*logs related to scaning*/
/**
* @brief Initialize Wi-Fi Driver
* Alloc resource for WiFi driver, such as WiFi control structure, RX/TX buffer,
@ -224,6 +258,46 @@ void *wifi_calloc( size_t n, size_t size );
*/
esp_err_t esp_wifi_internal_update_mac_time( uint32_t time_delta );
/**
* @brief Set current WiFi log level
*
* @param level Log level.
*
* @return
* - ESP_OK: succeed
* - ESP_FAIL: level is invalid
*/
esp_err_t esp_wifi_internal_set_log_level(wifi_log_level_t level);
/**
* @brief Set current log module and submodule
*
* @param module Log module
* @param submodule Log submodule
* @param enable enable or disable
* If module == 0 && enable == 0, all log modules are disabled.
* If module == 0 && enable == 1, all log modules are enabled.
* If submodule == 0 && enable == 0, all log submodules are disabled.
* If submodule == 0 && enable == 1, all log submodules are enabled.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_ARG: invalid argument
*/
esp_err_t esp_wifi_internal_set_log_mod(wifi_log_module_t module, uint32_t submodule, bool enable);
/**
* @brief Get current WiFi log info
*
* @param log_level the return log level.
* @param log_mod the return log module and submodule
*
* @return
* - ESP_OK: succeed
*/
esp_err_t esp_wifi_internal_get_log(wifi_log_level_t *log_level, uint32_t *log_mod);
#ifdef __cplusplus
}
#endif