小编Nox*_*xet的帖子

ESP32变量的多重定义

我正在使用 ESP32 的示例项目,并将主 C 文件拆分为两个文件,main.cwifi.c使用一个包含共享变量的头文件。

头文件:

#ifndef WIFI_TEST_H
#define WIFI_TEST_H

#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/event_groups.h"

#include "esp_system.h"
#include "esp_log.h"
#include "esp_ota_ops.h"
#include "esp_http_client.h"
#include "esp_flash_partitions.h"
#include "esp_partition.h"

#include "esp_wifi.h"
#include "esp_event_loop.h"

#define EXAMPLE_WIFI_SSID CONFIG_WIFI_SSID
#define EXAMPLE_WIFI_PASS CONFIG_WIFI_PASSWORD

const char *TAG = "wifi_test";

/* FreeRTOS event group to signal when we are connected & ready to make a request */
EventGroupHandle_t wifi_event_group;
/* The event group allows multiple bits for each event,
   but we only care …
Run Code Online (Sandbox Code Playgroud)

c esp32

4
推荐指数
1
解决办法
3069
查看次数

标签 统计

c ×1

esp32 ×1