├── programmers.txt ├── cores └── esp8266 │ ├── user_config.h │ ├── libb64 │ ├── AUTHORS │ ├── cdecode.h │ ├── cencode.h │ └── LICENSE │ ├── debug.h │ ├── eboot_command.h │ ├── spiffs │ ├── TODO │ └── LICENSE │ ├── Server.h │ ├── umm_malloc │ ├── LICENSE │ └── umm_malloc.h │ ├── heap.c │ ├── sigma_delta.h │ ├── base64.h │ ├── core_esp8266_features.h │ ├── wiring_private.h │ ├── StreamString.h │ ├── core_esp8266_wiring_analog.c │ ├── Printable.h │ ├── debug.cpp │ ├── twi.h │ ├── md5.h │ ├── interrupts.h │ ├── stdlib_noniso.h │ ├── Client.h │ └── MD5Builder.h ├── tools └── sdk │ ├── version │ ├── lwip │ ├── include │ │ ├── arch │ │ │ └── sys_arch.h │ │ ├── lwip │ │ │ ├── icmp.h │ │ │ ├── netif.h │ │ │ ├── puck_def.h │ │ │ └── sntp.h │ │ └── netif │ │ │ └── wlan_lwip_if.h │ └── src │ │ ├── api │ │ ├── tcpip.c │ │ └── netbuf.c │ │ ├── core │ │ ├── ipv4 │ │ │ ├── icmp.c │ │ │ └── inet.c │ │ └── sys_arch.c │ │ └── Makefile │ ├── License │ ├── lib │ ├── libat.a │ ├── libhal.a │ ├── libphy.a │ ├── libpp.a │ ├── libpwm.a │ ├── libssl.a │ ├── libwpa.a │ ├── libwps.a │ ├── libaxtls.a │ ├── libcrypto.a │ ├── libespnow.a │ ├── libjson.a │ ├── liblwip.a │ ├── libmain.a │ ├── libmesh.a │ ├── libwpa2.a │ ├── libairkiss.a │ ├── liblwip_gcc.a │ ├── libnet80211.a │ ├── libupgrade.a │ ├── libsmartconfig.a │ └── README.md │ ├── include │ ├── os_type.h │ ├── smartconfig.h │ ├── ping.h │ ├── pwm.h │ ├── spi_flash.h │ ├── upgrade.h │ ├── espnow.h │ └── mem.h │ └── ld │ ├── eagle.flash.512k0.ld │ ├── eagle.flash.8m.ld │ ├── eagle.flash.16m.ld │ ├── eagle.flash.1m128.ld │ ├── eagle.flash.1m144.ld │ ├── eagle.flash.1m160.ld │ ├── eagle.flash.1m192.ld │ ├── eagle.flash.1m256.ld │ ├── eagle.flash.1m512.ld │ ├── eagle.flash.1m64.ld │ ├── eagle.flash.2m.ld │ ├── eagle.flash.4m.ld │ ├── eagle.flash.512k64.ld │ ├── eagle.flash.512k128.ld │ └── eagle.flash.4m1m.ld ├── tests ├── .gitignore ├── test_overrides │ └── test_overrides.ino ├── test_umm_malloc │ └── test_umm_malloc.ino ├── host │ └── common │ │ ├── pins_arduino.h │ │ ├── Arduino.cpp │ │ ├── spiffs_mock.h │ │ └── WMath.cpp └── Time │ └── Time.ino ├── libraries ├── TFT_Touch_Shield_V2 │ ├── examples │ │ ├── paint │ │ │ ├── .test.skip │ │ │ └── paint.ino │ │ ├── tftbmp │ │ │ ├── .test.skip │ │ │ ├── test.bmp │ │ │ ├── flower.BMP │ │ │ └── hibiscus.bmp │ │ ├── tftbmp2 │ │ │ └── .test.skip │ │ ├── shapes │ │ │ └── shapes.ino │ │ ├── drawRectangle │ │ │ └── drawRectangle.ino │ │ ├── drawCircle │ │ │ └── drawCircle.ino │ │ ├── text │ │ │ └── text.ino │ │ ├── drawLines │ │ │ └── drawLines.ino │ │ └── drawNumber │ │ │ └── drawNumber.ino │ ├── License.txt │ └── keywords.txt ├── ESP8266mDNS │ ├── examples │ │ └── OTA-mDNS-SPIFFS │ │ │ └── data │ │ │ └── cl_conf.txt │ ├── ESP8266mDNS.cpp │ └── keywords.txt ├── GDBStub │ ├── License │ ├── gdbcmds │ ├── src │ │ ├── GDBStub.h │ │ └── internal │ │ │ ├── gdbstub.h │ │ │ └── gdbstub-entry.h │ ├── library.properties │ └── README.md ├── ESP8266WebServer │ ├── examples │ │ ├── FSBrowser │ │ │ └── data │ │ │ │ ├── edit.htm.gz │ │ │ │ ├── favicon.ico │ │ │ │ └── graphs.js.gz │ │ ├── SDWebServer │ │ │ └── SdRoot │ │ │ │ ├── pins.png │ │ │ │ └── index.htm │ │ └── HttpBasicAuth │ │ │ └── HttpBasicAuth.ino │ ├── library.properties │ ├── src │ │ └── detail │ │ │ └── RequestHandler.h │ └── keywords.txt ├── esp8266 │ ├── src │ │ └── dummy.h │ ├── library.properties │ └── examples │ │ ├── CallSDKFunctions │ │ └── CallSDKFunctions.ino │ │ ├── BlinkWithoutDelay │ │ └── BlinkWithoutDelay.ino │ │ ├── Blink │ │ └── Blink.ino │ │ └── CheckFlashConfig │ │ └── CheckFlashConfig.ino ├── Hash │ ├── library.properties │ ├── examples │ │ └── sha1 │ │ │ └── sha1.ino │ └── src │ │ ├── sha1 │ │ └── sha1.h │ │ └── Hash.h ├── Ticker │ ├── library.properties │ ├── keywords.txt │ └── examples │ │ ├── TickerParameter │ │ └── TickerParameter.ino │ │ └── TickerBasic │ │ └── TickerBasic.ino ├── ESP8266HTTPClient │ ├── library.properties │ └── examples │ │ └── ReuseConnection │ │ └── ReuseConnection.ino ├── ESP8266WiFiMesh │ ├── library.properties │ ├── keywords.txt │ └── examples │ │ └── HelloMesh │ │ └── HelloMesh.ino ├── DNSServer │ ├── library.properties │ └── examples │ │ ├── CaptivePortalAdvanced │ │ ├── tools.ino │ │ └── credentials.ino │ │ ├── CaptivePortal │ │ └── CaptivePortal.ino │ │ └── DNSServer │ │ └── DNSServer.ino ├── EEPROM │ ├── library.properties │ ├── keywords.txt │ └── examples │ │ ├── eeprom_clear │ │ └── eeprom_clear.ino │ │ ├── eeprom_read │ │ └── eeprom_read.ino │ │ └── eeprom_write │ │ └── eeprom_write.ino ├── ESP8266httpUpdate │ ├── library.properties │ └── examples │ │ └── httpUpdate │ │ └── httpUpdate.ino ├── Wire │ ├── library.properties │ └── keywords.txt ├── ESP8266AVRISP │ ├── library.properties │ └── README.md ├── SPI │ ├── library.properties │ └── keywords.txt ├── ESP8266HTTPUpdateServer │ ├── library.properties │ ├── src │ │ └── ESP8266HTTPUpdateServer.h │ ├── keywords.txt │ └── examples │ │ └── WebUpdater │ │ └── WebUpdater.ino ├── Ethernet │ ├── src │ │ ├── utility │ │ │ └── util.h │ │ ├── EthernetServer.h │ │ ├── EthernetClient.h │ │ ├── Ethernet.h │ │ └── Dns.h │ ├── library.properties │ ├── keywords.txt │ ├── README.adoc │ └── examples │ │ └── DhcpAddressPrinter │ │ └── DhcpAddressPrinter.ino ├── ArduinoOTA │ ├── library.properties │ ├── keywords.txt │ ├── examples │ │ └── BasicOTA │ │ │ └── BasicOTA.ino │ └── ArduinoOTA.h ├── Servo │ ├── library.properties │ ├── keywords.txt │ └── examples │ │ └── Sweep │ │ └── Sweep.ino ├── SD │ ├── src │ │ └── README.txt │ ├── library.properties │ ├── keywords.txt │ ├── README.adoc │ └── examples │ │ ├── DumpFile │ │ └── DumpFile.ino │ │ ├── listfiles │ │ └── listfiles.ino │ │ └── Files │ │ └── Files.ino ├── ESP8266WiFi │ ├── library.properties │ ├── src │ │ └── include │ │ │ └── slist.h │ ├── examples │ │ ├── WiFiMulti │ │ │ └── WiFiMulti.ino │ │ ├── WiFiClientEvents │ │ │ └── WiFiClientEvents.ino │ │ ├── WiFiScan │ │ │ └── WiFiScan.ino │ │ └── WiFiClientBasic │ │ │ └── WiFiClientBasic.ino │ └── keywords.txt └── ESP8266SSDP │ ├── README.md │ ├── examples │ └── SSDP │ │ └── SSDP.ino │ └── keywords.txt ├── doc ├── ESP_min.png ├── esp12.png ├── ESP01_connect.jpg ├── ESP_to_serial.png ├── pin_functions.png ├── exception_causes.md ├── ESP_improved_stability.png ├── esp8266_tcp_active_close.png ├── Troubleshooting │ ├── debug_level.png │ ├── debug_port.png │ └── ESP_Exception_Decoderp.png ├── eclipse │ ├── 2_Install_software.png │ ├── 1_Install_New_Software.png │ ├── makefile.init │ └── eclipse.md ├── ota_updates │ ├── ota-web-browser-form.png │ ├── update_memory_copy.png │ ├── a-ota-network-terminal.png │ ├── a-ota-sketch-selection.png │ ├── a-ota-ssid-pass-entry.png │ ├── ota-web-path-to-binary.png │ ├── termite-configuration.png │ ├── a-ota-ota-port-selection.png │ ├── a-ota-ota-upload-complete.png │ ├── ota-web-browser-form-ok.png │ ├── a-ota-python-configuration.png │ ├── a-ota-ota-upload-configuration.png │ ├── a-ota-upload-password-prompt.png │ ├── ota-web-serial-monitor-ready.png │ ├── ota-web-serial-monitor-reboot.png │ ├── ota-web-show-verbose-compilation.png │ ├── a-ota-serial-upload-configuration.png │ ├── a-ota-external-serial-terminal-output.png │ ├── a-ota-upload-complete-and-joined-wifi.png │ ├── a-ota-upload-password-authenticating-ok.png │ ├── a-ota-upload-password-passing-upload-ok.png │ └── a-ota-upload-password-passing-again-upload-ok.png └── reference_items.yml ├── bootloaders └── eboot │ ├── eboot.elf │ ├── eboot_command.h │ ├── flash.h │ ├── Makefile │ ├── LICENSE │ ├── flash.c │ └── eboot_command.c ├── .gitignore ├── ISSUE_TEMPLATE.md └── variants ├── generic └── pins_arduino.h ├── thing └── pins_arduino.h ├── espinotee └── pins_arduino.h ├── adafruit └── pins_arduino.h ├── ESPDuino └── pins_arduino.h ├── espresso_lite_v2 └── pins_arduino.h ├── espresso_lite_v1 └── pins_arduino.h ├── espino └── pins_arduino.h ├── d1_mini └── pins_arduino.h └── nodemcu └── pins_arduino.h /programmers.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cores/esp8266/user_config.h: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tools/sdk/version: -------------------------------------------------------------------------------- 1 | 1.5.1_16_01_08 -------------------------------------------------------------------------------- /tools/sdk/lwip/include/arch/sys_arch.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | hardware 2 | tmp 3 | .env 4 | -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/paint/.test.skip: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/tftbmp/.test.skip: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/tftbmp2/.test.skip: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc/ESP_min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ESP_min.png -------------------------------------------------------------------------------- /doc/esp12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/esp12.png -------------------------------------------------------------------------------- /tools/sdk/License: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/License -------------------------------------------------------------------------------- /libraries/ESP8266mDNS/examples/OTA-mDNS-SPIFFS/data/cl_conf.txt: -------------------------------------------------------------------------------- 1 | YOUR_SSID 2 | YOUR_PSK 3 | -------------------------------------------------------------------------------- /doc/ESP01_connect.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ESP01_connect.jpg -------------------------------------------------------------------------------- /doc/ESP_to_serial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ESP_to_serial.png -------------------------------------------------------------------------------- /doc/pin_functions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/pin_functions.png -------------------------------------------------------------------------------- /tools/sdk/lib/libat.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libat.a -------------------------------------------------------------------------------- /tools/sdk/lib/libhal.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libhal.a -------------------------------------------------------------------------------- /tools/sdk/lib/libphy.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libphy.a -------------------------------------------------------------------------------- /tools/sdk/lib/libpp.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libpp.a -------------------------------------------------------------------------------- /tools/sdk/lib/libpwm.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libpwm.a -------------------------------------------------------------------------------- /tools/sdk/lib/libssl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libssl.a -------------------------------------------------------------------------------- /tools/sdk/lib/libwpa.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libwpa.a -------------------------------------------------------------------------------- /tools/sdk/lib/libwps.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libwps.a -------------------------------------------------------------------------------- /doc/exception_causes.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/exception_causes.md -------------------------------------------------------------------------------- /libraries/GDBStub/License: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/libraries/GDBStub/License -------------------------------------------------------------------------------- /tools/sdk/lib/libaxtls.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libaxtls.a -------------------------------------------------------------------------------- /tools/sdk/lib/libcrypto.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libcrypto.a -------------------------------------------------------------------------------- /tools/sdk/lib/libespnow.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libespnow.a -------------------------------------------------------------------------------- /tools/sdk/lib/libjson.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libjson.a -------------------------------------------------------------------------------- /tools/sdk/lib/liblwip.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/liblwip.a -------------------------------------------------------------------------------- /tools/sdk/lib/libmain.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libmain.a -------------------------------------------------------------------------------- /tools/sdk/lib/libmesh.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libmesh.a -------------------------------------------------------------------------------- /tools/sdk/lib/libwpa2.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libwpa2.a -------------------------------------------------------------------------------- /bootloaders/eboot/eboot.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/bootloaders/eboot/eboot.elf -------------------------------------------------------------------------------- /tools/sdk/lib/libairkiss.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libairkiss.a -------------------------------------------------------------------------------- /tools/sdk/lib/liblwip_gcc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/liblwip_gcc.a -------------------------------------------------------------------------------- /tools/sdk/lib/libnet80211.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libnet80211.a -------------------------------------------------------------------------------- /tools/sdk/lib/libupgrade.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libupgrade.a -------------------------------------------------------------------------------- /doc/ESP_improved_stability.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ESP_improved_stability.png -------------------------------------------------------------------------------- /tools/sdk/lib/libsmartconfig.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lib/libsmartconfig.a -------------------------------------------------------------------------------- /tools/sdk/lwip/src/api/tcpip.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lwip/src/api/tcpip.c -------------------------------------------------------------------------------- /doc/esp8266_tcp_active_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/esp8266_tcp_active_close.png -------------------------------------------------------------------------------- /tools/sdk/lwip/src/api/netbuf.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lwip/src/api/netbuf.c -------------------------------------------------------------------------------- /doc/Troubleshooting/debug_level.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/Troubleshooting/debug_level.png -------------------------------------------------------------------------------- /doc/Troubleshooting/debug_port.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/Troubleshooting/debug_port.png -------------------------------------------------------------------------------- /doc/eclipse/2_Install_software.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/eclipse/2_Install_software.png -------------------------------------------------------------------------------- /tools/sdk/lwip/include/lwip/icmp.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lwip/include/lwip/icmp.h -------------------------------------------------------------------------------- /tools/sdk/lwip/include/lwip/netif.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lwip/include/lwip/netif.h -------------------------------------------------------------------------------- /tools/sdk/lwip/src/core/ipv4/icmp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/tools/sdk/lwip/src/core/ipv4/icmp.c -------------------------------------------------------------------------------- /libraries/ESP8266mDNS/ESP8266mDNS.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/libraries/ESP8266mDNS/ESP8266mDNS.cpp -------------------------------------------------------------------------------- /doc/eclipse/1_Install_New_Software.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/eclipse/1_Install_New_Software.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-web-browser-form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/ota-web-browser-form.png -------------------------------------------------------------------------------- /doc/ota_updates/update_memory_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/update_memory_copy.png -------------------------------------------------------------------------------- /doc/ota_updates/a-ota-network-terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/a-ota-network-terminal.png -------------------------------------------------------------------------------- /doc/ota_updates/a-ota-sketch-selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/a-ota-sketch-selection.png -------------------------------------------------------------------------------- /doc/ota_updates/a-ota-ssid-pass-entry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/a-ota-ssid-pass-entry.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-web-path-to-binary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/ota-web-path-to-binary.png -------------------------------------------------------------------------------- /doc/ota_updates/termite-configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/termite-configuration.png -------------------------------------------------------------------------------- /libraries/GDBStub/gdbcmds: -------------------------------------------------------------------------------- 1 | set remote hardware-breakpoint-limit 1 2 | set remote hardware-watchpoint-limit 1 3 | target remote :9980 4 | -------------------------------------------------------------------------------- /doc/ota_updates/a-ota-ota-port-selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/a-ota-ota-port-selection.png -------------------------------------------------------------------------------- /doc/ota_updates/a-ota-ota-upload-complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/a-ota-ota-upload-complete.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-web-browser-form-ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/ota-web-browser-form-ok.png -------------------------------------------------------------------------------- /doc/Troubleshooting/ESP_Exception_Decoderp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/Troubleshooting/ESP_Exception_Decoderp.png -------------------------------------------------------------------------------- /doc/ota_updates/a-ota-python-configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/a-ota-python-configuration.png -------------------------------------------------------------------------------- /doc/ota_updates/a-ota-ota-upload-configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/a-ota-ota-upload-configuration.png -------------------------------------------------------------------------------- /doc/ota_updates/a-ota-upload-password-prompt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/a-ota-upload-password-prompt.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-web-serial-monitor-ready.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/ota-web-serial-monitor-ready.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-web-serial-monitor-reboot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/ota-web-serial-monitor-reboot.png -------------------------------------------------------------------------------- /doc/ota_updates/ota-web-show-verbose-compilation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/ota-web-show-verbose-compilation.png -------------------------------------------------------------------------------- /libraries/GDBStub/src/GDBStub.h: -------------------------------------------------------------------------------- 1 | #ifndef GDBSTUB_H 2 | #define GDBSTUB_H 3 | 4 | // this header is intentionally left blank 5 | 6 | #endif //GDBSTUB_H 7 | -------------------------------------------------------------------------------- /doc/ota_updates/a-ota-serial-upload-configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/a-ota-serial-upload-configuration.png -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/tftbmp/test.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/libraries/TFT_Touch_Shield_V2/examples/tftbmp/test.bmp -------------------------------------------------------------------------------- /doc/ota_updates/a-ota-external-serial-terminal-output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/a-ota-external-serial-terminal-output.png -------------------------------------------------------------------------------- /doc/ota_updates/a-ota-upload-complete-and-joined-wifi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/a-ota-upload-complete-and-joined-wifi.png -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/tftbmp/flower.BMP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/libraries/TFT_Touch_Shield_V2/examples/tftbmp/flower.BMP -------------------------------------------------------------------------------- /doc/ota_updates/a-ota-upload-password-authenticating-ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/a-ota-upload-password-authenticating-ok.png -------------------------------------------------------------------------------- /doc/ota_updates/a-ota-upload-password-passing-upload-ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/a-ota-upload-password-passing-upload-ok.png -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/tftbmp/hibiscus.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/libraries/TFT_Touch_Shield_V2/examples/tftbmp/hibiscus.bmp -------------------------------------------------------------------------------- /libraries/ESP8266WebServer/examples/FSBrowser/data/edit.htm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/libraries/ESP8266WebServer/examples/FSBrowser/data/edit.htm.gz -------------------------------------------------------------------------------- /libraries/ESP8266WebServer/examples/FSBrowser/data/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/libraries/ESP8266WebServer/examples/FSBrowser/data/favicon.ico -------------------------------------------------------------------------------- /doc/ota_updates/a-ota-upload-password-passing-again-upload-ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/doc/ota_updates/a-ota-upload-password-passing-again-upload-ok.png -------------------------------------------------------------------------------- /libraries/ESP8266WebServer/examples/FSBrowser/data/graphs.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/libraries/ESP8266WebServer/examples/FSBrowser/data/graphs.js.gz -------------------------------------------------------------------------------- /libraries/ESP8266WebServer/examples/SDWebServer/SdRoot/pins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Links2004/Arduino/HEAD/libraries/ESP8266WebServer/examples/SDWebServer/SdRoot/pins.png -------------------------------------------------------------------------------- /tests/test_overrides/test_overrides.ino: -------------------------------------------------------------------------------- 1 | ADC_MODE(ADC_VCC); 2 | RF_MODE(RF_DISABLED); 3 | RF_PRE_INIT() 4 | { 5 | } 6 | 7 | void setup() { 8 | } 9 | 10 | void loop() { 11 | } 12 | -------------------------------------------------------------------------------- /libraries/esp8266/src/dummy.h: -------------------------------------------------------------------------------- 1 | // This file is here only to silence warnings from Arduino IDE 2 | // Currently IDE doesn't support no-code libraries, like this collection of example sketches. 3 | -------------------------------------------------------------------------------- /cores/esp8266/libb64/AUTHORS: -------------------------------------------------------------------------------- 1 | libb64: Base64 Encoding/Decoding Routines 2 | ====================================== 3 | 4 | Authors: 5 | ------- 6 | 7 | Chris Venter chris.venter@gmail.com http://rocketpod.blogspot.com 8 | -------------------------------------------------------------------------------- /libraries/GDBStub/src/internal/gdbstub.h: -------------------------------------------------------------------------------- 1 | #ifndef GDBSTUB_H 2 | #define GDBSTUB_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void gdbstub_init(); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | 14 | #endif -------------------------------------------------------------------------------- /libraries/Hash/library.properties: -------------------------------------------------------------------------------- 1 | name=Hash 2 | version=1.0 3 | author=Markus Sattler 4 | maintainer=Markus Sattler 5 | sentence=Generate Hash from data 6 | paragraph= 7 | category=Data Processing 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | tools/dist/ 3 | tools/xtensa-lx106-elf/ 4 | tools/esptool/ 5 | tools/mkspiffs/ 6 | package/versions/ 7 | exclude.txt 8 | tools/sdk/lib/liblwip_src.a 9 | tools/sdk/lwip/src/build 10 | tools/sdk/lwip/src/liblwip_src.a 11 | -------------------------------------------------------------------------------- /libraries/esp8266/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266 2 | version=1.0 3 | author=Simon Peter,Markus Sattler,Ivan Grokhotkov 4 | maintainer=Ivan Grokhtkov 5 | sentence=ESP8266 sketches examples 6 | paragraph= 7 | category=Other 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/Ticker/library.properties: -------------------------------------------------------------------------------- 1 | name=Ticker 2 | version=1.0 3 | author=Ivan Grokhtokov 4 | maintainer=Ivan Grokhtokov 5 | sentence=Allows to call functions with a given interval. 6 | paragraph= 7 | category=Timing 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /tests/test_umm_malloc/test_umm_malloc.ino: -------------------------------------------------------------------------------- 1 | // test that we can include umm_malloc.h from sketch (#1652) 2 | #include 3 | 4 | 5 | void setup() { 6 | Serial.begin(115200); 7 | delay(1000); 8 | umm_info(NULL, 1); 9 | } 10 | 11 | void loop() { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /tools/sdk/lwip/src/core/sys_arch.c: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2010 - 2011 espressif system 3 | */ 4 | 5 | #include "c_types.h" 6 | #include "ets_sys.h" 7 | #include "osapi.h" 8 | #include "os_type.h" 9 | 10 | #include "lwip/opt.h" 11 | #include "lwip/sys.h" 12 | 13 | #include "eagle_soc.h" 14 | -------------------------------------------------------------------------------- /tools/sdk/lib/README.md: -------------------------------------------------------------------------------- 1 | ## Updating SDK libraries 2 | 3 | After updating SDK libraries to a new version, do the following changes. 4 | 5 | 6 | 1. Remove mem_manager.o from libmain.a to use custom heap implementation 7 | 8 | ```bash 9 | xtensa-lx106-elf-ar -d libmain.a mem_manager.o 10 | ``` 11 | -------------------------------------------------------------------------------- /libraries/ESP8266HTTPClient/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266HTTPClient 2 | version=1.1 3 | author=Markus Sattler 4 | maintainer=Markus Sattler 5 | sentence=http Client for ESP8266 6 | paragraph= 7 | category=Communication 8 | url=https://github.com/Links2004/Arduino/tree/libraries/ESP8266HTTPClient 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/ESP8266WiFiMesh/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266WiFiMesh 2 | version=1.0 3 | author=Julian Fell 4 | maintainer= 5 | sentence=Mesh network library 6 | paragraph=The library sets up a Mesh Node which acts as a router, creating a Mesh Network with other nodes. 7 | category=Communication 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/DNSServer/library.properties: -------------------------------------------------------------------------------- 1 | name=DNSServer 2 | version=1.1.0 3 | author=Kristijan Novoselić 4 | maintainer=Kristijan Novoselić, 5 | sentence=A simple DNS server for ESP8266. 6 | paragraph=This library implements a simple DNS server. 7 | category=Communication 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/EEPROM/library.properties: -------------------------------------------------------------------------------- 1 | name=EEPROM 2 | version=1.0 3 | author=Ivan Grokhotkov 4 | maintainer=Ivan Grokhotkov 5 | sentence=Enables reading and writing data to the permanent FLASH storage, up to 4kb. 6 | paragraph= 7 | category=Data Storage 8 | url=http://arduino.cc/en/Reference/EEPROM 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/ESP8266httpUpdate/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266httpUpdate 2 | version=1.1 3 | author=Markus Sattler 4 | maintainer=Markus Sattler 5 | sentence=Http Update for ESP8266 6 | paragraph= 7 | category=Data Processing 8 | url=https://github.com/Links2004/Arduino/tree/esp8266/hardware/esp8266com/esp8266/libraries/ESP8266httpUpdate 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/GDBStub/library.properties: -------------------------------------------------------------------------------- 1 | name=GDBStub 2 | version=0.2 3 | author=Jeroen Domburg 4 | maintainer=Ivan Grokhotkov 5 | sentence=GDB server stub by Espressif 6 | paragraph=GDB server stub helps debug crashes when JTAG isn't an option. 7 | category=Uncategorized 8 | url=https://github.com/espressif/esp-gdbstub 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /doc/reference_items.yml: -------------------------------------------------------------------------------- 1 | # This file defines the order in which documents will appear in the menu 2 | 3 | - path: /doc/installing.html 4 | 5 | - path: /doc/reference.html 6 | 7 | - path: /doc/libraries.html 8 | 9 | - path: /doc/filesystem.html 10 | 11 | - path: /doc/ota_updates/readme.html 12 | 13 | - path: /doc/boards.html 14 | 15 | - path: /doc/changes.html 16 | -------------------------------------------------------------------------------- /libraries/Wire/library.properties: -------------------------------------------------------------------------------- 1 | name=Wire 2 | version=1.0 3 | author=Arduino 4 | maintainer=Ivan Grokhotkov 5 | sentence=Allows the communication between devices or sensors connected via Two Wire Interface Bus. For esp8266 boards. 6 | paragraph= 7 | category=Signal Input/Output 8 | url=http://arduino.cc/en/Reference/Wire 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/ESP8266AVRISP/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266AVRISP 2 | version=1.0 3 | author=Kiril Zyapkov 4 | maintainer=Kiril Zyapkov 5 | sentence=AVR In-System Programming over WiFi for ESP8266 6 | paragraph=This library allows programming 8-bit AVR ICSP targets via TCP over WiFi with ESP8266. 7 | category=Communication 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/ESP8266WebServer/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266WebServer 2 | version=1.0 3 | author=Ivan Grokhotkov 4 | maintainer=Ivan Grokhtkov 5 | sentence=Simple web server library 6 | paragraph=The library supports HTTP GET and POST requests, provides argument parsing, handles one client at a time. 7 | category=Communication 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/SPI/library.properties: -------------------------------------------------------------------------------- 1 | name=SPI 2 | version=1.0 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Enables the communication with devices that use the Serial Peripheral Interface (SPI) Bus. For all Arduino boards, BUT Arduino DUE. 6 | paragraph= 7 | category=Signal Input/Output 8 | url=http://arduino.cc/en/Reference/SPI 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/ESP8266HTTPUpdateServer/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266HTTPUpdateServer 2 | version=1.0 3 | author=Ivan Grokhotkov, Miguel Ángel Ajo 4 | maintainer=Ivan Grokhtkov 5 | sentence=Simple HTTP Update server based on the ESP8266WebServer 6 | paragraph=The library accepts HTTP post requests to the /update url, and updates the ESP8266 firmware. 7 | category=Communication 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /tools/sdk/include/os_type.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) Espressif System 2010 3 | * 4 | * mapping to ETS structures 5 | * 6 | */ 7 | #ifndef _OS_TYPES_H_ 8 | #define _OS_TYPES_H_ 9 | 10 | #include "ets_sys.h" 11 | 12 | #define os_signal_t ETSSignal 13 | #define os_param_t ETSParam 14 | #define os_event_t ETSEvent 15 | #define os_task_t ETSTask 16 | #define os_timer_t ETSTimer 17 | #define os_timer_func_t ETSTimerFunc 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /libraries/Ethernet/src/utility/util.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_H 2 | #define UTIL_H 3 | 4 | #define htons(x) ( ((x)<< 8 & 0xFF00) | \ 5 | ((x)>> 8 & 0x00FF) ) 6 | #define ntohs(x) htons(x) 7 | 8 | #define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \ 9 | ((x)<< 8 & 0x00FF0000UL) | \ 10 | ((x)>> 8 & 0x0000FF00UL) | \ 11 | ((x)>>24 & 0x000000FFUL) ) 12 | #define ntohl(x) htonl(x) 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /libraries/ArduinoOTA/library.properties: -------------------------------------------------------------------------------- 1 | name=ArduinoOTA 2 | version=1.0 3 | author=Ivan Grokhotkov and Miguel Angel Ajo 4 | maintainer=Ivan Grokhtkov 5 | sentence=Enables Over The Air upgrades, via wifi and espota.py UDP request/TCP download. 6 | paragraph=With this library you can enable your sketch to be upgraded over network. Includes mdns anounces to get discovered by the arduino IDE. 7 | category=Communication 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/Servo/library.properties: -------------------------------------------------------------------------------- 1 | name=Servo(esp8266) 2 | version=1.0.2 3 | author=Michael C. Miller 4 | maintainer=GitHub/esp8266/arduino 5 | sentence=Allows Esp8266 boards to control a variety of servo motors. 6 | paragraph=This library can control a great number of servos.
It makes careful use of timers: the library can control 12 servos using only 1 timer.
7 | category=Device Control 8 | url=http://arduino.cc/en/Reference/Servo 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/SD/src/README.txt: -------------------------------------------------------------------------------- 1 | 2 | ** SD - a slightly more friendly wrapper for sdfatlib ** 3 | 4 | This library aims to expose a subset of SD card functionality in the 5 | form of a higher level "wrapper" object. 6 | 7 | License: GNU General Public License V3 8 | (Because sdfatlib is licensed with this.) 9 | 10 | (C) Copyright 2010 SparkFun Electronics 11 | 12 | Now better than ever with optimization, multiple file support, directory handling, etc - ladyada! 13 | 14 | -------------------------------------------------------------------------------- /libraries/ESP8266HTTPUpdateServer/src/ESP8266HTTPUpdateServer.h: -------------------------------------------------------------------------------- 1 | #ifndef __HTTP_UPDATE_SERVER_H 2 | #define __HTTP_UPDATE_SERVER_H 3 | 4 | class ESP8266WebServer; 5 | 6 | class ESP8266HTTPUpdateServer 7 | { 8 | private: 9 | bool _serial_output; 10 | ESP8266WebServer *_server; 11 | static const char *_serverIndex; 12 | public: 13 | ESP8266HTTPUpdateServer(bool serial_debug=false); 14 | void setup(ESP8266WebServer *server=NULL); 15 | }; 16 | 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /libraries/SD/library.properties: -------------------------------------------------------------------------------- 1 | name=SD(esp8266) 2 | version=1.0.5 3 | author=Arduino, SparkFun 4 | maintainer=Arduino 5 | sentence=Enables reading and writing on SD cards. For all Arduino boards. 6 | paragraph=Once an SD memory card is connected to the SPI interfare of the Arduino board you are enabled to create files and read/write on them. You can also move through directories on the SD card. 7 | category=Data Storage 8 | url=http://www.arduino.cc/en/Reference/SD 9 | architectures=* 10 | -------------------------------------------------------------------------------- /libraries/Ethernet/src/EthernetServer.h: -------------------------------------------------------------------------------- 1 | #ifndef ethernetserver_h 2 | #define ethernetserver_h 3 | 4 | #include "Server.h" 5 | 6 | class EthernetClient; 7 | 8 | class EthernetServer : 9 | public Server { 10 | private: 11 | uint16_t _port; 12 | void accept(); 13 | public: 14 | EthernetServer(uint16_t); 15 | EthernetClient available(); 16 | virtual void begin(); 17 | virtual size_t write(uint8_t); 18 | virtual size_t write(const uint8_t *buf, size_t size); 19 | using Print::write; 20 | }; 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /libraries/EEPROM/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Ultrasound 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | EEPROM KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | ####################################### 16 | # Constants (LITERAL1) 17 | ####################################### 18 | 19 | -------------------------------------------------------------------------------- /libraries/EEPROM/examples/eeprom_clear/eeprom_clear.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * EEPROM Clear 3 | * 4 | * Sets all of the bytes of the EEPROM to 0. 5 | * This example code is in the public domain. 6 | 7 | */ 8 | 9 | #include 10 | 11 | void setup() 12 | { 13 | EEPROM.begin(512); 14 | // write a 0 to all 512 bytes of the EEPROM 15 | for (int i = 0; i < 512; i++) 16 | EEPROM.write(i, 0); 17 | 18 | // turn the LED on when we're done 19 | pinMode(13, OUTPUT); 20 | digitalWrite(13, HIGH); 21 | EEPROM.end(); 22 | } 23 | 24 | void loop() 25 | { 26 | } 27 | -------------------------------------------------------------------------------- /libraries/DNSServer/examples/CaptivePortalAdvanced/tools.ino: -------------------------------------------------------------------------------- 1 | /** Is this an IP? */ 2 | boolean isIp(String str) { 3 | for (int i = 0; i < str.length(); i++) { 4 | int c = str.charAt(i); 5 | if (c != '.' && (c < '0' || c > '9')) { 6 | return false; 7 | } 8 | } 9 | return true; 10 | } 11 | 12 | /** IP to String? */ 13 | String toStringIp(IPAddress ip) { 14 | String res = ""; 15 | for (int i = 0; i < 3; i++) { 16 | res += String((ip >> (8 * i)) & 0xFF) + "."; 17 | } 18 | res += String(((ip >> 8 * 3)) & 0xFF); 19 | return res; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /libraries/ESP8266WiFi/library.properties: -------------------------------------------------------------------------------- 1 | name=ESP8266WiFi 2 | version=1.0 3 | author=Ivan Grokhotkov 4 | maintainer=Ivan Grokhtkov 5 | sentence=Enables network connection (local and Internet) using the ESP8266 built-in WiFi. 6 | paragraph=With this library you can instantiate Servers, Clients and send/receive UDP packets through WiFi. The shield can connect either to open or encrypted networks (WEP, WPA). The IP address can be assigned statically or through a DHCP. The library can also manage DNS. 7 | category=Communication 8 | url= 9 | architectures=esp8266 10 | -------------------------------------------------------------------------------- /libraries/ESP8266WebServer/examples/SDWebServer/SdRoot/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ESP Index 6 | 12 | 17 | 18 | 19 |

ESP8266 Pin Functions

20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /libraries/Ethernet/library.properties: -------------------------------------------------------------------------------- 1 | name=Ethernet(esp8266) 2 | version=1.0.4 3 | author=Arduino 4 | maintainer=Arduino 5 | sentence=Enables network connection (local and Internet) using the Arduino Ethernet board or shield. For all Arduino boards. 6 | paragraph=With this library you can use the Arduino Ethernet (shield or board) to connect to Internet. The library provides both Client and server functionalities. The library permits you to connect to a local network also with DHCP and to resolve DNS. 7 | category=Communication 8 | url=http://www.arduino.cc/en/Reference/Ethernet 9 | architectures=* 10 | -------------------------------------------------------------------------------- /libraries/ESP8266HTTPUpdateServer/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For HTTPUpdateServer 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | ESP8266HTTPUpdateServer KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | begin KEYWORD2 16 | setup KEYWORD2 17 | 18 | ####################################### 19 | # Constants (LITERAL1) 20 | ####################################### 21 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.512k0.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 512K chips, no SPIFFS */ 2 | /* sketch 487KB */ 3 | /* eeprom 20KB */ 4 | 5 | MEMORY 6 | { 7 | dport0_0_seg : org = 0x3FF00000, len = 0x10 8 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 9 | iram1_0_seg : org = 0x40100000, len = 0x8000 10 | irom0_0_seg : org = 0x40201010, len = 0x79ff0 11 | } 12 | 13 | PROVIDE ( _SPIFFS_start = 0x4027B000 ); 14 | PROVIDE ( _SPIFFS_end = 0x4027B000 ); 15 | PROVIDE ( _SPIFFS_page = 0 ); 16 | PROVIDE ( _SPIFFS_block = 0 ); 17 | 18 | INCLUDE "../ld/eagle.app.v6.common.ld" 19 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.8m.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 8M chips */ 2 | /* sketch 1019KB */ 3 | /* eeprom 20KB */ 4 | /* spiffs 7MB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0xfeff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x40300000 ); 15 | PROVIDE ( _SPIFFS_end = 0x40A00000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x2000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /libraries/GDBStub/src/internal/gdbstub-entry.h: -------------------------------------------------------------------------------- 1 | #ifndef GDBSTUB_ENTRY_H 2 | #define GDBSTUB_ENTRY_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | void gdbstub_init_debug_entry(); 9 | void gdbstub_do_break(); 10 | void gdbstub_icount_ena_single_step(); 11 | void gdbstub_save_extra_sfrs_for_exception(); 12 | void gdbstub_uart_entry(); 13 | 14 | int gdbstub_set_hw_breakpoint(int addr, int len); 15 | int gdbstub_set_hw_watchpoint(int addr, int len, int type); 16 | int gdbstub_del_hw_breakpoint(int addr); 17 | int gdbstub_del_hw_watchpoint(int addr); 18 | 19 | extern void* gdbstub_do_break_breakpoint_addr; 20 | 21 | #ifdef __cplusplus 22 | { 23 | #endif 24 | 25 | #endif -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.16m.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 16M chips */ 2 | /* sketch 1019KB */ 3 | /* eeprom 20KB */ 4 | /* spiffs 15MB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0xfeff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x40300000 ); 15 | PROVIDE ( _SPIFFS_end = 0x41200000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x2000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.1m128.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 1M chips */ 2 | /* sketch 871KB */ 3 | /* spiffs 128KB */ 4 | /* eeprom 20KB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0xd9ff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x402DB000 ); 15 | PROVIDE ( _SPIFFS_end = 0x402FB000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x1000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.1m144.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 1M chips */ 2 | /* sketch 855KB */ 3 | /* spiffs 144KB */ 4 | /* eeprom 20KB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0xd5ff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x402D7000 ); 15 | PROVIDE ( _SPIFFS_end = 0x402FB000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x1000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.1m160.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 1M chips */ 2 | /* sketch 839KB */ 3 | /* spiffs 160KB */ 4 | /* eeprom 20KB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0xd1ff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x402D3000 ); 15 | PROVIDE ( _SPIFFS_end = 0x402FB000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x1000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.1m192.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 1M chips */ 2 | /* sketch 807KB */ 3 | /* spiffs 192KB */ 4 | /* eeprom 20KB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0xc9ff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x402CB000 ); 15 | PROVIDE ( _SPIFFS_end = 0x402FB000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x1000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.1m256.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 1M chips */ 2 | /* sketch 743KB */ 3 | /* spiffs 256KB */ 4 | /* eeprom 20KB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0xb9ff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x402BB000 ); 15 | PROVIDE ( _SPIFFS_end = 0x402FB000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x1000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.1m512.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 1M chips */ 2 | /* sketch 487KB */ 3 | /* spiffs 512KB */ 4 | /* eeprom 20KB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0x79ff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x4027B000 ); 15 | PROVIDE ( _SPIFFS_end = 0x402FB000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x2000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.1m64.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 1M chips */ 2 | /* sketch 935KB */ 3 | /* spiffs 64KB */ 4 | /* eeprom 20KB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0xe9ff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x402EB000 ); 15 | PROVIDE ( _SPIFFS_end = 0x402FB000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x1000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.2m.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 2M chips */ 2 | /* sketch 1019KB */ 3 | /* spiffs 1004KB */ 4 | /* eeprom 20KB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0xfeff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x40300000 ); 15 | PROVIDE ( _SPIFFS_end = 0x403FB000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x2000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.4m.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 4M chips */ 2 | /* sketch 1019KB */ 3 | /* spiffs 3052KB */ 4 | /* eeprom 20KB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0xfeff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x40300000 ); 15 | PROVIDE ( _SPIFFS_end = 0x405FB000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x2000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.512k64.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 512K chips */ 2 | /* sketch 423KB */ 3 | /* spiffs 64KB */ 4 | /* eeprom 20KB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0x69ff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x4026B000 ); 15 | PROVIDE ( _SPIFFS_end = 0x4027B000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x1000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.512k128.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 512K chips */ 2 | /* sketch 359KB */ 3 | /* spiffs 128KB */ 4 | /* eeprom 20KB */ 5 | 6 | MEMORY 7 | { 8 | dport0_0_seg : org = 0x3FF00000, len = 0x10 9 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 10 | iram1_0_seg : org = 0x40100000, len = 0x8000 11 | irom0_0_seg : org = 0x40201010, len = 0x59ff0 12 | } 13 | 14 | PROVIDE ( _SPIFFS_start = 0x4025B000 ); 15 | PROVIDE ( _SPIFFS_end = 0x4027B000 ); 16 | PROVIDE ( _SPIFFS_page = 0x100 ); 17 | PROVIDE ( _SPIFFS_block = 0x1000 ); 18 | 19 | INCLUDE "../ld/eagle.app.v6.common.ld" 20 | -------------------------------------------------------------------------------- /libraries/ESP8266WiFiMesh/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For ESP8266WiFiMesh 3 | ####################################### 4 | 5 | ####################################### 6 | # Library (KEYWORD3) 7 | ####################################### 8 | 9 | ESP8266WiFiMesh KEYWORD3 10 | 11 | ####################################### 12 | # Datatypes (KEYWORD1) 13 | ####################################### 14 | 15 | ESP8266WiFiMesh KEYWORD1 16 | 17 | ####################################### 18 | # Methods and Functions (KEYWORD2) 19 | ####################################### 20 | 21 | begin KEYWORD2 22 | attemptScan KEYWORD2 23 | acceptRequest KEYWORD2 24 | -------------------------------------------------------------------------------- /tools/sdk/lwip/include/netif/wlan_lwip_if.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2011 Espressif System 3 | * 4 | */ 5 | 6 | #ifndef _WLAN_LWIP_IF_H_ 7 | #define _WLAN_LWIP_IF_H_ 8 | 9 | #define LWIP_IF0_PRIO 28 10 | #define LWIP_IF1_PRIO 29 11 | 12 | enum { 13 | SIG_LWIP_RX = 0, 14 | }; 15 | 16 | struct netif * eagle_lwip_if_alloc(struct ieee80211_conn *conn, const uint8 *macaddr, struct ip_info *info); 17 | struct netif * eagle_lwip_getif(uint8 index); 18 | 19 | #ifndef IOT_SIP_MODE 20 | sint8 ieee80211_output_pbuf(struct netif *ifp, struct pbuf* pb); 21 | #else 22 | sint8 ieee80211_output_pbuf(struct ieee80211_conn *conn, esf_buf *eb); 23 | #endif 24 | 25 | #endif /* _WLAN_LWIP_IF_H_ */ 26 | -------------------------------------------------------------------------------- /tools/sdk/ld/eagle.flash.4m1m.ld: -------------------------------------------------------------------------------- 1 | /* Flash Split for 4M chips */ 2 | /* sketch 1019KB */ 3 | /* empty 2048KB */ 4 | /* spiffs 1004KB */ 5 | /* eeprom 20KB */ 6 | 7 | MEMORY 8 | { 9 | dport0_0_seg : org = 0x3FF00000, len = 0x10 10 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 11 | iram1_0_seg : org = 0x40100000, len = 0x8000 12 | irom0_0_seg : org = 0x40201010, len = 0xfeff0 13 | } 14 | 15 | PROVIDE ( _SPIFFS_start = 0x40500000 ); 16 | PROVIDE ( _SPIFFS_end = 0x405FB000 ); 17 | PROVIDE ( _SPIFFS_page = 0x100 ); 18 | PROVIDE ( _SPIFFS_block = 0x2000 ); 19 | 20 | INCLUDE "../ld/eagle.app.v6.common.ld" 21 | -------------------------------------------------------------------------------- /libraries/ESP8266mDNS/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Ultrasound 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | ESP8266mDNS KEYWORD1 10 | MDNSResponder KEYWORD1 11 | MDNS KEYWORD1 12 | 13 | ####################################### 14 | # Methods and Functions (KEYWORD2) 15 | ####################################### 16 | 17 | begin KEYWORD2 18 | update KEYWORD2 19 | addService KEYWORD2 20 | enableArduino KEYWORD2 21 | 22 | ####################################### 23 | # Constants (LITERAL1) 24 | ####################################### 25 | 26 | -------------------------------------------------------------------------------- /libraries/Servo/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map Servo 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | Servo KEYWORD1 Servo 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | attach KEYWORD2 15 | detach KEYWORD2 16 | write KEYWORD2 17 | read KEYWORD2 18 | attached KEYWORD2 19 | writeMicroseconds KEYWORD2 20 | readMicroseconds KEYWORD2 21 | 22 | ####################################### 23 | # Constants (LITERAL1) 24 | ####################################### 25 | -------------------------------------------------------------------------------- /libraries/ArduinoOTA/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Ultrasound 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | ArduinoOTA KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | begin KEYWORD2 16 | setup KEYWORD2 17 | handle KEYWORD2 18 | onStart KEYWORD2 19 | onEnd KEYWORD2 20 | onError KEYWORD2 21 | onProgress KEYWORD2 22 | 23 | ####################################### 24 | # Constants (LITERAL1) 25 | ####################################### 26 | 27 | -------------------------------------------------------------------------------- /libraries/Hash/examples/sha1/sha1.ino: -------------------------------------------------------------------------------- 1 | /** 2 | * simple demo to show sha1 calculation 3 | */ 4 | #include 5 | #include 6 | 7 | void setup() { 8 | Serial.begin(921600); 9 | } 10 | 11 | void loop() { 12 | 13 | // usage as String 14 | // SHA1:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 15 | 16 | Serial.print("SHA1:"); 17 | Serial.println(sha1("abc")); 18 | 19 | // usage as ptr 20 | // SHA1:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 21 | uint8_t hash[20]; 22 | sha1("abc", &hash[0]); 23 | 24 | Serial.print("SHA1:"); 25 | for(uint16_t i = 0; i < 20; i++) { 26 | Serial.printf("%02x", hash[i]); 27 | } 28 | Serial.println(); 29 | 30 | delay(1000); 31 | } 32 | 33 | -------------------------------------------------------------------------------- /cores/esp8266/debug.h: -------------------------------------------------------------------------------- 1 | #ifndef ARD_DEBUG_H 2 | #define ARD_DEBUG_H 3 | 4 | #include 5 | #include 6 | 7 | #ifdef DEBUG_ESP_CORE 8 | #define DEBUGV(...) ets_printf(__VA_ARGS__) 9 | #endif 10 | 11 | #ifndef DEBUGV 12 | #define DEBUGV(...) 13 | #endif 14 | 15 | #ifdef __cplusplus 16 | void hexdump(uint8_t *mem, uint32_t len, uint8_t cols = 16); 17 | #else 18 | void hexdump(uint8_t *mem, uint32_t len, uint8_t cols); 19 | #endif 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | void __panic_func(const char* file, int line, const char* func) __attribute__((noreturn)); 26 | #define panic() __panic_func(__FILE__, __LINE__, __func__) 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | 33 | #endif//ARD_DEBUG_H 34 | -------------------------------------------------------------------------------- /libraries/ESP8266WebServer/src/detail/RequestHandler.h: -------------------------------------------------------------------------------- 1 | #ifndef REQUESTHANDLER_H 2 | #define REQUESTHANDLER_H 3 | 4 | class RequestHandler { 5 | public: 6 | virtual ~RequestHandler() { } 7 | virtual bool canHandle(HTTPMethod method, String uri) { return false; } 8 | virtual bool canUpload(String uri) { return false; } 9 | virtual bool handle(ESP8266WebServer& server, HTTPMethod requestMethod, String requestUri) { return false; } 10 | virtual void upload(ESP8266WebServer& server, String requestUri, HTTPUpload& upload) {} 11 | 12 | RequestHandler* next() { return _next; } 13 | void next(RequestHandler* r) { _next = r; } 14 | 15 | private: 16 | RequestHandler* _next = nullptr; 17 | }; 18 | 19 | #endif //REQUESTHANDLER_H 20 | -------------------------------------------------------------------------------- /libraries/Ticker/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Wire 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | ####################################### 10 | # Methods and Functions (KEYWORD2) 11 | ####################################### 12 | 13 | attach KEYWORD2 14 | attach_ms KEYWORD2 15 | once KEYWORD2 16 | once_ms KEYWORD2 17 | detach KEYWORD2 18 | 19 | ####################################### 20 | # Instances (KEYWORD2) 21 | ####################################### 22 | 23 | Ticker KEYWORD2 24 | 25 | ####################################### 26 | # Constants (LITERAL1) 27 | ####################################### 28 | 29 | -------------------------------------------------------------------------------- /cores/esp8266/eboot_command.h: -------------------------------------------------------------------------------- 1 | #ifndef EBOOT_COMMAND_H 2 | #define EBOOT_COMMAND_H 3 | 4 | #include 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #define RTC_MEM ((volatile uint32_t*)0x60001200) 11 | 12 | enum action_t { 13 | ACTION_COPY_RAW = 0x00000001, 14 | ACTION_LOAD_APP = 0xffffffff 15 | }; 16 | 17 | #define EBOOT_MAGIC 0xeb001000 18 | #define EBOOT_MAGIC_MASK 0xfffff000 19 | 20 | struct eboot_command { 21 | uint32_t magic; 22 | enum action_t action; 23 | uint32_t args[29]; 24 | uint32_t crc32; 25 | }; 26 | 27 | 28 | int eboot_command_read(struct eboot_command* cmd); 29 | void eboot_command_write(struct eboot_command* cmd); 30 | void eboot_command_clear(); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif //EBOOT_COMMAND_H 37 | -------------------------------------------------------------------------------- /libraries/ESP8266WiFi/src/include/slist.h: -------------------------------------------------------------------------------- 1 | #ifndef SLIST_H 2 | #define SLIST_H 3 | 4 | template 5 | class SList { 6 | public: 7 | SList() : _next(0) { } 8 | 9 | protected: 10 | 11 | static void _add(T* self) { 12 | T* tmp = _s_first; 13 | _s_first = self; 14 | self->_next = tmp; 15 | } 16 | 17 | static void _remove(T* self) { 18 | if (_s_first == self) { 19 | _s_first = self->_next; 20 | self->_next = 0; 21 | return; 22 | } 23 | 24 | for (T* prev = _s_first; prev->_next; prev = prev->_next) { 25 | if (prev->_next == self) { 26 | prev->_next = self->_next; 27 | self->_next = 0; 28 | return; 29 | } 30 | } 31 | } 32 | 33 | static T* _s_first; 34 | T* _next; 35 | }; 36 | 37 | 38 | #endif //SLIST_H 39 | -------------------------------------------------------------------------------- /libraries/SD/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map SD 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | SD KEYWORD1 SD 10 | File KEYWORD1 SD 11 | 12 | ####################################### 13 | # Methods and Functions (KEYWORD2) 14 | ####################################### 15 | begin KEYWORD2 16 | exists KEYWORD2 17 | mkdir KEYWORD2 18 | remove KEYWORD2 19 | rmdir KEYWORD2 20 | open KEYWORD2 21 | close KEYWORD2 22 | seek KEYWORD2 23 | position KEYWORD2 24 | size KEYWORD2 25 | 26 | ####################################### 27 | # Constants (LITERAL1) 28 | ####################################### 29 | FILE_READ LITERAL1 30 | FILE_WRITE LITERAL1 31 | -------------------------------------------------------------------------------- /tests/host/common/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | pins_arduino.h 3 | Copyright © 2016 Ivan Grokhotkov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | */ 15 | #ifndef pins_arduino_h 16 | #define pins_arduino_h 17 | 18 | 19 | #endif /* pins_arduino_h */ 20 | -------------------------------------------------------------------------------- /tools/sdk/include/smartconfig.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 -2018 Espressif System 3 | * 4 | */ 5 | 6 | #ifndef __SMARTCONFIG_H__ 7 | #define __SMARTCONFIG_H__ 8 | 9 | typedef enum { 10 | SC_STATUS_WAIT = 0, 11 | SC_STATUS_FIND_CHANNEL, 12 | SC_STATUS_GETTING_SSID_PSWD, 13 | SC_STATUS_LINK, 14 | SC_STATUS_LINK_OVER, 15 | } sc_status; 16 | 17 | typedef enum { 18 | SC_TYPE_ESPTOUCH = 0, 19 | SC_TYPE_AIRKISS, 20 | SC_TYPE_ESPTOUCH_AIRKISS, 21 | } sc_type; 22 | 23 | typedef void (*sc_callback_t)(sc_status status, void *pdata); 24 | 25 | const char *smartconfig_get_version(void); 26 | bool smartconfig_start(sc_callback_t cb, ...); 27 | bool smartconfig_stop(void); 28 | bool esptouch_set_timeout(uint8 time_s); //15s~255s, offset:45s 29 | bool smartconfig_set_type(sc_type type); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /tests/Time/Time.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | const char* ssid = ".........."; 5 | const char* password = ".........."; 6 | 7 | int timezone = 3; 8 | int dst = 0; 9 | 10 | void setup() { 11 | Serial.begin(115200); 12 | Serial.setDebugOutput(true); 13 | 14 | WiFi.mode(WIFI_STA); 15 | WiFi.begin(ssid, password); 16 | Serial.println("\nConnecting to WiFi"); 17 | while (WiFi.status() != WL_CONNECTED) { 18 | Serial.print("."); 19 | delay(1000); 20 | } 21 | 22 | configTime(3 * 3600, 0, "pool.ntp.org", "time.nist.gov"); 23 | Serial.println("\nWaiting for time"); 24 | while (!time(nullptr)) { 25 | Serial.print("."); 26 | delay(1000); 27 | } 28 | Serial.println(""); 29 | } 30 | 31 | void loop() { 32 | time_t now = time(nullptr); 33 | Serial.println(ctime(&now)); 34 | delay(1000); 35 | } 36 | -------------------------------------------------------------------------------- /cores/esp8266/spiffs/TODO: -------------------------------------------------------------------------------- 1 | * When mending lost pages, also see if they fit into length specified in object index header 2 | 3 | SPIFFS2 thoughts 4 | 5 | * Instead of exact object id:s in the object lookup tables, use a hash of span index and object id. 6 | Eg. object id xor:ed with bit-reversed span index. 7 | This should decrease number of actual pages that needs to be visited when looking thru the obj lut. 8 | 9 | * Logical number of each block. When moving stuff in a garbage collected page, the free 10 | page is assigned the same number as the garbage collected. Thus, object index pages do not have to 11 | be rewritten. 12 | 13 | * Steal one page, use as a bit parity page. When starting an fs modification operation, write one bit 14 | as zero. When ending, write another bit as zero. On mount, if number of zeroes in page is uneven, a 15 | check is automatically run. -------------------------------------------------------------------------------- /libraries/DNSServer/examples/CaptivePortalAdvanced/credentials.ino: -------------------------------------------------------------------------------- 1 | /** Load WLAN credentials from EEPROM */ 2 | void loadCredentials() { 3 | EEPROM.begin(512); 4 | EEPROM.get(0, ssid); 5 | EEPROM.get(0+sizeof(ssid), password); 6 | char ok[2+1]; 7 | EEPROM.get(0+sizeof(ssid)+sizeof(password), ok); 8 | EEPROM.end(); 9 | if (String(ok) != String("OK")) { 10 | ssid[0] = 0; 11 | password[0] = 0; 12 | } 13 | Serial.println("Recovered credentials:"); 14 | Serial.println(ssid); 15 | Serial.println(strlen(password)>0?"********":""); 16 | } 17 | 18 | /** Store WLAN credentials to EEPROM */ 19 | void saveCredentials() { 20 | EEPROM.begin(512); 21 | EEPROM.put(0, ssid); 22 | EEPROM.put(0+sizeof(ssid), password); 23 | char ok[2+1] = "OK"; 24 | EEPROM.put(0+sizeof(ssid)+sizeof(password), ok); 25 | EEPROM.commit(); 26 | EEPROM.end(); 27 | } 28 | -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/shapes/shapes.ino: -------------------------------------------------------------------------------- 1 | // Draw Boxes - Demonstrate drawRectangle and fillRectangle 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | void setup() 8 | { 9 | TFT_BL_ON; // turn on the background light 10 | Tft.TFTinit(); // init TFT library 11 | } 12 | 13 | void loop() 14 | { 15 | for(int r=0;r<115;r=r+2) //set r : 0--115 16 | { 17 | Tft.drawCircle(119,160,r,random(0xFFFF)); //draw circle, center:(119, 160), color: random 18 | } 19 | delay(10); 20 | } 21 | /********************************************************************************************************* 22 | END FILE 23 | *********************************************************************************************************/ -------------------------------------------------------------------------------- /tools/sdk/include/ping.h: -------------------------------------------------------------------------------- 1 | #ifndef __PING_H__ 2 | #define __PING_H__ 3 | 4 | 5 | typedef void (* ping_recv_function)(void* arg, void *pdata); 6 | typedef void (* ping_sent_function)(void* arg, void *pdata); 7 | 8 | struct ping_option{ 9 | uint32 count; 10 | uint32 ip; 11 | uint32 coarse_time; 12 | ping_recv_function recv_function; 13 | ping_sent_function sent_function; 14 | void* reverse; 15 | }; 16 | 17 | struct ping_resp{ 18 | uint32 total_count; 19 | uint32 resp_time; 20 | uint32 seqno; 21 | uint32 timeout_count; 22 | uint32 bytes; 23 | uint32 total_bytes; 24 | uint32 total_time; 25 | sint8 ping_err; 26 | }; 27 | 28 | bool ping_start(struct ping_option *ping_opt); 29 | bool ping_regist_recv(struct ping_option *ping_opt, ping_recv_function ping_recv); 30 | bool ping_regist_sent(struct ping_option *ping_opt, ping_sent_function ping_sent); 31 | 32 | #endif /* __PING_H__ */ 33 | -------------------------------------------------------------------------------- /libraries/Hash/src/sha1/sha1.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sha1.h 3 | * @date 20.05.2015 4 | * @author Steve Reid 5 | * 6 | * from: http://www.virtualbox.org/svn/vbox/trunk/src/recompiler/tests/sha1.c 7 | */ 8 | 9 | /* ================ sha1.h ================ */ 10 | /* 11 | SHA-1 in C 12 | By Steve Reid 13 | 100% Public Domain 14 | */ 15 | 16 | #ifndef SHA1_H_ 17 | #define SHA1_H_ 18 | 19 | typedef struct { 20 | uint32_t state[5]; 21 | uint32_t count[2]; 22 | unsigned char buffer[64]; 23 | } SHA1_CTX; 24 | 25 | void SHA1Transform(uint32_t state[5], uint8_t buffer[64]); 26 | void SHA1Init(SHA1_CTX* context); 27 | void SHA1Update(SHA1_CTX* context, uint8_t* data, uint32_t len); 28 | void SHA1Final(unsigned char digest[20], SHA1_CTX* context); 29 | 30 | #endif /* SHA1_H_ */ 31 | 32 | /* ================ end of sha1.h ================ */ 33 | -------------------------------------------------------------------------------- /libraries/Wire/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Wire 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | ####################################### 10 | # Methods and Functions (KEYWORD2) 11 | ####################################### 12 | 13 | begin KEYWORD2 14 | setClock KEYWORD2 15 | setClockStretchLimit KEYWORD2 16 | beginTransmission KEYWORD2 17 | endTransmission KEYWORD2 18 | requestFrom KEYWORD2 19 | send KEYWORD2 20 | receive KEYWORD2 21 | onReceive KEYWORD2 22 | onRequest KEYWORD2 23 | 24 | ####################################### 25 | # Instances (KEYWORD2) 26 | ####################################### 27 | 28 | Wire KEYWORD2 29 | 30 | ####################################### 31 | # Constants (LITERAL1) 32 | ####################################### 33 | 34 | -------------------------------------------------------------------------------- /libraries/ESP8266WebServer/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Ultrasound 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | ESP8266WebServer KEYWORD1 10 | HTTPMethod KEYWORD1 11 | 12 | ####################################### 13 | # Methods and Functions (KEYWORD2) 14 | ####################################### 15 | 16 | begin KEYWORD2 17 | handleClient KEYWORD2 18 | on KEYWORD2 19 | addHandler KEYWORD2 20 | uri KEYWORD2 21 | method KEYWORD2 22 | client KEYWORD2 23 | send KEYWORD2 24 | arg KEYWORD2 25 | argName KEYWORD2 26 | args KEYWORD2 27 | hasArg KEYWORD2 28 | onNotFound KEYWORD2 29 | 30 | ####################################### 31 | # Constants (LITERAL1) 32 | ####################################### 33 | 34 | HTTP_GET LITERAL1 35 | HTTP_POST LITERAL1 36 | HTTP_ANY LITERAL1 37 | -------------------------------------------------------------------------------- /libraries/ESP8266WiFi/examples/WiFiMulti/WiFiMulti.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * This sketch trys to Connect to the best AP based on a given list 3 | * 4 | */ 5 | 6 | #include 7 | #include 8 | 9 | ESP8266WiFiMulti wifiMulti; 10 | 11 | void setup() { 12 | Serial.begin(115200); 13 | delay(10); 14 | 15 | wifiMulti.addAP("ssid_from_AP_1", "your_password_for_AP_1"); 16 | wifiMulti.addAP("ssid_from_AP_2", "your_password_for_AP_2"); 17 | wifiMulti.addAP("ssid_from_AP_3", "your_password_for_AP_3"); 18 | 19 | Serial.println("Connecting Wifi..."); 20 | if(wifiMulti.run() == WL_CONNECTED) { 21 | Serial.println(""); 22 | Serial.println("WiFi connected"); 23 | Serial.println("IP address: "); 24 | Serial.println(WiFi.localIP()); 25 | } 26 | } 27 | 28 | void loop() { 29 | if(wifiMulti.run() != WL_CONNECTED) { 30 | Serial.println("WiFi not connected!"); 31 | delay(1000); 32 | } 33 | } -------------------------------------------------------------------------------- /libraries/SPI/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map SPI 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | SPI KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | begin KEYWORD2 15 | end KEYWORD2 16 | transfer KEYWORD2 17 | setBitOrder KEYWORD2 18 | setDataMode KEYWORD2 19 | setClockDivider KEYWORD2 20 | 21 | 22 | ####################################### 23 | # Constants (LITERAL1) 24 | ####################################### 25 | SPI_CLOCK_DIV4 LITERAL1 26 | SPI_CLOCK_DIV16 LITERAL1 27 | SPI_CLOCK_DIV64 LITERAL1 28 | SPI_CLOCK_DIV128 LITERAL1 29 | SPI_CLOCK_DIV2 LITERAL1 30 | SPI_CLOCK_DIV8 LITERAL1 31 | SPI_CLOCK_DIV32 LITERAL1 32 | SPI_CLOCK_DIV64 LITERAL1 33 | SPI_MODE0 LITERAL1 34 | SPI_MODE1 LITERAL1 35 | SPI_MODE2 LITERAL1 36 | SPI_MODE3 LITERAL1 -------------------------------------------------------------------------------- /libraries/SD/README.adoc: -------------------------------------------------------------------------------- 1 | = SD Library for Arduino = 2 | 3 | The SD library allows for reading from and writing to SD cards. 4 | 5 | For more information about this library please visit us at 6 | http://www.arduino.cc/en/Reference/SD 7 | 8 | == License == 9 | 10 | Copyright (C) 2009 by William Greiman 11 | Copyright (c) 2010 SparkFun Electronics 12 | 13 | This program is free software: you can redistribute it and/or modify 14 | it under the terms of the GNU General Public License as published by 15 | the Free Software Foundation, either version 3 of the License, or 16 | (at your option) any later version. 17 | 18 | This program is distributed in the hope that it will be useful, 19 | but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | GNU General Public License for more details. 22 | 23 | You should have received a copy of the GNU General Public License 24 | along with this program. If not, see . 25 | -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/drawRectangle/drawRectangle.ino: -------------------------------------------------------------------------------- 1 | /* Draw Boxes - Demonstrate drawRectangle and fillRectangle 2 | fillScreen(INT16U XL,INT16U XR,INT16U YU,INT16U YD,INT16U color); 3 | fillRectangle(INT16U poX, INT16U poY, INT16U length, INT16U width, INT16U color); 4 | drawRectangle(INT16U poX, INT16U poY, INT16U length,INT16U width,INT16U color); 5 | */ 6 | #include 7 | #include 8 | #include 9 | 10 | void setup() 11 | { 12 | TFT_BL_ON; // turn on the background light 13 | Tft.TFTinit(); // init TFT library 14 | 15 | Tft.fillScreen(80, 160, 50, 150,RED); 16 | Tft.fillRectangle(30, 120, 100,65,YELLOW); 17 | Tft.drawRectangle(100, 170, 120,60,BLUE); 18 | } 19 | 20 | void loop() 21 | { 22 | 23 | } 24 | /********************************************************************************************************* 25 | END FILE 26 | *********************************************************************************************************/ -------------------------------------------------------------------------------- /bootloaders/eboot/eboot_command.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015 Ivan Grokhotkov. All rights reserved. 2 | * This file is part of eboot bootloader. 3 | * 4 | * Redistribution and use is permitted according to the conditions of the 5 | * 3-clause BSD license to be found in the LICENSE file. 6 | */ 7 | 8 | #ifndef EBOOT_COMMAND_H 9 | #define EBOOT_COMMAND_H 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | #define RTC_MEM ((volatile uint32_t*)0x60001200) 16 | 17 | enum action_t { 18 | ACTION_COPY_RAW = 0x00000001, 19 | ACTION_LOAD_APP = 0xffffffff 20 | }; 21 | 22 | #define EBOOT_MAGIC 0xeb001000 23 | #define EBOOT_MAGIC_MASK 0xfffff000 24 | 25 | struct eboot_command { 26 | uint32_t magic; 27 | enum action_t action; 28 | uint32_t args[29]; 29 | uint32_t crc32; 30 | }; 31 | 32 | 33 | int eboot_command_read(struct eboot_command* cmd); 34 | void eboot_command_write(struct eboot_command* cmd); 35 | void eboot_command_clear(); 36 | 37 | #endif //EBOOT_COMMAND_H 38 | -------------------------------------------------------------------------------- /libraries/Ethernet/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Ethernet 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | Ethernet KEYWORD1 Ethernet 10 | EthernetClient KEYWORD1 EthernetClient 11 | EthernetServer KEYWORD1 EthernetServer 12 | IPAddress KEYWORD1 EthernetIPAddress 13 | 14 | ####################################### 15 | # Methods and Functions (KEYWORD2) 16 | ####################################### 17 | 18 | status KEYWORD2 19 | connect KEYWORD2 20 | write KEYWORD2 21 | available KEYWORD2 22 | read KEYWORD2 23 | peek KEYWORD2 24 | flush KEYWORD2 25 | stop KEYWORD2 26 | connected KEYWORD2 27 | begin KEYWORD2 28 | beginPacket KEYWORD2 29 | endPacket KEYWORD2 30 | parsePacket KEYWORD2 31 | remoteIP KEYWORD2 32 | remotePort KEYWORD2 33 | 34 | ####################################### 35 | # Constants (LITERAL1) 36 | ####################################### 37 | 38 | -------------------------------------------------------------------------------- /libraries/GDBStub/README.md: -------------------------------------------------------------------------------- 1 | ## Using GDB stub 2 | 3 | - Add `#include ` to the sketch 4 | - Upload the sketch 5 | - Redirect serial port to TCP port: 6 | ``` 7 | tcp_serial_redirect.py -p /dev/tty.SLAB_USBtoUART -b 115200 --spy -P 9980 --rts=0 --dtr=0 8 | ``` 9 | Change port and baud rate as necessary. This command requires python and pyserial. 10 | - Observe serial output: 11 | ``` 12 | nc localhost 9980 13 | ``` 14 | - Once crash happens, close nc and start gdb: 15 | ``` 16 | xtensa-lx106-elf-gdb /path/to/Sketch.cpp.elf -ex "target remote :9980" 17 | ``` 18 | Or, using the provided gdbcmds file: 19 | ``` 20 | xtensa-lx106-elf-gdb /path/to/Sketch.cpp.elf -x gdbcmds 21 | ``` 22 | - Use gdb to inspect program state at the point of an exception. 23 | 24 | ## Tips and tricks 25 | 26 | - To halt the target when software WDT fires, add 27 | ``` 28 | ((int*)0) = 0; 29 | ``` 30 | at the top of `__wrap_system_restart_local` in core_esp8266_postmortem.c. 31 | 32 | ## License 33 | 34 | Espressif MIT License. See License file. 35 | -------------------------------------------------------------------------------- /tools/sdk/include/pwm.h: -------------------------------------------------------------------------------- 1 | #ifndef __PWM_H__ 2 | #define __PWM_H__ 3 | 4 | /*pwm.h: function and macro definition of PWM API , driver level */ 5 | /*user_light.h: user interface for light API, user level*/ 6 | /*user_light_adj: API for color changing and lighting effects, user level*/ 7 | 8 | 9 | /*NOTE!! : DO NOT CHANGE THIS FILE*/ 10 | 11 | /*SUPPORT UP TO 8 PWM CHANNEL*/ 12 | #define PWM_CHANNEL_NUM_MAX 8 13 | 14 | struct pwm_param { 15 | uint32 period; 16 | uint32 freq; 17 | uint32 duty[PWM_CHANNEL_NUM_MAX]; //PWM_CHANNEL<=8 18 | }; 19 | 20 | 21 | /* pwm_init should be called only once, for now */ 22 | void pwm_init(uint32 period, uint32 *duty,uint32 pwm_channel_num,uint32 (*pin_info_list)[3]); 23 | void pwm_start(void); 24 | 25 | void pwm_set_duty(uint32 duty, uint8 channel); 26 | uint32 pwm_get_duty(uint8 channel); 27 | void pwm_set_period(uint32 period); 28 | uint32 pwm_get_period(void); 29 | 30 | uint32 get_pwm_version(void); 31 | void set_pwm_debug_en(uint8 print_en); 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /libraries/Ticker/examples/TickerParameter/TickerParameter.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Passing paramters to Ticker callbacks 3 | 4 | Apart from void(void) functions, the Ticker library supports 5 | functions taking one argument. This argument's size has to be less or 6 | equal to 4 bytes (so char, short, int, float, void*, char* types will do). 7 | 8 | This sample runs two tickers that both call one callback function, 9 | but with different arguments. 10 | 11 | An LED connected to GPIO1 will be pulsing. Use a built-in LED on ESP-01 12 | or connect an external one to TXD on other boards. 13 | */ 14 | 15 | #include 16 | 17 | Ticker tickerSetHigh; 18 | Ticker tickerSetLow; 19 | 20 | void setPin(int state) { 21 | digitalWrite(1, state); 22 | } 23 | 24 | void setup() { 25 | pinMode(1, OUTPUT); 26 | digitalWrite(1, LOW); 27 | 28 | // every 25 ms, call setPin(0) 29 | tickerSetLow.attach_ms(25, setPin, 0); 30 | 31 | // every 26 ms, call setPin(1) 32 | tickerSetHigh.attach_ms(26, setPin, 1); 33 | } 34 | 35 | void loop() { 36 | } 37 | -------------------------------------------------------------------------------- /cores/esp8266/libb64/cdecode.h: -------------------------------------------------------------------------------- 1 | /* 2 | cdecode.h - c header for a base64 decoding algorithm 3 | 4 | This is part of the libb64 project, and has been placed in the public domain. 5 | For details, see http://sourceforge.net/projects/libb64 6 | */ 7 | 8 | #ifndef BASE64_CDECODE_H 9 | #define BASE64_CDECODE_H 10 | 11 | #define base64_decode_expected_len(n) ((n * 3) / 4) 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | typedef enum { 18 | step_a, step_b, step_c, step_d 19 | } base64_decodestep; 20 | 21 | typedef struct { 22 | base64_decodestep step; 23 | char plainchar; 24 | } base64_decodestate; 25 | 26 | void base64_init_decodestate(base64_decodestate* state_in); 27 | 28 | int base64_decode_value(char value_in); 29 | 30 | int base64_decode_block(const char* code_in, const int length_in, char* plaintext_out, base64_decodestate* state_in); 31 | 32 | int base64_decode_chars(const char* code_in, const int length_in, char* plaintext_out); 33 | 34 | #ifdef __cplusplus 35 | } // extern "C" 36 | #endif 37 | 38 | #endif /* BASE64_CDECODE_H */ 39 | -------------------------------------------------------------------------------- /libraries/esp8266/examples/CallSDKFunctions/CallSDKFunctions.ino: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * NativeSdk by Simon Peter 4 | * Access functionality from the Espressif ESP8266 SDK 5 | * This example code is in the public domain 6 | * 7 | * This is for advanced users. 8 | * Note that this makes your code dependent on the ESP8266, which is generally 9 | * a bad idea. So you should try to use esp8266/Arduino functionality 10 | * where possible instead, in order to abstract away the hardware dependency. 11 | */ 12 | 13 | // Expose Espressif SDK functionality - wrapped in ifdef so that it still 14 | // compiles on other platforms 15 | #ifdef ESP8266 16 | extern "C" { 17 | #include "user_interface.h" 18 | } 19 | #endif 20 | 21 | void setup() { 22 | Serial.begin(115200); 23 | } 24 | 25 | void loop() { 26 | // Call Espressif SDK functionality - wrapped in ifdef so that it still 27 | // compiles on other platforms 28 | #ifdef ESP8266 29 | Serial.print("wifi_station_get_hostname: "); 30 | Serial.println(wifi_station_get_hostname()); 31 | #endif 32 | delay(1000); 33 | } 34 | -------------------------------------------------------------------------------- /cores/esp8266/Server.h: -------------------------------------------------------------------------------- 1 | /* 2 | Server.h - Base class that provides Server 3 | Copyright (c) 2011 Adrian McEwen. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef server_h 21 | #define server_h 22 | 23 | #include "Print.h" 24 | 25 | class Server: public Print { 26 | public: 27 | virtual void begin() =0; 28 | }; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /libraries/esp8266/examples/BlinkWithoutDelay/BlinkWithoutDelay.ino: -------------------------------------------------------------------------------- 1 | /* 2 | ESP8266 BlinkWithoutDelay by Simon Peter 3 | Blink the blue LED on the ESP-01 module 4 | Based on the Arduino Blink without Delay example 5 | This example code is in the public domain 6 | 7 | The blue LED on the ESP-01 module is connected to GPIO1 8 | (which is also the TXD pin; so we cannot use Serial.print() at the same time) 9 | 10 | Note that this sketch uses LED_BUILTIN to find the pin with the internal LED 11 | */ 12 | 13 | int ledState = LOW; 14 | 15 | unsigned long previousMillis = 0; 16 | const long interval = 1000; 17 | 18 | void setup() { 19 | pinMode(LED_BUILTIN, OUTPUT); 20 | } 21 | 22 | void loop() 23 | { 24 | unsigned long currentMillis = millis(); 25 | if(currentMillis - previousMillis >= interval) { 26 | previousMillis = currentMillis; 27 | if (ledState == LOW) 28 | ledState = HIGH; // Note that this switches the LED *off* 29 | else 30 | ledState = LOW; // Note that this switches the LED *on* 31 | digitalWrite(LED_BUILTIN, ledState); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /libraries/esp8266/examples/Blink/Blink.ino: -------------------------------------------------------------------------------- 1 | /* 2 | ESP8266 Blink by Simon Peter 3 | Blink the blue LED on the ESP-01 module 4 | This example code is in the public domain 5 | 6 | The blue LED on the ESP-01 module is connected to GPIO1 7 | (which is also the TXD pin; so we cannot use Serial.print() at the same time) 8 | 9 | Note that this sketch uses LED_BUILTIN to find the pin with the internal LED 10 | */ 11 | 12 | void setup() { 13 | pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output 14 | } 15 | 16 | // the loop function runs over and over again forever 17 | void loop() { 18 | digitalWrite(LED_BUILTIN, LOW); // Turn the LED on (Note that LOW is the voltage level 19 | // but actually the LED is on; this is because 20 | // it is acive low on the ESP-01) 21 | delay(1000); // Wait for a second 22 | digitalWrite(LED_BUILTIN, HIGH); // Turn the LED off by making the voltage HIGH 23 | delay(2000); // Wait for two seconds (to demonstrate the active low LED) 24 | } 25 | -------------------------------------------------------------------------------- /tools/sdk/include/spi_flash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) Espressif System 2010 3 | * 4 | */ 5 | 6 | #ifndef SPI_FLASH_H 7 | #define SPI_FLASH_H 8 | 9 | typedef enum { 10 | SPI_FLASH_RESULT_OK, 11 | SPI_FLASH_RESULT_ERR, 12 | SPI_FLASH_RESULT_TIMEOUT 13 | } SpiFlashOpResult; 14 | 15 | typedef struct{ 16 | uint32 deviceId; 17 | uint32 chip_size; // chip size in byte 18 | uint32 block_size; 19 | uint32 sector_size; 20 | uint32 page_size; 21 | uint32 status_mask; 22 | } SpiFlashChip; 23 | 24 | #define SPI_FLASH_SEC_SIZE 4096 25 | 26 | extern SpiFlashChip * flashchip; // in ram ROM-BIOS 27 | 28 | uint32 spi_flash_get_id(void); 29 | SpiFlashOpResult spi_flash_erase_sector(uint16 sec); 30 | SpiFlashOpResult spi_flash_write(uint32 des_addr, uint32 *src_addr, uint32 size); 31 | SpiFlashOpResult spi_flash_read(uint32 src_addr, uint32 *des_addr, uint32 size); 32 | 33 | typedef SpiFlashOpResult (* user_spi_flash_read)( 34 | SpiFlashChip *spi, 35 | uint32 src_addr, 36 | uint32 *des_addr, 37 | uint32 size); 38 | 39 | void spi_flash_set_read_func(user_spi_flash_read read); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | Please fill the info fields, it helps to get you faster support ;) 3 | 4 | if you have a stack dump decode it: 5 | https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/stack_dump.md 6 | 7 | for better debug messages: 8 | https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/debugging.md 9 | 10 | ----------------------------- Remove above ----------------------------- 11 | 12 | ### Basic Infos 13 | 14 | #### Hardware 15 | Hardware: ?ESP-12? 16 | Core Version: ?2.1.0-rc2? 17 | 18 | ### Description 19 | 20 | Problem description 21 | 22 | ### Settings in IDE 23 | 24 | Module: ?Generic ESP8266 Module? 25 | Flash Size: ?4MB/1MB? 26 | CPU Frequency: ?80Mhz? 27 | Flash Mode: ?qio? 28 | Flash Frequency: ?40Mhz? 29 | Upload Using: ?OTA / SERIAL? 30 | Reset Method: ?ck / nodemcu? 31 | 32 | 33 | ### Sketch 34 | 35 | ```cpp 36 | 37 | #include 38 | 39 | void setup() { 40 | 41 | } 42 | 43 | void loop() { 44 | 45 | } 46 | ``` 47 | 48 | ### Debug Messages 49 | 50 | ``` 51 | messages here 52 | ``` 53 | 54 | 55 | -------------------------------------------------------------------------------- /libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | const byte DNS_PORT = 53; 6 | IPAddress apIP(192, 168, 1, 1); 7 | DNSServer dnsServer; 8 | ESP8266WebServer webServer(80); 9 | 10 | String responseHTML = "" 11 | "CaptivePortal" 12 | "

Hello World!

This is a captive portal example. All requests will " 13 | "be redirected here.

"; 14 | 15 | void setup() { 16 | WiFi.mode(WIFI_AP); 17 | WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0)); 18 | WiFi.softAP("DNSServer CaptivePortal example"); 19 | 20 | // if DNSServer is started with "*" for domain name, it will reply with 21 | // provided IP to all DNS request 22 | dnsServer.start(DNS_PORT, "*", apIP); 23 | 24 | // replay to all requests with same HTML 25 | webServer.onNotFound([]() { 26 | webServer.send(200, "text/html", responseHTML); 27 | }); 28 | webServer.begin(); 29 | } 30 | 31 | void loop() { 32 | dnsServer.processNextRequest(); 33 | webServer.handleClient(); 34 | } 35 | -------------------------------------------------------------------------------- /libraries/EEPROM/examples/eeprom_read/eeprom_read.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * EEPROM Read 3 | * 4 | * Reads the value of each byte of the EEPROM and prints it 5 | * to the computer. 6 | * This example code is in the public domain. 7 | */ 8 | 9 | #include 10 | 11 | // start reading from the first byte (address 0) of the EEPROM 12 | int address = 0; 13 | byte value; 14 | 15 | void setup() 16 | { 17 | // initialize serial and wait for port to open: 18 | Serial.begin(9600); 19 | while (!Serial) { 20 | ; // wait for serial port to connect. Needed for Leonardo only 21 | } 22 | EEPROM.begin(512); 23 | } 24 | 25 | void loop() 26 | { 27 | // read a byte from the current address of the EEPROM 28 | value = EEPROM.read(address); 29 | 30 | Serial.print(address); 31 | Serial.print("\t"); 32 | Serial.print(value, DEC); 33 | Serial.println(); 34 | 35 | // advance to the next address of the EEPROM 36 | address = address + 1; 37 | 38 | // there are only 512 bytes of EEPROM, from 0 to 511, so if we're 39 | // on address 512, wrap around to address 0 40 | if (address == 512) 41 | address = 0; 42 | 43 | delay(500); 44 | } 45 | -------------------------------------------------------------------------------- /cores/esp8266/libb64/cencode.h: -------------------------------------------------------------------------------- 1 | /* 2 | cencode.h - c header for a base64 encoding algorithm 3 | 4 | This is part of the libb64 project, and has been placed in the public domain. 5 | For details, see http://sourceforge.net/projects/libb64 6 | */ 7 | 8 | #ifndef BASE64_CENCODE_H 9 | #define BASE64_CENCODE_H 10 | 11 | #define base64_encode_expected_len(n) ((((4 * n) / 3) + 3) & ~3) 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | typedef enum { 18 | step_A, step_B, step_C 19 | } base64_encodestep; 20 | 21 | typedef struct { 22 | base64_encodestep step; 23 | char result; 24 | int stepcount; 25 | } base64_encodestate; 26 | 27 | void base64_init_encodestate(base64_encodestate* state_in); 28 | 29 | char base64_encode_value(char value_in); 30 | 31 | int base64_encode_block(const char* plaintext_in, int length_in, char* code_out, base64_encodestate* state_in); 32 | 33 | int base64_encode_blockend(char* code_out, base64_encodestate* state_in); 34 | 35 | int base64_encode_chars(const char* plaintext_in, int length_in, char* code_out); 36 | 37 | #ifdef __cplusplus 38 | } // extern "C" 39 | #endif 40 | 41 | #endif /* BASE64_CENCODE_H */ 42 | -------------------------------------------------------------------------------- /libraries/ESP8266WebServer/examples/HttpBasicAuth/HttpBasicAuth.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | const char* ssid = "........"; 7 | const char* password = "........"; 8 | 9 | ESP8266WebServer server(80); 10 | 11 | const char* www_username = "admin"; 12 | const char* www_password = "esp8266"; 13 | 14 | void setup() { 15 | Serial.begin(115200); 16 | WiFi.mode(WIFI_STA); 17 | WiFi.begin(ssid, password); 18 | if(WiFi.waitForConnectResult() != WL_CONNECTED) { 19 | Serial.println("WiFi Connect Failed! Rebooting..."); 20 | delay(1000); 21 | ESP.restart(); 22 | } 23 | ArduinoOTA.begin(); 24 | 25 | server.on("/", [](){ 26 | if(!server.authenticate(www_username, www_password)) 27 | return server.requestAuthentication(); 28 | server.send(200, "text/plain", "Login OK"); 29 | }); 30 | server.begin(); 31 | 32 | Serial.print("Open http://"); 33 | Serial.print(WiFi.localIP()); 34 | Serial.println("/ in your browser to see it working"); 35 | } 36 | 37 | void loop() { 38 | ArduinoOTA.handle(); 39 | server.handleClient(); 40 | } 41 | -------------------------------------------------------------------------------- /libraries/Ethernet/README.adoc: -------------------------------------------------------------------------------- 1 | = Ethernet Library for Arduino = 2 | 3 | With the Arduino Ethernet Shield, this library allows an Arduino board to connect to the internet. 4 | 5 | For more information about this library please visit us at 6 | http://www.arduino.cc/en/Reference/Ethernet 7 | 8 | modified to run on the ESP8266 9 | 10 | == License == 11 | 12 | Copyright (c) 2010 Arduino LLC. All right reserved. 13 | 14 | This library is free software; you can redistribute it and/or 15 | modify it under the terms of the GNU Lesser General Public 16 | License as published by the Free Software Foundation; either 17 | version 2.1 of the License, or (at your option) any later version. 18 | 19 | This library is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22 | Lesser General Public License for more details. 23 | 24 | You should have received a copy of the GNU Lesser General Public 25 | License along with this library; if not, write to the Free Software 26 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 27 | -------------------------------------------------------------------------------- /libraries/esp8266/examples/CheckFlashConfig/CheckFlashConfig.ino: -------------------------------------------------------------------------------- 1 | /* 2 | ESP8266 CheckFlashConfig by Markus Sattler 3 | 4 | This sketch tests if the EEPROM settings of the IDE match to the Hardware 5 | 6 | */ 7 | 8 | void setup(void) { 9 | Serial.begin(115200); 10 | } 11 | 12 | void loop() { 13 | 14 | uint32_t realSize = ESP.getFlashChipRealSize(); 15 | uint32_t ideSize = ESP.getFlashChipSize(); 16 | FlashMode_t ideMode = ESP.getFlashChipMode(); 17 | 18 | Serial.printf("Flash real id: %08X\n", ESP.getFlashChipId()); 19 | Serial.printf("Flash real size: %u\n\n", realSize); 20 | 21 | Serial.printf("Flash ide size: %u\n", ideSize); 22 | Serial.printf("Flash ide speed: %u\n", ESP.getFlashChipSpeed()); 23 | Serial.printf("Flash ide mode: %s\n", (ideMode == FM_QIO ? "QIO" : ideMode == FM_QOUT ? "QOUT" : ideMode == FM_DIO ? "DIO" : ideMode == FM_DOUT ? "DOUT" : "UNKNOWN")); 24 | 25 | if(ideSize != realSize) { 26 | Serial.println("Flash Chip configuration wrong!\n"); 27 | } else { 28 | Serial.println("Flash Chip configuration ok.\n"); 29 | } 30 | 31 | delay(5000); 32 | } 33 | -------------------------------------------------------------------------------- /cores/esp8266/umm_malloc/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Ralph Hempel 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /libraries/EEPROM/examples/eeprom_write/eeprom_write.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * EEPROM Write 3 | * 4 | * Stores values read from analog input 0 into the EEPROM. 5 | * These values will stay in the EEPROM when the board is 6 | * turned off and may be retrieved later by another sketch. 7 | */ 8 | 9 | #include 10 | 11 | // the current address in the EEPROM (i.e. which byte 12 | // we're going to write to next) 13 | int addr = 0; 14 | 15 | void setup() 16 | { 17 | EEPROM.begin(512); 18 | } 19 | 20 | void loop() 21 | { 22 | // need to divide by 4 because analog inputs range from 23 | // 0 to 1023 and each byte of the EEPROM can only hold a 24 | // value from 0 to 255. 25 | int val = analogRead(A0) / 4; 26 | 27 | // write the value to the appropriate byte of the EEPROM. 28 | // these values will remain there when the board is 29 | // turned off. 30 | EEPROM.write(addr, val); 31 | 32 | // advance to the next address. there are 512 bytes in 33 | // the EEPROM, so go back to 0 when we hit 512. 34 | // save all changes to the flash. 35 | addr = addr + 1; 36 | if (addr == 512) 37 | { 38 | addr = 0; 39 | EEPROM.commit(); 40 | } 41 | 42 | delay(100); 43 | } 44 | -------------------------------------------------------------------------------- /tests/host/common/Arduino.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Arduino.cpp - Mocks for common Arduino APIs 3 | Copyright © 2016 Ivan Grokhotkov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | */ 15 | 16 | #define CATCH_CONFIG_MAIN 17 | #include 18 | #include 19 | #include "Arduino.h" 20 | 21 | 22 | extern "C" unsigned long millis() 23 | { 24 | timeval time; 25 | gettimeofday(&time, NULL); 26 | return (time.tv_sec * 1000) + (time.tv_usec / 1000); 27 | } 28 | 29 | 30 | extern "C" void yield() 31 | { 32 | } 33 | 34 | 35 | extern "C" void __panic_func(const char* file, int line, const char* func) { 36 | abort(); 37 | } -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/License.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Seeed Technology Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /tools/sdk/lwip/src/Makefile: -------------------------------------------------------------------------------- 1 | TOOLS_PATH ?= ../../../xtensa-lx106-elf/bin/xtensa-lx106-elf- 2 | LWIP_LIB ?= liblwip_src.a 3 | SDK_PATH ?= $(abspath ../../) 4 | 5 | BUILD_PATH = build 6 | LWIP_SRCS = $(patsubst %.c,$(BUILD_PATH)/%.o,$(wildcard */*.c)) $(patsubst %.c,$(BUILD_PATH)/%.o,$(wildcard */*/*.c)) 7 | 8 | LWIP_INCLUDE = -Ibuild -I$(SDK_PATH)/include -I$(SDK_PATH)/lwip/include 9 | BUILD_FLAGS = -c -Os -g -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -falign-functions=4 -MMD -std=gnu99 -ffunction-sections -fdata-sections 10 | BUILD_DEFINES = -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -DLWIP_OPEN_SRC 11 | 12 | CC=$(TOOLS_PATH)gcc 13 | AR=$(TOOLS_PATH)ar 14 | 15 | $(BUILD_PATH)/%.h: 16 | @mkdir -p $(dir $@) 17 | @touch $@ 18 | 19 | $(BUILD_PATH)/%.o: %.c 20 | @mkdir -p $(dir $@) 21 | $(CC) $(BUILD_FLAGS) $(BUILD_DEFINES) $(LWIP_INCLUDE) $< -o $@ 22 | 23 | $(LWIP_LIB): $(BUILD_PATH)/user_config.h $(LWIP_SRCS) 24 | $(AR) cru $(LWIP_LIB) $(LWIP_SRCS) 25 | 26 | all: $(LWIP_LIB) 27 | 28 | install: all 29 | cp -f $(LWIP_LIB) $(SDK_PATH)/lib/$(LWIP_LIB) 30 | 31 | clean: 32 | @rm -rf $(BUILD_PATH) $(LWIP_LIB) 33 | -------------------------------------------------------------------------------- /cores/esp8266/spiffs/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-2015 Peter Andersson (pelleplutt1976gmail.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /libraries/ESP8266WiFi/examples/WiFiClientEvents/WiFiClientEvents.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * This sketch shows the WiFi event usage 3 | * 4 | */ 5 | 6 | #include 7 | 8 | const char* ssid = "your-ssid"; 9 | const char* password = "your-password"; 10 | 11 | 12 | void WiFiEvent(WiFiEvent_t event) { 13 | Serial.printf("[WiFi-event] event: %d\n", event); 14 | 15 | switch(event) { 16 | case WIFI_EVENT_STAMODE_GOT_IP: 17 | Serial.println("WiFi connected"); 18 | Serial.println("IP address: "); 19 | Serial.println(WiFi.localIP()); 20 | break; 21 | case WIFI_EVENT_STAMODE_DISCONNECTED: 22 | Serial.println("WiFi lost connection"); 23 | break; 24 | } 25 | } 26 | 27 | void setup() { 28 | Serial.begin(115200); 29 | 30 | // delete old config 31 | WiFi.disconnect(true); 32 | 33 | delay(1000); 34 | 35 | WiFi.onEvent(WiFiEvent); 36 | 37 | WiFi.begin(ssid, password); 38 | 39 | Serial.println(); 40 | Serial.println(); 41 | Serial.println("Wait for WiFi... "); 42 | } 43 | 44 | 45 | void loop() { 46 | delay(1000); 47 | } 48 | 49 | -------------------------------------------------------------------------------- /libraries/ESP8266HTTPUpdateServer/examples/WebUpdater/WebUpdater.ino: -------------------------------------------------------------------------------- 1 | /* 2 | To upload through terminal you can use: curl -F "image=@firmware.bin" esp8266-webupdate.local/update 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | const char* host = "esp8266-webupdate"; 12 | const char* ssid = "........"; 13 | const char* password = "........"; 14 | 15 | ESP8266WebServer httpServer(80); 16 | ESP8266HTTPUpdateServer httpUpdater; 17 | 18 | void setup(void){ 19 | 20 | Serial.begin(115200); 21 | Serial.println(); 22 | Serial.println("Booting Sketch..."); 23 | WiFi.mode(WIFI_AP_STA); 24 | WiFi.begin(ssid, password); 25 | 26 | while(WiFi.waitForConnectResult() != WL_CONNECTED){ 27 | WiFi.begin(ssid, password); 28 | Serial.println("WiFi failed, retrying."); 29 | } 30 | 31 | MDNS.begin(host); 32 | 33 | httpUpdater.setup(&httpServer); 34 | httpServer.begin(); 35 | 36 | MDNS.addService("http", "tcp", 80); 37 | Serial.printf("HTTPUpdateServer ready! Open http://%s.local/update in your browser\n", host); 38 | } 39 | 40 | void loop(void){ 41 | httpServer.handleClient(); 42 | delay(1); 43 | } 44 | -------------------------------------------------------------------------------- /cores/esp8266/heap.c: -------------------------------------------------------------------------------- 1 | /* heap.c - overrides of SDK heap handling functions 2 | * Copyright (c) 2016 Ivan Grokhotkov. All rights reserved. 3 | * This file is distributed under MIT license. 4 | */ 5 | 6 | #include 7 | #include "umm_malloc/umm_malloc.h" 8 | #include 9 | 10 | void* ICACHE_RAM_ATTR pvPortMalloc(size_t size, const char* file, int line) 11 | { 12 | return malloc(size); 13 | } 14 | 15 | void ICACHE_RAM_ATTR vPortFree(void *ptr, const char* file, int line) 16 | { 17 | free(ptr); 18 | } 19 | 20 | void* ICACHE_RAM_ATTR pvPortCalloc(size_t count, size_t size, const char* file, int line) 21 | { 22 | return calloc(count, size); 23 | } 24 | 25 | void* ICACHE_RAM_ATTR pvPortRealloc(void *ptr, size_t size, const char* file, int line) 26 | { 27 | return realloc(ptr, size); 28 | } 29 | 30 | void* ICACHE_RAM_ATTR pvPortZalloc(size_t size, const char* file, int line) 31 | { 32 | return calloc(1, size); 33 | } 34 | 35 | size_t xPortGetFreeHeapSize(void) 36 | { 37 | return umm_free_heap_size(); 38 | } 39 | 40 | size_t ICACHE_RAM_ATTR xPortWantedSizeAlign(size_t size) 41 | { 42 | return (size + 3) & ~((size_t) 3); 43 | } 44 | 45 | void system_show_malloc(void) 46 | { 47 | umm_info(NULL, 1); 48 | } 49 | -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/drawCircle/drawCircle.ino: -------------------------------------------------------------------------------- 1 | /* Demo of draw circle's APP 2 | drawCircle(int poX, int poY, int r,INT16U color); 3 | fillCircle(int poX, int poY, int r,INT16U color); 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | void setup() 11 | { 12 | TFT_BL_ON; //turn on the background light 13 | 14 | Tft.TFTinit(); //init TFT library 15 | 16 | Tft.drawCircle(100, 100, 30,YELLOW); //center: (100, 100), r = 30 ,color : YELLOW 17 | 18 | Tft.drawCircle(100, 200, 40,CYAN); // center: (100, 200), r = 10 ,color : CYAN 19 | 20 | Tft.fillCircle(200, 100, 30,RED); //center: (200, 100), r = 30 ,color : RED 21 | 22 | Tft.fillCircle(200, 200, 30,BLUE); //center: (200, 200), r = 30 ,color : BLUE 23 | } 24 | 25 | void loop() 26 | { 27 | 28 | } 29 | 30 | /********************************************************************************************************* 31 | END FILE 32 | *********************************************************************************************************/ -------------------------------------------------------------------------------- /libraries/Ethernet/src/EthernetClient.h: -------------------------------------------------------------------------------- 1 | #ifndef ethernetclient_h 2 | #define ethernetclient_h 3 | #include "Arduino.h" 4 | #include "Print.h" 5 | #include "Client.h" 6 | #include "IPAddress.h" 7 | 8 | class EthernetClient : public Client { 9 | 10 | public: 11 | EthernetClient(); 12 | EthernetClient(uint8_t sock); 13 | 14 | uint8_t status(); 15 | virtual int connect(IPAddress ip, uint16_t port); 16 | virtual int connect(const char *host, uint16_t port); 17 | virtual size_t write(uint8_t); 18 | virtual size_t write(const uint8_t *buf, size_t size); 19 | virtual int available(); 20 | virtual int read(); 21 | virtual int read(uint8_t *buf, size_t size); 22 | virtual int peek(); 23 | virtual void flush(); 24 | virtual void stop(); 25 | virtual uint8_t connected(); 26 | virtual operator bool(); 27 | virtual bool operator==(const bool value) { return bool() == value; } 28 | virtual bool operator!=(const bool value) { return bool() != value; } 29 | virtual bool operator==(const EthernetClient&); 30 | virtual bool operator!=(const EthernetClient& rhs) { return !this->operator==(rhs); }; 31 | 32 | friend class EthernetServer; 33 | 34 | using Print::write; 35 | 36 | private: 37 | static uint16_t _srcport; 38 | uint8_t _sock; 39 | }; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /cores/esp8266/sigma_delta.h: -------------------------------------------------------------------------------- 1 | /* 2 | sigma_delta.h - esp8266 sigma-delta source 3 | 4 | Copyright (c) 2014 Ivan Grokhotkov. All rights reserved. 5 | This file is part of the esp8266 core for Arduino environment. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library; if not, write to the Free Software 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef SIGMA_DELTA_H 23 | #define SIGMA_DELTA_H 24 | 25 | #include 26 | 27 | void sigma_delta_close(uint32_t gpio); 28 | void set_sigma_target(uint8_t target); 29 | void set_sigma_prescale(uint8_t prescale); 30 | void set_sigma_duty_312KHz(uint8_t duty); 31 | 32 | #endif//SIGMA_DELTA_H 33 | -------------------------------------------------------------------------------- /libraries/ESP8266SSDP/README.md: -------------------------------------------------------------------------------- 1 | ESP8266 Simple Service Discovery 2 | Copyright (c) 2015 Hristo Gochkov 3 | Original (Arduino) version by Filippo Sallemi, July 23, 2014. 4 | Can be found at: https://github.com/nomadnt/uSSDP 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/text/text.ino: -------------------------------------------------------------------------------- 1 | /* draw text's APP 2 | drawChar(INT8U ascii,INT16U poX, INT16U poY,INT16U size, INT16U fgcolor); 3 | drawString(char *string,INT16U poX, INT16U poY,INT16U size,INT16U fgcolor); 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | void setup() 11 | { 12 | TFT_BL_ON; // turn on the background light 13 | Tft.TFTinit(); // init TFT library 14 | 15 | Tft.drawChar('S',0,0,1,RED); // draw char: 'S', (0, 0), size: 1, color: RED 16 | 17 | Tft.drawChar('E',10,10,2,BLUE); // draw char: 'E', (10, 10), size: 2, color: BLUE 18 | 19 | Tft.drawChar('E',20,40,3,GREEN); // draw char: 'E', (20, 40), size: 3, color: GREEN 20 | 21 | Tft.drawChar('E',30,80,4,YELLOW); // draw char: 'E', (30, 80), size: 4, color: YELLOW 22 | 23 | Tft.drawChar('D',40,120,4,YELLOW); // draw char: 'D', (40, 120), size: 4, color: YELLOW 24 | 25 | Tft.drawString("Hello",0,180,3,CYAN); // draw string: "hello", (0, 180), size: 3, color: CYAN 26 | 27 | Tft.drawString("World!!",60,220,4,WHITE); // draw string: "world!!", (80, 230), size: 4, color: WHITE 28 | 29 | 30 | } 31 | 32 | void loop() 33 | { 34 | 35 | } 36 | -------------------------------------------------------------------------------- /libraries/Servo/examples/Sweep/Sweep.ino: -------------------------------------------------------------------------------- 1 | /* Sweep 2 | by BARRAGAN 3 | This example code is in the public domain. 4 | 5 | modified 28 May 2015 6 | by Michael C. Miller 7 | modified 8 Nov 2013 8 | by Scott Fitzgerald 9 | 10 | http://arduino.cc/en/Tutorial/Sweep 11 | */ 12 | 13 | #include 14 | 15 | Servo myservo; // create servo object to control a servo 16 | // twelve servo objects can be created on most boards 17 | 18 | 19 | void setup() 20 | { 21 | myservo.attach(2); // attaches the servo on GIO2 to the servo object 22 | } 23 | 24 | void loop() 25 | { 26 | int pos; 27 | 28 | for(pos = 0; pos <= 180; pos += 1) // goes from 0 degrees to 180 degrees 29 | { // in steps of 1 degree 30 | myservo.write(pos); // tell servo to go to position in variable 'pos' 31 | delay(15); // waits 15ms for the servo to reach the position 32 | } 33 | for(pos = 180; pos>=0; pos-=1) // goes from 180 degrees to 0 degrees 34 | { 35 | myservo.write(pos); // tell servo to go to position in variable 'pos' 36 | delay(15); // waits 15ms for the servo to reach the position 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /cores/esp8266/base64.h: -------------------------------------------------------------------------------- 1 | /** 2 | * base64.h 3 | * 4 | * Created on: 09.12.2015 5 | * 6 | * Copyright (c) 2015 Markus Sattler. All rights reserved. 7 | * This file is part of the ESP8266 core for Arduino. 8 | * 9 | * This library is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 22 | * 23 | */ 24 | 25 | #ifndef CORE_BASE64_H_ 26 | #define CORE_BASE64_H_ 27 | 28 | class base64 { 29 | public: 30 | static String encode(uint8_t * data, size_t length); 31 | static String encode(String text); 32 | private: 33 | }; 34 | 35 | 36 | #endif /* CORE_BASE64_H_ */ 37 | -------------------------------------------------------------------------------- /tests/host/common/spiffs_mock.h: -------------------------------------------------------------------------------- 1 | /* 2 | spiffs_mock.h - SPIFFS HAL mock for host side testing 3 | Copyright © 2016 Ivan Grokhotkov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | */ 15 | 16 | #ifndef spiffs_mock_hpp 17 | #define spiffs_mock_hpp 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | class SpiffsMock { 25 | public: 26 | SpiffsMock(size_t fs_size, size_t fs_block, size_t fs_page); 27 | void reset(); 28 | ~SpiffsMock(); 29 | 30 | protected: 31 | std::vector m_fs; 32 | }; 33 | 34 | #define SPIFFS_MOCK_DECLARE(size_kb, block_kb, page_b) SpiffsMock spiffs_mock(size_kb * 1024, block_kb * 1024, page_b) 35 | #define SPIFFS_MOCK_RESET() spiffs_mock.reset() 36 | 37 | 38 | #endif /* spiffs_mock_hpp */ 39 | -------------------------------------------------------------------------------- /bootloaders/eboot/flash.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015 Ivan Grokhotkov. All rights reserved. 2 | * This file is part of eboot bootloader. 3 | * 4 | * Redistribution and use is permitted according to the conditions of the 5 | * 3-clause BSD license to be found in the LICENSE file. 6 | */ 7 | 8 | #ifndef FLASH_H 9 | #define FLASH_H 10 | 11 | int SPIEraseBlock(uint32_t block); 12 | int SPIEraseSector(uint32_t sector); 13 | int SPIRead(uint32_t addr, void *dest, size_t size); 14 | int SPIWrite(uint32_t addr, void *src, size_t size); 15 | int SPIEraseAreaEx(const uint32_t start, const uint32_t size); 16 | 17 | #define FLASH_SECTOR_SIZE 0x1000 18 | #define FLASH_BLOCK_SIZE 0x10000 19 | #define APP_START_OFFSET 0x1000 20 | 21 | typedef struct { 22 | unsigned char magic; 23 | unsigned char num_segments; 24 | 25 | /* SPI Flash Interface (0 = QIO, 1 = QOUT, 2 = DIO, 0x3 = DOUT) */ 26 | unsigned char flash_mode; 27 | 28 | /* High four bits: 0 = 512K, 1 = 256K, 2 = 1M, 3 = 2M, 4 = 4M, 29 | Low four bits: 0 = 40MHz, 1= 26MHz, 2 = 20MHz, 0xf = 80MHz */ 30 | unsigned char flash_size_freq; 31 | 32 | uint32_t entry; 33 | } image_header_t; 34 | 35 | 36 | typedef struct { 37 | uint32_t address; 38 | uint32_t size; 39 | } section_header_t; 40 | 41 | 42 | 43 | #endif //FLASH_H 44 | -------------------------------------------------------------------------------- /cores/esp8266/core_esp8266_features.h: -------------------------------------------------------------------------------- 1 | /* 2 | core_esp8266_features.h - list of features integrated in to ESP8266 core 3 | 4 | Copyright (c) 2014 Ivan Grokhotkov. All rights reserved. 5 | This file is part of the esp8266 core for Arduino environment. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library; if not, write to the Free Software 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 | 21 | */ 22 | 23 | 24 | #ifndef CORE_ESP8266_FEATURES_H 25 | #define CORE_ESP8266_FEATURES_H 26 | 27 | 28 | #define CORE_HAS_LIBB64 29 | #define CORE_HAS_BASE64_CLASS 30 | #define CORE_HAS_CXA_GUARD 31 | #define CORE_HAS_UMM 32 | 33 | #define WIFI_HAS_EVENT_CALLBACK 34 | 35 | 36 | 37 | 38 | #endif 39 | 40 | -------------------------------------------------------------------------------- /cores/esp8266/wiring_private.h: -------------------------------------------------------------------------------- 1 | /* 2 | wiring_private.h - Internal header file. 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2005-2006 David A. Mellis 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General 18 | Public License along with this library; if not, write to the 19 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | $Id: wiring.h 239 2007-01-12 17:58:39Z mellis $ 23 | */ 24 | 25 | #ifndef WiringPrivate_h 26 | #define WiringPrivate_h 27 | 28 | #include 29 | #include 30 | 31 | #include "Arduino.h" 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | typedef void (*voidFuncPtr)(void); 38 | 39 | void initPins(); 40 | 41 | #ifdef __cplusplus 42 | } // extern "C" 43 | #endif 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /libraries/Ethernet/src/Ethernet.h: -------------------------------------------------------------------------------- 1 | #ifndef ethernet_h 2 | #define ethernet_h 3 | 4 | #include 5 | //#include "w5100.h" 6 | #include "IPAddress.h" 7 | #include "EthernetClient.h" 8 | #include "EthernetServer.h" 9 | #include "Dhcp.h" 10 | 11 | #define MAX_SOCK_NUM 4 12 | 13 | class EthernetClass { 14 | private: 15 | IPAddress _dnsServerAddress; 16 | DhcpClass* _dhcp; 17 | public: 18 | static uint8_t _state[MAX_SOCK_NUM]; 19 | static uint16_t _server_port[MAX_SOCK_NUM]; 20 | // Initialise the Ethernet shield to use the provided MAC address and gain the rest of the 21 | // configuration through DHCP. 22 | // Returns 0 if the DHCP configuration failed, and 1 if it succeeded 23 | int begin(uint8_t *mac_address); 24 | void begin(uint8_t *mac_address, IPAddress local_ip); 25 | void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server); 26 | void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server, IPAddress gateway); 27 | void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server, IPAddress gateway, IPAddress subnet); 28 | int maintain(); 29 | 30 | IPAddress localIP(); 31 | IPAddress subnetMask(); 32 | IPAddress gatewayIP(); 33 | IPAddress dnsServerIP(); 34 | 35 | friend class EthernetClient; 36 | friend class EthernetServer; 37 | }; 38 | 39 | extern EthernetClass Ethernet; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /tools/sdk/include/upgrade.h: -------------------------------------------------------------------------------- 1 | #ifndef __UPGRADE_H__ 2 | #define __UPGRADE_H__ 3 | 4 | #define SPI_FLASH_SEC_SIZE 4096 5 | #define LIMIT_ERASE_SIZE 0x10000 6 | 7 | #define USER_BIN1 0x00 8 | #define USER_BIN2 0x01 9 | 10 | #define UPGRADE_FLAG_IDLE 0x00 11 | #define UPGRADE_FLAG_START 0x01 12 | #define UPGRADE_FLAG_FINISH 0x02 13 | 14 | #define UPGRADE_FW_BIN1 0x00 15 | #define UPGRADE_FW_BIN2 0x01 16 | 17 | typedef void (*upgrade_states_check_callback)(void * arg); 18 | 19 | //#define UPGRADE_SSL_ENABLE 20 | 21 | struct upgrade_server_info { 22 | uint8 ip[4]; 23 | uint16 port; 24 | 25 | uint8 upgrade_flag; 26 | 27 | uint8 pre_version[16]; 28 | uint8 upgrade_version[16]; 29 | 30 | uint32 check_times; 31 | uint8 *url; 32 | 33 | upgrade_states_check_callback check_cb; 34 | struct espconn *pespconn; 35 | }; 36 | 37 | #define UPGRADE_FLAG_IDLE 0x00 38 | #define UPGRADE_FLAG_START 0x01 39 | #define UPGRADE_FLAG_FINISH 0x02 40 | 41 | void system_upgrade_init(); 42 | void system_upgrade_deinit(); 43 | bool system_upgrade(uint8 *data, uint16 len); 44 | 45 | #ifdef UPGRADE_SSL_ENABLE 46 | bool system_upgrade_start_ssl(struct upgrade_server_info *server); // not supported now 47 | #else 48 | bool system_upgrade_start(struct upgrade_server_info *server); 49 | #endif 50 | #endif 51 | -------------------------------------------------------------------------------- /libraries/DNSServer/examples/DNSServer/DNSServer.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | const byte DNS_PORT = 53; 6 | IPAddress apIP(192, 168, 1, 1); 7 | DNSServer dnsServer; 8 | ESP8266WebServer webServer(80); 9 | 10 | void setup() { 11 | WiFi.mode(WIFI_AP); 12 | WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0)); 13 | WiFi.softAP("DNSServer example"); 14 | 15 | // modify TTL associated with the domain name (in seconds) 16 | // default is 60 seconds 17 | dnsServer.setTTL(300); 18 | // set which return code will be used for all other domains (e.g. sending 19 | // ServerFailure instead of NonExistentDomain will reduce number of queries 20 | // sent by clients) 21 | // default is DNSReplyCode::NonExistentDomain 22 | dnsServer.setErrorReplyCode(DNSReplyCode::ServerFailure); 23 | 24 | // start DNS server for a specific domain name 25 | dnsServer.start(DNS_PORT, "www.example.com", apIP); 26 | 27 | // simple HTTP server to see that DNS server is working 28 | webServer.onNotFound([]() { 29 | String message = "Hello World!\n\n"; 30 | message += "URI: "; 31 | message += webServer.uri(); 32 | 33 | webServer.send(200, "text/plain", message); 34 | }); 35 | webServer.begin(); 36 | } 37 | 38 | void loop() { 39 | dnsServer.processNextRequest(); 40 | webServer.handleClient(); 41 | } 42 | -------------------------------------------------------------------------------- /variants/generic/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | pins_arduino.h - Pin definition functions for Arduino 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2007 David A. Mellis 6 | Modified for ESP8266 platform by Ivan Grokhotkov, 2014-2015. 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ 24 | */ 25 | 26 | #ifndef Pins_Arduino_h 27 | #define Pins_Arduino_h 28 | 29 | #include "common.h" 30 | 31 | static const uint8_t SDA = 4; 32 | static const uint8_t SCL = 5; 33 | 34 | static const uint8_t BUILTIN_LED = 1; 35 | static const uint8_t LED_BUILTIN = 1; 36 | 37 | #endif /* Pins_Arduino_h */ 38 | -------------------------------------------------------------------------------- /variants/thing/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | pins_arduino.h - Pin definition functions for Arduino 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2007 David A. Mellis 6 | Modified for ESP8266 platform by Ivan Grokhotkov, 2014-2015. 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ 24 | */ 25 | 26 | #ifndef Pins_Arduino_h 27 | #define Pins_Arduino_h 28 | 29 | #include "../generic/common.h" 30 | 31 | static const uint8_t SDA = 2; 32 | static const uint8_t SCL = 14; 33 | 34 | static const uint8_t LED_BUILTIN = 5; 35 | static const uint8_t BUILTIN_LED = 5; 36 | 37 | #endif /* Pins_Arduino_h */ 38 | -------------------------------------------------------------------------------- /cores/esp8266/StreamString.h: -------------------------------------------------------------------------------- 1 | /** 2 | StreamString.h 3 | 4 | Copyright (c) 2015 Markus Sattler. All rights reserved. 5 | This file is part of the esp8266 core for Arduino environment. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library; if not, write to the Free Software 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 | 21 | */ 22 | 23 | #ifndef STREAMSTRING_H_ 24 | #define STREAMSTRING_H_ 25 | 26 | 27 | class StreamString: public Stream, public String { 28 | 29 | size_t write(const uint8_t *buffer, size_t size); 30 | size_t write(uint8_t data); 31 | 32 | int available(); 33 | int read(); 34 | int peek(); 35 | void flush(); 36 | 37 | }; 38 | 39 | 40 | #endif /* STREAMSTRING_H_ */ 41 | -------------------------------------------------------------------------------- /tools/sdk/lwip/include/lwip/puck_def.h: -------------------------------------------------------------------------------- 1 | /* 2 | * puck_def.h 3 | * 4 | * Created on: Jul 22, 2010 5 | * Author: dtoma 6 | */ 7 | 8 | #ifndef PUCK_DEF_H_ 9 | #define PUCK_DEF_H_ 10 | 11 | 12 | 13 | #define INSTRUMENT_PORT 8760 14 | 15 | #define INSTRUMENT_LENGTH 80 16 | 17 | #define MDNS_NAME_LENGTH 68 //68 18 | 19 | char* PUCK_SERVICE = NULL; 20 | //#define PUCK_SERVICE "_Escpressif._tcp.local" 21 | #define DNS_SD_SERVICE "_services._dns-sd._udp.local" 22 | #define SERVICE_DESCRIPTION "PUCK PROTOCOL" 23 | #define PUCK_SERVICE_LENGTH 30 24 | 25 | #define UUID_LEN 16 26 | #define DS_VERS_LEN 2 27 | #define DS_SIZE_LEN 2 28 | #define MAN_ID_LEN 4 29 | #define MAN_MODEL_LEN 2 30 | #define MAN_VERS_LEN 2 31 | #define SER_NUM_LEN 4 32 | #define NAME_LEN 64 33 | #define PUCK_DATASHEET_SIZE 96 34 | 35 | #define UUID_OFFSET 0 36 | #define DS_VERS_OFFSET UUID_LEN + UUID_OFFSET 37 | #define DS_SIZE_OFFSET DS_VERS_LEN + DS_VERS_OFFSET 38 | #define MAN_ID_OFFSET DS_SIZE_LEN + DS_SIZE_OFFSET 39 | #define MAN_MODEL_OFFSET MAN_ID_LEN + MAN_ID_OFFSET 40 | #define MAN_VERS_OFFSET MAN_MODEL_LEN + MAN_MODEL_OFFSET 41 | #define SER_NUM_OFFSET MAN_VERS_LEN + MAN_VERS_OFFSET 42 | #define NAME_OFFSET SER_NUM_LEN + SER_NUM_OFFSET 43 | 44 | #endif /* __PUCK_DEF_H__ */ 45 | -------------------------------------------------------------------------------- /variants/espinotee/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | pins_arduino.h - Pin definition functions for Arduino 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2007 David A. Mellis 6 | Modified for ESP8266 platform by Ivan Grokhotkov, 2014-2015. 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ 24 | */ 25 | 26 | #ifndef Pins_Arduino_h 27 | #define Pins_Arduino_h 28 | 29 | #include "../generic/common.h" 30 | 31 | static const uint8_t SDA = 4; 32 | static const uint8_t SCL = 5; 33 | 34 | static const uint8_t BUILTIN_LED = 16; 35 | static const uint8_t LED_BUILTIN = 16; 36 | 37 | #endif /* Pins_Arduino_h */ 38 | -------------------------------------------------------------------------------- /bootloaders/eboot/Makefile: -------------------------------------------------------------------------------- 1 | XTENSA_TOOLCHAIN ?= ../../tools/xtensa-lx106-elf/bin/ 2 | ESPTOOL ?= ../../tools/esptool/esptool 3 | 4 | BIN_DIR := ./ 5 | TARGET_DIR := ./ 6 | 7 | TARGET_OBJ_FILES := \ 8 | eboot.o \ 9 | eboot_command.o \ 10 | 11 | 12 | TARGET_OBJ_PATHS := $(addprefix $(TARGET_DIR)/,$(TARGET_OBJ_FILES)) 13 | 14 | CC := $(XTENSA_TOOLCHAIN)xtensa-lx106-elf-gcc 15 | CXX := $(XTENSA_TOOLCHAIN)xtensa-lx106-elf-g++ 16 | AR := $(XTENSA_TOOLCHAIN)xtensa-lx106-elf-ar 17 | LD := $(XTENSA_TOOLCHAIN)xtensa-lx106-elf-gcc 18 | OBJDUMP := $(XTENSA_TOOLCHAIN)xtensa-lx106-elf-objdump 19 | 20 | 21 | CFLAGS += -std=gnu99 22 | 23 | CFLAGS += -O0 -g -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mno-text-section-literals 24 | 25 | LDFLAGS += -nostdlib -Wl,--no-check-sections -umain 26 | 27 | LD_SCRIPT := -Teboot.ld 28 | 29 | APP_OUT:= eboot.elf 30 | APP_AR := eboot.a 31 | APP_FW := eboot.bin 32 | 33 | all: $(APP_FW) 34 | 35 | $(APP_AR): $(TARGET_OBJ_PATHS) 36 | $(AR) cru $@ $^ 37 | 38 | 39 | $(APP_OUT): $(APP_AR) 40 | $(LD) $(LD_SCRIPT) $(LDFLAGS) -Wl,--start-group -Wl,--whole-archive $(APP_AR) -Wl,--end-group -o $@ 41 | 42 | $(APP_FW): $(APP_OUT) 43 | $(ESPTOOL) -vvv -eo $(APP_OUT) -bo $@ -bs .text -bs .data -bs .rodata -bc -ec || true 44 | 45 | 46 | clean: 47 | rm -f *.o 48 | rm -f $(APP_AR) 49 | rm -f $(APP_OUT) 50 | 51 | 52 | .PHONY: all clean default 53 | -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/drawLines/drawLines.ino: -------------------------------------------------------------------------------- 1 | /* Demo of draw line's APP 2 | drawLine(unsigned int x0,unsigned int y0,unsigned int x1,unsigned int y1,unsigned int color); 3 | drawVerticalLine(unsigned int poX, unsigned int poY,unsigned int length,unsigned int color); 4 | drawHorizontalLine(unsigned int poX, unsigned int poY,unsigned int length,unsigned int color); 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | void setup() 11 | { 12 | TFT_BL_ON; // turn on the background light 13 | Tft.TFTinit(); //init TFT library 14 | 15 | Tft.drawLine(0,0,239,319,RED); //start: (0, 0) end: (239, 319), color : RED 16 | 17 | Tft.drawVerticalLine(60,100,100,GREEN); // Draw a vertical line 18 | // start: (60, 100) length: 100 color: green 19 | 20 | Tft.drawHorizontalLine(30,60,150,BLUE); //Draw a horizontal line 21 | //start: (30, 60), high: 150, color: blue 22 | } 23 | 24 | void loop() 25 | { 26 | 27 | } 28 | 29 | /********************************************************************************************************* 30 | END FILE 31 | *********************************************************************************************************/ -------------------------------------------------------------------------------- /libraries/Ticker/examples/TickerBasic/TickerBasic.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Basic Ticker usage 3 | 4 | Ticker is an object that will call a given function with a certain period. 5 | Each Ticker calls one function. You can have as many Tickers as you like, 6 | memory being the only limitation. 7 | 8 | A function may be attached to a ticker and detached from the ticker. 9 | There are two variants of the attach function: attach and attach_ms. 10 | The first one takes period in seconds, the second one in milliseconds. 11 | 12 | An LED connected to GPIO1 will be blinking. Use a built-in LED on ESP-01 13 | or connect an external one to TXD on other boards. 14 | */ 15 | 16 | #include 17 | 18 | Ticker flipper; 19 | 20 | int count = 0; 21 | 22 | void flip() 23 | { 24 | int state = digitalRead(1); // get the current state of GPIO1 pin 25 | digitalWrite(1, !state); // set pin to the opposite state 26 | 27 | ++count; 28 | // when the counter reaches a certain value, start blinking like crazy 29 | if (count == 20) 30 | { 31 | flipper.attach(0.1, flip); 32 | } 33 | // when the counter reaches yet another value, stop blinking 34 | else if (count == 120) 35 | { 36 | flipper.detach(); 37 | } 38 | } 39 | 40 | void setup() { 41 | pinMode(1, OUTPUT); 42 | digitalWrite(1, LOW); 43 | 44 | // flip the pin every 0.3s 45 | flipper.attach(0.3, flip); 46 | } 47 | 48 | void loop() { 49 | } 50 | -------------------------------------------------------------------------------- /variants/adafruit/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | pins_arduino.h - Pin definition functions for Arduino 3 | Part of ESP8266 core for Arduino - https://github.com/esp8266/Arduino 4 | 5 | Copyright (c) 2007 David A. Mellis 6 | Modified for ESP8266 platform by Ivan Grokhotkov, 2014-2015. 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ 24 | */ 25 | 26 | #ifndef Pins_Arduino_h 27 | #define Pins_Arduino_h 28 | 29 | #include "../generic/common.h" 30 | 31 | static const uint8_t SDA = 4; 32 | static const uint8_t SCL = 5; 33 | 34 | static const uint8_t LED_BUILTIN = 0; 35 | static const uint8_t BUILTIN_LED = 0; 36 | 37 | #endif /* Pins_Arduino_h */ 38 | -------------------------------------------------------------------------------- /libraries/ESP8266WiFi/examples/WiFiScan/WiFiScan.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * This sketch demonstrates how to scan WiFi networks. 3 | * The API is almost the same as with the WiFi Shield library, 4 | * the most obvious difference being the different file you need to include: 5 | */ 6 | #include "ESP8266WiFi.h" 7 | 8 | void setup() { 9 | Serial.begin(115200); 10 | 11 | // Set WiFi to station mode and disconnect from an AP if it was previously connected 12 | WiFi.mode(WIFI_STA); 13 | WiFi.disconnect(); 14 | delay(100); 15 | 16 | Serial.println("Setup done"); 17 | } 18 | 19 | void loop() { 20 | Serial.println("scan start"); 21 | 22 | // WiFi.scanNetworks will return the number of networks found 23 | int n = WiFi.scanNetworks(); 24 | Serial.println("scan done"); 25 | if (n == 0) 26 | Serial.println("no networks found"); 27 | else 28 | { 29 | Serial.print(n); 30 | Serial.println(" networks found"); 31 | for (int i = 0; i < n; ++i) 32 | { 33 | // Print SSID and RSSI for each network found 34 | Serial.print(i + 1); 35 | Serial.print(": "); 36 | Serial.print(WiFi.SSID(i)); 37 | Serial.print(" ("); 38 | Serial.print(WiFi.RSSI(i)); 39 | Serial.print(")"); 40 | Serial.println((WiFi.encryptionType(i) == ENC_TYPE_NONE)?" ":"*"); 41 | delay(10); 42 | } 43 | } 44 | Serial.println(""); 45 | 46 | // Wait a bit before scanning again 47 | delay(5000); 48 | } 49 | -------------------------------------------------------------------------------- /variants/ESPDuino/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | pins_arduino.h - Pin definition functions for Arduino 3 | Part of Arduino - http://www.arduino.cc/ 4 | Copyright (c) 2007 David A. Mellis 5 | Modified for ESP8266 platform by Ivan Grokhotkov, 2014-2015. 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | You should have received a copy of the GNU Lesser General 15 | Public License along with this library; if not, write to the 16 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 17 | Boston, MA 02111-1307 USA 18 | $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ 19 | */ 20 | /* 21 | Modified by Doit.am team 22 | www.doit.am 23 | */ 24 | 25 | #ifndef Pins_Arduino_h 26 | #define Pins_Arduino_h 27 | 28 | #include "../generic/common.h" 29 | 30 | static const uint8_t SDA = 4; 31 | static const uint8_t SCL = 5; 32 | 33 | static const uint8_t LED_BUILTIN = 16; 34 | static const uint8_t BUILTIN_LED = 16; 35 | 36 | #endif /* Pins_Arduino_h */ 37 | -------------------------------------------------------------------------------- /variants/espresso_lite_v2/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | pins_arduino.h - Pin definition functions for Arduino 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2007 David A. Mellis 6 | Modified for ESP8266 platform by Ivan Grokhotkov, 2014-2015. 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ 24 | */ 25 | 26 | #ifndef Pins_Arduino_h 27 | #define Pins_Arduino_h 28 | 29 | #include "../generic/common.h" 30 | 31 | #define ESPRESSO_LITE_VERSION 2 32 | 33 | static const uint8_t SDA = 4; 34 | static const uint8_t SCL = 5; 35 | 36 | static const uint8_t LED_BUILTIN = 2; 37 | static const uint8_t BUILTIN_LED = 2; 38 | 39 | #endif /* Pins_Arduino_h */ 40 | -------------------------------------------------------------------------------- /variants/espresso_lite_v1/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | pins_arduino.h - Pin definition functions for Arduino 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2007 David A. Mellis 6 | Modified for ESP8266 platform by Ivan Grokhotkov, 2014-2015. 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ 24 | */ 25 | 26 | #ifndef Pins_Arduino_h 27 | #define Pins_Arduino_h 28 | 29 | #include "../generic/common.h" 30 | 31 | #define ESPRESSO_LITE_VERSION 1 32 | 33 | static const uint8_t SDA = 4; 34 | static const uint8_t SCL = 5; 35 | 36 | static const uint8_t LED_BUILTIN = 16; 37 | static const uint8_t BUILTIN_LED = 16; 38 | 39 | #endif /* Pins_Arduino_h */ 40 | -------------------------------------------------------------------------------- /doc/eclipse/makefile.init: -------------------------------------------------------------------------------- 1 | vecho := @echo 2 | Q := @ 3 | 4 | PROJECT_NAME=project_name 5 | 6 | OTA_IP=192.168.254.100 7 | OTA_PORT=8266 8 | 9 | SERIAL_PORT=COM3 10 | SERIAL_BAUD=230400 11 | 12 | ARDUINO_BASE = D:/Coding/avr/Programme/arduino-nightly 13 | ESP8266_BASE = $(ARDUINO_BASE)/hardware/esp8266com/esp8266 14 | ESP8266_TOOLS = $(ESP8266_BASE)/tools 15 | XTENSA_TOOLS_ROOT = $(ESP8266_TOOLS)/xtensa-lx106-elf/bin 16 | 17 | PYTHON_BIN = python 18 | ESPTOOL_PY_BIN = $(ESP8266_TOOLS)/esptool.py 19 | ESPOTA_PY_BIN = $(ESP8266_TOOLS)/espota.py 20 | ESPTOOL_BIN = $(ESP8266_TOOLS)/esptool/esptool.exe 21 | 22 | ota: 23 | $(vecho) ota... 24 | $(PYTHON_BIN) $(ESPOTA_PY_BIN) -i $(OTA_IP) -p $(OTA_PORT) --auth= -f ./$(PROJECT_NAME).bin 25 | 26 | ota_spiffs: 27 | $(vecho) ota spiffs... 28 | $(PYTHON_BIN) $(ESPOTA_PY_BIN) -i $(OTA_IP) -p $(OTA_PORT) --auth= -s -f ./$(PROJECT_NAME)_spiffs.bin 29 | 30 | erase_flash: 31 | $(vecho) "Erase Flash" 32 | $(PYTHON_BIN) $(ESPTOOL_PY_BIN) -p $(SERIAL_PORT) -b $(SERIAL_BAUD) erase_flash 33 | 34 | dumpmem: 35 | $(vecho) "Read Flash need some time..." 36 | $(PYTHON_BIN) $(ESPTOOL_PY_BIN) -p $(SERIAL_PORT) -b $(SERIAL_BAUD) read_flash 0 4194304 dump.bin 37 | 38 | objdump: 39 | "$(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-objdump" -S $(PROJECT_NAME).elf > $(PROJECT_NAME).dobj 40 | -------------------------------------------------------------------------------- /cores/esp8266/umm_malloc/umm_malloc.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | * umm_malloc.h - a memory allocator for embedded systems (microcontrollers) 3 | * 4 | * See copyright notice in LICENSE.TXT 5 | * ---------------------------------------------------------------------------- 6 | */ 7 | 8 | #ifndef UMM_MALLOC_H 9 | #define UMM_MALLOC_H 10 | 11 | /* ------------------------------------------------------------------------ */ 12 | 13 | #include "umm_malloc_cfg.h" /* user-dependent */ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | typedef struct UMM_HEAP_INFO_t { 20 | unsigned short int totalEntries; 21 | unsigned short int usedEntries; 22 | unsigned short int freeEntries; 23 | 24 | unsigned short int totalBlocks; 25 | unsigned short int usedBlocks; 26 | unsigned short int freeBlocks; 27 | 28 | unsigned short int maxFreeContiguousBlocks; 29 | } 30 | UMM_HEAP_INFO; 31 | 32 | extern UMM_HEAP_INFO ummHeapInfo; 33 | 34 | void umm_init( void ); 35 | 36 | void *umm_info( void *ptr, int force ); 37 | 38 | void *umm_malloc( size_t size ); 39 | void *umm_calloc( size_t num, size_t size ); 40 | void *umm_realloc( void *ptr, size_t size ); 41 | void umm_free( void *ptr ); 42 | 43 | size_t umm_free_heap_size( void ); 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | /* ------------------------------------------------------------------------ */ 50 | 51 | #endif /* UMM_MALLOC_H */ 52 | -------------------------------------------------------------------------------- /cores/esp8266/core_esp8266_wiring_analog.c: -------------------------------------------------------------------------------- 1 | /* 2 | analog.c - analogRead implementation for esp8266 3 | 4 | Copyright (c) 2015 Hristo Gochkov. All rights reserved. 5 | This file is part of the esp8266 core for Arduino environment. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library; if not, write to the Free Software 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 | 21 | 22 | 18/06/2015 analogRead bugfix by Testato 23 | */ 24 | 25 | #include "wiring_private.h" 26 | #include "pins_arduino.h" 27 | 28 | 29 | extern int __analogRead(uint8_t pin) 30 | { 31 | // accept both A0 constant and ADC channel number 32 | if(pin == 17 || pin == 0) { 33 | return system_adc_read(); 34 | } 35 | return digitalRead(pin) * 1023; 36 | } 37 | 38 | extern int analogRead(uint8_t pin) __attribute__ ((weak, alias("__analogRead"))); 39 | -------------------------------------------------------------------------------- /libraries/Ethernet/src/Dns.h: -------------------------------------------------------------------------------- 1 | // Arduino DNS client for WizNet5100-based Ethernet shield 2 | // (c) Copyright 2009-2010 MCQN Ltd. 3 | // Released under Apache License, version 2.0 4 | 5 | #ifndef DNSClient_h 6 | #define DNSClient_h 7 | 8 | #include 9 | 10 | class DNSClient 11 | { 12 | public: 13 | // ctor 14 | void begin(const IPAddress& aDNSServer); 15 | 16 | /** Convert a numeric IP address string into a four-byte IP address. 17 | @param aIPAddrString IP address to convert 18 | @param aResult IPAddress structure to store the returned IP address 19 | @result 1 if aIPAddrString was successfully converted to an IP address, 20 | else error code 21 | */ 22 | int inet_aton(const char *aIPAddrString, IPAddress& aResult); 23 | 24 | /** Resolve the given hostname to an IP address. 25 | @param aHostname Name to be resolved 26 | @param aResult IPAddress structure to store the returned IP address 27 | @result 1 if aIPAddrString was successfully converted to an IP address, 28 | else error code 29 | */ 30 | int getHostByName(const char* aHostname, IPAddress& aResult); 31 | 32 | protected: 33 | uint16_t BuildRequest(const char* aName); 34 | uint16_t ProcessResponse(uint16_t aTimeout, IPAddress& aAddress); 35 | 36 | IPAddress iDNSServer; 37 | uint16_t iRequestId; 38 | EthernetUDP iUdp; 39 | }; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /cores/esp8266/Printable.h: -------------------------------------------------------------------------------- 1 | /* 2 | Printable.h - Interface class that allows printing of complex types 3 | Copyright (c) 2011 Adrian McEwen. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef Printable_h 21 | #define Printable_h 22 | 23 | #include 24 | 25 | class Print; 26 | 27 | /** The Printable class provides a way for new classes to allow themselves to be printed. 28 | By deriving from Printable and implementing the printTo method, it will then be possible 29 | for users to print out instances of this class by passing them into the usual 30 | Print::print and Print::println methods. 31 | */ 32 | 33 | class Printable { 34 | public: 35 | virtual size_t printTo(Print& p) const = 0; 36 | }; 37 | 38 | #endif 39 | 40 | -------------------------------------------------------------------------------- /libraries/ESP8266WiFiMesh/examples/HelloMesh/HelloMesh.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | unsigned int request_i = 0; 5 | unsigned int response_i = 0; 6 | 7 | String manageRequest(String request); 8 | 9 | /* Create the mesh node object */ 10 | ESP8266WiFiMesh mesh_node = ESP8266WiFiMesh(ESP.getChipId(), manageRequest); 11 | 12 | /** 13 | * Callback for when other nodes send you data 14 | * 15 | * @request The string received from another node in the mesh 16 | * @returns The string to send back to the other node 17 | */ 18 | String manageRequest(String request) 19 | { 20 | /* Print out received message */ 21 | Serial.print("received: "); 22 | Serial.println(request); 23 | 24 | /* return a string to send back */ 25 | char response[60]; 26 | sprintf(response, "Hello world response #%d from Mesh_Node%d.", response_i++, ESP.getChipId()); 27 | return response; 28 | } 29 | 30 | void setup() 31 | { 32 | Serial.begin(115200); 33 | delay(10); 34 | 35 | Serial.println(); 36 | Serial.println(); 37 | Serial.println("Setting up mesh node..."); 38 | 39 | /* Initialise the mesh node */ 40 | mesh_node.begin(); 41 | } 42 | 43 | void loop() 44 | { 45 | /* Accept any incoming connections */ 46 | mesh_node.acceptRequest(); 47 | 48 | /* Scan for other nodes and send them a message */ 49 | char request[60]; 50 | sprintf(request, "Hello world request #%d from Mesh_Node%d.", request_i++, ESP.getChipId()); 51 | mesh_node.attemptScan(request); 52 | delay(1000); 53 | } 54 | -------------------------------------------------------------------------------- /cores/esp8266/debug.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | debug.cpp - debug helper functions 3 | Copyright (c) 2015 Markus Sattler. All rights reserved. 4 | This file is part of the esp8266 core for Arduino environment. 5 | 6 | This library is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU Lesser General Public 8 | License as published by the Free Software Foundation; either 9 | version 2.1 of the License, or (at your option) any later version. 10 | 11 | This library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | Lesser General Public License for more details. 15 | 16 | You should have received a copy of the GNU Lesser General Public 17 | License along with this library; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #include "Arduino.h" 22 | #include "debug.h" 23 | 24 | void ICACHE_RAM_ATTR hexdump(uint8_t *mem, uint32_t len, uint8_t cols) { 25 | os_printf("\n[HEXDUMP] Address: 0x%08X len: 0x%X (%d)", (size_t)mem, len, len); 26 | for(uint32_t i = 0; i < len; i++) { 27 | if(i % cols == 0) { 28 | os_printf("\n[0x%08X] 0x%08X: ", (size_t)mem, i); 29 | yield(); 30 | } 31 | os_printf("%02X ", *mem); 32 | mem++; 33 | } 34 | os_printf("\n"); 35 | } 36 | 37 | -------------------------------------------------------------------------------- /bootloaders/eboot/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Ivan Grokhotkov 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 3. The name of the authors may not be used to endorse or promote products 13 | derived from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 16 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 17 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 18 | SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 20 | OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 23 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 24 | OF SUCH DAMAGE. 25 | 26 | Authors: Ivan Grokhotkov 27 | -------------------------------------------------------------------------------- /libraries/ESP8266SSDP/examples/SSDP/SSDP.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | const char* ssid = "************"; 6 | const char* password = "***********"; 7 | 8 | ESP8266WebServer HTTP(80); 9 | 10 | void setup() { 11 | Serial.begin(115200); 12 | Serial.println(); 13 | Serial.println("Starting WiFi..."); 14 | 15 | WiFi.mode(WIFI_STA); 16 | WiFi.begin(ssid, password); 17 | if(WiFi.waitForConnectResult() == WL_CONNECTED){ 18 | 19 | Serial.printf("Starting HTTP...\n"); 20 | HTTP.on("/index.html", HTTP_GET, [](){ 21 | HTTP.send(200, "text/plain", "Hello World!"); 22 | }); 23 | HTTP.on("/description.xml", HTTP_GET, [](){ 24 | SSDP.schema(HTTP.client()); 25 | }); 26 | HTTP.begin(); 27 | 28 | Serial.printf("Starting SSDP...\n"); 29 | SSDP.setSchemaURL("description.xml"); 30 | SSDP.setHTTPPort(80); 31 | SSDP.setName("Philips hue clone"); 32 | SSDP.setSerialNumber("001788102201"); 33 | SSDP.setURL("index.html"); 34 | SSDP.setModelName("Philips hue bridge 2012"); 35 | SSDP.setModelNumber("929000226503"); 36 | SSDP.setModelURL("http://www.meethue.com"); 37 | SSDP.setManufacturer("Royal Philips Electronics"); 38 | SSDP.setManufacturerURL("http://www.philips.com"); 39 | SSDP.begin(); 40 | 41 | Serial.printf("Ready!\n"); 42 | } else { 43 | Serial.printf("WiFi Failed\n"); 44 | while(1) delay(100); 45 | } 46 | } 47 | 48 | void loop() { 49 | HTTP.handleClient(); 50 | delay(1); 51 | } 52 | -------------------------------------------------------------------------------- /doc/eclipse/eclipse.md: -------------------------------------------------------------------------------- 1 | using Eclipse with Arduino ESP8266 2 | =========================================== 3 | 4 | ### What to Download ### 5 | - [arduino IDE](https://www.arduino.cc/en/Main/Software) 6 | - [Eclipse IDE for C/C++ Developers](http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/marsr) 7 | - [Java](http://www.java.com/) 8 | 9 | ### Setup Arduino ### 10 | see the [Readme](https://github.com/esp8266/Arduino#installing-with-boards-manager) 11 | 12 | ### Setup Eclipse ### 13 | - [step 1](http://www.baeyens.it/eclipse/how_to.shtml#/c) 14 | - [step 2](http://www.baeyens.it/eclipse/how_to.shtml#/e) 15 | - go to Window --> preferences --> Arduino 16 | - add as private hardware path the Part to the ESP8266 17 | 18 | ###### example private hardware path 19 | Windows: C:\Users\[username]\AppData\Roaming\Arduino15\packages\esp8266\hardware 20 | Linux: /home/[username]/.arduino15/packages/esp8266/hardware 21 | 22 | ### Eclipse wont build ### 23 | if eclipse dont find the path to the Compiler add to the platform.txt 24 | after: 25 | ``` 26 | version=1.6.4 27 | ``` 28 | this: 29 | ``` 30 | runtime.tools.xtensa-lx106-elf-gcc.path={runtime.platform.path}/../../../tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9 31 | runtime.tools.esptool.path={runtime.platform.path}/../../../tools/esptool/0.4.4 32 | ``` 33 | Note: 34 | - the path may changed, check the current version. 35 | - each update over the Arduino IDE will remove the fix 36 | - may not needed in future if Eclipse Plugin get an Update 37 | 38 | -------------------------------------------------------------------------------- /libraries/ESP8266SSDP/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Ultrasound 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | ESP8266SSDP KEYWORD1 10 | SSDP KEYWORD1 11 | 12 | ####################################### 13 | # Methods and Functions (KEYWORD2) 14 | ####################################### 15 | 16 | begin KEYWORD2 17 | schema KEYWORD2 18 | setName KEYWORD2 19 | setURL KEYWORD2 20 | setHTTPPort KEYWORD2 21 | setSchemaURL KEYWORD2 22 | setSerialNumber KEYWORD2 23 | setModelName KEYWORD2 24 | setModelNumber KEYWORD2 25 | setModelURL KEYWORD2 26 | setManufacturer KEYWORD2 27 | setManufacturerURL KEYWORD2 28 | 29 | ####################################### 30 | # Constants (LITERAL1) 31 | ####################################### 32 | SSDP_INTERVAL LITERAL1 33 | SSDP_PORT LITERAL1 34 | SSDP_METHOD_SIZE LITERAL1 35 | SSDP_URI_SIZE LITERAL1 36 | SSDP_BUFFER_SIZE LITERAL1 37 | SSDP_BASE_SIZE LITERAL1 38 | SSDP_FRIENDLY_NAME_SIZE LITERAL1 39 | SSDP_SERIAL_NUMBER_SIZE LITERAL1 40 | SSDP_PRESENTATION_URL_SIZE LITERAL1 41 | SSDP_MODEL_NAME_SIZE LITERAL1 42 | SSDP_MODEL_URL_SIZE LITERAL1 43 | SSDP_MODEL_VERSION_SIZE LITERAL1 44 | SSDP_MANUFACTURER_SIZE LITERAL1 45 | SSDP_MANUFACTURER_URL_SIZE LITERAL1 46 | SEARCH LITERAL1 47 | NOTIFY LITERAL1 48 | BASIC LITERAL1 49 | MANAGEABLE LITERAL1 50 | SOLARPROTECTIONBLIND LITERAL1 51 | DIGITALSECURITYCAMERA LITERAL1 52 | HVAC LITERAL1 53 | LIGHTINGCONTROL LITERAL1 54 | -------------------------------------------------------------------------------- /tools/sdk/include/espnow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 -2018 Espressif System 3 | * 4 | */ 5 | 6 | #ifndef __ESPNOW_H__ 7 | #define __ESPNOW_H__ 8 | 9 | enum esp_now_role { 10 | ESP_NOW_ROLE_IDLE = 0, 11 | ESP_NOW_ROLE_CONTROLLER, 12 | ESP_NOW_ROLE_SLAVE, 13 | ESP_NOW_ROLE_MAX, 14 | }; 15 | 16 | typedef void (*esp_now_recv_cb_t)(u8 *mac_addr, u8 *data, u8 len); 17 | typedef void (*esp_now_send_cb_t)(u8 *mac_addr, u8 status); 18 | 19 | int esp_now_init(void); 20 | int esp_now_deinit(void); 21 | 22 | int esp_now_register_send_cb(esp_now_send_cb_t cb); 23 | int esp_now_unregister_send_cb(void); 24 | 25 | int esp_now_register_recv_cb(esp_now_recv_cb_t cb); 26 | int esp_now_unregister_recv_cb(void); 27 | 28 | int esp_now_send(u8 *da, u8 *data, int len); 29 | 30 | int esp_now_add_peer(u8 *mac_addr, u8 role, u8 channel, u8 *key, u8 key_len); 31 | int esp_now_del_peer(u8 *mac_addr); 32 | 33 | int esp_now_set_self_role(u8 role); 34 | int esp_now_get_self_role(void); 35 | 36 | int esp_now_set_peer_role(u8 *mac_addr, u8 role); 37 | int esp_now_get_peer_role(u8 *mac_addr); 38 | 39 | int esp_now_set_peer_channel(u8 *mac_addr, u8 channel); 40 | int esp_now_get_peer_channel(u8 *mac_addr); 41 | 42 | int esp_now_set_peer_key(u8 *mac_addr, u8 *key, u8 key_len); 43 | int esp_now_get_peer_key(u8 *mac_addr, u8 *key, u8 *key_len); 44 | 45 | u8 *esp_now_fetch_peer(bool restart); 46 | 47 | int esp_now_is_peer_exist(u8 *mac_addr); 48 | 49 | int esp_now_get_cnt_info(u8 *all_cnt, u8 *encrypt_cnt); 50 | 51 | int esp_now_set_kok(u8 *key, u8 len); 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /cores/esp8266/twi.h: -------------------------------------------------------------------------------- 1 | /* 2 | twi.h - Software I2C library for esp8266 3 | 4 | Copyright (c) 2015 Hristo Gochkov. All rights reserved. 5 | This file is part of the esp8266 core for Arduino environment. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library; if not, write to the Free Software 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | #ifndef SI2C_h 22 | #define SI2C_h 23 | #include "Arduino.h" 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | void twi_init(unsigned char sda, unsigned char scl); 30 | void twi_stop(void); 31 | void twi_setClock(unsigned int freq); 32 | void twi_setClockStretchLimit(uint32_t limit); 33 | uint8_t twi_writeTo(unsigned char address, unsigned char * buf, unsigned int len, unsigned char sendStop); 34 | uint8_t twi_readFrom(unsigned char address, unsigned char * buf, unsigned int len, unsigned char sendStop); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif -------------------------------------------------------------------------------- /cores/esp8266/md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | md5.h - exposed md5 ROM functions for esp8266 3 | 4 | Copyright (c) 2015 Hristo Gochkov. All rights reserved. 5 | This file is part of the esp8266 core for Arduino environment. 6 | 7 | original C source from https://github.com/morrissinger/ESP8266-Websocket/raw/master/MD5.h 8 | 9 | This library is free software; you can redistribute it and/or 10 | modify it under the terms of the GNU Lesser General Public 11 | License as published by the Free Software Foundation; either 12 | version 2.1 of the License, or (at your option) any later version. 13 | 14 | This library is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | Lesser General Public License for more details. 18 | 19 | You should have received a copy of the GNU Lesser General Public 20 | License along with this library; if not, write to the Free Software 21 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 22 | */ 23 | #ifndef __ESP8266_MD5__ 24 | #define __ESP8266_MD5__ 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | typedef struct { 31 | uint32_t state[4]; 32 | uint32_t count[2]; 33 | uint8_t buffer[64]; 34 | } md5_context_t; 35 | 36 | extern void MD5Init (md5_context_t *); 37 | extern void MD5Update (md5_context_t *, uint8_t *, uint16_t); 38 | extern void MD5Final (uint8_t [16], md5_context_t *); 39 | 40 | #ifdef __cplusplus 41 | } // extern "C" 42 | #endif 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For SeeedTft2.0 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | Tft KEYWORD1 9 | TFTv2 KEYWORD1 10 | ####################################### 11 | # Methods and Functions (KEYWORD2) 12 | ####################################### 13 | TFTinit KEYWORD2 14 | setCol KEYWORD2 15 | setPage KEYWORD2 16 | setXY KEYWORD2 17 | setPixel KEYWORD2 18 | sendCMD KEYWORD2 19 | WRITE_Package KEYWORD2 20 | WRITE_DATA KEYWORD2 21 | sendData KEYWORD2 22 | Read_Register KEYWORD2 23 | fillScreen KEYWORD2 24 | drawChar KEYWORD2 25 | drawString KEYWORD2 26 | fillRectangle KEYWORD2 27 | drawLine KEYWORD2 28 | drawVerticalLine KEYWORD2 29 | drawHorizontalLine KEYWORD2 30 | drawRectangle KEYWORD2 31 | drawCircle KEYWORD2 32 | fillCircle KEYWORD2 33 | drawTraingle KEYWORD2 34 | drawNumber KEYWORD2 35 | drawFloat KEYWORD2 36 | 37 | ####################################### 38 | # Constants (LITERAL1) 39 | ####################################### 40 | RED LITERAL1 41 | GREEN LITERAL1 42 | BLUE LITERAL1 43 | BLACK LITERAL1 44 | YELLOW LITERAL1 45 | WHITE LITERAL1 46 | CYAN LITERAL1 47 | BRIGHT_RED LITERAL1 48 | GRAY1 LITERAL1 49 | GRAY2 LITERAL1 50 | MIN_X LITERAL1 51 | MIN_Y LITERAL1 52 | MAX_X LITERAL1 53 | MAX_Y LITERAL1 54 | TFT_BL_ON LITERAL1 55 | TFT_BL_OFF LITERAL1 56 | TFT_CS_LOW LITERAL1 57 | TFT_CS_HIGH LITERAL1 58 | TFT_DC_LOW LITERAL1 59 | TFT_DC_HIGH LITERAL1 60 | RED LITERAL1 61 | RED LITERAL1 -------------------------------------------------------------------------------- /bootloaders/eboot/flash.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015 Ivan Grokhotkov. All rights reserved. 2 | * This file is part of eboot bootloader. 3 | * 4 | * Redistribution and use is permitted according to the conditions of the 5 | * 3-clause BSD license to be found in the LICENSE file. 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include "flash.h" 12 | 13 | 14 | int SPIEraseAreaEx(const uint32_t start, const uint32_t size) 15 | { 16 | if (start & (FLASH_SECTOR_SIZE - 1) != 0) { 17 | return 1; 18 | } 19 | 20 | const uint32_t sectors_per_block = FLASH_BLOCK_SIZE / FLASH_SECTOR_SIZE; 21 | uint32_t current_sector = start / FLASH_SECTOR_SIZE; 22 | uint32_t sector_count = (size + FLASH_SECTOR_SIZE - 1) / FLASH_SECTOR_SIZE; 23 | const uint32_t end = current_sector + sector_count; 24 | 25 | for (; current_sector < end && (current_sector & (sectors_per_block-1)); 26 | ++current_sector, --sector_count) { 27 | if (SPIEraseSector(current_sector)) { 28 | return 2; 29 | } 30 | } 31 | 32 | for (;current_sector + sectors_per_block <= end; 33 | current_sector += sectors_per_block, 34 | sector_count -= sectors_per_block) { 35 | if (SPIEraseBlock(current_sector / sectors_per_block)) { 36 | return 3; 37 | } 38 | } 39 | 40 | for (; current_sector < end; 41 | ++current_sector, --sector_count) { 42 | if (SPIEraseSector(current_sector)) { 43 | return 4; 44 | } 45 | } 46 | 47 | return 0; 48 | } 49 | 50 | -------------------------------------------------------------------------------- /cores/esp8266/interrupts.h: -------------------------------------------------------------------------------- 1 | #ifndef INTERRUPTS_H 2 | #define INTERRUPTS_H 3 | 4 | #include 5 | #include 6 | extern "C" { 7 | #include "c_types.h" 8 | #include "ets_sys.h" 9 | } 10 | 11 | // these auto classes wrap up xt_rsil so your code can be simplier, but can only be 12 | // used in an ino or cpp files. 13 | 14 | // InterruptLock is used when you want to completely disable locks 15 | //{ 16 | // { 17 | // InterruptLock lock; 18 | // // do work within interrupt lock here 19 | // } 20 | // do work outside of interrupt lock here outside its scope 21 | //} 22 | // 23 | 24 | class InterruptLock { 25 | public: 26 | InterruptLock() { 27 | _state = xt_rsil(15); 28 | } 29 | 30 | ~InterruptLock() { 31 | xt_wsr_ps(_state); 32 | } 33 | 34 | uint32_t savedInterruptLevel() const { 35 | return _state & 0x0f; 36 | } 37 | 38 | protected: 39 | uint32_t _state; 40 | }; 41 | 42 | // AutoInterruptLock is when you need to set a specific level, A normal use pattern is like 43 | // 44 | //{ 45 | // { 46 | // AutoInterruptLock(1); // this routine will allow level 2 and above 47 | // // do work within interrupt lock here 48 | // } 49 | // do work outside of interrupt lock here outside its scope 50 | //} 51 | // 52 | #define AutoInterruptLock(intrLevel) \ 53 | class _AutoDisableIntr { \ 54 | public: \ 55 | _AutoDisableIntr() { _savedPS = xt_rsil(intrLevel); } \ 56 | ~_AutoDisableIntr() { xt_wsr_ps(_savedPS); } \ 57 | private: \ 58 | uint32_t _savedPS; \ 59 | }; \ 60 | _AutoDisableIntr _autoDisableIntr 61 | 62 | #endif //INTERRUPTS_H 63 | -------------------------------------------------------------------------------- /cores/esp8266/stdlib_noniso.h: -------------------------------------------------------------------------------- 1 | /* 2 | stdlib_noniso.h - nonstandard (but usefull) conversion functions 3 | 4 | Copyright (c) 2014 Ivan Grokhotkov. All rights reserved. 5 | This file is part of the esp8266 core for Arduino environment. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library; if not, write to the Free Software 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef STDLIB_NONISO_H 23 | #define STDLIB_NONISO_H 24 | 25 | #ifdef __cplusplus 26 | extern "C"{ 27 | #endif 28 | 29 | int atoi(const char *s); 30 | 31 | long atol(const char* s); 32 | 33 | double atof(const char* s); 34 | 35 | char* itoa (int val, char *s, int radix); 36 | 37 | char* ltoa (long val, char *s, int radix); 38 | 39 | char* utoa (unsigned int val, char *s, int radix); 40 | 41 | char* ultoa (unsigned long val, char *s, int radix); 42 | 43 | char* dtostrf (double val, signed char width, unsigned char prec, char *s); 44 | 45 | #ifdef __cplusplus 46 | } // extern "C" 47 | #endif 48 | 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /tools/sdk/lwip/include/lwip/sntp.h: -------------------------------------------------------------------------------- 1 | #ifndef LWIP_SNTP_H 2 | #define LWIP_SNTP_H 3 | 4 | #include "lwip/opt.h" 5 | #include "lwip/ip_addr.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | /** The maximum number of SNTP servers that can be set */ 12 | #ifndef SNTP_MAX_SERVERS 13 | #define SNTP_MAX_SERVERS 3 14 | #endif 15 | 16 | /** Set this to 1 to implement the callback function called by dhcp when 17 | * NTP servers are received. */ 18 | #ifndef SNTP_GET_SERVERS_FROM_DHCP 19 | #define SNTP_GET_SERVERS_FROM_DHCP 0//LWIP_DHCP_GET_NTP_SRV 20 | #endif 21 | 22 | /* Set this to 1 to support DNS names (or IP address strings) to set sntp servers */ 23 | #ifndef SNTP_SERVER_DNS 24 | #define SNTP_SERVER_DNS 1 25 | #endif 26 | 27 | /** One server address/name can be defined as default if SNTP_SERVER_DNS == 1: 28 | * #define SNTP_SERVER_ADDRESS "pool.ntp.org" 29 | */ 30 | uint32 sntp_get_current_timestamp(); 31 | char* sntp_get_real_time(long t); 32 | 33 | void sntp_init(void); 34 | void sntp_stop(void); 35 | 36 | sint8 sntp_get_timezone(void); 37 | bool sntp_set_timezone(sint8 timezone); 38 | void sntp_setserver(u8_t idx, ip_addr_t *addr); 39 | ip_addr_t sntp_getserver(u8_t idx); 40 | 41 | #if SNTP_SERVER_DNS 42 | void sntp_setservername(u8_t idx, char *server); 43 | char *sntp_getservername(u8_t idx); 44 | #endif /* SNTP_SERVER_DNS */ 45 | 46 | #if SNTP_GET_SERVERS_FROM_DHCP 47 | void sntp_servermode_dhcp(int set_servers_from_dhcp); 48 | #else /* SNTP_GET_SERVERS_FROM_DHCP */ 49 | #define sntp_servermode_dhcp(x) 50 | #endif /* SNTP_GET_SERVERS_FROM_DHCP */ 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif /* LWIP_SNTP_H */ 57 | -------------------------------------------------------------------------------- /tools/sdk/include/mem.h: -------------------------------------------------------------------------------- 1 | #ifndef __MEM_H__ 2 | #define __MEM_H__ 3 | 4 | /* Note: check_memleak_debug_enable is a weak function inside SDK. 5 | * please copy following codes to user_main.c. 6 | #include "mem.h" 7 | 8 | bool ICACHE_FLASH_ATTR check_memleak_debug_enable(void) 9 | { 10 | return MEMLEAK_DEBUG_ENABLE; 11 | } 12 | */ 13 | 14 | #ifndef MEMLEAK_DEBUG 15 | #define MEMLEAK_DEBUG_ENABLE 0 16 | #define os_free(s) vPortFree(s, "", 0) 17 | #define os_malloc(s) pvPortMalloc(s, "", 0) 18 | #define os_calloc(s) pvPortCalloc(s, "", 0); 19 | #define os_realloc(p, s) pvPortRealloc(p, s, "", 0) 20 | #define os_zalloc(s) pvPortZalloc(s, "", 0) 21 | #else 22 | #define MEMLEAK_DEBUG_ENABLE 1 23 | 24 | #define os_free(s) \ 25 | do{\ 26 | static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \ 27 | vPortFree(s, mem_debug_file, __LINE__);\ 28 | }while(0) 29 | 30 | #define os_malloc(s) \ 31 | ({ \ 32 | static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \ 33 | pvPortMalloc(s, mem_debug_file, __LINE__); \ 34 | }) 35 | 36 | #define os_calloc(s) \ 37 | ({ \ 38 | static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \ 39 | pvPortCalloc(s, mem_debug_file, __LINE__); \ 40 | }) 41 | 42 | #define os_realloc(p, s) \ 43 | ({ \ 44 | static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \ 45 | pvPortRealloc(p, s, mem_debug_file, __LINE__); \ 46 | }) 47 | 48 | #define os_zalloc(s) \ 49 | ({ \ 50 | static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__; \ 51 | pvPortZalloc(s, mem_debug_file, __LINE__); \ 52 | }) 53 | 54 | #endif 55 | 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /libraries/ESP8266HTTPClient/examples/ReuseConnection/ReuseConnection.ino: -------------------------------------------------------------------------------- 1 | /** 2 | * reuseConnection.ino 3 | * 4 | * Created on: 22.11.2015 5 | * 6 | */ 7 | 8 | 9 | #include 10 | 11 | #include 12 | #include 13 | 14 | #include 15 | 16 | #define USE_SERIAL Serial 17 | 18 | ESP8266WiFiMulti WiFiMulti; 19 | 20 | HTTPClient http; 21 | 22 | void setup() { 23 | 24 | USE_SERIAL.begin(115200); 25 | // USE_SERIAL.setDebugOutput(true); 26 | 27 | USE_SERIAL.println(); 28 | USE_SERIAL.println(); 29 | USE_SERIAL.println(); 30 | 31 | for(uint8_t t = 4; t > 0; t--) { 32 | USE_SERIAL.printf("[SETUP] WAIT %d...\n", t); 33 | USE_SERIAL.flush(); 34 | delay(1000); 35 | } 36 | 37 | WiFiMulti.addAP("SSID", "PASSWORD"); 38 | 39 | // allow reuse (if server supports it) 40 | http.setReuse(true); 41 | } 42 | 43 | void loop() { 44 | // wait for WiFi connection 45 | if((WiFiMulti.run() == WL_CONNECTED)) { 46 | 47 | http.begin("http://192.168.1.12/test.html"); 48 | //http.begin("192.168.1.12", 80, "/test.html"); 49 | 50 | int httpCode = http.GET(); 51 | if(httpCode > 0) { 52 | USE_SERIAL.printf("[HTTP] GET... code: %d\n", httpCode); 53 | 54 | // file found at server 55 | if(httpCode == HTTP_CODE_OK) { 56 | http.writeToStream(&USE_SERIAL); 57 | } 58 | } else { 59 | USE_SERIAL.printf("[HTTP] GET... failed, error: %s\n", http.errorToString(httpCode).c_str()); 60 | } 61 | 62 | http.end(); 63 | } 64 | 65 | delay(1000); 66 | } 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /libraries/SD/examples/DumpFile/DumpFile.ino: -------------------------------------------------------------------------------- 1 | /* 2 | SD card file dump 3 | 4 | This example shows how to read a file from the SD card using the 5 | SD library and send it over the serial port. 6 | 7 | The circuit: 8 | * SD card attached to SPI bus as follows: 9 | ** MOSI - pin 11 10 | ** MISO - pin 12 11 | ** CLK - pin 13 12 | ** CS - pin 4 13 | 14 | created 22 December 2010 15 | by Limor Fried 16 | modified 9 Apr 2012 17 | by Tom Igoe 18 | 19 | This example code is in the public domain. 20 | 21 | */ 22 | 23 | #include 24 | #include 25 | 26 | const int chipSelect = 4; 27 | 28 | void setup() 29 | { 30 | // Open serial communications and wait for port to open: 31 | Serial.begin(9600); 32 | while (!Serial) { 33 | ; // wait for serial port to connect. Needed for Leonardo only 34 | } 35 | 36 | 37 | Serial.print("Initializing SD card..."); 38 | 39 | // see if the card is present and can be initialized: 40 | if (!SD.begin(chipSelect)) { 41 | Serial.println("Card failed, or not present"); 42 | // don't do anything more: 43 | return; 44 | } 45 | Serial.println("card initialized."); 46 | 47 | // open the file. note that only one file can be open at a time, 48 | // so you have to close this one before opening another. 49 | File dataFile = SD.open("datalog.txt"); 50 | 51 | // if the file is available, write to it: 52 | if (dataFile) { 53 | while (dataFile.available()) { 54 | Serial.write(dataFile.read()); 55 | } 56 | dataFile.close(); 57 | } 58 | // if the file isn't open, pop up an error: 59 | else { 60 | Serial.println("error opening datalog.txt"); 61 | } 62 | } 63 | 64 | void loop() 65 | { 66 | } 67 | 68 | -------------------------------------------------------------------------------- /variants/espino/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | pins_arduino.h - Pin definition functions for Arduino 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2007 David A. Mellis 6 | Modified for ESP8266 platform by Ivan Grokhotkov, 2014-2015. 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ 24 | */ 25 | 26 | #ifndef Pins_Arduino_h 27 | #define Pins_Arduino_h 28 | 29 | #include "../generic/common.h" 30 | 31 | static const uint8_t SDA = 4; 32 | static const uint8_t SCL = 5; 33 | 34 | static const uint8_t LED_BUILTIN = 2; 35 | static const uint8_t LED_BUILTIN_R = 2; 36 | static const uint8_t LED_BUILTIN_G = 4; 37 | static const uint8_t LED_BUILTIN_B = 5; 38 | 39 | static const uint8_t BUILTIN_LED = 2; 40 | static const uint8_t BUILTIN_LEDR = 2; 41 | static const uint8_t BUILTIN_LEDG = 4; 42 | static const uint8_t BUILTIN_LEDB = 5; 43 | static const uint8_t BUILTIN_BUTTON = 0; 44 | 45 | #endif /* Pins_Arduino_h */ 46 | -------------------------------------------------------------------------------- /libraries/ESP8266WiFi/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For ESP8266WiFi 3 | ####################################### 4 | 5 | ####################################### 6 | # Library (KEYWORD3) 7 | ####################################### 8 | 9 | ESP8266WiFi KEYWORD3 10 | 11 | ####################################### 12 | # Datatypes (KEYWORD1) 13 | ####################################### 14 | 15 | WiFi KEYWORD1 16 | WiFiClient KEYWORD1 17 | WiFiServer KEYWORD1 18 | WiFiUDP KEYWORD1 19 | WiFiClientSecure KEYWORD1 20 | 21 | ####################################### 22 | # Methods and Functions (KEYWORD2) 23 | ####################################### 24 | 25 | status KEYWORD2 26 | mode KEYWORD2 27 | connect KEYWORD2 28 | write KEYWORD2 29 | available KEYWORD2 30 | config KEYWORD2 31 | setDNS KEYWORD2 32 | read KEYWORD2 33 | flush KEYWORD2 34 | stop KEYWORD2 35 | connected KEYWORD2 36 | begin KEYWORD2 37 | beginMulticast KEYWORD2 38 | disconnect KEYWORD2 39 | macAddress KEYWORD2 40 | localIP KEYWORD2 41 | subnetMask KEYWORD2 42 | gatewayIP KEYWORD2 43 | SSID KEYWORD2 44 | psk KEYWORD2 45 | BSSID KEYWORD2 46 | RSSI KEYWORD2 47 | encryptionType KEYWORD2 48 | beginPacket KEYWORD2 49 | beginPacketMulticast KEYWORD2 50 | endPacket KEYWORD2 51 | parsePacket KEYWORD2 52 | destinationIP KEYWORD2 53 | remoteIP KEYWORD2 54 | remotePort KEYWORD2 55 | softAP KEYWORD2 56 | softAPIP KEYWORD2 57 | softAPmacAddress KEYWORD2 58 | softAPConfig KEYWORD2 59 | printDiag KEYWORD2 60 | hostByName KEYWORD2 61 | scanNetworks KEYWORD2 62 | 63 | ####################################### 64 | # Constants (LITERAL1) 65 | ####################################### 66 | WIFI_AP LITERAL1 67 | WIFI_STA LITERAL1 68 | WIFI_AP_STA LITERAL1 69 | -------------------------------------------------------------------------------- /libraries/ESP8266WiFi/examples/WiFiClientBasic/WiFiClientBasic.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * This sketch sends a message to a TCP server 3 | * 4 | */ 5 | 6 | #include 7 | #include 8 | 9 | ESP8266WiFiMulti WiFiMulti; 10 | 11 | void setup() { 12 | Serial.begin(115200); 13 | delay(10); 14 | 15 | // We start by connecting to a WiFi network 16 | WiFiMulti.addAP("SSID", "passpasspass"); 17 | 18 | Serial.println(); 19 | Serial.println(); 20 | Serial.print("Wait for WiFi... "); 21 | 22 | while(WiFiMulti.run() != WL_CONNECTED) { 23 | Serial.print("."); 24 | delay(500); 25 | } 26 | 27 | Serial.println(""); 28 | Serial.println("WiFi connected"); 29 | Serial.println("IP address: "); 30 | Serial.println(WiFi.localIP()); 31 | 32 | delay(500); 33 | } 34 | 35 | 36 | void loop() { 37 | const uint16_t port = 80; 38 | const char * host = "192.168.1.1"; // ip or dns 39 | 40 | 41 | 42 | Serial.print("connecting to "); 43 | Serial.println(host); 44 | 45 | // Use WiFiClient class to create TCP connections 46 | WiFiClient client; 47 | 48 | if (!client.connect(host, port)) { 49 | Serial.println("connection failed"); 50 | Serial.println("wait 5 sec..."); 51 | delay(5000); 52 | return; 53 | } 54 | 55 | // This will send the request to the server 56 | client.print("Send this data to server"); 57 | 58 | //read back one line from server 59 | String line = client.readStringUntil('\r'); 60 | client.println(line); 61 | 62 | Serial.println("closing connection"); 63 | client.stop(); 64 | 65 | Serial.println("wait 5 sec..."); 66 | delay(5000); 67 | } 68 | 69 | -------------------------------------------------------------------------------- /libraries/ESP8266httpUpdate/examples/httpUpdate/httpUpdate.ino: -------------------------------------------------------------------------------- 1 | /** 2 | * httpUpdate.ino 3 | * 4 | * Created on: 27.11.2015 5 | * 6 | */ 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | #define USE_SERIAL Serial 17 | 18 | ESP8266WiFiMulti WiFiMulti; 19 | 20 | void setup() { 21 | 22 | USE_SERIAL.begin(115200); 23 | // USE_SERIAL.setDebugOutput(true); 24 | 25 | USE_SERIAL.println(); 26 | USE_SERIAL.println(); 27 | USE_SERIAL.println(); 28 | 29 | for(uint8_t t = 4; t > 0; t--) { 30 | USE_SERIAL.printf("[SETUP] WAIT %d...\n", t); 31 | USE_SERIAL.flush(); 32 | delay(1000); 33 | } 34 | 35 | WiFiMulti.addAP("SSID", "PASSWORD"); 36 | 37 | } 38 | 39 | void loop() { 40 | // wait for WiFi connection 41 | if((WiFiMulti.run() == WL_CONNECTED)) { 42 | 43 | t_httpUpdate_return ret = ESPhttpUpdate.update("http://server/file.bin"); 44 | //t_httpUpdate_return ret = ESPhttpUpdate.update("https://server/file.bin"); 45 | 46 | switch(ret) { 47 | case HTTP_UPDATE_FAILED: 48 | USE_SERIAL.printf("HTTP_UPDATE_FAILD Error (%d): %s", ESPhttpUpdate.getLastError(), ESPhttpUpdate.getLastErrorString().c_str()); 49 | break; 50 | 51 | case HTTP_UPDATE_NO_UPDATES: 52 | USE_SERIAL.println("HTTP_UPDATE_NO_UPDATES"); 53 | break; 54 | 55 | case HTTP_UPDATE_OK: 56 | USE_SERIAL.println("HTTP_UPDATE_OK"); 57 | break; 58 | } 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /libraries/Hash/src/Hash.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file Hash.h 3 | * @date 20.05.2015 4 | * @author Markus Sattler 5 | * 6 | * Copyright (c) 2015 Markus Sattler. All rights reserved. 7 | * This file is part of the esp8266 core for Arduino environment. 8 | * 9 | * This library is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with this library; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 22 | * 23 | */ 24 | 25 | #ifndef HASH_H_ 26 | #define HASH_H_ 27 | 28 | //#define DEBUG_SHA1 29 | 30 | void sha1(uint8_t * data, uint32_t size, uint8_t hash[20]); 31 | void sha1(char * data, uint32_t size, uint8_t hash[20]); 32 | void sha1(const uint8_t * data, uint32_t size, uint8_t hash[20]); 33 | void sha1(const char * data, uint32_t size, uint8_t hash[20]); 34 | void sha1(String data, uint8_t hash[20]); 35 | 36 | String sha1(uint8_t* data, uint32_t size); 37 | String sha1(char* data, uint32_t size); 38 | String sha1(const uint8_t* data, uint32_t size); 39 | String sha1(const char* data, uint32_t size); 40 | String sha1(String data); 41 | 42 | #endif /* HASH_H_ */ 43 | -------------------------------------------------------------------------------- /cores/esp8266/libb64/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright-Only Dedication (based on United States law) 2 | or Public Domain Certification 3 | 4 | The person or persons who have associated work with this document (the 5 | "Dedicator" or "Certifier") hereby either (a) certifies that, to the best of 6 | his knowledge, the work of authorship identified is in the public domain of the 7 | country from which the work is published, or (b) hereby dedicates whatever 8 | copyright the dedicators holds in the work of authorship identified below (the 9 | "Work") to the public domain. A certifier, moreover, dedicates any copyright 10 | interest he may have in the associated work, and for these purposes, is 11 | described as a "dedicator" below. 12 | 13 | A certifier has taken reasonable steps to verify the copyright status of this 14 | work. Certifier recognizes that his good faith efforts may not shield him from 15 | liability if in fact the work certified is not in the public domain. 16 | 17 | Dedicator makes this dedication for the benefit of the public at large and to 18 | the detriment of the Dedicator's heirs and successors. Dedicator intends this 19 | dedication to be an overt act of relinquishment in perpetuity of all present 20 | and future rights under copyright law, whether vested or contingent, in the 21 | Work. Dedicator understands that such relinquishment of all rights includes 22 | the relinquishment of all rights to enforce (by lawsuit or otherwise) those 23 | copyrights in the Work. 24 | 25 | Dedicator recognizes that, once placed in the public domain, the Work may be 26 | freely reproduced, distributed, transmitted, used, modified, built upon, or 27 | otherwise exploited by anyone for any purpose, commercial or non-commercial, 28 | and in any way, including by methods that have not yet been invented or 29 | conceived. -------------------------------------------------------------------------------- /libraries/Ethernet/examples/DhcpAddressPrinter/DhcpAddressPrinter.ino: -------------------------------------------------------------------------------- 1 | /* 2 | DHCP-based IP printer 3 | 4 | This sketch uses the DHCP extensions to the Ethernet library 5 | to get an IP address via DHCP and print the address obtained. 6 | using an Arduino Wiznet Ethernet shield. 7 | 8 | Circuit: 9 | * Ethernet shield attached to pins 10, 11, 12, 13 10 | 11 | created 12 April 2011 12 | modified 9 Apr 2012 13 | by Tom Igoe 14 | 15 | */ 16 | 17 | #include 18 | #include 19 | 20 | // Enter a MAC address for your controller below. 21 | // Newer Ethernet shields have a MAC address printed on a sticker on the shield 22 | byte mac[] = { 23 | 0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02 24 | }; 25 | 26 | // Initialize the Ethernet client library 27 | // with the IP address and port of the server 28 | // that you want to connect to (port 80 is default for HTTP): 29 | EthernetClient client; 30 | 31 | void setup() { 32 | // Open serial communications and wait for port to open: 33 | Serial.begin(9600); 34 | // this check is only needed on the Leonardo: 35 | while (!Serial) { 36 | ; // wait for serial port to connect. Needed for Leonardo only 37 | } 38 | 39 | // start the Ethernet connection: 40 | if (Ethernet.begin(mac) == 0) { 41 | Serial.println("Failed to configure Ethernet using DHCP"); 42 | // no point in carrying on, so do nothing forevermore: 43 | for (;;) 44 | ; 45 | } 46 | // print your local IP address: 47 | Serial.print("My IP address: "); 48 | for (byte thisByte = 0; thisByte < 4; thisByte++) { 49 | // print the value of each byte of the IP address: 50 | Serial.print(Ethernet.localIP()[thisByte], DEC); 51 | Serial.print("."); 52 | } 53 | Serial.println(); 54 | } 55 | 56 | void loop() { 57 | 58 | } 59 | 60 | 61 | -------------------------------------------------------------------------------- /variants/d1_mini/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | pins_arduino.h - Pin definition functions for Arduino 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2007 David A. Mellis 6 | Modified for ESP8266 platform by Ivan Grokhotkov, 2014-2015. 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ 24 | */ 25 | 26 | #ifndef Pins_Arduino_h 27 | #define Pins_Arduino_h 28 | 29 | #include "../generic/common.h" 30 | 31 | static const uint8_t SDA = 4; 32 | static const uint8_t SCL = 5; 33 | 34 | static const uint8_t LED_BUILTIN = 2; 35 | static const uint8_t BUILTIN_LED = 2; 36 | 37 | static const uint8_t D0 = 16; 38 | static const uint8_t D1 = 5; 39 | static const uint8_t D2 = 4; 40 | static const uint8_t D3 = 0; 41 | static const uint8_t D4 = 2; 42 | static const uint8_t D5 = 14; 43 | static const uint8_t D6 = 12; 44 | static const uint8_t D7 = 13; 45 | static const uint8_t D8 = 15; 46 | static const uint8_t RX = 3; 47 | static const uint8_t TX = 1; 48 | 49 | #endif /* Pins_Arduino_h */ 50 | -------------------------------------------------------------------------------- /variants/nodemcu/pins_arduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | pins_arduino.h - Pin definition functions for Arduino 3 | Part of Arduino - http://www.arduino.cc/ 4 | 5 | Copyright (c) 2007 David A. Mellis 6 | Modified for ESP8266 platform by Ivan Grokhotkov, 2014-2015. 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ 24 | */ 25 | 26 | #ifndef Pins_Arduino_h 27 | #define Pins_Arduino_h 28 | 29 | #include "../generic/common.h" 30 | 31 | static const uint8_t SDA = 4; 32 | static const uint8_t SCL = 5; 33 | 34 | static const uint8_t LED_BUILTIN = 16; 35 | static const uint8_t BUILTIN_LED = 16; 36 | 37 | static const uint8_t D0 = 16; 38 | static const uint8_t D1 = 5; 39 | static const uint8_t D2 = 4; 40 | static const uint8_t D3 = 0; 41 | static const uint8_t D4 = 2; 42 | static const uint8_t D5 = 14; 43 | static const uint8_t D6 = 12; 44 | static const uint8_t D7 = 13; 45 | static const uint8_t D8 = 15; 46 | static const uint8_t D9 = 3; 47 | static const uint8_t D10 = 1; 48 | 49 | #endif /* Pins_Arduino_h */ 50 | -------------------------------------------------------------------------------- /libraries/ArduinoOTA/examples/BasicOTA/BasicOTA.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | const char* ssid = ".........."; 7 | const char* password = ".........."; 8 | 9 | void setup() { 10 | Serial.begin(115200); 11 | Serial.println("Booting"); 12 | WiFi.mode(WIFI_STA); 13 | WiFi.begin(ssid, password); 14 | while (WiFi.waitForConnectResult() != WL_CONNECTED) { 15 | Serial.println("Connection Failed! Rebooting..."); 16 | delay(5000); 17 | ESP.restart(); 18 | } 19 | 20 | // Port defaults to 8266 21 | // ArduinoOTA.setPort(8266); 22 | 23 | // Hostname defaults to esp8266-[ChipID] 24 | // ArduinoOTA.setHostname("myesp8266"); 25 | 26 | // No authentication by default 27 | // ArduinoOTA.setPassword((const char *)"123"); 28 | 29 | ArduinoOTA.onStart([]() { 30 | Serial.println("Start"); 31 | }); 32 | ArduinoOTA.onEnd([]() { 33 | Serial.println("\nEnd"); 34 | }); 35 | ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) { 36 | Serial.printf("Progress: %u%%\r", (progress / (total / 100))); 37 | }); 38 | ArduinoOTA.onError([](ota_error_t error) { 39 | Serial.printf("Error[%u]: ", error); 40 | if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed"); 41 | else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed"); 42 | else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed"); 43 | else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed"); 44 | else if (error == OTA_END_ERROR) Serial.println("End Failed"); 45 | }); 46 | ArduinoOTA.begin(); 47 | Serial.println("Ready"); 48 | Serial.print("IP address: "); 49 | Serial.println(WiFi.localIP()); 50 | } 51 | 52 | void loop() { 53 | ArduinoOTA.handle(); 54 | } 55 | -------------------------------------------------------------------------------- /libraries/ArduinoOTA/ArduinoOTA.h: -------------------------------------------------------------------------------- 1 | #ifndef __ARDUINO_OTA_H 2 | #define __ARDUINO_OTA_H 3 | 4 | #include 5 | #include 6 | 7 | class UdpContext; 8 | 9 | #define OTA_CALLBACK(callback) void (*callback)() 10 | #define OTA_CALLBACK_PROGRESS(callback) void (*callback)(unsigned int, unsigned int) 11 | #define OTA_CALLBACK_ERROR(callback) void (*callback)(ota_error_t) 12 | 13 | typedef enum { 14 | OTA_IDLE, 15 | OTA_WAITAUTH, 16 | OTA_RUNUPDATE 17 | } ota_state_t; 18 | 19 | typedef enum { 20 | OTA_AUTH_ERROR, 21 | OTA_BEGIN_ERROR, 22 | OTA_CONNECT_ERROR, 23 | OTA_RECEIVE_ERROR, 24 | OTA_END_ERROR 25 | } ota_error_t; 26 | 27 | class ArduinoOTAClass 28 | { 29 | public: 30 | ArduinoOTAClass(); 31 | ~ArduinoOTAClass(); 32 | void setPort(uint16_t port); 33 | void setHostname(const char *hostname); 34 | void setPassword(const char *password); 35 | void onStart(OTA_CALLBACK(fn)); 36 | void onEnd(OTA_CALLBACK(fn)); 37 | void onProgress(OTA_CALLBACK_PROGRESS(fn)); 38 | void onError(OTA_CALLBACK_ERROR (fn)); 39 | void begin(); 40 | void handle(); 41 | 42 | private: 43 | int _port; 44 | String _password; 45 | String _hostname; 46 | String _nonce; 47 | UdpContext *_udp_ota; 48 | bool _initialized; 49 | ota_state_t _state; 50 | int _size; 51 | int _cmd; 52 | int _ota_port; 53 | IPAddress _ota_ip; 54 | String _md5; 55 | 56 | OTA_CALLBACK(_start_callback); 57 | OTA_CALLBACK(_end_callback); 58 | OTA_CALLBACK_ERROR(_error_callback); 59 | OTA_CALLBACK_PROGRESS(_progress_callback); 60 | 61 | void _runUpdate(void); 62 | void _onRx(void); 63 | int parseInt(void); 64 | String readStringUntil(char end); 65 | }; 66 | 67 | extern ArduinoOTAClass ArduinoOTA; 68 | 69 | #endif /* __ARDUINO_OTA_H */ 70 | -------------------------------------------------------------------------------- /cores/esp8266/Client.h: -------------------------------------------------------------------------------- 1 | /* 2 | Client.h - Base class that provides Client 3 | Copyright (c) 2011 Adrian McEwen. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef client_h 21 | #define client_h 22 | #include "Print.h" 23 | #include "Stream.h" 24 | #include "IPAddress.h" 25 | 26 | class Client: public Stream { 27 | 28 | public: 29 | virtual int connect(IPAddress ip, uint16_t port) =0; 30 | virtual int connect(const char *host, uint16_t port) =0; 31 | virtual size_t write(uint8_t) =0; 32 | virtual size_t write(const uint8_t *buf, size_t size) =0; 33 | virtual int available() = 0; 34 | virtual int read() = 0; 35 | virtual int read(uint8_t *buf, size_t size) = 0; 36 | virtual int peek() = 0; 37 | virtual void flush() = 0; 38 | virtual void stop() = 0; 39 | virtual uint8_t connected() = 0; 40 | virtual operator bool() = 0; 41 | protected: 42 | uint8_t* rawIPAddress(IPAddress& addr) { 43 | return addr.raw_address(); 44 | } 45 | ; 46 | }; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /libraries/TFT_Touch_Shield_V2/examples/paint/paint.ino: -------------------------------------------------------------------------------- 1 | // Paint application - Demonstate both TFT and Touch Screen 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | int ColorPaletteHigh = 30; 8 | int color = WHITE; //Paint brush color 9 | unsigned int colors[8] = {BLACK, RED, GREEN, BLUE, CYAN, YELLOW, WHITE, GRAY1}; 10 | 11 | // For better pressure precision, we need to know the resistance 12 | // between X+ and X- Use any multimeter to read it 13 | // The 2.8" TFT Touch shield has 300 ohms across the X plate 14 | 15 | TouchScreen ts = TouchScreen(XP, YP, XM, YM); //init TouchScreen port pins 16 | 17 | void setup() 18 | { 19 | Tft.TFTinit(); //init TFT library 20 | Serial.begin(115200); 21 | //Draw the pallet 22 | for(int i = 0; i<8; i++) 23 | { 24 | Tft.fillRectangle(i*30, 0, 30, ColorPaletteHigh, colors[i]); 25 | } 26 | } 27 | 28 | void loop() 29 | { 30 | // a point object holds x y and z coordinates. 31 | Point p = ts.getPoint(); 32 | 33 | //map the ADC value read to into pixel co-ordinates 34 | 35 | p.x = map(p.x, TS_MINX, TS_MAXX, 0, 240); 36 | p.y = map(p.y, TS_MINY, TS_MAXY, 0, 320); 37 | 38 | // we have some minimum pressure we consider 'valid' 39 | // pressure of 0 means no pressing! 40 | 41 | if (p.z > __PRESURE) { 42 | // Detect paint brush color change 43 | if(p.y < ColorPaletteHigh+2) 44 | { 45 | color = colors[p.x/30]; 46 | } 47 | else 48 | { 49 | Tft.fillCircle(p.x,p.y,2,color); 50 | } 51 | } 52 | } 53 | /********************************************************************************************************* 54 | END FILE 55 | *********************************************************************************************************/ 56 | -------------------------------------------------------------------------------- /libraries/SD/examples/listfiles/listfiles.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Listfiles 3 | 4 | This example shows how print out the files in a 5 | directory on a SD card 6 | 7 | The circuit: 8 | * SD card attached to SPI bus as follows: 9 | ** MOSI - pin 11 10 | ** MISO - pin 12 11 | ** CLK - pin 13 12 | ** CS - pin 4 13 | 14 | created Nov 2010 15 | by David A. Mellis 16 | modified 9 Apr 2012 17 | by Tom Igoe 18 | modified 2 Feb 2014 19 | by Scott Fitzgerald 20 | 21 | This example code is in the public domain. 22 | 23 | */ 24 | #include 25 | #include 26 | 27 | File root; 28 | 29 | void setup() 30 | { 31 | // Open serial communications and wait for port to open: 32 | Serial.begin(9600); 33 | while (!Serial) { 34 | ; // wait for serial port to connect. Needed for Leonardo only 35 | } 36 | 37 | Serial.print("Initializing SD card..."); 38 | 39 | if (!SD.begin(4)) { 40 | Serial.println("initialization failed!"); 41 | return; 42 | } 43 | Serial.println("initialization done."); 44 | 45 | root = SD.open("/"); 46 | 47 | printDirectory(root, 0); 48 | 49 | Serial.println("done!"); 50 | } 51 | 52 | void loop() 53 | { 54 | // nothing happens after setup finishes. 55 | } 56 | 57 | void printDirectory(File dir, int numTabs) { 58 | while(true) { 59 | 60 | File entry = dir.openNextFile(); 61 | if (! entry) { 62 | // no more files 63 | break; 64 | } 65 | for (uint8_t i=0; i 8 | #include 9 | #include 10 | 11 | void setup() 12 | { 13 | TFT_BL_ON; // turn on the background light 14 | 15 | Tft.TFTinit(); // init TFT library 16 | 17 | Tft.drawNumber(1024, 0, 0, 1, RED); // draw a integer: 1024, Location: (0, 0), size: 1, color: RED 18 | 19 | Tft.drawNumber(1024, 0, 20, 2, BLUE); // draw a integer: 1024, Location: (0, 20), size: 2, color: BLUE 20 | 21 | Tft.drawNumber(1024, 0, 50, 3, GREEN); // draw a integer: 1024, Location: (0, 50), size: 3, color: GREEN 22 | 23 | Tft.drawNumber(1024, 0, 90, 4, BLUE); // draw a integer: 1024, Location: (0, 90), size:4, color: BLUE 24 | 25 | Tft.drawFloat(1.2345, 0, 150, 4, YELLOW); // draw a float number: 1.2345, Location: (0, 150), size: 4, color: YELLOW 26 | 27 | Tft.drawFloat(1.2345, 2, 0, 200, 4, BLUE); // draw a float number: 1.2345: Location: (0, 200), size: 4, decimal: 2, color: BLUE 28 | 29 | Tft.drawFloat(1.2345, 4, 0, 250, 4, RED); // draw a float number: 1.2345 Location: (0, 250), size: 4, decimal: 4, color: RED 30 | 31 | } 32 | 33 | void loop() 34 | { 35 | 36 | } 37 | 38 | /********************************************************************************************************* 39 | END FILE 40 | *********************************************************************************************************/ 41 | -------------------------------------------------------------------------------- /cores/esp8266/MD5Builder.h: -------------------------------------------------------------------------------- 1 | /* 2 | md5.h - exposed md5 ROM functions for esp8266 3 | 4 | Copyright (c) 2015 Hristo Gochkov. All rights reserved. 5 | This file is part of the esp8266 core for Arduino environment. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library; if not, write to the Free Software 19 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | #ifndef __ESP8266_MD5_BUILDER__ 22 | #define __ESP8266_MD5_BUILDER__ 23 | 24 | #include "Arduino.h" 25 | #include "md5.h" 26 | 27 | class MD5Builder { 28 | private: 29 | md5_context_t _ctx; 30 | uint8_t _buf[16]; 31 | public: 32 | void begin(void); 33 | void add(uint8_t * data, uint16_t len); 34 | void add(const char * data){ add((uint8_t*)data, strlen(data)); } 35 | void add(char * data){ add((const char*)data); } 36 | void add(String data){ add(data.c_str()); } 37 | void addHexString(const char * data); 38 | void addHexString(char * data){ addHexString((const char*)data); } 39 | void addHexString(String data){ addHexString(data.c_str()); } 40 | bool addStream(Stream & stream, const size_t total_len); 41 | void calculate(void); 42 | void getBytes(uint8_t * output); 43 | void getChars(char * output); 44 | String toString(void); 45 | }; 46 | 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /libraries/SD/examples/Files/Files.ino: -------------------------------------------------------------------------------- 1 | /* 2 | SD card basic file example 3 | 4 | This example shows how to create and destroy an SD card file 5 | The circuit: 6 | * SD card attached to SPI bus as follows: 7 | ** MOSI - pin 11 8 | ** MISO - pin 12 9 | ** CLK - pin 13 10 | ** CS - pin 4 11 | 12 | created Nov 2010 13 | by David A. Mellis 14 | modified 9 Apr 2012 15 | by Tom Igoe 16 | 17 | This example code is in the public domain. 18 | 19 | */ 20 | #include 21 | #include 22 | 23 | File myFile; 24 | 25 | void setup() 26 | { 27 | // Open serial communications and wait for port to open: 28 | Serial.begin(9600); 29 | while (!Serial) { 30 | ; // wait for serial port to connect. Needed for Leonardo only 31 | } 32 | 33 | 34 | Serial.print("Initializing SD card..."); 35 | 36 | if (!SD.begin(4)) { 37 | Serial.println("initialization failed!"); 38 | return; 39 | } 40 | Serial.println("initialization done."); 41 | 42 | if (SD.exists("example.txt")) { 43 | Serial.println("example.txt exists."); 44 | } 45 | else { 46 | Serial.println("example.txt doesn't exist."); 47 | } 48 | 49 | // open a new file and immediately close it: 50 | Serial.println("Creating example.txt..."); 51 | myFile = SD.open("example.txt", FILE_WRITE); 52 | myFile.close(); 53 | 54 | // Check to see if the file exists: 55 | if (SD.exists("example.txt")) { 56 | Serial.println("example.txt exists."); 57 | } 58 | else { 59 | Serial.println("example.txt doesn't exist."); 60 | } 61 | 62 | // delete the file: 63 | Serial.println("Removing example.txt..."); 64 | SD.remove("example.txt"); 65 | 66 | if (SD.exists("example.txt")) { 67 | Serial.println("example.txt exists."); 68 | } 69 | else { 70 | Serial.println("example.txt doesn't exist."); 71 | } 72 | } 73 | 74 | void loop() 75 | { 76 | // nothing happens after setup finishes. 77 | } 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /tools/sdk/lwip/src/core/ipv4/inet.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Functions common to all TCP/IPv4 modules, such as the byte order functions. 4 | * 5 | */ 6 | 7 | /* 8 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without modification, 12 | * are permitted provided that the following conditions are met: 13 | * 14 | * 1. Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 3. The name of the author may not be used to endorse or promote products 20 | * derived from this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 25 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 27 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 30 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 31 | * OF SUCH DAMAGE. 32 | * 33 | * This file is part of the lwIP TCP/IP stack. 34 | * 35 | * Author: Adam Dunkels 36 | * 37 | */ 38 | 39 | #include "lwip/opt.h" 40 | 41 | #include "lwip/inet.h" 42 | 43 | -------------------------------------------------------------------------------- /bootloaders/eboot/eboot_command.c: -------------------------------------------------------------------------------- 1 | #include "eboot_command.h" 2 | 3 | uint32_t crc_update(uint32_t crc, const uint8_t *data, size_t length) 4 | { 5 | uint32_t i; 6 | bool bit; 7 | uint8_t c; 8 | 9 | while (length--) { 10 | c = *data++; 11 | for (i = 0x80; i > 0; i >>= 1) { 12 | bit = crc & 0x80000000; 13 | if (c & i) { 14 | bit = !bit; 15 | } 16 | crc <<= 1; 17 | if (bit) { 18 | crc ^= 0x04c11db7; 19 | } 20 | } 21 | } 22 | return crc; 23 | } 24 | 25 | uint32_t eboot_command_calculate_crc32(const struct eboot_command* cmd) 26 | { 27 | return crc_update(0xffffffff, (const uint8_t*) cmd, 28 | offsetof(struct eboot_command, crc32)); 29 | } 30 | 31 | int eboot_command_read(struct eboot_command* cmd) 32 | { 33 | const uint32_t dw_count = sizeof(struct eboot_command) / sizeof(uint32_t); 34 | uint32_t* dst = (uint32_t *) cmd; 35 | for (uint32_t i = 0; i < dw_count; ++i) { 36 | dst[i] = RTC_MEM[i]; 37 | } 38 | 39 | uint32_t crc32 = eboot_command_calculate_crc32(cmd); 40 | if (cmd->magic & EBOOT_MAGIC_MASK != EBOOT_MAGIC || 41 | cmd->crc32 != crc32) { 42 | return 1; 43 | } 44 | 45 | return 0; 46 | } 47 | 48 | void eboot_command_write(struct eboot_command* cmd) 49 | { 50 | cmd->magic = EBOOT_MAGIC; 51 | cmd->crc32 = eboot_command_calculate_crc32(cmd); 52 | 53 | const uint32_t dw_count = sizeof(struct eboot_command) / sizeof(uint32_t); 54 | const uint32_t* src = (const uint32_t *) cmd; 55 | for (uint32_t i = 0; i < dw_count; ++i) { 56 | RTC_MEM[i] = src[i]; 57 | } 58 | } 59 | 60 | void eboot_command_clear() 61 | { 62 | RTC_MEM[offsetof(struct eboot_command, magic) / sizeof(uint32_t)] = 0; 63 | RTC_MEM[offsetof(struct eboot_command, crc32) / sizeof(uint32_t)] = 0; 64 | } 65 | 66 | -------------------------------------------------------------------------------- /libraries/ESP8266AVRISP/README.md: -------------------------------------------------------------------------------- 1 | # AVR In-System Programming over WiFi for ESP8266 2 | 3 | This library allows an ESP8266 module with the HSPI port available to become 4 | an AVR In-System Programmer. 5 | 6 | ## Hardware 7 | 8 | The ESP8266 module connects to the AVR target chip via the standard 6-pin 9 | AVR "Recommended In-System Programming Interface Connector Layout" as seen 10 | in [AVR910](http://www.atmel.com/images/doc0943.pdf) among other places. 11 | 12 | If the AVR target is powered by a different Vcc than what powers your ESP8266 13 | chip, you **must provide voltage level shifting** or some other form of buffers. 14 | Exposing the pins of ESP8266 to anything larger than 3.6V will damage it. 15 | 16 | Connections are as follows: 17 | 18 | ESP8266 | AVR / SPI 19 | --------|------------ 20 | GPIO12 | MISO 21 | GPIO13 | MOSI 22 | GPIO14 | SCK 23 | any* | RESET 24 | 25 | For RESET use a GPIO other than 0, 2 and 15 (bootselect pins), and apply an 26 | external pullup/down so that the target is normally running. 27 | 28 | ## Usage 29 | 30 | See the included example. In short: 31 | 32 | ```arduino 33 | 34 | // Create the programmer object 35 | ESP8266AVRISP avrprog(PORT, RESET_PIN) 36 | // ... with custom SPI frequency 37 | ESP8266AVRISP avrprog(PORT, RESET_PIN, 4e6) 38 | 39 | // Check current connection state, but don't perform any actions 40 | AVRISPState_t state = avrprog.update(); 41 | 42 | // Serve the pending connection, execute STK500 commands 43 | AVRISPState_t state = avrprog.serve(); 44 | ``` 45 | 46 | ### License and Authors 47 | 48 | This library started off from the source of ArduinoISP "sketch" included with 49 | the Arduino IDE: 50 | 51 | ArduinoISP version 04m3 52 | Copyright (c) 2008-2011 Randall Bohn 53 | If you require a license, see 54 | http://www.opensource.org/licenses/bsd-license.php 55 | 56 | Support for TCP on ESP8266 57 | Copyright (c) Kiril Zyapkov . 58 | -------------------------------------------------------------------------------- /tests/host/common/WMath.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | 3 | /* 4 | Part of the Wiring project - http://wiring.org.co 5 | Copyright (c) 2004-06 Hernando Barragan 6 | Modified 13 August 2006, David A. Mellis for Arduino - http://www.arduino.cc/ 7 | 8 | This library is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU Lesser General Public 10 | License as published by the Free Software Foundation; either 11 | version 2.1 of the License, or (at your option) any later version. 12 | 13 | This library is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | Lesser General Public License for more details. 17 | 18 | You should have received a copy of the GNU Lesser General 19 | Public License along with this library; if not, write to the 20 | Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | $Id$ 24 | */ 25 | 26 | extern "C" { 27 | #include 28 | } 29 | 30 | void randomSeed(unsigned long seed) { 31 | if(seed != 0) { 32 | srand(seed); 33 | } 34 | } 35 | 36 | long random(long howbig) { 37 | if(howbig == 0) { 38 | return 0; 39 | } 40 | return (rand()) % howbig; 41 | } 42 | 43 | long random(long howsmall, long howbig) { 44 | if(howsmall >= howbig) { 45 | return howsmall; 46 | } 47 | long diff = howbig - howsmall; 48 | return random(diff) + howsmall; 49 | } 50 | 51 | long map(long x, long in_min, long in_max, long out_min, long out_max) { 52 | return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; 53 | } 54 | 55 | unsigned int makeWord(unsigned int w) { 56 | return w; 57 | } 58 | 59 | unsigned int makeWord(unsigned char h, unsigned char l) { 60 | return (h << 8) | l; 61 | } 62 | --------------------------------------------------------------------------------