mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-23 18:18:36 +08:00
feat(examples): fix aws iot examples for esp8266 platform
This commit is contained in:
@ -37,8 +37,11 @@
|
|||||||
#include "esp_wifi.h"
|
#include "esp_wifi.h"
|
||||||
#include "esp_event_loop.h"
|
#include "esp_event_loop.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
|
|
||||||
|
#ifdef CONFIG_EXAMPLE_FILESYSTEM_CERTS
|
||||||
#include "esp_vfs_fat.h"
|
#include "esp_vfs_fat.h"
|
||||||
#include "driver/sdmmc_host.h"
|
#include "driver/sdmmc_host.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "nvs.h"
|
#include "nvs.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
@ -65,7 +68,7 @@ static EventGroupHandle_t wifi_event_group;
|
|||||||
/* The event group allows multiple bits for each event,
|
/* The event group allows multiple bits for each event,
|
||||||
but we only care about one event - are we connected
|
but we only care about one event - are we connected
|
||||||
to the AP with an IP? */
|
to the AP with an IP? */
|
||||||
const int CONNECTED_BIT = BIT0;
|
const int CONNECTED_BIT = 1 << 0;
|
||||||
|
|
||||||
|
|
||||||
/* CA Root certificate, device ("Thing") certificate and device
|
/* CA Root certificate, device ("Thing") certificate and device
|
||||||
@ -328,5 +331,5 @@ void app_main()
|
|||||||
ESP_ERROR_CHECK( err );
|
ESP_ERROR_CHECK( err );
|
||||||
|
|
||||||
initialise_wifi();
|
initialise_wifi();
|
||||||
xTaskCreatePinnedToCore(&aws_iot_task, "aws_iot_task", 9216, NULL, 5, NULL, 1);
|
xTaskCreate(&aws_iot_task, "aws_iot_task", 9216, NULL, 5, NULL);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
# Enable AWS IoT SDK support
|
# Enable AWS IoT SDK support
|
||||||
CONFIG_AWS_IOT_SDK=y
|
CONFIG_AWS_IOT_SDK=y
|
||||||
|
|
||||||
|
CONFIG_MBEDTLS_SSL_ALPN=y
|
||||||
|
|
||||||
# Enable FATFS read only with long filename support
|
# Enable FATFS read only with long filename support
|
||||||
# for loading Cert/CA/etc from filesystem
|
# for loading Cert/CA/etc from filesystem
|
||||||
# (if enabled in config)
|
# (if enabled in config)
|
||||||
|
@ -34,8 +34,11 @@
|
|||||||
#include "esp_wifi.h"
|
#include "esp_wifi.h"
|
||||||
#include "esp_event_loop.h"
|
#include "esp_event_loop.h"
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
|
|
||||||
|
#ifdef CONFIG_EXAMPLE_FILESYSTEM_CERTS
|
||||||
#include "esp_vfs_fat.h"
|
#include "esp_vfs_fat.h"
|
||||||
#include "driver/sdmmc_host.h"
|
#include "driver/sdmmc_host.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "nvs.h"
|
#include "nvs.h"
|
||||||
#include "nvs_flash.h"
|
#include "nvs_flash.h"
|
||||||
@ -92,7 +95,7 @@ static EventGroupHandle_t wifi_event_group;
|
|||||||
/* The event group allows multiple bits for each event,
|
/* The event group allows multiple bits for each event,
|
||||||
but we only care about one event - are we connected
|
but we only care about one event - are we connected
|
||||||
to the AP with an IP? */
|
to the AP with an IP? */
|
||||||
const int CONNECTED_BIT = BIT0;
|
const int CONNECTED_BIT = 1 << 0;
|
||||||
|
|
||||||
|
|
||||||
/* CA Root certificate, device ("Thing") certificate and device
|
/* CA Root certificate, device ("Thing") certificate and device
|
||||||
@ -364,5 +367,5 @@ void app_main()
|
|||||||
|
|
||||||
initialise_wifi();
|
initialise_wifi();
|
||||||
/* Temporarily pin task to core, due to FPU uncertainty */
|
/* Temporarily pin task to core, due to FPU uncertainty */
|
||||||
xTaskCreatePinnedToCore(&aws_iot_task, "aws_iot_task", 9216, NULL, 5, NULL, 1);
|
xTaskCreate(&aws_iot_task, "aws_iot_task", 9216, NULL, 5, NULL);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
# Enable AWS IoT SDK support
|
# Enable AWS IoT SDK support
|
||||||
CONFIG_AWS_IOT_SDK=y
|
CONFIG_AWS_IOT_SDK=y
|
||||||
|
|
||||||
|
CONFIG_MBEDTLS_SSL_ALPN=y
|
||||||
|
|
||||||
# Enable FATFS read only with long filename support
|
# Enable FATFS read only with long filename support
|
||||||
# for loading Cert/CA/etc from filesystem
|
# for loading Cert/CA/etc from filesystem
|
||||||
# (if enabled in config)
|
# (if enabled in config)
|
||||||
|
Reference in New Issue
Block a user