This repository has been archived by the owner on Feb 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
defines.h
65 lines (43 loc) · 1.67 KB
/
defines.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/****************************************************************************************************************************
defines.h
AsyncMqttClient_Generic is a library for ESP32, ESP8266, Protenta_H7, STM32F7, etc. with current AsyncTCP support
Based on and modified from :
1) async-mqtt-client (https://github.com/marvinroger/async-mqtt-client)
Built by Khoi Hoang https://github.com/khoih-prog/AsyncMqttClient_Generic
***************************************************************************************************************************************/
#ifndef defines_h
#define defines_h
#define _ASYNC_MQTT_LOGLEVEL_ 1
//////////////////////////////////////////////////////////
#define USING_W5500 true
#define USING_W5100 false
#define USING_ENC28J60 false
#include <SPI.h>
#define CSPIN 16 // 5
#if USING_W5500
#include "W5500lwIP.h"
#define SHIELD_TYPE "ESP8266_W5500 Ethernet"
Wiznet5500lwIP eth(CSPIN);
#elif USING_W5100
#include <W5100lwIP.h>
#define SHIELD_TYPE "ESP8266_W5100 Ethernet"
Wiznet5100lwIP eth(CSPIN);
#elif USING_ENC28J60
#include <ENC28J60lwIP.h>
#define SHIELD_TYPE "ESP8266_ENC28J60 Ethernet"
ENC28J60lwIP eth(CSPIN);
#else
// default if none selected
#include "W5500lwIP.h"
Wiznet5500lwIP eth(CSPIN);
#endif
#include <WiFiClient.h> // WiFiClient (-> TCPClient)
using TCPClient = WiFiClient;
//////////////////////////////////////////////////////////
#define USING_DHCP true
#if !USING_DHCP
IPAddress localIP(192, 168, 2, 222);
IPAddress gateway(192, 168, 2, 1);
IPAddress netMask(255, 255, 255, 0);
#endif
#endif //defines_h