c64wifi/include/WiFi64.h

74 lines
2.3 KiB
C

// Firmware version
#ifndef BUILD
#define BUILD "20190101.00"
#endif
// Board GPIO pin mapping
#define SWITCH_PIN 0 // GPIO0 (programming mode pin)
//#define LED0 16 // Power on indicator
#define LED1 16 // Status 1 / Wifi signal 1
#define LED2 2 // Wifi signal 2
#define LED3 12 // Wifi signal 3
#define LED4 13 // Wifi signal 4
#define DCD_PIN 14 // DCD Carrier Status
#define RTS_PIN 4 // RTS Request to Send, connect to host's CTS pin
#define CTS_PIN 5 // CTS Clear to Send, connect to host's RTS pin
// Default speed dial list
#define SPEEDDIAL0 "heatwavebbs.com:9640"
#define SPEEDDIAL1 "bbs.fozztexx.com:23"
#define SPEEDDIAL2 "cottonwoodbbs.dyndns.org:6502"
#define SPEEDDIAL3 "borderlinebbs.dyndns.org:6400"
#define SPEEDDIAL4 "particlesbbs.dyndns.org:6400"
#define SPEEDDIAL5 "reflections.servebbs.com:23"
#define SPEEDDIAL6 ""
#define SPEEDDIAL7 ""
#define SPEEDDIAL8 ""
#define SPEEDDIAL9 ""
// Other definitions
#define VERSIONA 0
#define VERSIONB 1
#define VERSION_ADDRESS 0 // EEPROM address
#define VERSION_LEN 2 // Length in bytes
#define SSID_ADDRESS 2
#define SSID_LEN 32
#define PASS_ADDRESS 34
#define PASS_LEN 63
#define IP_TYPE_ADDRESS 97 // for future use
#define STATIC_IP_ADDRESS 98 // length 4, for future use
#define STATIC_GW 102 // length 4, for future use
#define STATIC_DNS 106 // length 4, for future use
#define STATIC_MASK 110 // length 4, for future use
#define BAUD_ADDRESS 111
#define ECHO_ADDRESS 112
#define SERVER_PORT_ADDRESS 113 // 2 bytes
#define AUTO_ANSWER_ADDRESS 115 // 1 byte
#define TELNET_ADDRESS 116 // 1 byte
#define VERBOSE_ADDRESS 117
#define PET_TRANSLATE_ADDRESS 118
#define FLOW_CONTROL_ADDRESS 119
#define PIN_POLARITY_ADDRESS 120
#define DIAL0_ADDRESS 200
#define DIAL1_ADDRESS 250
#define DIAL2_ADDRESS 300
#define DIAL3_ADDRESS 350
#define DIAL4_ADDRESS 400
#define DIAL5_ADDRESS 450
#define DIAL6_ADDRESS 500
#define DIAL7_ADDRESS 550
#define DIAL8_ADDRESS 600
#define DIAL9_ADDRESS 650
#define BUSY_MSG_ADDRESS 700
#define BUSY_MSG_LEN 80
#define LAST_ADDRESS 780
String getEEPROM(int startAddress, int len);
void setEEPROM(String inString, int startAddress, int maxLen);
void updateLed();
String ipToString(IPAddress ip);
void handleRoot();
void handleWebHangUp();