mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-21 17:16:29 +08:00
feat(coap): Add COAP enable macro to make coap not build if application not use coap module
This commit is contained in:
@ -18,7 +18,7 @@
|
||||
#include "esp_log.h"
|
||||
#include "esp_wifi.h"
|
||||
#include "esp_event.h"
|
||||
|
||||
#include "esp_netif.h"
|
||||
#include "nvs_flash.h"
|
||||
|
||||
#include "protocol_examples_common.h"
|
||||
@ -282,7 +282,7 @@ clean_up:
|
||||
void app_main(void)
|
||||
{
|
||||
ESP_ERROR_CHECK( nvs_flash_init() );
|
||||
tcpip_adapter_init();
|
||||
ESP_ERROR_CHECK(esp_netif_init());
|
||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||
|
||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||
|
1
examples/protocols/coap_client/sdkconfig.defaults
Normal file
1
examples/protocols/coap_client/sdkconfig.defaults
Normal file
@ -0,0 +1 @@
|
||||
CONFIG_ENABLE_COAP=y
|
@ -17,7 +17,7 @@
|
||||
#include "esp_log.h"
|
||||
#include "esp_wifi.h"
|
||||
#include "esp_event.h"
|
||||
|
||||
#include "esp_netif.h"
|
||||
#include "nvs_flash.h"
|
||||
|
||||
#include "protocol_examples_common.h"
|
||||
@ -162,7 +162,7 @@ clean_up:
|
||||
void app_main(void)
|
||||
{
|
||||
ESP_ERROR_CHECK( nvs_flash_init() );
|
||||
tcpip_adapter_init();
|
||||
ESP_ERROR_CHECK(esp_netif_init());
|
||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
||||
|
||||
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.
|
||||
|
1
examples/protocols/coap_server/sdkconfig.defaults
Normal file
1
examples/protocols/coap_server/sdkconfig.defaults
Normal file
@ -0,0 +1 @@
|
||||
CONFIG_ENABLE_COAP=y
|
Reference in New Issue
Block a user