feat(coap): Add COAP enable macro to make coap not build if application not use coap module

This commit is contained in:
yuanjm
2020-09-18 11:51:18 +08:00
parent 9ed7356f01
commit 684ea0a479
7 changed files with 51 additions and 33 deletions

View File

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

View File

@ -0,0 +1 @@
CONFIG_ENABLE_COAP=y

View File

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

View File

@ -0,0 +1 @@
CONFIG_ENABLE_COAP=y