mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'feature/enable_wifi_provisioning_for_esp32c3' into 'master'
wifi_provisioning: enable component build for ESP32-C3 Closes IDF-2251 See merge request espressif/esp-idf!11749
This commit is contained in:
commit
569ebc181a
@ -1,8 +1,3 @@
|
||||
idf_build_get_property(target IDF_TARGET)
|
||||
if(${target} STREQUAL "esp32c3")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(srcs "src/wifi_config.c"
|
||||
"src/wifi_scan.c"
|
||||
"src/manager.c"
|
||||
|
@ -268,7 +268,7 @@ static cJSON* wifi_prov_get_info_json(void)
|
||||
|
||||
/* Declare the internal event handler */
|
||||
static void wifi_prov_mgr_event_handler_internal(void* arg, esp_event_base_t event_base,
|
||||
int event_id, void* event_data);
|
||||
int32_t event_id, void* event_data);
|
||||
|
||||
static esp_err_t wifi_prov_mgr_start_service(const char *service_name, const char *service_key)
|
||||
{
|
||||
@ -801,7 +801,7 @@ esp_err_t wifi_prov_mgr_event_handler(void *ctx, system_event_t *event)
|
||||
}
|
||||
|
||||
static void wifi_prov_mgr_event_handler_internal(
|
||||
void* arg, esp_event_base_t event_base, int event_id, void* event_data)
|
||||
void* arg, esp_event_base_t event_base, int32_t event_id, void* event_data)
|
||||
{
|
||||
if (!prov_ctx_lock) {
|
||||
ESP_LOGE(TAG, "Provisioning manager not initialized");
|
||||
|
@ -28,7 +28,7 @@ static const char *TAG = "app";
|
||||
static void start_ble_provisioning(void);
|
||||
|
||||
static void event_handler(void* arg, esp_event_base_t event_base,
|
||||
int event_id, void* event_data)
|
||||
int32_t event_id, void* event_data)
|
||||
{
|
||||
static int s_retry_num_ap_not_found = 0;
|
||||
static int s_retry_num_ap_auth_fail = 0;
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <nvs.h>
|
||||
#include <esp_bt.h>
|
||||
#include <esp_event.h>
|
||||
#include <esp_timer.h>
|
||||
|
||||
#ifdef CONFIG_BT_NIMBLE_ENABLED
|
||||
#include "esp_nimble_hci.h"
|
||||
@ -35,7 +36,7 @@ static const char *TAG = "app_prov";
|
||||
static const char *ssid_prefix = "PROV_";
|
||||
|
||||
/* Handler for catching WiFi events */
|
||||
static void app_prov_event_handler(void* handler_arg, esp_event_base_t base, int id, void* data);
|
||||
static void app_prov_event_handler(void* handler_arg, esp_event_base_t base, int32_t id, void* data);
|
||||
|
||||
/* Handlers for wifi_config provisioning endpoint */
|
||||
extern wifi_prov_config_handlers_t wifi_prov_handlers;
|
||||
@ -198,7 +199,7 @@ static void _stop_prov_cb(void * arg)
|
||||
|
||||
/* Event handler for starting/stopping provisioning */
|
||||
static void app_prov_event_handler(void* handler_arg, esp_event_base_t event_base,
|
||||
int event_id, void* event_data)
|
||||
int32_t event_id, void* event_data)
|
||||
{
|
||||
/* If pointer to provisioning application data is NULL
|
||||
* then provisioning is not running */
|
||||
|
@ -26,7 +26,7 @@
|
||||
static const char *TAG = "app";
|
||||
|
||||
static void event_handler(void* arg, esp_event_base_t event_base,
|
||||
int event_id, void* event_data)
|
||||
int32_t event_id, void* event_data)
|
||||
{
|
||||
static int s_retry_num = 0;
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <nvs_flash.h>
|
||||
#include <nvs.h>
|
||||
#include <esp_event.h>
|
||||
#include <esp_timer.h>
|
||||
|
||||
#include <protocomm.h>
|
||||
#include <protocomm_console.h>
|
||||
@ -26,7 +27,7 @@
|
||||
static const char *TAG = "app_prov";
|
||||
|
||||
/* Handler for catching WiFi events */
|
||||
static void app_prov_event_handler(void* handler_arg, esp_event_base_t base, int id, void* data);
|
||||
static void app_prov_event_handler(void* handler_arg, esp_event_base_t base, int32_t id, void* data);
|
||||
|
||||
/* Handlers for wifi_config provisioning endpoint */
|
||||
extern wifi_prov_config_handlers_t wifi_prov_handlers;
|
||||
@ -136,7 +137,7 @@ static void _stop_prov_cb(void * arg)
|
||||
|
||||
/* Event handler for starting/stopping provisioning */
|
||||
static void app_prov_event_handler(void* handler_arg, esp_event_base_t event_base,
|
||||
int event_id, void* event_data)
|
||||
int32_t event_id, void* event_data)
|
||||
{
|
||||
/* If pointer to provisioning application data is NULL
|
||||
* then provisioning is not running */
|
||||
|
@ -26,7 +26,7 @@
|
||||
static const char *TAG = "app";
|
||||
|
||||
static void event_handler(void* arg, esp_event_base_t event_base,
|
||||
int event_id, void* event_data)
|
||||
int32_t event_id, void* event_data)
|
||||
{
|
||||
static int s_retry_num = 0;
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <nvs_flash.h>
|
||||
#include <nvs.h>
|
||||
#include <esp_event.h>
|
||||
#include <esp_timer.h>
|
||||
|
||||
#include <protocomm.h>
|
||||
#include <protocomm_httpd.h>
|
||||
@ -27,7 +28,7 @@
|
||||
static const char *TAG = "app_prov";
|
||||
|
||||
/* Handler for catching WiFi events */
|
||||
static void app_prov_event_handler(void* handler_arg, esp_event_base_t base, int id, void* data);
|
||||
static void app_prov_event_handler(void* handler_arg, esp_event_base_t base, int32_t id, void* data);
|
||||
|
||||
/* Handlers for provisioning endpoints */
|
||||
extern wifi_prov_config_handlers_t wifi_prov_handlers;
|
||||
@ -152,7 +153,7 @@ static void _stop_prov_cb(void * arg)
|
||||
|
||||
/* Event handler for starting/stopping provisioning */
|
||||
static void app_prov_event_handler(void* handler_arg, esp_event_base_t event_base,
|
||||
int event_id, void* event_data)
|
||||
int32_t event_id, void* event_data)
|
||||
{
|
||||
/* If pointer to provisioning application data is NULL
|
||||
* then provisioning is not running */
|
||||
|
@ -26,7 +26,7 @@
|
||||
static const char *TAG = "app";
|
||||
|
||||
static void event_handler(void* arg, esp_event_base_t event_base,
|
||||
int event_id, void* event_data)
|
||||
int32_t event_id, void* event_data)
|
||||
{
|
||||
static int s_retry_num = 0;
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <nvs_flash.h>
|
||||
#include <nvs.h>
|
||||
#include <esp_event.h>
|
||||
#include <esp_timer.h>
|
||||
|
||||
#include <protocomm.h>
|
||||
#include <protocomm_httpd.h>
|
||||
@ -26,7 +27,7 @@
|
||||
static const char *TAG = "app_prov";
|
||||
|
||||
/* Handler for catching WiFi events */
|
||||
static void app_prov_event_handler(void* handler_arg, esp_event_base_t base, int id, void* data);
|
||||
static void app_prov_event_handler(void* handler_arg, esp_event_base_t base, int32_t id, void* data);
|
||||
|
||||
/* Handlers for wifi_config provisioning endpoint */
|
||||
extern wifi_prov_config_handlers_t wifi_prov_handlers;
|
||||
@ -138,7 +139,7 @@ static void _stop_prov_cb(void * arg)
|
||||
|
||||
/* Event handler for starting/stopping provisioning */
|
||||
static void app_prov_event_handler(void* handler_arg, esp_event_base_t event_base,
|
||||
int event_id, void* event_data)
|
||||
int32_t event_id, void* event_data)
|
||||
{
|
||||
/* If pointer to provisioning application data is NULL
|
||||
* then provisioning is not running */
|
||||
|
@ -2,6 +2,7 @@ menu "Example Configuration"
|
||||
|
||||
choice EXAMPLE_PROV_TRANSPORT
|
||||
bool "Provisioning Transport"
|
||||
default EXAMPLE_PROV_TRANSPORT_SOFTAP if IDF_TARGET_ESP32S2
|
||||
default EXAMPLE_PROV_TRANSPORT_BLE
|
||||
help
|
||||
Wi-Fi provisioning component offers both, SoftAP and BLE transports. Choose any one.
|
||||
@ -9,7 +10,6 @@ menu "Example Configuration"
|
||||
config EXAMPLE_PROV_TRANSPORT_BLE
|
||||
bool "BLE"
|
||||
select BT_ENABLED
|
||||
depends on IDF_TARGET_ESP32
|
||||
config EXAMPLE_PROV_TRANSPORT_SOFTAP
|
||||
bool "Soft AP"
|
||||
endchoice
|
||||
|
@ -37,7 +37,7 @@ static EventGroupHandle_t wifi_event_group;
|
||||
|
||||
/* Event handler for catching system events */
|
||||
static void event_handler(void* arg, esp_event_base_t event_base,
|
||||
int event_id, void* event_data)
|
||||
int32_t event_id, void* event_data)
|
||||
{
|
||||
if (event_base == WIFI_PROV_EVENT) {
|
||||
switch (event_id) {
|
||||
|
@ -2,4 +2,4 @@
|
||||
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
|
||||
nvs, data, nvs, 0x9000, 0x6000,
|
||||
phy_init, data, phy, 0xf000, 0x1000,
|
||||
factory, app, factory, 0x10000, 1200000,
|
||||
factory, app, factory, 0x10000, 1300000,
|
||||
|
|
Loading…
Reference in New Issue
Block a user