feat(examples): fix aws iot examples for esp8266 platform

This commit is contained in:
Wu Jian Gang
2018-07-10 23:18:48 +08:00
parent d31775704d
commit fd299df7e5
4 changed files with 14 additions and 4 deletions

View File

@ -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);
} }

View File

@ -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)

View File

@ -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);
} }

View File

@ -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)