This repository has been archived by the owner on Jan 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdefines.h
120 lines (89 loc) · 3.97 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/****************************************************************************************************************************
defines.h
For all Generic boards such as ESP8266, ESP32, SAM DUE, SAMD21/SAMD51, nRF52, STM32F/L/H/G/WB/MP1, AVR, megaAVR, Teensy
with WiFiNINA, ESP8266/ESP32 WiFi, ESP8266-AT, W5x00, ENC28J60, built-in Ethernet LAN8742A, WT32_ETH01
DDNS_Generic is a library to update DDNS IP address for DDNS services such as
duckdns, noip, dyndns, dynu, enom, all-inkl, selfhost.de, dyndns.it, strato, freemyip, afraid.org, ovh.com
Based on and modified from
1) EasyDDNS (https://github.com/ayushsharma82/EasyDDNS)
2) ArduinoHttpClient (https://github.com/arduino-libraries/ArduinoHttpClient)
Built by Khoi Hoang https://github.com/khoih-prog/DDNS_Generic
Licensed under MIT license
*****************************************************************************************************************************/
#ifndef defines_h
#define defines_h
#define DEBUG_WIFI_WEBSERVER_PORT Serial
// Debug Level from 0 to 4
#define _WIFI_LOGLEVEL_ 4
#define _WIFININA_LOGLEVEL_ 4
#define _DDNS_GENERIC_LOGLEVEL_ 2
// Select DDNS_USING_WIFI for boards using built-in WiFi, such as Nano-33-IoT
#define DDNS_USING_WIFI true //true
#define DDNS_USING_ETHERNET false //true
/////////////////////////////////
#if !( defined(NRF52840_FEATHER) || defined(NRF52832_FEATHER) || defined(NRF52_SERIES) || defined(ARDUINO_NRF52_ADAFRUIT) || \
defined(NRF52840_FEATHER_SENSE) || defined(NRF52840_ITSYBITSY) || defined(NRF52840_CIRCUITPLAY) || defined(NRF52840_CLUE) || \
defined(NRF52840_METRO) || defined(NRF52840_PCA10056) || defined(PARTICLE_XENON) || defined(NINA_B302_ublox) || defined(NINA_B112_ublox) )
#error This code is intended to run on the nRF52 platform! Please check your Tools->Board setting.
#endif
#if defined(WIFI_USE_NRF528XX)
#undef WIFI_USE_NRF528XX
#endif
#define WIFI_USE_NRF528XX true
#warning Use NRF52 architecture with WiFi
/////////////////////////////////
#if defined(NRF52840_FEATHER)
#define BOARD_TYPE "NRF52840_FEATHER_EXPRESS"
#elif defined(NRF52832_FEATHER)
#define BOARD_TYPE "NRF52832_FEATHER"
#elif defined(NRF52840_FEATHER_SENSE)
#define BOARD_TYPE "NRF52840_FEATHER_SENSE"
#elif defined(NRF52840_ITSYBITSY)
#define BOARD_TYPE "NRF52840_ITSYBITSY_EXPRESS"
#elif defined(NRF52840_CIRCUITPLAY)
#define BOARD_TYPE "NRF52840_CIRCUIT_PLAYGROUND"
#elif defined(NRF52840_CLUE)
#define BOARD_TYPE "NRF52840_CLUE"
#elif defined(NRF52840_METRO)
#define BOARD_TYPE "NRF52840_METRO_EXPRESS"
#elif defined(NRF52840_PCA10056)
#define BOARD_TYPE "NORDIC_NRF52840DK"
#elif defined(NINA_B302_ublox)
#define BOARD_TYPE "NINA_B302_ublox"
#elif defined(NINA_B112_ublox)
#define BOARD_TYPE "NINA_B112_ublox"
#elif defined(PARTICLE_XENON)
#define BOARD_TYPE "PARTICLE_XENON"
#elif defined(MDBT50Q_RX)
#define BOARD_TYPE "RAYTAC_MDBT50Q_RX"
#elif defined(ARDUINO_NRF52_ADAFRUIT)
#define BOARD_TYPE "ARDUINO_NRF52_ADAFRUIT"
#else
#define BOARD_TYPE "nRF52 Unknown"
#endif
/////////////////////////////////
// Select one to be true: USE_WIFI_NINA, DDNS_USING_WIFI_AT or USE_WIFI_CUSTOM
#define USE_WIFI_NINA true
#warning Using WiFiNINA and WiFiNINA_Generic Library
#define SHIELD_TYPE "WiFiNINA using WiFiNINA_Generic Library"
/////////////////////////////////
#include <WiFiWebServer.h>
/////////////////////////////////
#ifndef BOARD_NAME
#ifdef ARDUINO_BOARD
#define BOARD_NAME ARDUINO_BOARD
#else
#define BOARD_NAME BOARD_TYPE
#endif
#endif
#ifndef SHIELD_TYPE
#define SHIELD_TYPE "Unknown shield"
#endif
/////////////////////////////////
#include <DDNS_Generic.h>
WiFiServer server(80);
#include "wifi_credentials.h"
const char* ssid = SECRET_SSID;
const char* password = SECRET_PASS;
/////////////////////////////////
#endif //defines_h