mirror of
https://git.beihong.wang/wangbeihong/iot-bedroom-environment-controller.git
synced 2026-04-23 16:33:04 +08:00
- 环境监测:温湿度/光照/空气质量传感器采集 - 智能控制:时间段/降温/通风三种自动模式 - 闹钟系统:3个闹钟+温和唤醒功能 - 远程控制:MQTT双向通信 - 本地显示:LVGL图形界面 - 双MCU架构,FreeRTOS 10任务并行 - 完整的1250行README文档
59 lines
1.7 KiB
C
59 lines
1.7 KiB
C
/*
|
|
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
|
*
|
|
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
|
*/
|
|
/* Private Functions of protocol example common */
|
|
|
|
#pragma once
|
|
|
|
#include "esp_err.h"
|
|
#include "esp_wifi.h"
|
|
#include "sdkconfig.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#if CONFIG_EXAMPLE_CONNECT_IPV6
|
|
#define MAX_IP6_ADDRS_PER_NETIF (5)
|
|
|
|
#if defined(CONFIG_EXAMPLE_CONNECT_IPV6_PREF_LOCAL_LINK)
|
|
#define EXAMPLE_CONNECT_PREFERRED_IPV6_TYPE ESP_IP6_ADDR_IS_LINK_LOCAL
|
|
#elif defined(CONFIG_EXAMPLE_CONNECT_IPV6_PREF_GLOBAL)
|
|
#define EXAMPLE_CONNECT_PREFERRED_IPV6_TYPE ESP_IP6_ADDR_IS_GLOBAL
|
|
#elif defined(CONFIG_EXAMPLE_CONNECT_IPV6_PREF_SITE_LOCAL)
|
|
#define EXAMPLE_CONNECT_PREFERRED_IPV6_TYPE ESP_IP6_ADDR_IS_SITE_LOCAL
|
|
#elif defined(CONFIG_EXAMPLE_CONNECT_IPV6_PREF_UNIQUE_LOCAL)
|
|
#define EXAMPLE_CONNECT_PREFERRED_IPV6_TYPE ESP_IP6_ADDR_IS_UNIQUE_LOCAL
|
|
#endif // if-elif CONFIG_EXAMPLE_CONNECT_IPV6_PREF_...
|
|
|
|
#endif
|
|
|
|
|
|
#if CONFIG_EXAMPLE_CONNECT_IPV6
|
|
extern const char *example_ipv6_addr_types_to_str[6];
|
|
#endif
|
|
|
|
void example_wifi_start(void);
|
|
void example_wifi_stop(void);
|
|
esp_err_t example_wifi_sta_do_connect(wifi_config_t wifi_config, bool wait);
|
|
esp_err_t example_wifi_sta_do_disconnect(void);
|
|
bool example_is_our_netif(const char *prefix, esp_netif_t *netif);
|
|
void example_print_all_netif_ips(const char *prefix);
|
|
void example_wifi_shutdown(void);
|
|
esp_err_t example_wifi_connect(void);
|
|
void example_ethernet_shutdown(void);
|
|
esp_err_t example_ethernet_connect(void);
|
|
void example_thread_shutdown(void);
|
|
esp_err_t example_thread_connect(void);
|
|
esp_err_t example_ppp_connect(void);
|
|
void example_ppp_start(void);
|
|
void example_ppp_shutdown(void);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|