-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathwifi-ota.h
87 lines (51 loc) · 2.05 KB
/
wifi-ota.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
// wifi-ota.h
#ifndef _WIFI_OTA_h
#define _WIFI_OTA_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "arduino.h"
#endif
#include "IPAddress.h"
#define WIFI_ACCESSPOINT true //true // if the bool is true run accesspoint
// Wifi IP settings data stucture
struct wifi_Struct
{
char pwd[32]; // the Wifi client Password
char ssid[32]; // the Wifi client SSID
char APname[32]; // the Hostname & AP mode SSID
char APpassword[32]; // The AP password
IPAddress ipStaticLocal; // the configured Static IP-address
IPAddress ipSubnet; // for Static IP the Subnet
IPAddress ipDGW; // for Static IP the DGW
IPAddress ipDNS; // for Static IP the DNS server
IPAddress ipNTP; // What NTP server to use in IP
char ntp_fqdn[24]; // what NTP server to use in FQDN#
uint8_t wifiChannel; // what channel to run wifi on.
unsigned long connectTimeout; // When to reconnect default 10 seconds
};
struct fft_ip_cfg_struct
{ // Config structure to hold the FFT parameters
IPAddress IP_multi; // Multicast IP address to send the FFT data to
uint16_t port_slave; // Multicast DEST port for FFT packets
uint16_t port_master; // Multicast source port to send from
};
// Functions
void wifi_loop(); // The main wifi loop
void wifi_setup(); // The wifi setup function
void WIFI_FFT_toggle_master(boolean value); // osc.cpp
void WIFI_FFT_toggle(boolean mode_value); //osc.cpp
//void WIFI_FFT_master_send(); // Comms
void WiFi_telnet_print(String input, boolean line);
void WiFi_telnet_print(tm input, boolean line);
void WiFi_telnet_print(float input, boolean line);
void WiFi_telnet_print(uint8_t input, boolean line);
void WiFi_telnet_print(int input, boolean line);
void WiFi_telnet_print(IPAddress input, boolean line);
int NTP_get_time_h();
int NTP_get_time_m();
int NTP_get_time_s();
void tpm_settime(int sc, int mn, int hr);
void Wifi_Stop_Network();
void WiFi_Start_Network();
boolean Network_connected_check();
void wifi_start_IP_services();
#endif