Showing preview only (3,981K chars total). Download the full file or copy to clipboard to get everything.
Repository: israellot/esp-ginx
Branch: master
Commit: b063b0901e6a
Files: 379
Total size: 3.7 MB
Directory structure:
gitextract_iq5ciyeb/
├── LICENSE
├── Makefile
├── README.md
├── app/
│ ├── .gitignore
│ ├── Makefile
│ ├── dns/
│ │ ├── Makefile
│ │ ├── dns.c
│ │ └── dns.h
│ ├── driver/
│ │ ├── Makefile
│ │ ├── gpio16.c
│ │ ├── i2c_master.c
│ │ ├── key.c
│ │ ├── onewire.c
│ │ ├── pwm.c
│ │ ├── readline.c
│ │ ├── relay.c
│ │ ├── spi.c
│ │ └── uart_interrupt.c
│ ├── http/
│ │ ├── Makefile
│ │ ├── app.c
│ │ ├── app.h
│ │ ├── cgi.c
│ │ ├── cgi.h
│ │ ├── cgi_relay.c
│ │ ├── cgi_relay.h
│ │ ├── cgi_wifi.c
│ │ ├── cgi_wifi.h
│ │ ├── html/
│ │ │ ├── .bak/
│ │ │ │ └── bootstrap.css
│ │ │ ├── bootstrap.css
│ │ │ ├── cats.html
│ │ │ ├── index.html
│ │ │ ├── index.js
│ │ │ ├── lib.js
│ │ │ └── speed_test.html
│ │ ├── http.h
│ │ ├── http_client.c
│ │ ├── http_client.h
│ │ ├── http_helper.c
│ │ ├── http_helper.h
│ │ ├── http_parser.c
│ │ ├── http_parser.h
│ │ ├── http_process.c
│ │ ├── http_process.h
│ │ ├── http_server.c
│ │ ├── http_server.h
│ │ ├── http_websocket_server.c
│ │ ├── http_websocket_server.h
│ │ ├── rofs.c
│ │ ├── rofs.h
│ │ ├── rofs_data.c
│ │ ├── websocket.c
│ │ ├── websocket.h
│ │ ├── ws_app.c
│ │ └── ws_app.h
│ ├── include/
│ │ ├── arch/
│ │ │ ├── cc.h
│ │ │ ├── perf.h
│ │ │ └── sys_arch.h
│ │ ├── driver/
│ │ │ ├── gpio16.h
│ │ │ ├── i2c_master.h
│ │ │ ├── key.h
│ │ │ ├── onewire.h
│ │ │ ├── pwm.h
│ │ │ ├── relay.h
│ │ │ ├── spi.h
│ │ │ ├── spi_master.h
│ │ │ ├── spi_register.h
│ │ │ ├── uart.h
│ │ │ └── uart_register.h
│ │ ├── json/
│ │ │ └── cJson.h
│ │ ├── lwip/
│ │ │ ├── api.h
│ │ │ ├── api_msg.h
│ │ │ ├── app/
│ │ │ │ ├── dhcpserver.h
│ │ │ │ ├── espconn.h
│ │ │ │ ├── espconn_tcp.h
│ │ │ │ ├── espconn_udp.h
│ │ │ │ └── ping.h
│ │ │ ├── arch.h
│ │ │ ├── autoip.h
│ │ │ ├── debug.h
│ │ │ ├── def.h
│ │ │ ├── dhcp.h
│ │ │ ├── dns.h
│ │ │ ├── err.h
│ │ │ ├── icmp.h
│ │ │ ├── igmp.h
│ │ │ ├── inet.h
│ │ │ ├── inet_chksum.h
│ │ │ ├── init.h
│ │ │ ├── ip.h
│ │ │ ├── ip_addr.h
│ │ │ ├── ip_frag.h
│ │ │ ├── mdns.h
│ │ │ ├── mem.h
│ │ │ ├── memp.h
│ │ │ ├── memp_std.h
│ │ │ ├── netbuf.h
│ │ │ ├── netdb.h
│ │ │ ├── netif.h
│ │ │ ├── netifapi.h
│ │ │ ├── opt.h
│ │ │ ├── pbuf.h
│ │ │ ├── puck_def.h
│ │ │ ├── raw.h
│ │ │ ├── sio.h
│ │ │ ├── snmp.h
│ │ │ ├── snmp_asn1.h
│ │ │ ├── snmp_msg.h
│ │ │ ├── snmp_structs.h
│ │ │ ├── sntp.h
│ │ │ ├── sockets.h
│ │ │ ├── stats.h
│ │ │ ├── sys.h
│ │ │ ├── tcp.h
│ │ │ ├── tcp_impl.h
│ │ │ ├── tcpip.h
│ │ │ ├── timers.h
│ │ │ └── udp.h
│ │ ├── lwipopts.h
│ │ ├── mem_manager.h
│ │ ├── netif/
│ │ │ ├── etharp.h
│ │ │ ├── if_llc.h
│ │ │ ├── ppp_oe.h
│ │ │ └── wlan_lwip_if.h
│ │ ├── pp/
│ │ │ └── esf_buf.h
│ │ ├── serial_number.h
│ │ ├── ssl/
│ │ │ ├── app/
│ │ │ │ ├── espconn_secure.h
│ │ │ │ └── espconn_ssl.h
│ │ │ ├── cert.h
│ │ │ ├── private_key.h
│ │ │ ├── ssl_bigint.h
│ │ │ ├── ssl_bigint_impl.h
│ │ │ ├── ssl_cert.h
│ │ │ ├── ssl_config.h
│ │ │ ├── ssl_crypto.h
│ │ │ ├── ssl_crypto_misc.h
│ │ │ ├── ssl_os_int.h
│ │ │ ├── ssl_os_port.h
│ │ │ ├── ssl_private_key.h
│ │ │ ├── ssl_ssl.h
│ │ │ ├── ssl_tls1.h
│ │ │ └── ssl_version.h
│ │ ├── user_config.h
│ │ └── xtensa/
│ │ ├── cacheasm.h
│ │ ├── cacheattrasm.h
│ │ ├── config/
│ │ │ ├── core-isa.h
│ │ │ ├── core-matmap.h
│ │ │ ├── core.h
│ │ │ ├── defs.h
│ │ │ ├── specreg.h
│ │ │ ├── system.h
│ │ │ ├── tie-asm.h
│ │ │ └── tie.h
│ │ ├── coreasm.h
│ │ ├── corebits.h
│ │ ├── hal.h
│ │ ├── sim.h
│ │ ├── simcall-errno.h
│ │ ├── simcall-fcntl.h
│ │ ├── simcall.h
│ │ ├── specreg.h
│ │ ├── tie/
│ │ │ ├── xt_MUL32.h
│ │ │ ├── xt_core.h
│ │ │ ├── xt_debug.h
│ │ │ ├── xt_density.h
│ │ │ ├── xt_exceptions.h
│ │ │ ├── xt_externalregisters.h
│ │ │ ├── xt_interrupt.h
│ │ │ ├── xt_misc.h
│ │ │ ├── xt_mmu.h
│ │ │ ├── xt_mul.h
│ │ │ ├── xt_timer.h
│ │ │ └── xt_trace.h
│ │ ├── xtensa-libdb-macros.h
│ │ ├── xtensa-xer.h
│ │ ├── xtruntime-frames.h
│ │ └── xtruntime.h
│ ├── json/
│ │ ├── Makefile
│ │ └── cJson.c
│ ├── libc/
│ │ ├── Makefile
│ │ ├── c_ctype.c
│ │ ├── c_ctype.h
│ │ ├── c_errno.h
│ │ ├── c_fcntl.h
│ │ ├── c_limits.h
│ │ ├── c_locale.h
│ │ ├── c_math.c
│ │ ├── c_math.h
│ │ ├── c_signal.h
│ │ ├── c_stdarg.h
│ │ ├── c_stddef.h
│ │ ├── c_stdint.h
│ │ ├── c_stdio.c
│ │ ├── c_stdio.h
│ │ ├── c_stdlib.c
│ │ ├── c_stdlib.h
│ │ ├── c_string.c
│ │ └── c_string.h
│ ├── lwip/
│ │ ├── Makefile
│ │ ├── api/
│ │ │ ├── Makefile
│ │ │ ├── api_lib.c
│ │ │ ├── api_msg.c
│ │ │ ├── err.c
│ │ │ ├── netbuf.c
│ │ │ ├── netdb.c
│ │ │ ├── netifapi.c
│ │ │ ├── sockets.c
│ │ │ └── tcpip.c
│ │ ├── app/
│ │ │ ├── Makefile
│ │ │ ├── dhcpserver.c
│ │ │ ├── espconn.c
│ │ │ ├── espconn_mdns.c
│ │ │ ├── espconn_tcp.c
│ │ │ ├── espconn_udp.c
│ │ │ ├── netio.c
│ │ │ └── ping.c
│ │ ├── core/
│ │ │ ├── Makefile
│ │ │ ├── def.c
│ │ │ ├── dhcp.c
│ │ │ ├── dns.c
│ │ │ ├── init.c
│ │ │ ├── ipv4/
│ │ │ │ ├── Makefile
│ │ │ │ ├── autoip.c
│ │ │ │ ├── icmp.c
│ │ │ │ ├── igmp.c
│ │ │ │ ├── inet.c
│ │ │ │ ├── inet_chksum.c
│ │ │ │ ├── ip.c
│ │ │ │ ├── ip_addr.c
│ │ │ │ └── ip_frag.c
│ │ │ ├── mdns.c
│ │ │ ├── mem.c
│ │ │ ├── memp.c
│ │ │ ├── netif.c
│ │ │ ├── pbuf.c
│ │ │ ├── raw.c
│ │ │ ├── sntp.c
│ │ │ ├── stats.c
│ │ │ ├── sys.c
│ │ │ ├── sys_arch.c
│ │ │ ├── tcp.c
│ │ │ ├── tcp_in.c
│ │ │ ├── tcp_out.c
│ │ │ ├── timers.c
│ │ │ └── udp.c
│ │ └── netif/
│ │ ├── Makefile
│ │ └── etharp.c
│ ├── mqtt/
│ │ ├── Makefile
│ │ ├── app.c
│ │ ├── app.h
│ │ ├── mqtt.c
│ │ ├── mqtt.h
│ │ ├── mqtt_msg.c
│ │ ├── mqtt_msg.h
│ │ ├── proto.c
│ │ ├── proto.h
│ │ ├── queue.c
│ │ ├── queue.h
│ │ ├── ringbuf.c
│ │ ├── ringbuf.h
│ │ ├── typedef.h
│ │ ├── utils.c
│ │ └── utils.h
│ ├── platform/
│ │ ├── Makefile
│ │ ├── common.c
│ │ ├── common.h
│ │ ├── config.c
│ │ ├── config.h
│ │ ├── cpu_esp8266.h
│ │ ├── flash_api.c
│ │ ├── flash_api.h
│ │ ├── flash_fs.c
│ │ ├── flash_fs.h
│ │ ├── pin_map.c
│ │ ├── pin_map.h
│ │ ├── platform.c
│ │ └── platform.h
│ ├── sensor/
│ │ ├── Makefile
│ │ ├── bmp180.c
│ │ ├── bmp180.h
│ │ ├── dht22.c
│ │ ├── dht22.h
│ │ ├── ds18b20.c
│ │ ├── ds18b20.h
│ │ ├── sensors.c
│ │ └── sensors.h
│ ├── smart/
│ │ ├── Makefile
│ │ ├── smart.c
│ │ └── smart.h
│ ├── spiffs/
│ │ ├── Makefile
│ │ ├── docs/
│ │ │ ├── IMPLEMENTING
│ │ │ ├── INTEGRATION
│ │ │ ├── TECH_SPEC
│ │ │ └── TODO
│ │ ├── params_test.h
│ │ ├── spiffs.c
│ │ ├── spiffs.h
│ │ ├── spiffs_cache.c
│ │ ├── spiffs_check.c
│ │ ├── spiffs_config.h
│ │ ├── spiffs_gc.c
│ │ ├── spiffs_hydrogen.c
│ │ ├── spiffs_nucleus.c
│ │ └── spiffs_nucleus.h
│ ├── ssl/
│ │ ├── Makefile
│ │ ├── app/
│ │ │ ├── Makefile
│ │ │ ├── espconn_secure.c
│ │ │ └── espconn_ssl.c
│ │ ├── crypto/
│ │ │ ├── Makefile
│ │ │ ├── ssl_aes.c
│ │ │ ├── ssl_bigint.c
│ │ │ ├── ssl_crypto_misc.c
│ │ │ ├── ssl_hmac.c
│ │ │ ├── ssl_md2.c
│ │ │ ├── ssl_md5.c
│ │ │ ├── ssl_rc4.c
│ │ │ ├── ssl_rsa.c
│ │ │ └── ssl_sha1.c
│ │ └── ssl/
│ │ ├── Makefile
│ │ ├── ssl_asn1.c
│ │ ├── ssl_gen_cert.c
│ │ ├── ssl_loader.c
│ │ ├── ssl_openssl.c
│ │ ├── ssl_os_port.c
│ │ ├── ssl_p12.c
│ │ ├── ssl_tls1.c
│ │ ├── ssl_tls1_clnt.c
│ │ ├── ssl_tls1_svr.c
│ │ └── ssl_x509.c
│ ├── user/
│ │ ├── Makefile
│ │ └── user_main.c
│ └── util/
│ ├── Makefile
│ ├── base64.c
│ ├── base64.h
│ ├── linked_list.c
│ └── linked_list.h
├── bin/
│ └── .gitignore
├── include/
│ ├── at_custom.h
│ ├── c_types.h
│ ├── eagle_soc.h
│ ├── espconn.h
│ ├── espnow.h
│ ├── ets_sys.h
│ ├── gpio.h
│ ├── ip_addr.h
│ ├── mem.h
│ ├── mesh.h
│ ├── os_type.h
│ ├── osapi.h
│ ├── ping.h
│ ├── pwm.h
│ ├── queue.h
│ ├── smartconfig.h
│ ├── sntp.h
│ ├── spi_flash.h
│ ├── upgrade.h
│ └── user_interface.h
├── ld/
│ ├── eagle.app.v6.ld
│ └── eagle.rom.addr.v6.ld
├── lib/
│ ├── libat.a
│ ├── libcrypto.a
│ ├── libespnow.a
│ ├── libjson.a
│ ├── liblwip.a
│ ├── liblwip_536.a
│ ├── libmain.a
│ ├── libmesh.a
│ ├── libnet80211.a
│ ├── libphy.a
│ ├── libpp.a
│ ├── libpwm.a
│ ├── libsmartconfig.a
│ ├── libssl.a
│ ├── libupgrade.a
│ ├── libwpa.a
│ └── libwps.a
└── tools/
├── .gitattributes
├── esptool.py
├── makefile.sh
└── mkfs.py
================================================
FILE CONTENTS
================================================
================================================
FILE: LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2015 Israel Lot
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: Makefile
================================================
# copyright (c) 2010 Espressif System
#
ifndef PDIR
endif
# Base directory for the compiler
XTENSA_TOOLS_ROOT ?= /opt/xtensa-lx106-elf/bin
#############################################################
# Select compile
#
ifeq ($(OS),Windows_NT)
# WIN32
# We are under windows.
ifeq ($(XTENSA_CORE),lx106)
# It is xcc
AR = xt-ar
CC = xt-xcc
NM = xt-nm
CPP = xt-cpp
OBJCOPY = xt-objcopy
#MAKE = xt-make
CCFLAGS += -Os --rename-section .text=.irom0.text --rename-section .literal=.irom0.literal
else
# It is gcc, may be cygwin
# Can we use -fdata-sections?
CCFLAGS += -Os -ffunction-sections -fno-jump-tables
AR = xtensa-lx106-elf-ar
CC = xtensa-lx106-elf-gcc
NM = xtensa-lx106-elf-nm
CPP = xtensa-lx106-elf-cpp
OBJCOPY = xtensa-lx106-elf-objcopy
endif
FIRMWAREDIR = ..\\bin\\
ifndef COMPORT
ESPPORT = com1
else
ESPPORT = $(COMPORT)
endif
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
# ->AMD64
endif
ifeq ($(PROCESSOR_ARCHITECTURE),x86)
# ->IA32
endif
else
# We are under other system, may be Linux. Assume using gcc.
# Can we use -fdata-sections?
ifndef COMPORT
ESPPORT = /dev/ttyUSB0
else
ESPPORT = $(COMPORT)
endif
CCFLAGS += -Os -ffunction-sections -fno-jump-tables
AR = xtensa-lx106-elf-ar
CC = xtensa-lx106-elf-gcc
NM = xtensa-lx106-elf-nm
CPP = xtensa-lx106-elf-cpp
OBJCOPY = xtensa-lx106-elf-objcopy
FIRMWAREDIR = ../bin/
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
# LINUX
endif
ifeq ($(UNAME_S),Darwin)
# OSX
endif
UNAME_P := $(shell uname -p)
ifeq ($(UNAME_P),x86_64)
# ->AMD64
endif
ifneq ($(filter %86,$(UNAME_P)),)
# ->IA32
endif
ifneq ($(filter arm%,$(UNAME_P)),)
# ->ARM
endif
endif
#############################################################
ESPTOOL ?= ../tools/esptool.py
MKFSTOOL ?= tools/mkfs.py
CSRCS ?= $(wildcard *.c)
ASRCs ?= $(wildcard *.s)
ASRCS ?= $(wildcard *.S)
SUBDIRS ?= $(patsubst %/,%,$(dir $(wildcard */Makefile)))
ODIR := .output
OBJODIR := $(ODIR)/$(TARGET)/$(FLAVOR)/obj
OBJS := $(CSRCS:%.c=$(OBJODIR)/%.o) \
$(ASRCs:%.s=$(OBJODIR)/%.o) \
$(ASRCS:%.S=$(OBJODIR)/%.o)
DEPS := $(CSRCS:%.c=$(OBJODIR)/%.d) \
$(ASRCs:%.s=$(OBJODIR)/%.d) \
$(ASRCS:%.S=$(OBJODIR)/%.d)
LIBODIR := $(ODIR)/$(TARGET)/$(FLAVOR)/lib
OLIBS := $(GEN_LIBS:%=$(LIBODIR)/%)
IMAGEODIR := $(ODIR)/$(TARGET)/$(FLAVOR)/image
OIMAGES := $(GEN_IMAGES:%=$(IMAGEODIR)/%)
BINODIR := $(ODIR)/$(TARGET)/$(FLAVOR)/bin
OBINS := $(GEN_BINS:%=$(BINODIR)/%)
CCFLAGS += \
-g \
-O2 \
-Wpointer-arith \
-Wundef \
-Werror \
-Wl,-EL \
-fno-inline-functions \
-nostdlib \
-mlongcalls \
-mtext-section-literals \
# -Wall
CFLAGS = $(CCFLAGS) $(DEFINES) $(EXTRA_CCFLAGS) $(INCLUDES)
DFLAGS = $(CCFLAGS) $(DDEFINES) $(EXTRA_CCFLAGS) $(INCLUDES)
#############################################################
# Functions
#
define ShortcutRule
$(1): .subdirs $(2)/$(1)
endef
define MakeLibrary
DEP_LIBS_$(1) = $$(foreach lib,$$(filter %.a,$$(COMPONENTS_$(1))),$$(dir $$(lib))$$(LIBODIR)/$$(notdir $$(lib)))
DEP_OBJS_$(1) = $$(foreach obj,$$(filter %.o,$$(COMPONENTS_$(1))),$$(dir $$(obj))$$(OBJODIR)/$$(notdir $$(obj)))
$$(LIBODIR)/$(1).a: $$(OBJS) $$(DEP_OBJS_$(1)) $$(DEP_LIBS_$(1)) $$(DEPENDS_$(1))
@mkdir -p $$(LIBODIR)
$$(if $$(filter %.a,$$?),mkdir -p $$(EXTRACT_DIR)_$(1))
$$(if $$(filter %.a,$$?),cd $$(EXTRACT_DIR)_$(1); $$(foreach lib,$$(filter %.a,$$?),$$(AR) xo $$(UP_EXTRACT_DIR)/$$(lib);))
$$(AR) ru $$@ $$(filter %.o,$$?) $$(if $$(filter %.a,$$?),$$(EXTRACT_DIR)_$(1)/*.o)
$$(if $$(filter %.a,$$?),$$(RM) -r $$(EXTRACT_DIR)_$(1))
endef
define MakeImage
DEP_LIBS_$(1) = $$(foreach lib,$$(filter %.a,$$(COMPONENTS_$(1))),$$(dir $$(lib))$$(LIBODIR)/$$(notdir $$(lib)))
DEP_OBJS_$(1) = $$(foreach obj,$$(filter %.o,$$(COMPONENTS_$(1))),$$(dir $$(obj))$$(OBJODIR)/$$(notdir $$(obj)))
$$(IMAGEODIR)/$(1).out: $$(OBJS) $$(DEP_OBJS_$(1)) $$(DEP_LIBS_$(1)) $$(DEPENDS_$(1))
@mkdir -p $$(IMAGEODIR)
$$(CC) $$(LDFLAGS) $$(if $$(LINKFLAGS_$(1)),$$(LINKFLAGS_$(1)),$$(LINKFLAGS_DEFAULT) $$(OBJS) $$(DEP_OBJS_$(1)) $$(DEP_LIBS_$(1))) -o $$@
endef
$(BINODIR)/%.bin: $(IMAGEODIR)/%.out
@mkdir -p $(BINODIR)
$(ESPTOOL) elf2image $< -o $(FIRMWAREDIR)
#############################################################
# Rules base
# Should be done in top-level makefile only
#
all: .subdirs $(OBJS) $(OLIBS) $(OIMAGES) $(OBINS) $(SPECIAL_MKTARGETS)
clean:
$(foreach d, $(SUBDIRS), $(MAKE) -C $(d) clean;)
$(RM) -r $(ODIR)/$(TARGET)/$(FLAVOR)
clobber: $(SPECIAL_CLOBBER)
$(foreach d, $(SUBDIRS), $(MAKE) -C $(d) clobber;)
$(RM) -r $(ODIR)
flash:
ifndef PDIR
$(MAKE) -C ./app flash
else
$(ESPTOOL) --port $(ESPPORT) write_flash 0x00000 $(FIRMWAREDIR)0x00000.bin 0x10000 $(FIRMWAREDIR)0x10000.bin
endif
html:
$(MKFSTOOL) -s app/http/html/ -d app/http/rofs_data.c
.subdirs:
@set -e; $(foreach d, $(SUBDIRS), $(MAKE) -C $(d);)
#.subdirs:
# $(foreach d, $(SUBDIRS), $(MAKE) -C $(d))
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),clobber)
ifdef DEPS
sinclude $(DEPS)
endif
endif
endif
$(OBJODIR)/%.o: %.c
@mkdir -p $(OBJODIR);
$(CC) $(if $(findstring $<,$(DSRCS)),$(DFLAGS),$(CFLAGS)) $(COPTS_$(*F)) -o $@ -c $<
$(OBJODIR)/%.d: %.c
@mkdir -p $(OBJODIR);
@echo DEPEND: $(CC) -M $(CFLAGS) $<
@set -e; rm -f $@; \
$(CC) -M $(CFLAGS) $< > $@.$$$$; \
sed 's,\($*\.o\)[ :]*,$(OBJODIR)/\1 $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
$(OBJODIR)/%.o: %.s
@mkdir -p $(OBJODIR);
$(CC) $(CFLAGS) -o $@ -c $<
$(OBJODIR)/%.d: %.s
@mkdir -p $(OBJODIR); \
set -e; rm -f $@; \
$(CC) -M $(CFLAGS) $< > $@.$$$$; \
sed 's,\($*\.o\)[ :]*,$(OBJODIR)/\1 $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
$(OBJODIR)/%.o: %.S
@mkdir -p $(OBJODIR);
$(CC) $(CFLAGS) -D__ASSEMBLER__ -o $@ -c $<
$(OBJODIR)/%.d: %.S
@mkdir -p $(OBJODIR); \
set -e; rm -f $@; \
$(CC) -M $(CFLAGS) $< > $@.$$$$; \
sed 's,\($*\.o\)[ :]*,$(OBJODIR)/\1 $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
$(foreach lib,$(GEN_LIBS),$(eval $(call ShortcutRule,$(lib),$(LIBODIR))))
$(foreach image,$(GEN_IMAGES),$(eval $(call ShortcutRule,$(image),$(IMAGEODIR))))
$(foreach bin,$(GEN_BINS),$(eval $(call ShortcutRule,$(bin),$(BINODIR))))
$(foreach lib,$(GEN_LIBS),$(eval $(call MakeLibrary,$(basename $(lib)))))
$(foreach image,$(GEN_IMAGES),$(eval $(call MakeImage,$(basename $(image)))))
#############################################################
# Recursion Magic - Don't touch this!!
#
# Each subtree potentially has an include directory
# corresponding to the common APIs applicable to modules
# rooted at that subtree. Accordingly, the INCLUDE PATH
# of a module can only contain the include directories up
# its parent path, and not its siblings
#
# Required for each makefile to inherit from the parent
#
INCLUDES := $(INCLUDES) -I $(PDIR)include -I $(PDIR)include/$(TARGET)
PDIR := ../$(PDIR)
sinclude $(PDIR)Makefile
================================================
FILE: README.md
================================================
esp-ginx
--------
##Robust HTTP server for the ESP8266
This project was inspired esp-httpd by Sprite_tm, NodeMcu ( https://github.com/nodemcu/nodemcu-firmware ) and NGINX
Main features
=============
1. Event-driven, single threaded. No blocking, nowhere.
2. DNS Server built in, means we have a captive portal ( will open upon connection os most phones and computers )
3. Host check, means we can ensure server is on here.com and not there.com
4. Redirects ( so #2 will work )
5. HTTP Method enforcement
7. URL rewrite ( very simple one but gives us friendly urls)
8. CGI ( similar to esp-httpd but with more features )
9. CORS enabled
10. Zero-copy ( or almost ) request parse, inspired on NGINX parse.
11. ROFS compressed with gzip
12. WebSockects!
12. Bonus http client :)
Overview
-------
After playing around with esp-httpd I decided to extend it and ended up deciding to take it to the next level.
I've used the NodeMcu firmware as base, removed all the lua related code and got a solid framework to work on.
Later I ported Joyent's http parser (https://github.com/joyent/http-parser), which is almost the NGINX implementation, to the esp and developed from there.
The File System
---------------
I personally didn't like the overhead of decompressing static files to send over http as in esp-httpd, so I created a rom file system that consists of a static FS descriptor and an array with the data concatenated. To keep size short, I compress the files with gzip and send the compressed data stream with the gzip content-encoding. I could fit the whole bootstrap css+js files even if I didn't need to, plus cats pictures to honor Sprite_tm.
Static files are placed in the folder 'html' and there's a tool written in python to create the file system. The file system in the end id just a c file.
Issuing 'Make html' creates/updates the file system.
There's a Spiffs built on the firmware, so a next step should be use it instead, but for my needs right now a static FS is enough.
CGI
---
I don't believe in template html for such low memory devices. I rather prefer the static html + json api approach. So that's what you will see.
When a request arrives, the server will start to parse it and call a cgi dispatcher on several points of the process, mainly on the http parser callbacks. This allows me to reject a request even before the body was received for example.
It also allows me not to copy unnecessary data to the precious ESP memory. CGI functions can say which headers they need to read and the parser will extract them as the data comes. We never save the whole request on a buffer.
CGI functions are very flexible. They can allow other rules to proccess or keep the processing to themselfs. We can plugin features like request filtering by inserting wildcard cgi functions on the pipe for example. CORS cgi will plug itself on the pre-headers received and post headers received only.
DNS server and Captive Portal
---------
I wanted to have captive portal-like featured on the server.
To do so the first step was to compile our own version of LwIP stack so we can enable DNS server announce via DHCP. Fortunatelly NodeMCU had LwIP sources already.
We then need to answer some known domains queries with our own ip, so we can capture those requests. Iphones for example to detect captive portal will issue a request to some random apple owned domains expecting 200 OK response, if we respond those requests with a redirect, voilà, the phone will open a login page with anything we like. It also works on PCs, windows will issue a requet to msftncsi.com to check for internet connection. When we redirect it, it will open our esp-ginx server on our loved browser.
There's a list of knows domains on the DNS server. I could just answer all DNS queries with our esp ip, but it would then flood our little esp with nonsense http requests.
Websockets
---
Why? Mostly because I didn't see it around.
I use it to speed test the esp's tcp capabilities, so a very simple application is written on top of the websocket stack that will keep flushing tcp packets of the chosen size so we can measure how many bytes / second we receive on the other end.
The Demo
--------
This demo application assumes:
* Relays connects to GPIO 5 and 4
* DHT22 sensor connected to GPIO 2
You can :
* Scan available wifi networks
* Connect to an wifi network
* Direct test the relays
* Read temperature and humidity data
* Do a tcp speed test on ESP8266 using websockets ( no more discussion about it, data wins )
* See the required pictures of cats

================================================
FILE: app/.gitignore
================================================
*.output*
!.gitignore
================================================
FILE: app/Makefile
================================================
#############################################################
# Required variables for each makefile
# Discard this section from all parent makefiles
# Expected variables (with automatic defaults):
# CSRCS (all "C" files in the dir)
# SUBDIRS (all subdirs with a Makefile)
# GEN_LIBS - list of libs to be generated ()
# GEN_IMAGES - list of object file images to be generated ()
# GEN_BINS - list of binaries to be generated ()
# COMPONENTS_xxx - a list of libs/objs in the form
# subdir/lib to be extracted and rolled up into
# a generated lib/image xxx.a ()
#
TARGET = eagle
#FLAVOR = release
FLAVOR = debug
#EXTRA_CCFLAGS += -u
ifndef PDIR # {
GEN_IMAGES= eagle.app.v6.out
GEN_BINS= eagle.app.v6.bin
SPECIAL_MKTARGETS=$(APP_MKTARGETS)
SUBDIRS= \
user \
http \
dns \
driver \
lwip \
json \
platform \
libc \
mqtt \
smart \
util \
sensor \
spiffs
endif # } PDIR
APPDIR = .
LDDIR = ../ld
CCFLAGS += -Os
TARGET_LDFLAGS = \
-nostdlib \
-Wl,-EL \
--longcalls \
--text-section-literals
ifeq ($(FLAVOR),debug)
TARGET_LDFLAGS += -g -O2
endif
ifeq ($(FLAVOR),release)
TARGET_LDFLAGS += -g -O0
endif
LD_FILE = $(LDDIR)/eagle.app.v6.ld
ifeq ($(APP), 1)
LD_FILE = $(LDDIR)/eagle.app.v6.app1.ld
endif
ifeq ($(APP), 2)
LD_FILE = $(LDDIR)/eagle.app.v6.app2.ld
endif
COMPONENTS_eagle.app.v6 = \
user/libuser.a \
http/http.a \
dns/dns.a \
driver/libdriver.a \
lwip/liblwip.a \
json/libjson.a \
platform/libplatform.a \
libc/liblibc.a \
mqtt/mqtt.a \
smart/smart.a \
util/util.a \
sensor/sensors.a \
spiffs/spiffs.a
LINKFLAGS_eagle.app.v6 = \
-L../lib \
-nostdlib \
-T$(LD_FILE) \
-Wl,--no-check-sections \
-u call_user_start \
-Wl,-static \
-Wl,--start-group \
-lc \
-lgcc \
-lhal \
-lphy \
-lpp \
-lnet80211 \
-lwpa \
-lmain \
-ljson \
-lsmartconfig \
-lssl \
$(DEP_LIBS_eagle.app.v6) \
-Wl,--end-group
DEPENDS_eagle.app.v6 = \
$(LD_FILE) \
$(LDDIR)/eagle.rom.addr.v6.ld
#############################################################
# Configuration i.e. compile options etc.
# Target specific stuff (defines etc.) goes in here!
# Generally values applying to a tree are captured in the
# makefile at its root level - these are then overridden
# for a subtree within the makefile rooted therein
#
#UNIVERSAL_TARGET_DEFINES = \
# Other potential configuration flags include:
# -DTXRX_TXBUF_DEBUG
# -DTXRX_RXBUF_DEBUG
# -DWLAN_CONFIG_CCX
CONFIGURATION_DEFINES = -D__ets__ \
-DICACHE_FLASH \
-DLWIP_OPEN_SRC \
-DPBUF_RSV_FOR_WLAN \
-DEBUF_LWIP
DEFINES += \
$(UNIVERSAL_TARGET_DEFINES) \
$(CONFIGURATION_DEFINES)
DDEFINES += \
$(UNIVERSAL_TARGET_DEFINES) \
$(CONFIGURATION_DEFINES)
#############################################################
# Recursion Magic - Don't touch this!!
#
# Each subtree potentially has an include directory
# corresponding to the common APIs applicable to modules
# rooted at that subtree. Accordingly, the INCLUDE PATH
# of a module can only contain the include directories up
# its parent path, and not its siblings
#
# Required for each makefile to inherit from the parent
#
INCLUDES := $(INCLUDES) -I $(PDIR)include
INCLUDES += -I ./
PDIR := ../$(PDIR)
sinclude $(PDIR)Makefile
.PHONY: FORCE
FORCE:
================================================
FILE: app/dns/Makefile
================================================
#############################################################
# Required variables for each makefile
# Discard this section from all parent makefiles
# Expected variables (with automatic defaults):
# CSRCS (all "C" files in the dir)
# SUBDIRS (all subdirs with a Makefile)
# GEN_LIBS - list of libs to be generated ()
# GEN_IMAGES - list of images to be generated ()
# COMPONENTS_xxx - a list of libs/objs in the form
# subdir/lib to be extracted and rolled up into
# a generated lib/image xxx.a ()
#
ifndef PDIR
GEN_LIBS = dns.a
endif
#############################################################
# Configuration i.e. compile options etc.
# Target specific stuff (defines etc.) goes in here!
# Generally values applying to a tree are captured in the
# makefile at its root level - these are then overridden
# for a subtree within the makefile rooted therein
#
#DEFINES +=
#############################################################
# Recursion Magic - Don't touch this!!
#
# Each subtree potentially has an include directory
# corresponding to the common APIs applicable to modules
# rooted at that subtree. Accordingly, the INCLUDE PATH
# of a module can only contain the include directories up
# its parent path, and not its siblings
#
# Required for each makefile to inherit from the parent
#
INCLUDES := $(INCLUDES) -I $(PDIR)include
INCLUDES += -I ./
INCLUDES += -I ../libc
PDIR := ../$(PDIR)
sinclude $(PDIR)Makefile
================================================
FILE: app/dns/dns.c
================================================
#include "c_types.h"
#include "user_interface.h"
#include "user_config.h"
#include "espconn.h"
#include "mem.h"
#include "osapi.h"
//Listening connection data
static struct espconn dnsConn;
static esp_udp dnsUdp;
static const char *localDomains[]={
INTERFACE_DOMAIN, //because I can be anybody
//captive portal domains
"google.com", //android , yes I can be Google too
"gsp1.apple.com", //iphone
"akamaitechnologies.com",
"apple.com",
"appleiphonecell.com",
"itools.info",
"ibook.info",
"airport.us",
"thinkdifferent.us",
"apple.com.edgekey.net",
"akamaiedge.net",
"msftncsi.com", //for windows and windows phone,
"microsoft.com",
NULL
};
static int ICACHE_FLASH_ATTR isKnownDNS(char *dns){
int i=0;
while(true){
const char *cmp = localDomains[i];
if(cmp==NULL)
break;
if(strstr(dns,cmp))
return 1;
i++;
}
return 0;
}
static void ICACHE_FLASH_ATTR dnsQueryReceived(void *arg, char *data, unsigned short length) {
// parse incoming query domain
char domain[30];
char *writePos=domain;
memset(domain,0,30);
int offSet=12;
int len=data[offSet];
while(len!=0 && offSet<length){
offSet++;
memcpy(writePos,data+offSet,len);
writePos+=len; //advance
offSet+=len;
len=data[offSet];
if(len!=0){
*writePos='.';
writePos++;
}
}
NODE_DBG("DNS Query Received: %s",domain);
if(!isKnownDNS(domain))
return;
struct espconn *conn=arg;
//build response
char response[100] = {data[0], data[1],
0b10000100 | (0b00000001 & data[2]), //response, authorative answer, not truncated, copy the recursion bit
0b00000000, //no recursion available, no errors
data[4], data[5], //Question count
data[4], data[5], //answer count
0x00, 0x00, //NS record count
0x00, 0x00}; //Resource record count
int idx = 12;
memcpy(response+12, data+12, length-12); //Copy the rest of the query section
idx += length-12;
//Set a pointer to the domain name in the question section
response[idx] = 0xC0;
response[idx+1] = 0x0C;
//Set the type to "Host Address"
response[idx+2] = 0x00;
response[idx+3] = 0x01;
//Set the response class to IN
response[idx+4] = 0x00;
response[idx+5] = 0x01;
//A 32 bit integer specifying TTL in seconds, 0 means no caching
response[idx+6] = 0x00;
response[idx+7] = 0x00;
response[idx+8] = 0x00;
response[idx+9] = 0x00;
//RDATA length
response[idx+10] = 0x00;
response[idx+11] = 0x04; //4 byte IP address
//The IP address
response[idx + 12] = 192;
response[idx + 13] = 168;
response[idx + 14] = 4;
response[idx + 15] = 1;
int ret = espconn_sendto(conn, (uint8_t*)response, idx+16);
uint8_t *ip = conn->proto.udp->remote_ip;
//NODE_DBG("UDP send res : %d ip: %d.%d.%d.%d , port: %d",ret,ip[0],ip[1],ip[2],ip[3],conn->proto.udp->remote_port);
}
void ICACHE_FLASH_ATTR init_dns() {
uint8_t mode = 1;
wifi_softap_set_dhcps_offer_option(OFFER_ROUTER, &mode);
wifi_set_broadcast_if(3);
//espconn_disconnect(&dnsConn);
espconn_delete(&dnsConn);
dnsConn.type=ESPCONN_UDP;
dnsConn.state=ESPCONN_NONE;
dnsUdp.local_port=(int)53;
dnsConn.proto.udp=&dnsUdp;
espconn_regist_recvcb(&dnsConn, dnsQueryReceived);
int res = espconn_create(&dnsConn);
NODE_DBG("DNS server init, conn=%p , status=%d", &dnsConn,res);
}
================================================
FILE: app/dns/dns.h
================================================
#ifndef DNS_H
#define DNS_H
void ICACHE_FLASH_ATTR init_dns();
#endif
================================================
FILE: app/driver/Makefile
================================================
#############################################################
# Required variables for each makefile
# Discard this section from all parent makefiles
# Expected variables (with automatic defaults):
# CSRCS (all "C" files in the dir)
# SUBDIRS (all subdirs with a Makefile)
# GEN_LIBS - list of libs to be generated ()
# GEN_IMAGES - list of images to be generated ()
# COMPONENTS_xxx - a list of libs/objs in the form
# subdir/lib to be extracted and rolled up into
# a generated lib/image xxx.a ()
#
ifndef PDIR
GEN_LIBS = libdriver.a
endif
#############################################################
# Configuration i.e. compile options etc.
# Target specific stuff (defines etc.) goes in here!
# Generally values applying to a tree are captured in the
# makefile at its root level - these are then overridden
# for a subtree within the makefile rooted therein
#
#DEFINES +=
#############################################################
# Recursion Magic - Don't touch this!!
#
# Each subtree potentially has an include directory
# corresponding to the common APIs applicable to modules
# rooted at that subtree. Accordingly, the INCLUDE PATH
# of a module can only contain the include directories up
# its parent path, and not its siblings
#
# Required for each makefile to inherit from the parent
#
INCLUDES := $(INCLUDES) -I $(PDIR)include
INCLUDES += -I ./
INCLUDES += -I ../
INCLUDES += -I ../platform
INCLUDES += -I ../libc
PDIR := ../$(PDIR)
sinclude $(PDIR)Makefile
================================================
FILE: app/driver/gpio16.c
================================================
#include "ets_sys.h"
#include "osapi.h"
#include "driver/gpio16.h"
void ICACHE_FLASH_ATTR
gpio16_output_conf(void)
{
WRITE_PERI_REG(PAD_XPD_DCDC_CONF,
(READ_PERI_REG(PAD_XPD_DCDC_CONF) & 0xffffffbc) | (uint32)0x1); // mux configuration for XPD_DCDC to output rtc_gpio0
WRITE_PERI_REG(RTC_GPIO_CONF,
(READ_PERI_REG(RTC_GPIO_CONF) & (uint32)0xfffffffe) | (uint32)0x0); //mux configuration for out enable
WRITE_PERI_REG(RTC_GPIO_ENABLE,
(READ_PERI_REG(RTC_GPIO_ENABLE) & (uint32)0xfffffffe) | (uint32)0x1); //out enable
}
void ICACHE_FLASH_ATTR
gpio16_output_set(uint8 value)
{
WRITE_PERI_REG(RTC_GPIO_OUT,
(READ_PERI_REG(RTC_GPIO_OUT) & (uint32)0xfffffffe) | (uint32)(value & 1));
}
void ICACHE_FLASH_ATTR
gpio16_input_conf(void)
{
WRITE_PERI_REG(PAD_XPD_DCDC_CONF,
(READ_PERI_REG(PAD_XPD_DCDC_CONF) & 0xffffffbc) | (uint32)0x1); // mux configuration for XPD_DCDC and rtc_gpio0 connection
WRITE_PERI_REG(RTC_GPIO_CONF,
(READ_PERI_REG(RTC_GPIO_CONF) & (uint32)0xfffffffe) | (uint32)0x0); //mux configuration for out enable
WRITE_PERI_REG(RTC_GPIO_ENABLE,
READ_PERI_REG(RTC_GPIO_ENABLE) & (uint32)0xfffffffe); //out disable
}
uint8 ICACHE_FLASH_ATTR
gpio16_input_get(void)
{
return (uint8)(READ_PERI_REG(RTC_GPIO_IN_DATA) & 1);
}
================================================
FILE: app/driver/i2c_master.c
================================================
/******************************************************************************
* Copyright 2013-2014 Espressif Systems (Wuxi)
*
* FileName: i2c_master.c
*
* Description: i2c master API
*
* Modification history:
* 2014/3/12, v1.0 create this file.
*******************************************************************************/
#include "ets_sys.h"
#include "osapi.h"
#include "gpio.h"
#include "driver/i2c_master.h"
#include "pin_map.h"
LOCAL uint8 m_nLastSDA;
LOCAL uint8 m_nLastSCL;
LOCAL uint8 pinSDA = 2;
LOCAL uint8 pinSCL = 15;
/******************************************************************************
* FunctionName : i2c_master_setDC
* Description : Internal used function -
* set i2c SDA and SCL bit value for half clk cycle
* Parameters : uint8 SDA
* uint8 SCL
* Returns : NONE
*******************************************************************************/
LOCAL void ICACHE_FLASH_ATTR
i2c_master_setDC(uint8 SDA, uint8 SCL)
{
SDA &= 0x01;
SCL &= 0x01;
m_nLastSDA = SDA;
m_nLastSCL = SCL;
if ((0 == SDA) && (0 == SCL)) {
I2C_MASTER_SDA_LOW_SCL_LOW();
} else if ((0 == SDA) && (1 == SCL)) {
I2C_MASTER_SDA_LOW_SCL_HIGH();
} else if ((1 == SDA) && (0 == SCL)) {
I2C_MASTER_SDA_HIGH_SCL_LOW();
} else {
I2C_MASTER_SDA_HIGH_SCL_HIGH();
}
}
/******************************************************************************
* FunctionName : i2c_master_getDC
* Description : Internal used function -
* get i2c SDA bit value
* Parameters : NONE
* Returns : uint8 - SDA bit value
*******************************************************************************/
LOCAL uint8 ICACHE_FLASH_ATTR
i2c_master_getDC(void)
{
uint8 sda_out;
sda_out = GPIO_INPUT_GET(GPIO_ID_PIN(I2C_MASTER_SDA_GPIO));
return sda_out;
}
/******************************************************************************
* FunctionName : i2c_master_init
* Description : initilize I2C bus to enable i2c operations
* Parameters : NONE
* Returns : NONE
*******************************************************************************/
void ICACHE_FLASH_ATTR
i2c_master_init(void)
{
uint8 i;
i2c_master_setDC(1, 0);
i2c_master_wait(5);
// when SCL = 0, toggle SDA to clear up
i2c_master_setDC(0, 0) ;
i2c_master_wait(5);
i2c_master_setDC(1, 0) ;
i2c_master_wait(5);
// set data_cnt to max value
for (i = 0; i < 28; i++) {
i2c_master_setDC(1, 0);
i2c_master_wait(5); // sda 1, scl 0
i2c_master_setDC(1, 1);
i2c_master_wait(5); // sda 1, scl 1
}
// reset all
i2c_master_stop();
return;
}
uint8 i2c_master_get_pinSDA(){
return pinSDA;
}
uint8 i2c_master_get_pinSCL(){
return pinSCL;
}
/******************************************************************************
* FunctionName : i2c_master_gpio_init
* Description : config SDA and SCL gpio to open-drain output mode,
* mux and gpio num defined in i2c_master.h
* Parameters : NONE
* Returns : NONE
*******************************************************************************/
void ICACHE_FLASH_ATTR
i2c_master_gpio_init(uint8 sda, uint8 scl)
{
pinSDA = pin_num[sda];
pinSCL = pin_num[scl];
ETS_GPIO_INTR_DISABLE() ;
// ETS_INTR_LOCK();
PIN_FUNC_SELECT(I2C_MASTER_SDA_MUX, I2C_MASTER_SDA_FUNC);
PIN_FUNC_SELECT(I2C_MASTER_SCL_MUX, I2C_MASTER_SCL_FUNC);
GPIO_REG_WRITE(GPIO_PIN_ADDR(GPIO_ID_PIN(I2C_MASTER_SDA_GPIO)), GPIO_REG_READ(GPIO_PIN_ADDR(GPIO_ID_PIN(I2C_MASTER_SDA_GPIO))) | GPIO_PIN_PAD_DRIVER_SET(GPIO_PAD_DRIVER_ENABLE)); //open drain;
GPIO_REG_WRITE(GPIO_ENABLE_ADDRESS, GPIO_REG_READ(GPIO_ENABLE_ADDRESS) | (1 << I2C_MASTER_SDA_GPIO));
GPIO_REG_WRITE(GPIO_PIN_ADDR(GPIO_ID_PIN(I2C_MASTER_SCL_GPIO)), GPIO_REG_READ(GPIO_PIN_ADDR(GPIO_ID_PIN(I2C_MASTER_SCL_GPIO))) | GPIO_PIN_PAD_DRIVER_SET(GPIO_PAD_DRIVER_ENABLE)); //open drain;
GPIO_REG_WRITE(GPIO_ENABLE_ADDRESS, GPIO_REG_READ(GPIO_ENABLE_ADDRESS) | (1 << I2C_MASTER_SCL_GPIO));
I2C_MASTER_SDA_HIGH_SCL_HIGH();
ETS_GPIO_INTR_ENABLE() ;
// ETS_INTR_UNLOCK();
i2c_master_init();
}
/******************************************************************************
* FunctionName : i2c_master_start
* Description : set i2c to send state
* Parameters : NONE
* Returns : NONE
*******************************************************************************/
void ICACHE_FLASH_ATTR
i2c_master_start(void)
{
i2c_master_setDC(1, m_nLastSCL);
i2c_master_wait(5);
i2c_master_setDC(1, 1);
i2c_master_wait(5); // sda 1, scl 1
i2c_master_setDC(0, 1);
i2c_master_wait(5); // sda 0, scl 1
}
/******************************************************************************
* FunctionName : i2c_master_stop
* Description : set i2c to stop sending state
* Parameters : NONE
* Returns : NONE
*******************************************************************************/
void ICACHE_FLASH_ATTR
i2c_master_stop(void)
{
i2c_master_wait(5);
i2c_master_setDC(0, m_nLastSCL);
i2c_master_wait(5); // sda 0
i2c_master_setDC(0, 1);
i2c_master_wait(5); // sda 0, scl 1
i2c_master_setDC(1, 1);
i2c_master_wait(5); // sda 1, scl 1
}
/******************************************************************************
* FunctionName : i2c_master_setAck
* Description : set ack to i2c bus as level value
* Parameters : uint8 level - 0 or 1
* Returns : NONE
*******************************************************************************/
void ICACHE_FLASH_ATTR
i2c_master_setAck(uint8 level)
{
i2c_master_setDC(m_nLastSDA, 0);
i2c_master_wait(5);
i2c_master_setDC(level, 0);
i2c_master_wait(5); // sda level, scl 0
i2c_master_setDC(level, 1);
i2c_master_wait(8); // sda level, scl 1
i2c_master_setDC(level, 0);
i2c_master_wait(5); // sda level, scl 0
i2c_master_setDC(1, 0);
i2c_master_wait(5);
}
/******************************************************************************
* FunctionName : i2c_master_getAck
* Description : confirm if peer send ack
* Parameters : NONE
* Returns : uint8 - ack value, 0 or 1
*******************************************************************************/
uint8 ICACHE_FLASH_ATTR
i2c_master_getAck(void)
{
uint8 retVal;
i2c_master_setDC(m_nLastSDA, 0);
i2c_master_wait(5);
i2c_master_setDC(1, 0);
i2c_master_wait(5);
i2c_master_setDC(1, 1);
i2c_master_wait(5);
retVal = i2c_master_getDC();
i2c_master_wait(5);
i2c_master_setDC(1, 0);
i2c_master_wait(5);
return retVal;
}
/******************************************************************************
* FunctionName : i2c_master_checkAck
* Description : get dev response
* Parameters : NONE
* Returns : true : get ack ; false : get nack
*******************************************************************************/
bool ICACHE_FLASH_ATTR
i2c_master_checkAck(void)
{
if(i2c_master_getAck()){
return FALSE;
}else{
return TRUE;
}
}
/******************************************************************************
* FunctionName : i2c_master_send_ack
* Description : response ack
* Parameters : NONE
* Returns : NONE
*******************************************************************************/
void ICACHE_FLASH_ATTR
i2c_master_send_ack(void)
{
i2c_master_setAck(0x0);
}
/******************************************************************************
* FunctionName : i2c_master_send_nack
* Description : response nack
* Parameters : NONE
* Returns : NONE
*******************************************************************************/
void ICACHE_FLASH_ATTR
i2c_master_send_nack(void)
{
i2c_master_setAck(0x1);
}
/******************************************************************************
* FunctionName : i2c_master_readByte
* Description : read Byte from i2c bus
* Parameters : NONE
* Returns : uint8 - readed value
*******************************************************************************/
uint8 ICACHE_FLASH_ATTR
i2c_master_readByte(void)
{
uint8 retVal = 0;
uint8 k, i;
i2c_master_wait(5);
i2c_master_setDC(m_nLastSDA, 0);
i2c_master_wait(5); // sda 1, scl 0
for (i = 0; i < 8; i++) {
i2c_master_wait(5);
i2c_master_setDC(1, 0);
i2c_master_wait(5); // sda 1, scl 0
i2c_master_setDC(1, 1);
i2c_master_wait(5); // sda 1, scl 1
k = i2c_master_getDC();
i2c_master_wait(5);
if (i == 7) {
i2c_master_wait(3); ////
}
k <<= (7 - i);
retVal |= k;
}
i2c_master_setDC(1, 0);
i2c_master_wait(5); // sda 1, scl 0
return retVal;
}
/******************************************************************************
* FunctionName : i2c_master_writeByte
* Description : write wrdata value(one byte) into i2c
* Parameters : uint8 wrdata - write value
* Returns : NONE
*******************************************************************************/
void ICACHE_FLASH_ATTR
i2c_master_writeByte(uint8 wrdata)
{
uint8 dat;
sint8 i;
i2c_master_wait(5);
i2c_master_setDC(m_nLastSDA, 0);
i2c_master_wait(5);
for (i = 7; i >= 0; i--) {
dat = wrdata >> i;
i2c_master_setDC(dat, 0);
i2c_master_wait(5);
i2c_master_setDC(dat, 1);
i2c_master_wait(5);
if (i == 0) {
i2c_master_wait(3); ////
}
i2c_master_setDC(dat, 0);
i2c_master_wait(5);
}
}
================================================
FILE: app/driver/key.c
================================================
/******************************************************************************
* Copyright 2013-2014 Espressif Systems (Wuxi)
*
* FileName: key.c
*
* Description: key driver, now can use different gpio and install different function
*
* Modification history:
* 2014/5/1, v1.0 create this file.
*******************************************************************************/
#include "ets_sys.h"
#include "os_type.h"
#include "osapi.h"
#include "mem.h"
#include "gpio.h"
#include "user_interface.h"
#include "driver/key.h"
LOCAL void key_intr_handler(struct keys_param *keys);
/******************************************************************************
* FunctionName : key_init_single
* Description : init single key's gpio and register function
* Parameters : uint8 gpio_id - which gpio to use
* uint32 gpio_name - gpio mux name
* uint32 gpio_func - gpio function
* key_function long_press - long press function, needed to install
* key_function short_press - short press function, needed to install
* Returns : single_key_param - single key parameter, needed by key init
*******************************************************************************/
struct single_key_param *ICACHE_FLASH_ATTR
key_init_single(uint8 gpio_id, uint32 gpio_name, uint8 gpio_func, key_function long_press, key_function short_press)
{
struct single_key_param *single_key = (struct single_key_param *)os_zalloc(sizeof(struct single_key_param));
single_key->gpio_id = gpio_id;
single_key->gpio_name = gpio_name;
single_key->gpio_func = gpio_func;
single_key->long_press = long_press;
single_key->short_press = short_press;
return single_key;
}
/******************************************************************************
* FunctionName : key_init
* Description : init keys
* Parameters : key_param *keys - keys parameter, which inited by key_init_single
* Returns : none
*******************************************************************************/
void ICACHE_FLASH_ATTR
key_init(struct keys_param *keys)
{
uint8 i;
ETS_GPIO_INTR_ATTACH(key_intr_handler, keys);
ETS_GPIO_INTR_DISABLE();
for (i = 0; i < keys->key_num; i++) {
keys->single_key[i]->key_level = 1;
PIN_FUNC_SELECT(keys->single_key[i]->gpio_name, keys->single_key[i]->gpio_func);
gpio_output_set(0, 0, 0, GPIO_ID_PIN(keys->single_key[i]->gpio_id));
gpio_register_set(GPIO_PIN_ADDR(keys->single_key[i]->gpio_id), GPIO_PIN_INT_TYPE_SET(GPIO_PIN_INTR_DISABLE)
| GPIO_PIN_PAD_DRIVER_SET(GPIO_PAD_DRIVER_DISABLE)
| GPIO_PIN_SOURCE_SET(GPIO_AS_PIN_SOURCE));
//clear gpio14 status
GPIO_REG_WRITE(GPIO_STATUS_W1TC_ADDRESS, BIT(keys->single_key[i]->gpio_id));
//enable interrupt
gpio_pin_intr_state_set(GPIO_ID_PIN(keys->single_key[i]->gpio_id), GPIO_PIN_INTR_NEGEDGE);
}
ETS_GPIO_INTR_ENABLE();
}
/******************************************************************************
* FunctionName : key_5s_cb
* Description : long press 5s timer callback
* Parameters : single_key_param *single_key - single key parameter
* Returns : none
*******************************************************************************/
LOCAL void ICACHE_FLASH_ATTR
key_5s_cb(struct single_key_param *single_key)
{
os_timer_disarm(&single_key->key_5s);
// low, then restart
if (0 == GPIO_INPUT_GET(GPIO_ID_PIN(single_key->gpio_id))) {
if (single_key->long_press) {
single_key->long_press();
}
}
}
/******************************************************************************
* FunctionName : key_50ms_cb
* Description : 50ms timer callback to check it's a real key push
* Parameters : single_key_param *single_key - single key parameter
* Returns : none
*******************************************************************************/
LOCAL void ICACHE_FLASH_ATTR
key_50ms_cb(struct single_key_param *single_key)
{
os_timer_disarm(&single_key->key_50ms);
// high, then key is up
if (1 == GPIO_INPUT_GET(GPIO_ID_PIN(single_key->gpio_id))) {
os_timer_disarm(&single_key->key_5s);
single_key->key_level = 1;
gpio_pin_intr_state_set(GPIO_ID_PIN(single_key->gpio_id), GPIO_PIN_INTR_NEGEDGE);
if (single_key->short_press) {
single_key->short_press();
}
} else {
gpio_pin_intr_state_set(GPIO_ID_PIN(single_key->gpio_id), GPIO_PIN_INTR_POSEDGE);
}
}
/******************************************************************************
* FunctionName : key_intr_handler
* Description : key interrupt handler
* Parameters : key_param *keys - keys parameter, which inited by key_init_single
* Returns : none
*******************************************************************************/
LOCAL void
key_intr_handler(struct keys_param *keys)
{
uint8 i;
uint32 gpio_status = GPIO_REG_READ(GPIO_STATUS_ADDRESS);
for (i = 0; i < keys->key_num; i++) {
if (gpio_status & BIT(keys->single_key[i]->gpio_id)) {
//disable interrupt
gpio_pin_intr_state_set(GPIO_ID_PIN(keys->single_key[i]->gpio_id), GPIO_PIN_INTR_DISABLE);
//clear interrupt status
GPIO_REG_WRITE(GPIO_STATUS_W1TC_ADDRESS, gpio_status & BIT(keys->single_key[i]->gpio_id));
if (keys->single_key[i]->key_level == 1) {
// 5s, restart & enter softap mode
os_timer_disarm(&keys->single_key[i]->key_5s);
os_timer_setfn(&keys->single_key[i]->key_5s, (os_timer_func_t *)key_5s_cb, keys->single_key[i]);
os_timer_arm(&keys->single_key[i]->key_5s, 5000, 0);
keys->single_key[i]->key_level = 0;
gpio_pin_intr_state_set(GPIO_ID_PIN(keys->single_key[i]->gpio_id), GPIO_PIN_INTR_POSEDGE);
} else {
// 50ms, check if this is a real key up
os_timer_disarm(&keys->single_key[i]->key_50ms);
os_timer_setfn(&keys->single_key[i]->key_50ms, (os_timer_func_t *)key_50ms_cb, keys->single_key[i]);
os_timer_arm(&keys->single_key[i]->key_50ms, 50, 0);
}
}
}
}
================================================
FILE: app/driver/onewire.c
================================================
/*
Adaptation of Paul Stoffregen's One wire library to the NodeMcu
The latest version of this library may be found at:
http://www.pjrc.com/teensy/td_libs_OneWire.html
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Much of the code was inspired by Derek Yerger's code, though I don't
think much of that remains. In any event that was..
(copyleft) 2006 by Derek Yerger - Free to distribute freely.
The CRC code was excerpted and inspired by the Dallas Semiconductor
sample code bearing this copyright.
//---------------------------------------------------------------------------
// Copyright (C) 2000 Dallas Semiconductor Corporation, All Rights Reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES
// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
//
// Except as contained in this notice, the name of Dallas Semiconductor
// shall not be used except as stated in the Dallas Semiconductor
// Branding Policy.
//--------------------------------------------------------------------------
*/
#include "driver/onewire.h"
#include "platform.h"
#include "osapi.h"
#define noInterrupts ets_intr_lock
#define interrupts ets_intr_unlock
#define delayMicroseconds os_delay_us
#if ONEWIRE_SEARCH
// global search state
static unsigned char ROM_NO[NUM_OW][8];
static uint8_t LastDiscrepancy[NUM_OW];
static uint8_t LastFamilyDiscrepancy[NUM_OW];
static uint8_t LastDeviceFlag[NUM_OW];
#endif
void onewire_init(uint8_t pin)
{
// pinMode(pin, INPUT);
platform_gpio_mode(pin, PLATFORM_GPIO_INPUT, PLATFORM_GPIO_PULLUP);
#if ONEWIRE_SEARCH
onewire_reset_search(pin);
#endif
}
// Perform the onewire reset function. We will wait up to 250uS for
// the bus to come high, if it doesn't then it is broken or shorted
// and we return a 0;
//
// Returns 1 if a device asserted a presence pulse, 0 otherwise.
//
uint8_t onewire_reset(uint8_t pin)
{
uint8_t r;
uint8_t retries = 125;
noInterrupts();
DIRECT_MODE_INPUT(pin);
interrupts();
// wait until the wire is high... just in case
do {
if (--retries == 0) return 0;
delayMicroseconds(2);
} while ( !DIRECT_READ(pin));
noInterrupts();
DIRECT_WRITE_LOW(pin);
DIRECT_MODE_OUTPUT(pin); // drive output low
interrupts();
delayMicroseconds(480);
noInterrupts();
DIRECT_MODE_INPUT(pin); // allow it to float
delayMicroseconds(70);
r = !DIRECT_READ(pin);
interrupts();
delayMicroseconds(410);
return r;
}
//
// Write a bit. Port and bit is used to cut lookup time and provide
// more certain timing.
//
static void onewire_write_bit(uint8_t pin, uint8_t v)
{
if (v & 1) {
noInterrupts();
DIRECT_WRITE_LOW(pin);
DIRECT_MODE_OUTPUT(pin); // drive output low
delayMicroseconds(10);
DIRECT_WRITE_HIGH(pin); // drive output high
interrupts();
delayMicroseconds(55);
} else {
noInterrupts();
DIRECT_WRITE_LOW(pin);
DIRECT_MODE_OUTPUT(pin); // drive output low
delayMicroseconds(65);
DIRECT_WRITE_HIGH(pin); // drive output high
interrupts();
delayMicroseconds(5);
}
}
//
// Read a bit. Port and bit is used to cut lookup time and provide
// more certain timing.
//
static uint8_t onewire_read_bit(uint8_t pin)
{
uint8_t r;
noInterrupts();
DIRECT_MODE_OUTPUT(pin);
DIRECT_WRITE_LOW(pin);
delayMicroseconds(3);
DIRECT_MODE_INPUT(pin); // let pin float, pull up will raise
delayMicroseconds(10);
r = DIRECT_READ(pin);
interrupts();
delayMicroseconds(53);
return r;
}
//
// Write a byte. The writing code uses the active drivers to raise the
// pin high, if you need power after the write (e.g. DS18S20 in
// parasite power mode) then set 'power' to 1, otherwise the pin will
// go tri-state at the end of the write to avoid heating in a short or
// other mishap.
//
void onewire_write(uint8_t pin, uint8_t v, uint8_t power /* = 0 */) {
uint8_t bitMask;
for (bitMask = 0x01; bitMask; bitMask <<= 1) {
onewire_write_bit(pin, (bitMask & v)?1:0);
}
if ( !power) {
noInterrupts();
DIRECT_MODE_INPUT(pin);
DIRECT_WRITE_LOW(pin);
interrupts();
}
}
void onewire_write_bytes(uint8_t pin, const uint8_t *buf, uint16_t count, bool power /* = 0 */) {
uint16_t i;
for (i = 0 ; i < count ; i++)
onewire_write(pin, buf[i], 0);
if (!power) {
noInterrupts();
DIRECT_MODE_INPUT(pin);
DIRECT_WRITE_LOW(pin);
interrupts();
}
}
//
// Read a byte
//
uint8_t onewire_read(uint8_t pin) {
uint8_t bitMask;
uint8_t r = 0;
for (bitMask = 0x01; bitMask; bitMask <<= 1) {
if (onewire_read_bit(pin)) r |= bitMask;
}
return r;
}
void onewire_read_bytes(uint8_t pin, uint8_t *buf, uint16_t count) {
uint16_t i;
for (i = 0 ; i < count ; i++)
buf[i] = onewire_read(pin);
}
//
// Do a ROM select
//
void onewire_select(uint8_t pin, const uint8_t rom[8])
{
uint8_t i;
onewire_write(pin, 0x55, 0); // Choose ROM
for (i = 0; i < 8; i++) onewire_write(pin, rom[i], 0);
}
//
// Do a ROM skip
//
void onewire_skip(uint8_t pin)
{
onewire_write(pin, 0xCC, 0); // Skip ROM
}
void onewire_depower(uint8_t pin)
{
noInterrupts();
DIRECT_MODE_INPUT(pin);
interrupts();
}
#if ONEWIRE_SEARCH
//
// You need to use this function to start a search again from the beginning.
// You do not need to do it for the first search, though you could.
//
void onewire_reset_search(uint8_t pin)
{
// reset the search state
LastDiscrepancy[pin] = 0;
LastDeviceFlag[pin] = FALSE;
LastFamilyDiscrepancy[pin] = 0;
int i;
for(i = 7; ; i--) {
ROM_NO[pin][i] = 0;
if ( i == 0) break;
}
}
// Setup the search to find the device type 'family_code' on the next call
// to search(*newAddr) if it is present.
//
void onewire_target_search(uint8_t pin, uint8_t family_code)
{
// set the search state to find SearchFamily type devices
ROM_NO[pin][0] = family_code;
uint8_t i;
for (i = 1; i < 8; i++)
ROM_NO[pin][i] = 0;
LastDiscrepancy[pin] = 64;
LastFamilyDiscrepancy[pin] = 0;
LastDeviceFlag[pin] = FALSE;
}
//
// Perform a search. If this function returns a '1' then it has
// enumerated the next device and you may retrieve the ROM from the
// OneWire::address variable. If there are no devices, no further
// devices, or something horrible happens in the middle of the
// enumeration then a 0 is returned. If a new device is found then
// its address is copied to newAddr. Use OneWire::reset_search() to
// start over.
//
// --- Replaced by the one from the Dallas Semiconductor web site ---
//--------------------------------------------------------------------------
// Perform the 1-Wire Search Algorithm on the 1-Wire bus using the existing
// search state.
// Return TRUE : device found, ROM number in ROM_NO buffer
// FALSE : device not found, end of search
//
uint8_t onewire_search(uint8_t pin, uint8_t *newAddr)
{
uint8_t id_bit_number;
uint8_t last_zero, rom_byte_number, search_result;
uint8_t id_bit, cmp_id_bit;
unsigned char rom_byte_mask, search_direction;
// initialize for search
id_bit_number = 1;
last_zero = 0;
rom_byte_number = 0;
rom_byte_mask = 1;
search_result = 0;
// if the last call was not the last one
if (!LastDeviceFlag[pin])
{
// 1-Wire reset
if (!onewire_reset(pin))
{
// reset the search
LastDiscrepancy[pin] = 0;
LastDeviceFlag[pin] = FALSE;
LastFamilyDiscrepancy[pin] = 0;
return FALSE;
}
// issue the search command
onewire_write(pin, 0xF0, 0);
// loop to do the search
do
{
// read a bit and its complement
id_bit = onewire_read_bit(pin);
cmp_id_bit = onewire_read_bit(pin);
// check for no devices on 1-wire
if ((id_bit == 1) && (cmp_id_bit == 1))
break;
else
{
// all devices coupled have 0 or 1
if (id_bit != cmp_id_bit)
search_direction = id_bit; // bit write value for search
else
{
// if this discrepancy if before the Last Discrepancy
// on a previous next then pick the same as last time
if (id_bit_number < LastDiscrepancy[pin])
search_direction = ((ROM_NO[pin][rom_byte_number] & rom_byte_mask) > 0);
else
// if equal to last pick 1, if not then pick 0
search_direction = (id_bit_number == LastDiscrepancy[pin]);
// if 0 was picked then record its position in LastZero
if (search_direction == 0)
{
last_zero = id_bit_number;
// check for Last discrepancy in family
if (last_zero < 9)
LastFamilyDiscrepancy[pin] = last_zero;
}
}
// set or clear the bit in the ROM byte rom_byte_number
// with mask rom_byte_mask
if (search_direction == 1)
ROM_NO[pin][rom_byte_number] |= rom_byte_mask;
else
ROM_NO[pin][rom_byte_number] &= ~rom_byte_mask;
// serial number search direction write bit
onewire_write_bit(pin, search_direction);
// increment the byte counter id_bit_number
// and shift the mask rom_byte_mask
id_bit_number++;
rom_byte_mask <<= 1;
// if the mask is 0 then go to new SerialNum byte rom_byte_number and reset mask
if (rom_byte_mask == 0)
{
rom_byte_number++;
rom_byte_mask = 1;
}
}
}
while(rom_byte_number < 8); // loop until through all ROM bytes 0-7
// if the search was successful then
if (!(id_bit_number < 65))
{
// search successful so set LastDiscrepancy,LastDeviceFlag,search_result
LastDiscrepancy[pin] = last_zero;
// check for last device
if (LastDiscrepancy[pin] == 0)
LastDeviceFlag[pin] = TRUE;
search_result = TRUE;
}
}
// if no device found then reset counters so next 'search' will be like a first
if (!search_result || !ROM_NO[pin][0])
{
LastDiscrepancy[pin] = 0;
LastDeviceFlag[pin] = FALSE;
LastFamilyDiscrepancy[pin] = 0;
search_result = FALSE;
}
int i;
for (i = 0; i < 8; i++) newAddr[i] = ROM_NO[pin][i];
return search_result;
}
#endif
#if ONEWIRE_CRC
// The 1-Wire CRC scheme is described in Maxim Application Note 27:
// "Understanding and Using Cyclic Redundancy Checks with Maxim iButton Products"
//
#if ONEWIRE_CRC8_TABLE
// This table comes from Dallas sample code where it is freely reusable,
// though Copyright (C) 2000 Dallas Semiconductor Corporation
static const uint8_t dscrc_table[] = {
0, 94,188,226, 97, 63,221,131,194,156,126, 32,163,253, 31, 65,
157,195, 33,127,252,162, 64, 30, 95, 1,227,189, 62, 96,130,220,
35,125,159,193, 66, 28,254,160,225,191, 93, 3,128,222, 60, 98,
190,224, 2, 92,223,129, 99, 61,124, 34,192,158, 29, 67,161,255,
70, 24,250,164, 39,121,155,197,132,218, 56,102,229,187, 89, 7,
219,133,103, 57,186,228, 6, 88, 25, 71,165,251,120, 38,196,154,
101, 59,217,135, 4, 90,184,230,167,249, 27, 69,198,152,122, 36,
248,166, 68, 26,153,199, 37,123, 58,100,134,216, 91, 5,231,185,
140,210, 48,110,237,179, 81, 15, 78, 16,242,172, 47,113,147,205,
17, 79,173,243,112, 46,204,146,211,141,111, 49,178,236, 14, 80,
175,241, 19, 77,206,144,114, 44,109, 51,209,143, 12, 82,176,238,
50,108,142,208, 83, 13,239,177,240,174, 76, 18,145,207, 45,115,
202,148,118, 40,171,245, 23, 73, 8, 86,180,234,105, 55,213,139,
87, 9,235,181, 54,104,138,212,149,203, 41,119,244,170, 72, 22,
233,183, 85, 11,136,214, 52,106, 43,117,151,201, 74, 20,246,168,
116, 42,200,150, 21, 75,169,247,182,232, 10, 84,215,137,107, 53};
#ifndef pgm_read_byte
#define pgm_read_byte(addr) (*(const uint8_t *)(addr))
#endif
//
// Compute a Dallas Semiconductor 8 bit CRC. These show up in the ROM
// and the registers. (note: this might better be done without to
// table, it would probably be smaller and certainly fast enough
// compared to all those delayMicrosecond() calls. But I got
// confused, so I use this table from the examples.)
//
uint8_t onewire_crc8(const uint8_t *addr, uint8_t len)
{
uint8_t crc = 0;
while (len--) {
crc = pgm_read_byte(dscrc_table + (crc ^ *addr++));
}
return crc;
}
#else
//
// Compute a Dallas Semiconductor 8 bit CRC directly.
// this is much slower, but much smaller, than the lookup table.
//
uint8_t onewire_crc8(const uint8_t *addr, uint8_t len)
{
uint8_t crc = 0;
while (len--) {
uint8_t inbyte = *addr++;
uint8_t i;
for (i = 8; i; i--) {
uint8_t mix = (crc ^ inbyte) & 0x01;
crc >>= 1;
if (mix) crc ^= 0x8C;
inbyte >>= 1;
}
}
return crc;
}
#endif
#if ONEWIRE_CRC16
// Compute the 1-Wire CRC16 and compare it against the received CRC.
// Example usage (reading a DS2408):
// // Put everything in a buffer so we can compute the CRC easily.
// uint8_t buf[13];
// buf[0] = 0xF0; // Read PIO Registers
// buf[1] = 0x88; // LSB address
// buf[2] = 0x00; // MSB address
// WriteBytes(net, buf, 3); // Write 3 cmd bytes
// ReadBytes(net, buf+3, 10); // Read 6 data bytes, 2 0xFF, 2 CRC16
// if (!CheckCRC16(buf, 11, &buf[11])) {
// // Handle error.
// }
//
// @param input - Array of bytes to checksum.
// @param len - How many bytes to use.
// @param inverted_crc - The two CRC16 bytes in the received data.
// This should just point into the received data,
// *not* at a 16-bit integer.
// @param crc - The crc starting value (optional)
// @return True, iff the CRC matches.
bool onewire_check_crc16(const uint8_t* input, uint16_t len, const uint8_t* inverted_crc, uint16_t crc)
{
crc = ~onewire_crc16(input, len, crc);
return (crc & 0xFF) == inverted_crc[0] && (crc >> 8) == inverted_crc[1];
}
// Compute a Dallas Semiconductor 16 bit CRC. This is required to check
// the integrity of data received from many 1-Wire devices. Note that the
// CRC computed here is *not* what you'll get from the 1-Wire network,
// for two reasons:
// 1) The CRC is transmitted bitwise inverted.
// 2) Depending on the endian-ness of your processor, the binary
// representation of the two-byte return value may have a different
// byte order than the two bytes you get from 1-Wire.
// @param input - Array of bytes to checksum.
// @param len - How many bytes to use.
// @param crc - The crc starting value (optional)
// @return The CRC16, as defined by Dallas Semiconductor.
uint16_t onewire_crc16(const uint8_t* input, uint16_t len, uint16_t crc)
{
static const uint8_t oddparity[16] =
{ 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0 };
uint16_t i;
for (i = 0 ; i < len ; i++) {
// Even though we're just copying a byte from the input,
// we'll be doing 16-bit computation with it.
uint16_t cdata = input[i];
cdata = (cdata ^ crc) & 0xff;
crc >>= 8;
if (oddparity[cdata & 0x0F] ^ oddparity[cdata >> 4])
crc ^= 0xC001;
cdata <<= 6;
crc ^= cdata;
cdata <<= 1;
crc ^= cdata;
}
return crc;
}
#endif
#endif
================================================
FILE: app/driver/pwm.c
================================================
/******************************************************************************
* Copyright 2013-2014 Espressif Systems (Wuxi)
*
* FileName: pwm.c
*
* Description: pwm driver
*
* Modification history:
* 2014/5/1, v1.0 create this file.
*******************************************************************************/
#include "platform.h"
#include "ets_sys.h"
#include "os_type.h"
#include "osapi.h"
#include "gpio.h"
#include "user_interface.h"
#include "driver/pwm.h"
// #define PWM_DBG os_printf
#define PWM_DBG
LOCAL struct pwm_single_param pwm_single_toggle[2][PWM_CHANNEL + 1];
LOCAL struct pwm_single_param *pwm_single;
LOCAL struct pwm_param pwm;
// LOCAL uint8 pwm_out_io_num[PWM_CHANNEL] = {PWM_0_OUT_IO_NUM, PWM_1_OUT_IO_NUM, PWM_2_OUT_IO_NUM};
LOCAL int8 pwm_out_io_num[PWM_CHANNEL] = {-1, -1, -1, -1, -1, -1};
LOCAL uint8 pwm_channel_toggle[2];
LOCAL uint8 *pwm_channel;
LOCAL uint8 pwm_toggle = 1;
LOCAL uint8 pwm_timer_down = 1;
LOCAL uint8 pwm_current_channel = 0;
LOCAL uint16 pwm_gpio = 0;
LOCAL uint8 pwm_channel_num = 0;
//XXX: 0xffffffff/(80000000/16)=35A
#define US_TO_RTC_TIMER_TICKS(t) \
((t) ? \
(((t) > 0x35A) ? \
(((t)>>2) * ((APB_CLK_FREQ>>4)/250000) + ((t)&0x3) * ((APB_CLK_FREQ>>4)/1000000)) : \
(((t) *(APB_CLK_FREQ>>4)) / 1000000)) : \
0)
//FRC1
#define FRC1_ENABLE_TIMER BIT7
typedef enum {
DIVDED_BY_1 = 0,
DIVDED_BY_16 = 4,
DIVDED_BY_256 = 8,
} TIMER_PREDIVED_MODE;
typedef enum {
TM_LEVEL_INT = 1,
TM_EDGE_INT = 0,
} TIMER_INT_MODE;
LOCAL void ICACHE_FLASH_ATTR
pwm_insert_sort(struct pwm_single_param pwm[], uint8 n)
{
uint8 i;
for (i = 1; i < n; i++) {
if (pwm[i].h_time < pwm[i - 1].h_time) {
int8 j = i - 1;
struct pwm_single_param tmp;
os_memcpy(&tmp, &pwm[i], sizeof(struct pwm_single_param));
os_memcpy(&pwm[i], &pwm[i - 1], sizeof(struct pwm_single_param));
while (tmp.h_time < pwm[j].h_time) {
os_memcpy(&pwm[j + 1], &pwm[j], sizeof(struct pwm_single_param));
j--;
if (j < 0) {
break;
}
}
os_memcpy(&pwm[j + 1], &tmp, sizeof(struct pwm_single_param));
}
}
}
LOCAL volatile uint8 critical = 0;
#define LOCK_PWM(c) do { \
while( (c)==1 ); \
(c) = 1; \
} while (0)
#define UNLOCK_PWM(c) do { \
(c) = 0; \
} while (0)
void ICACHE_FLASH_ATTR
pwm_start(void)
{
uint8 i, j;
PWM_DBG("--Function pwm_start() is called\n");
PWM_DBG("pwm_gpio:%x,pwm_channel_num:%d\n",pwm_gpio,pwm_channel_num);
PWM_DBG("pwm_out_io_num[0]:%d,[1]:%d,[2]:%d\n",pwm_out_io_num[0],pwm_out_io_num[1],pwm_out_io_num[2]);
PWM_DBG("pwm.period:%d,pwm.duty[0]:%d,[1]:%d,[2]:%d\n",pwm.period,pwm.duty[0],pwm.duty[1],pwm.duty[2]);
LOCK_PWM(critical); // enter critical
struct pwm_single_param *local_single = pwm_single_toggle[pwm_toggle ^ 0x01];
uint8 *local_channel = &pwm_channel_toggle[pwm_toggle ^ 0x01];
// step 1: init PWM_CHANNEL+1 channels param
for (i = 0; i < pwm_channel_num; i++) {
uint32 us = pwm.period * pwm.duty[i] / PWM_DEPTH;
local_single[i].h_time = US_TO_RTC_TIMER_TICKS(us);
PWM_DBG("i:%d us:%d ht:%d\n",i,us,local_single[i].h_time);
local_single[i].gpio_set = 0;
local_single[i].gpio_clear = 1 << pin_num[pwm_out_io_num[i]];
}
local_single[pwm_channel_num].h_time = US_TO_RTC_TIMER_TICKS(pwm.period);
local_single[pwm_channel_num].gpio_set = pwm_gpio;
local_single[pwm_channel_num].gpio_clear = 0;
PWM_DBG("i:%d period:%d ht:%d\n",pwm_channel_num,pwm.period,local_single[pwm_channel_num].h_time);
// step 2: sort, small to big
pwm_insert_sort(local_single, pwm_channel_num + 1);
*local_channel = pwm_channel_num + 1;
PWM_DBG("1channel:%d,single[0]:%d,[1]:%d,[2]:%d,[3]:%d\n",*local_channel,local_single[0].h_time,local_single[1].h_time,local_single[2].h_time,local_single[3].h_time);
// step 3: combine same duty channels
for (i = pwm_channel_num; i > 0; i--) {
if (local_single[i].h_time == local_single[i - 1].h_time) {
local_single[i - 1].gpio_set |= local_single[i].gpio_set;
local_single[i - 1].gpio_clear |= local_single[i].gpio_clear;
for (j = i + 1; j < *local_channel; j++) {
os_memcpy(&local_single[j - 1], &local_single[j], sizeof(struct pwm_single_param));
}
(*local_channel)--;
}
}
PWM_DBG("2channel:%d,single[0]:%d,[1]:%d,[2]:%d,[3]:%d\n",*local_channel,local_single[0].h_time,local_single[1].h_time,local_single[2].h_time,local_single[3].h_time);
// step 4: cacl delt time
for (i = *local_channel - 1; i > 0; i--) {
local_single[i].h_time -= local_single[i - 1].h_time;
}
// step 5: last channel needs to clean
local_single[*local_channel-1].gpio_clear = 0;
// step 6: if first channel duty is 0, remove it
if (local_single[0].h_time == 0) {
local_single[*local_channel - 1].gpio_set &= ~local_single[0].gpio_clear;
local_single[*local_channel - 1].gpio_clear |= local_single[0].gpio_clear;
for (i = 1; i < *local_channel; i++) {
os_memcpy(&local_single[i - 1], &local_single[i], sizeof(struct pwm_single_param));
}
(*local_channel)--;
}
// if timer is down, need to set gpio and start timer
if (pwm_timer_down == 1) {
pwm_channel = local_channel;
pwm_single = local_single;
// start
gpio_output_set(local_single[0].gpio_set, local_single[0].gpio_clear, pwm_gpio, 0);
// yeah, if all channels' duty is 0 or 255, don't need to start timer, otherwise start...
if (*local_channel != 1) {
pwm_timer_down = 0;
RTC_REG_WRITE(FRC1_LOAD_ADDRESS, local_single[0].h_time);
}
}
if (pwm_toggle == 1) {
pwm_toggle = 0;
} else {
pwm_toggle = 1;
}
UNLOCK_PWM(critical); // leave critical
PWM_DBG("3channel:%d,single[0]:%d,[1]:%d,[2]:%d,[3]:%d\n",*local_channel,local_single[0].h_time,local_single[1].h_time,local_single[2].h_time,local_single[3].h_time);
}
/******************************************************************************
* FunctionName : pwm_set_duty
* Description : set each channel's duty params
* Parameters : uint8 duty : 0 ~ PWM_DEPTH
* uint8 channel : channel index
* Returns : NONE
*******************************************************************************/
void ICACHE_FLASH_ATTR
pwm_set_duty(uint16 duty, uint8 channel)
{
uint8 i;
for(i=0;i<pwm_channel_num;i++){
if(pwm_out_io_num[i] == channel){
channel = i;
break;
}
}
if(i==pwm_channel_num) // non found
return;
LOCK_PWM(critical); // enter critical
if (duty < 1) {
pwm.duty[channel] = 0;
} else if (duty >= PWM_DEPTH) {
pwm.duty[channel] = PWM_DEPTH;
} else {
pwm.duty[channel] = duty;
}
UNLOCK_PWM(critical); // leave critical
}
/******************************************************************************
* FunctionName : pwm_set_freq
* Description : set pwm frequency
* Parameters : uint16 freq : 100hz typically
* Returns : NONE
*******************************************************************************/
void ICACHE_FLASH_ATTR
pwm_set_freq(uint16 freq, uint8 channel)
{
LOCK_PWM(critical); // enter critical
if (freq > PWM_FREQ_MAX) {
pwm.freq = PWM_FREQ_MAX;
} else if (freq < 1) {
pwm.freq = 1;
} else {
pwm.freq = freq;
}
pwm.period = PWM_1S / pwm.freq;
UNLOCK_PWM(critical); // leave critical
}
/******************************************************************************
* FunctionName : pwm_set_freq_duty
* Description : set pwm frequency and each channel's duty
* Parameters : uint16 freq : 100hz typically
* uint16 *duty : each channel's duty
* Returns : NONE
*******************************************************************************/
LOCAL void ICACHE_FLASH_ATTR
pwm_set_freq_duty(uint16 freq, uint16 *duty)
{
uint8 i;
pwm_set_freq(freq, 0);
for (i = 0; i < PWM_CHANNEL; i++) {
// pwm_set_duty(duty[i], i);
if(pwm_out_io_num[i] != -1)
pwm_set_duty(duty[i], pwm_out_io_num[i]);
}
}
/******************************************************************************
* FunctionName : pwm_get_duty
* Description : get duty of each channel
* Parameters : uint8 channel : channel index
* Returns : NONE
*******************************************************************************/
uint16 ICACHE_FLASH_ATTR
pwm_get_duty(uint8 channel)
{
uint8 i;
for(i=0;i<pwm_channel_num;i++){
if(pwm_out_io_num[i] == channel){
channel = i;
break;
}
}
if(i==pwm_channel_num) // non found
return 0;
return pwm.duty[channel];
}
/******************************************************************************
* FunctionName : pwm_get_freq
* Description : get pwm frequency
* Parameters : NONE
* Returns : uint16 : pwm frequency
*******************************************************************************/
uint16 ICACHE_FLASH_ATTR
pwm_get_freq(uint8 channel)
{
return pwm.freq;
}
/******************************************************************************
* FunctionName : pwm_period_timer
* Description : pwm period timer function, output high level,
* start each channel's high level timer
* Parameters : NONE
* Returns : NONE
*******************************************************************************/
LOCAL void ICACHE_RAM_ATTR
pwm_tim1_intr_handler(void)
{
uint8 local_toggle = pwm_toggle; // pwm_toggle may change outside
RTC_CLR_REG_MASK(FRC1_INT_ADDRESS, FRC1_INT_CLR_MASK);
if (pwm_current_channel >= (*pwm_channel - 1)) { // *pwm_channel may change outside
pwm_single = pwm_single_toggle[local_toggle];
pwm_channel = &pwm_channel_toggle[local_toggle];
gpio_output_set(pwm_single[*pwm_channel - 1].gpio_set,
pwm_single[*pwm_channel - 1].gpio_clear,
pwm_gpio,
0);
pwm_current_channel = 0;
if (*pwm_channel != 1) {
RTC_REG_WRITE(FRC1_LOAD_ADDRESS, pwm_single[pwm_current_channel].h_time);
} else {
pwm_timer_down = 1;
}
} else {
gpio_output_set(pwm_single[pwm_current_channel].gpio_set,
pwm_single[pwm_current_channel].gpio_clear,
pwm_gpio, 0);
pwm_current_channel++;
RTC_REG_WRITE(FRC1_LOAD_ADDRESS, pwm_single[pwm_current_channel].h_time);
}
}
/******************************************************************************
* FunctionName : pwm_init
* Description : pwm gpio, params and timer initialization
* Parameters : uint16 freq : pwm freq param
* uint16 *duty : each channel's duty
* Returns : NONE
*******************************************************************************/
void ICACHE_FLASH_ATTR
pwm_init(uint16 freq, uint16 *duty)
{
uint8 i;
RTC_REG_WRITE(FRC1_CTRL_ADDRESS, //FRC2_AUTO_RELOAD|
DIVDED_BY_16
| FRC1_ENABLE_TIMER
| TM_EDGE_INT);
RTC_REG_WRITE(FRC1_LOAD_ADDRESS, 0);
// PIN_FUNC_SELECT(PWM_0_OUT_IO_MUX, PWM_0_OUT_IO_FUNC);
// PIN_FUNC_SELECT(PWM_1_OUT_IO_MUX, PWM_1_OUT_IO_FUNC);
// PIN_FUNC_SELECT(PWM_2_OUT_IO_MUX, PWM_2_OUT_IO_FUNC);
// GPIO_OUTPUT_SET(GPIO_ID_PIN(PWM_0_OUT_IO_NUM), 0);
// GPIO_OUTPUT_SET(GPIO_ID_PIN(PWM_1_OUT_IO_NUM), 0);
// GPIO_OUTPUT_SET(GPIO_ID_PIN(PWM_2_OUT_IO_NUM), 0);
for (i = 0; i < PWM_CHANNEL; i++) {
// pwm_gpio |= (1 << pwm_out_io_num[i]);
pwm_gpio = 0;
pwm.duty[0] = 0;
}
pwm_set_freq(500, 0);
// pwm_set_freq_duty(freq, duty);
pwm_start();
ETS_FRC_TIMER1_INTR_ATTACH(pwm_tim1_intr_handler, NULL);
TM1_EDGE_INT_ENABLE();
ETS_FRC1_INTR_ENABLE();
}
bool ICACHE_FLASH_ATTR
pwm_add(uint8 channel){
PWM_DBG("--Function pwm_add() is called. channel:%d\n", channel);
PWM_DBG("pwm_gpio:%x,pwm_channel_num:%d\n",pwm_gpio,pwm_channel_num);
PWM_DBG("pwm_out_io_num[0]:%d,[1]:%d,[2]:%d\n",pwm_out_io_num[0],pwm_out_io_num[1],pwm_out_io_num[2]);
PWM_DBG("pwm.duty[0]:%d,[1]:%d,[2]:%d\n",pwm.duty[0],pwm.duty[1],pwm.duty[2]);
uint8 i;
for(i=0;i<PWM_CHANNEL;i++){
if(pwm_out_io_num[i]==channel) // already exist
return true;
if(pwm_out_io_num[i] == -1){ // empty exist
LOCK_PWM(critical); // enter critical
pwm_out_io_num[i] = channel;
pwm.duty[i] = 0;
pwm_gpio |= (1 << pin_num[channel]);
PIN_FUNC_SELECT(pin_mux[channel], pin_func[channel]);
GPIO_REG_WRITE(GPIO_PIN_ADDR(GPIO_ID_PIN(pin_num[channel])), GPIO_REG_READ(GPIO_PIN_ADDR(GPIO_ID_PIN(pin_num[channel]))) & (~ GPIO_PIN_PAD_DRIVER_SET(GPIO_PAD_DRIVER_ENABLE))); //disable open drain;
pwm_channel_num++;
UNLOCK_PWM(critical); // leave critical
return true;
}
}
return false;
}
bool ICACHE_FLASH_ATTR
pwm_delete(uint8 channel){
PWM_DBG("--Function pwm_delete() is called. channel:%d\n", channel);
PWM_DBG("pwm_gpio:%x,pwm_channel_num:%d\n",pwm_gpio,pwm_channel_num);
PWM_DBG("pwm_out_io_num[0]:%d,[1]:%d,[2]:%d\n",pwm_out_io_num[0],pwm_out_io_num[1],pwm_out_io_num[2]);
PWM_DBG("pwm.duty[0]:%d,[1]:%d,[2]:%d\n",pwm.duty[0],pwm.duty[1],pwm.duty[2]);
uint8 i,j;
for(i=0;i<pwm_channel_num;i++){
if(pwm_out_io_num[i]==channel){ // exist
LOCK_PWM(critical); // enter critical
pwm_out_io_num[i] = -1;
pwm_gpio &= ~(1 << pin_num[channel]); //clear the bit
for(j=i;j<pwm_channel_num-1;j++){
pwm_out_io_num[j] = pwm_out_io_num[j+1];
pwm.duty[j] = pwm.duty[j+1];
}
pwm_out_io_num[pwm_channel_num-1] = -1;
pwm.duty[pwm_channel_num-1] = 0;
pwm_channel_num--;
UNLOCK_PWM(critical); // leave critical
return true;
}
}
// non found
return true;
}
bool ICACHE_FLASH_ATTR
pwm_exist(uint8 channel){
PWM_DBG("--Function pwm_exist() is called. channel:%d\n", channel);
PWM_DBG("pwm_gpio:%x,pwm_channel_num:%d\n",pwm_gpio,pwm_channel_num);
PWM_DBG("pwm_out_io_num[0]:%d,[1]:%d,[2]:%d\n",pwm_out_io_num[0],pwm_out_io_num[1],pwm_out_io_num[2]);
PWM_DBG("pwm.duty[0]:%d,[1]:%d,[2]:%d\n",pwm.duty[0],pwm.duty[1],pwm.duty[2]);
uint8 i;
for(i=0;i<PWM_CHANNEL;i++){
if(pwm_out_io_num[i]==channel) // exist
return true;
}
return false;
}
================================================
FILE: app/driver/readline.c
================================================
#include "ets_sys.h"
#include "os_type.h"
#include "osapi.h"
#include "driver/uart.h"
#include "c_types.h"
LOCAL os_timer_t readline_timer;
// UartDev is defined and initialized in rom code.
extern UartDevice UartDev;
#define uart_putc uart0_putc
bool uart_getc(char *c){
RcvMsgBuff *pRxBuff = &(UartDev.rcv_buff);
if(pRxBuff->pWritePos == pRxBuff->pReadPos){ // empty
return false;
}
// ETS_UART_INTR_DISABLE();
ETS_INTR_LOCK();
*c = (char)*(pRxBuff->pReadPos);
if (pRxBuff->pReadPos == (pRxBuff->pRcvMsgBuff + RX_BUFF_SIZE)) {
pRxBuff->pReadPos = pRxBuff->pRcvMsgBuff ;
} else {
pRxBuff->pReadPos++;
}
// ETS_UART_INTR_ENABLE();
ETS_INTR_UNLOCK();
return true;
}
#if 0
int readline4lua(const char *prompt, char *buffer, int length){
char ch;
int line_position;
start:
/* show prompt */
uart0_sendStr(prompt);
line_position = 0;
os_memset(buffer, 0, length);
while (1)
{
while (uart_getc(&ch))
{
/* handle CR key */
if (ch == '\r')
{
char next;
if (uart_getc(&next))
ch = next;
}
/* backspace key */
else if (ch == 0x7f || ch == 0x08)
{
if (line_position > 0)
{
uart_putc(0x08);
uart_putc(' ');
uart_putc(0x08);
line_position--;
}
buffer[line_position] = 0;
continue;
}
/* EOF(ctrl+d) */
else if (ch == 0x04)
{
if (line_position == 0)
/* No input which makes lua interpreter close */
return 0;
else
continue;
}
/* end of line */
if (ch == '\r' || ch == '\n')
{
buffer[line_position] = 0;
uart_putc('\n');
if (line_position == 0)
{
/* Get a empty line, then go to get a new line */
goto start;
}
else
{
return line_position;
}
}
/* other control character or not an acsii character */
if (ch < 0x20 || ch >= 0x80)
{
continue;
}
/* echo */
uart_putc(ch);
buffer[line_position] = ch;
ch = 0;
line_position++;
/* it's a large line, discard it */
if (line_position >= length)
line_position = 0;
}
}
}
#endif
================================================
FILE: app/driver/relay.c
================================================
#include "ets_sys.h"
#include "os_type.h"
#include "osapi.h"
#include "mem.h"
#include "c_types.h"
#include "c_string.h"
#include "c_stdlib.h"
#include "c_stdio.h"
#include "gpio.h"
#include "user_interface.h"
#include "user_config.h"
#include "platform.h"
#include "config.h"
#include "driver/relay.h"
#define MAX_RELAY_LISTENERS 5
uint8_t relay_init_ok=0;
relay_change_callback listeners[MAX_RELAY_LISTENERS];
void ICACHE_FLASH_ATTR relay_register_listener(relay_change_callback f){
NODE_DBG("Relay listener add %p",f);
int i=0;
while(listeners[i]!=NULL) i++;
if(i>=MAX_RELAY_LISTENERS){
NODE_DBG("No more listener space %d",i);
return;
}
NODE_DBG("Relay listener add index %d",i);
listeners[i]=f;
}
void ICACHE_FLASH_ATTR relay_unregister_listener(relay_change_callback f){
NODE_DBG("Relay listener remove %p",f);
int i=0;
while(listeners[i]!=f) i++;
if(i>=MAX_RELAY_LISTENERS)
return;
listeners[i]=NULL;
}
static void ICACHE_FLASH_ATTR relay_notify_listeners(int relayId,int state){
NODE_DBG("relay_notify_listeners");
int i;
for(i=0;i<MAX_RELAY_LISTENERS;i++){
if(listeners[i]!=NULL){
NODE_DBG("Relay listener notify %p",listeners[i]);
listeners[i](relayId,state);
}
}
}
static relay * ICACHE_FLASH_ATTR find_relay(int relayNumber){
if(relayNumber>=RELAY_COUNT)
return NULL;
config_data * config = config_read();
return &config->relay_state.relay[relayNumber];
}
int ICACHE_FLASH_ATTR relay_get_state(int relayNumber){
relay * r = find_relay(relayNumber);
if(r==NULL)
return -1;
return r->state;
}
int ICACHE_FLASH_ATTR relay_set_state(int relayNumber,unsigned state){
relay * r = find_relay(relayNumber);
if(r==NULL)
return -1;
r->state=state;
platform_gpio_write(r->gpioPin,r->state);
config_save(NULL);
relay_notify_listeners(relayNumber,state);
return r->state;
}
int ICACHE_FLASH_ATTR relay_toggle_state(int relayNumber){
relay * r = find_relay(relayNumber);
if(r==NULL)
return -1;
r->state=!r->state;
platform_gpio_write(r->gpioPin,r->state);
config_save(NULL);
relay_notify_listeners(relayNumber,r->state);
return r->state;
}
void ICACHE_FLASH_ATTR relay_init(){
if(relay_init_ok)
return;
relay_init_ok=1;
NODE_DBG("Relay init");
//zero listeners
int i;
for(i=0;i<MAX_RELAY_LISTENERS;i++)
listeners[i]=NULL;
config_data * config = config_read();
if(config->relay_state.init_ok){
#ifdef DEVELOP_VERSION
NODE_DBG("Relay init ok");
int j;
for(j=0;j<RELAY_COUNT;j++)
NODE_DBG("\tRelay #%d pin #%d state %d",j,config->relay_state.relay[j].gpioPin,config->relay_state.relay[j].state);
NODE_DBG("");
#endif
int i;
for(i=0;i<RELAY_COUNT;i++)
platform_gpio_write(config->relay_state.relay[i].gpioPin,config->relay_state.relay[i].state);
return;
}
//relay #0 on pin 1
config->relay_state.relay[0].gpioPin=1;
config->relay_state.relay[0].state=0;
platform_gpio_mode(1,PLATFORM_GPIO_OUTPUT,PLATFORM_GPIO_FLOAT);
//relay #1 on pin 2
config->relay_state.relay[1].gpioPin=2;
config->relay_state.relay[1].state=0;
platform_gpio_mode(2,PLATFORM_GPIO_OUTPUT,PLATFORM_GPIO_FLOAT);
config->relay_state.init_ok=1;
config_save(config);
}
int ICACHE_FLASH_ATTR relay_count(){
return RELAY_COUNT;
}
================================================
FILE: app/driver/spi.c
================================================
#include "driver/spi.h"
/******************************************************************************
* FunctionName : spi_lcd_mode_init
* Description : SPI master initial function for driving LCD TM035PDZV36
* Parameters : uint8 spi_no - SPI module number, Only "SPI" and "HSPI" are valid
*******************************************************************************/
void spi_lcd_mode_init(uint8 spi_no)
{
uint32 regvalue;
if(spi_no>1) return; //handle invalid input number
//bit9 of PERIPHS_IO_MUX should be cleared when HSPI clock doesn't equal CPU clock
//bit8 of PERIPHS_IO_MUX should be cleared when SPI clock doesn't equal CPU clock
if(spi_no==SPI){
WRITE_PERI_REG(PERIPHS_IO_MUX, 0x005); //clear bit9,and bit8
PIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_CLK_U, 1);//configure io to spi mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_CMD_U, 1);//configure io to spi mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_DATA0_U, 1);//configure io to spi mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_DATA1_U, 1);//configure io to spi mode
}else if(spi_no==HSPI){
WRITE_PERI_REG(PERIPHS_IO_MUX, 0x105); //clear bit9
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDI_U, 2);//configure io to spi mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTCK_U, 2);//configure io to spi mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTMS_U, 2);//configure io to spi mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U, 2);//configure io to spi mode
}
SET_PERI_REG_MASK(SPI_USER(spi_no), SPI_CS_SETUP|SPI_CS_HOLD|SPI_USR_COMMAND);
CLEAR_PERI_REG_MASK(SPI_USER(spi_no), SPI_FLASH_MODE);
// SPI clock=CPU clock/8
WRITE_PERI_REG(SPI_CLOCK(spi_no),
((1&SPI_CLKDIV_PRE)<<SPI_CLKDIV_PRE_S)|
((3&SPI_CLKCNT_N)<<SPI_CLKCNT_N_S)|
((1&SPI_CLKCNT_H)<<SPI_CLKCNT_H_S)|
((3&SPI_CLKCNT_L)<<SPI_CLKCNT_L_S)); //clear bit 31,set SPI clock div
}
/******************************************************************************
* FunctionName : spi_lcd_9bit_write
* Description : SPI 9bits transmission function for driving LCD TM035PDZV36
* Parameters : uint8 spi_no - SPI module number, Only "SPI" and "HSPI" are valid
* uint8 high_bit - first high bit of the data, 0 is for "0",the other value 1-255 is for "1"
* uint8 low_8bit- the rest 8bits of the data.
*******************************************************************************/
void spi_lcd_9bit_write(uint8 spi_no,uint8 high_bit,uint8 low_8bit)
{
uint32 regvalue;
uint8 bytetemp;
if(spi_no>1) return; //handle invalid input number
if(high_bit) bytetemp=(low_8bit>>1)|0x80;
else bytetemp=(low_8bit>>1)&0x7f;
regvalue= ((8&SPI_USR_COMMAND_BITLEN)<<SPI_USR_COMMAND_BITLEN_S)|((uint32)bytetemp); //configure transmission variable,9bit transmission length and first 8 command bit
if(low_8bit&0x01) regvalue|=BIT15; //write the 9th bit
while(READ_PERI_REG(SPI_CMD(spi_no))&SPI_USR); //waiting for spi module available
WRITE_PERI_REG(SPI_USER2(spi_no), regvalue); //write command and command length into spi reg
SET_PERI_REG_MASK(SPI_CMD(spi_no), SPI_USR); //transmission start
}
/******************************************************************************
* FunctionName : spi_master_init
* Description : SPI master initial function for common byte units transmission
* Parameters : uint8 spi_no - SPI module number, Only "SPI" and "HSPI" are valid
*******************************************************************************/
void spi_master_init(uint8 spi_no, unsigned cpol, unsigned cpha, unsigned databits, uint32_t clock)
{
uint32 regvalue;
if(spi_no>1) return; //handle invalid input number
if(spi_no==SPI){
WRITE_PERI_REG(PERIPHS_IO_MUX, 0x005);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_CLK_U, 1);//configure io to spi mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_CMD_U, 1);//configure io to spi mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_DATA0_U, 1);//configure io to spi mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_DATA1_U, 1);//configure io to spi mode
}
else if(spi_no==HSPI){
WRITE_PERI_REG(PERIPHS_IO_MUX, 0x105);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDI_U, 2);//configure io to spi mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTCK_U, 2);//configure io to spi mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTMS_U, 2);//configure io to spi mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U, 2);//configure io to spi mode
}
SET_PERI_REG_MASK(SPI_USER(spi_no), SPI_CS_SETUP|SPI_CS_HOLD|SPI_DOUTDIN|SPI_USR_MOSI);
//set clock polarity
// TODO: This doesn't work
//if (cpol == 1) {
// SET_PERI_REG_MASK(SPI_CTRL2(spi_no), (SPI_CK_OUT_HIGH_MODE<<SPI_CK_OUT_HIGH_MODE_S));
//} else {
// SET_PERI_REG_MASK(SPI_CTRL2(spi_no), (SPI_CK_OUT_LOW_MODE<<SPI_CK_OUT_LOW_MODE_S));
//}
//os_printf("SPI_CTRL2 is %08x\n",READ_PERI_REG(SPI_CTRL2(spi_no)));
//set clock phase
if (cpha == 1) {
SET_PERI_REG_MASK(SPI_USER(spi_no), SPI_CK_OUT_EDGE|SPI_CK_I_EDGE);
} else {
CLEAR_PERI_REG_MASK(SPI_USER(spi_no), SPI_CK_OUT_EDGE|SPI_CK_I_EDGE);
}
CLEAR_PERI_REG_MASK(SPI_USER(HSPI), SPI_FLASH_MODE|SPI_WR_BYTE_ORDER|SPI_USR_MISO|
SPI_RD_BYTE_ORDER|SPI_USR_ADDR|SPI_USR_COMMAND|SPI_USR_DUMMY);
//clear Daul or Quad lines transmission mode
CLEAR_PERI_REG_MASK(SPI_CTRL(spi_no), SPI_QIO_MODE|SPI_DIO_MODE|SPI_DOUT_MODE|SPI_QOUT_MODE);
// SPI clock=CPU clock/8
WRITE_PERI_REG(SPI_CLOCK(spi_no),
((1&SPI_CLKDIV_PRE)<<SPI_CLKDIV_PRE_S)|
((3&SPI_CLKCNT_N)<<SPI_CLKCNT_N_S)|
((1&SPI_CLKCNT_H)<<SPI_CLKCNT_H_S)|
((3&SPI_CLKCNT_L)<<SPI_CLKCNT_L_S)); //clear bit 31,set SPI clock div
//set 8bit output buffer length, the buffer is the low 8bit of register"SPI_FLASH_C0"
WRITE_PERI_REG(SPI_USER1(spi_no),
((7&SPI_USR_MOSI_BITLEN)<<SPI_USR_MOSI_BITLEN_S)|
((7&SPI_USR_MISO_BITLEN)<<SPI_USR_MISO_BITLEN_S));
}
/******************************************************************************
* FunctionName : spi_mast_byte_write
* Description : SPI master 1 byte transmission function
* Parameters : uint8 spi_no - SPI module number, Only "SPI" and "HSPI" are valid
* uint8 data- transmitted data
*******************************************************************************/
void spi_mast_byte_write(uint8 spi_no, uint8 *data)
{
if(spi_no>1) return; //handle invalid input number
while(READ_PERI_REG(SPI_CMD(spi_no))&SPI_USR);
WRITE_PERI_REG(SPI_W0(spi_no), *data);
SET_PERI_REG_MASK(SPI_CMD(spi_no), SPI_USR);
while(READ_PERI_REG(SPI_CMD(spi_no))&SPI_USR);
*data = (uint8)(READ_PERI_REG(SPI_W0(spi_no))&0xff);
}
/******************************************************************************
* FunctionName : spi_byte_write_espslave
* Description : SPI master 1 byte transmission function for esp8266 slave,
* transmit 1byte data to esp8266 slave buffer needs 16bit transmission ,
* first byte is command 0x04 to write slave buffer, second byte is data
* Parameters : uint8 spi_no - SPI module number, Only "SPI" and "HSPI" are valid
* uint8 data- transmitted data
*******************************************************************************/
void spi_byte_write_espslave(uint8 spi_no,uint8 data)
{
uint32 regvalue;
if(spi_no>1) return; //handle invalid input number
while(READ_PERI_REG(SPI_CMD(spi_no))&SPI_USR);
SET_PERI_REG_MASK(SPI_USER(spi_no), SPI_USR_MOSI);
CLEAR_PERI_REG_MASK(SPI_USER(spi_no), SPI_USR_MISO|SPI_USR_ADDR|SPI_USR_DUMMY);
//SPI_FLASH_USER2 bit28-31 is cmd length,cmd bit length is value(0-15)+1,
// bit15-0 is cmd value.
//0x70000000 is for 8bits cmd, 0x04 is eps8266 slave write cmd value
WRITE_PERI_REG(SPI_USER2(spi_no),
((7&SPI_USR_COMMAND_BITLEN)<<SPI_USR_COMMAND_BITLEN_S)|4);
WRITE_PERI_REG(SPI_W0(spi_no), (uint32)(data));
SET_PERI_REG_MASK(SPI_CMD(spi_no), SPI_USR);
}
/******************************************************************************
* FunctionName : spi_byte_read_espslave
* Description : SPI master 1 byte read function for esp8266 slave,
* read 1byte data from esp8266 slave buffer needs 16bit transmission ,
* first byte is command 0x06 to read slave buffer, second byte is recieved data
* Parameters : uint8 spi_no - SPI module number, Only "SPI" and "HSPI" are valid
* uint8* data- recieved data address
*******************************************************************************/
void spi_byte_read_espslave(uint8 spi_no,uint8 *data)
{
uint32 regvalue;
if(spi_no>1) return; //handle invalid input number
while(READ_PERI_REG(SPI_CMD(spi_no))&SPI_USR);
SET_PERI_REG_MASK(SPI_USER(spi_no), SPI_USR_MISO);
CLEAR_PERI_REG_MASK(SPI_USER(spi_no), SPI_USR_MOSI|SPI_USR_ADDR|SPI_USR_DUMMY);
//SPI_FLASH_USER2 bit28-31 is cmd length,cmd bit length is value(0-15)+1,
// bit15-0 is cmd value.
//0x70000000 is for 8bits cmd, 0x06 is eps8266 slave read cmd value
WRITE_PERI_REG(SPI_USER2(spi_no),
((7&SPI_USR_COMMAND_BITLEN)<<SPI_USR_COMMAND_BITLEN_S)|6);
SET_PERI_REG_MASK(SPI_CMD(spi_no), SPI_USR);
while(READ_PERI_REG(SPI_CMD(spi_no))&SPI_USR);
*data=(uint8)(READ_PERI_REG(SPI_W0(spi_no))&0xff);
}
/******************************************************************************
* FunctionName : spi_slave_init
* Description : SPI slave mode initial funtion, including mode setting,
* IO setting, transmission interrupt opening, interrupt function registration
* Parameters : uint8 spi_no - SPI module number, Only "SPI" and "HSPI" are valid
*******************************************************************************/
void spi_slave_init(uint8 spi_no)
{
uint32 regvalue;
if(spi_no>1)
return; //handle invalid input number
//clear bit9,bit8 of reg PERIPHS_IO_MUX
//bit9 should be cleared when HSPI clock doesn't equal CPU clock
//bit8 should be cleared when SPI clock doesn't equal CPU clock
////WRITE_PERI_REG(PERIPHS_IO_MUX, 0x105); //clear bit9//TEST
if(spi_no==SPI){
PIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_CLK_U, 1);//configure io to spi mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_CMD_U, 1);//configure io to spi mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_DATA0_U, 1);//configure io to spi mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_DATA1_U, 1);//configure io to spi mode
}else if(spi_no==HSPI){
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDI_U, 2);//configure io to spi mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTCK_U, 2);//configure io to spi mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTMS_U, 2);//configure io to spi mode
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U, 2);//configure io to spi mode
}
//regvalue=READ_PERI_REG(SPI_FLASH_SLAVE(spi_no));
//slave mode,slave use buffers which are register "SPI_FLASH_C0~C15", enable trans done isr
//set bit 30 bit 29 bit9,bit9 is trans done isr mask
SET_PERI_REG_MASK( SPI_SLAVE(spi_no),
SPI_SLAVE_MODE|SPI_SLV_WR_RD_BUF_EN|
SPI_SLV_WR_BUF_DONE_EN|SPI_SLV_RD_BUF_DONE_EN|
SPI_SLV_WR_STA_DONE_EN|SPI_SLV_RD_STA_DONE_EN|
SPI_TRANS_DONE_EN);
//disable general trans intr
//CLEAR_PERI_REG_MASK(SPI_SLAVE(spi_no),SPI_TRANS_DONE_EN);
CLEAR_PERI_REG_MASK(SPI_USER(spi_no), SPI_FLASH_MODE);//disable flash operation mode
SET_PERI_REG_MASK(SPI_USER(spi_no),SPI_USR_MISO_HIGHPART);//SLAVE SEND DATA BUFFER IN C8-C15
//////**************RUN WHEN SLAVE RECIEVE*******************///////
//tow lines below is to configure spi timing.
SET_PERI_REG_MASK(SPI_CTRL2(spi_no),(0x2&SPI_MOSI_DELAY_NUM)<<SPI_MOSI_DELAY_NUM_S) ;//delay num
os_printf("SPI_CTRL2 is %08x\n",READ_PERI_REG(SPI_CTRL2(spi_no)));
WRITE_PERI_REG(SPI_CLOCK(spi_no), 0);
/////***************************************************//////
//set 8 bit slave command length, because slave must have at least one bit addr,
//8 bit slave+8bit addr, so master device first 2 bytes can be regarded as a command
//and the following bytes are datas,
//32 bytes input wil be stored in SPI_FLASH_C0-C7
//32 bytes output data should be set to SPI_FLASH_C8-C15
WRITE_PERI_REG(SPI_USER2(spi_no), (0x7&SPI_USR_COMMAND_BITLEN)<<SPI_USR_COMMAND_BITLEN_S); //0x70000000
//set 8 bit slave recieve buffer length, the buffer is SPI_FLASH_C0-C7
//set 8 bit slave status register, which is the low 8 bit of register "SPI_FLASH_STATUS"
SET_PERI_REG_MASK(SPI_SLAVE1(spi_no), ((0xff&SPI_SLV_BUF_BITLEN)<< SPI_SLV_BUF_BITLEN_S)|
((0x7&SPI_SLV_STATUS_BITLEN)<<SPI_SLV_STATUS_BITLEN_S)|
((0x7&SPI_SLV_WR_ADDR_BITLEN)<<SPI_SLV_WR_ADDR_BITLEN_S)|
((0x7&SPI_SLV_RD_ADDR_BITLEN)<<SPI_SLV_RD_ADDR_BITLEN_S));
SET_PERI_REG_MASK(SPI_PIN(spi_no),BIT19);//BIT19
//maybe enable slave transmission liston
SET_PERI_REG_MASK(SPI_CMD(spi_no),SPI_USR);
//register level2 isr function, which contains spi, hspi and i2s events
ETS_SPI_INTR_ATTACH(spi_slave_isr_handler,NULL);
//enable level2 isr, which contains spi, hspi and i2s events
ETS_SPI_INTR_ENABLE();
}
/* =============================================================================================
* code below is for spi slave r/w testcase with 2 r/w state lines connected to the spi master mcu
* replace with your own process functions
* find "add system_os_post here" in spi_slave_isr_handler.
* =============================================================================================
*/
#ifdef SPI_SLAVE_DEBUG
/******************************************************************************
* FunctionName : hspi_master_readwrite_repeat
* Description : SPI master test function for reading and writing esp8266 slave buffer,
the function uses HSPI module
*******************************************************************************/
os_timer_t timer2;
void hspi_master_readwrite_repeat(void)
{
static uint8 data=0;
uint8 temp;
os_timer_disarm(&timer2);
spi_byte_read_espslave(HSPI,&temp);
temp++;
spi_byte_write_espslave(HSPI,temp);
os_timer_setfn(&timer2, (os_timer_func_t *)hspi_master_readwrite_repeat, NULL);
os_timer_arm(&timer2, 500, 0);
}
#endif
/******************************************************************************
* FunctionName : spi_slave_isr_handler
* Description : SPI interrupt function, SPI HSPI and I2S interrupt can trig this function
some basic operation like clear isr flag has been done,
and it is availible for adding user coder in the funtion
* Parameters : void *para- function parameter address, which has been registered in function spi_slave_init
*******************************************************************************/
#include "gpio.h"
#include "user_interface.h"
#include "mem.h"
static uint8 spi_data[32] = {0};
static uint8 idx = 0;
static uint8 spi_flg = 0;
#define SPI_MISO
#define SPI_QUEUE_LEN 8
os_event_t * spiQueue;
#define MOSI 0
#define MISO 1
#define STATUS_R_IN_WR 2
#define STATUS_W 3
#define TR_DONE_ALONE 4
#define WR_RD 5
#define DATA_ERROR 6
#define STATUS_R_IN_RD 7
//init the two intr line of slave
//gpio0: wr_ready ,and
//gpio2: rd_ready , controlled by slave
void ICACHE_FLASH_ATTR
gpio_init()
{
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO0_U, FUNC_GPIO0);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO2_U, FUNC_GPIO2);
//PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO4_U, FUNC_GPIO4);
GPIO_OUTPUT_SET(0, 1);
GPIO_OUTPUT_SET(2, 0);
//GPIO_OUTPUT_SET(4, 1);
}
void spi_slave_isr_handler(void *para)
{
uint32 regvalue,calvalue;
static uint8 state =0;
uint32 recv_data,send_data;
if(READ_PERI_REG(0x3ff00020)&BIT4){
//following 3 lines is to clear isr signal
CLEAR_PERI_REG_MASK(SPI_SLAVE(SPI), 0x3ff);
}else if(READ_PERI_REG(0x3ff00020)&BIT7){ //bit7 is for hspi isr,
regvalue=READ_PERI_REG(SPI_SLAVE(HSPI));
CLEAR_PERI_REG_MASK(SPI_SLAVE(HSPI),
SPI_TRANS_DONE_EN|
SPI_SLV_WR_STA_DONE_EN|
SPI_SLV_RD_STA_DONE_EN|
SPI_SLV_WR_BUF_DONE_EN|
SPI_SLV_RD_BUF_DONE_EN);
SET_PERI_REG_MASK(SPI_SLAVE(HSPI), SPI_SYNC_RESET);
CLEAR_PERI_REG_MASK(SPI_SLAVE(HSPI),
SPI_TRANS_DONE|
SPI_SLV_WR_STA_DONE|
SPI_SLV_RD_STA_DONE|
SPI_SLV_WR_BUF_DONE|
SPI_SLV_RD_BUF_DONE);
SET_PERI_REG_MASK(SPI_SLAVE(HSPI),
SPI_TRANS_DONE_EN|
SPI_SLV_WR_STA_DONE_EN|
SPI_SLV_RD_STA_DONE_EN|
SPI_SLV_WR_BUF_DONE_EN|
SPI_SLV_RD_BUF_DONE_EN);
if(regvalue&SPI_SLV_WR_BUF_DONE){
GPIO_OUTPUT_SET(0, 0);
idx=0;
while(idx<8){
recv_data=READ_PERI_REG(SPI_W0(HSPI)+(idx<<2));
spi_data[idx<<2] = recv_data&0xff;
spi_data[(idx<<2)+1] = (recv_data>>8)&0xff;
spi_data[(idx<<2)+2] = (recv_data>>16)&0xff;
spi_data[(idx<<2)+3] = (recv_data>>24)&0xff;
idx++;
}
//add system_os_post here
GPIO_OUTPUT_SET(0, 1);
}
if(regvalue&SPI_SLV_RD_BUF_DONE){
//it is necessary to call GPIO_OUTPUT_SET(2, 1), when new data is preped in SPI_W8-15 and needs to be sended.
GPIO_OUTPUT_SET(2, 0);
//add system_os_post here
//system_os_post(USER_TASK_PRIO_1,WR_RD,regvalue);
}
}else if(READ_PERI_REG(0x3ff00020)&BIT9){ //bit7 is for i2s isr,
}
}
#ifdef SPI_SLAVE_DEBUG
void ICACHE_FLASH_ATTR
set_miso_data()
{
if(GPIO_INPUT_GET(2)==0){
WRITE_PERI_REG(SPI_W8(HSPI),0x05040302);
WRITE_PERI_REG(SPI_W9(HSPI),0x09080706);
WRITE_PERI_REG(SPI_W10(HSPI),0x0d0c0b0a);
WRITE_PERI_REG(SPI_W11(HSPI),0x11100f0e);
WRITE_PERI_REG(SPI_W12(HSPI),0x15141312);
WRITE_PERI_REG(SPI_W13(HSPI),0x19181716);
WRITE_PERI_REG(SPI_W14(HSPI),0x1d1c1b1a);
WRITE_PERI_REG(SPI_W15(HSPI),0x21201f1e);
GPIO_OUTPUT_SET(2, 1);
}
}
void ICACHE_FLASH_ATTR
disp_spi_data()
{
uint8 i = 0;
for(i=0;i<32;i++){
os_printf("data %d : 0x%02x\n\r",i,spi_data[i]);
}
//os_printf("d31:0x%02x\n\r",spi_data[31]);
}
void ICACHE_FLASH_ATTR
spi_task(os_event_t *e)
{
uint8 data;
switch(e->sig){
case MOSI:
disp_spi_data();
break;
case STATUS_R_IN_WR :
os_printf("SR ERR in WRPR,Reg:%08x \n",e->par);
break;
case STATUS_W:
os_printf("SW ERR,Reg:%08x\n",e->par);
break;
case TR_DONE_ALONE:
os_printf("TD ALO ERR,Reg:%08x\n",e->par);
break;
case WR_RD:
os_printf("WR&RD ERR,Reg:%08x\n",e->par);
break;
case DATA_ERROR:
os_printf("Data ERR,Reg:%08x\n",e->par);
break;
case STATUS_R_IN_RD :
os_printf("SR ERR in RDPR,Reg:%08x\n",e->par);
break;
default:
break;
}
}
void ICACHE_FLASH_ATTR
spi_task_init(void)
{
spiQueue = (os_event_t*)os_malloc(sizeof(os_event_t)*SPI_QUEUE_LEN);
system_os_task(spi_task,USER_TASK_PRIO_1,spiQueue,SPI_QUEUE_LEN);
}
os_timer_t spi_timer_test;
void ICACHE_FLASH_ATTR
spi_test_init()
{
os_printf("spi init\n\r");
spi_slave_init(HSPI);
os_printf("gpio init\n\r");
gpio_init();
os_printf("spi task init \n\r");
spi_task_init();
#ifdef SPI_MISO
os_printf("spi miso init\n\r");
set_miso_data();
#endif
//os_timer_disarm(&spi_timer_test);
//os_timer_setfn(&spi_timer_test, (os_timer_func_t *)set_miso_data, NULL);//wjl
//os_timer_arm(&spi_timer_test,50,1);
}
#endif
================================================
FILE: app/driver/uart_interrupt.c
================================================
#include "ets_sys.h"
#include "osapi.h"
#include "driver/uart.h"
#include "osapi.h"
#include "driver/uart_register.h"
#include "user_config.h"
#include "mem.h"
#include "os_type.h"
#include "util/linked_list.h"
// UartDev is defined and initialized in rom code.
extern UartDevice UartDev;
#define UART_RX_INTR_DISABLE(uart) CLEAR_PERI_REG_MASK(UART_INT_ENA(uart), UART_RXFIFO_FULL_INT_ENA|UART_RXFIFO_TOUT_INT_ENA)
#define UART_RX_INTR_ENABLE(uart) SET_PERI_REG_MASK(UART_INT_ENA(uart), UART_RXFIFO_FULL_INT_ENA|UART_RXFIFO_TOUT_INT_ENA)
#define UART_TX_INTR_DISABLE(uart) CLEAR_PERI_REG_MASK(UART_INT_ENA(uart), UART_TXFIFO_EMPTY_INT_ENA)
#define UART_TX_INTR_ENABLE(uart) SET_PERI_REG_MASK(UART_CONF1(uart), (UART_TX_EMPTY_THRESH_VAL & UART_TXFIFO_EMPTY_THRHD)<<UART_TXFIFO_EMPTY_THRHD_S); \
SET_PERI_REG_MASK(UART_INT_ENA(uart), UART_TXFIFO_EMPTY_INT_ENA)
#define UART_RESET_FIFO(uart) SET_PERI_REG_MASK(UART_CONF0(uart), UART_RXFIFO_RST | UART_TXFIFO_RST); \
CLEAR_PERI_REG_MASK(UART_CONF0(uart), UART_RXFIFO_RST | UART_TXFIFO_RST)
#define UART_CLEAR_ALL_INTR(uart) WRITE_PERI_REG(UART_INT_CLR(uart), 0xffff)
#define UART_CLEAR_INTR(uart,INTERRUPT) WRITE_PERI_REG(UART_INT_CLR(uart), INTERRUPT)
#define UART_INTERRUPT_IS(uart,INTERRUPT) INTERRUPT == (READ_PERI_REG(UART_INT_ST(uart)) & INTERRUPT)
#define UART_RX_FIFO_COUNT(uart) (READ_PERI_REG(UART_STATUS(uart))>>UART_RXFIFO_CNT_S)&UART_RXFIFO_CNT
#define UART_TX_FIFO_COUNT(uart) (READ_PERI_REG(UART_STATUS(uart))>>UART_TXFIFO_CNT_S)&UART_TXFIFO_CNT
#define UART0_READ_CHAR() READ_PERI_REG(UART_FIFO(UART0)) & 0xFF
#define UART_WRITE_CHAR(uart,c) WRITE_PERI_REG(UART_FIFO(uart), c)
static uart0_data_received_callback_t uart0_data_received_callback=NULL;
LOCAL void uart_rx_intr_handler(void *para);
LOCAL void uart_transmit(uint8_t uart);
#define TX_ITEM_LEN 128
struct tx_item{
uint8_t data[TX_ITEM_LEN];
int len;
};
linked_list tx_list[2];
os_timer_t tx_timer[2];
//UART TRANSMIT ------------------------------------------------------------
STATUS uart_tx_one_char(uint8_t uart, uint8_t TxChar)
{
while (true){
uint8_t fifo_cnt = UART_TX_FIFO_COUNT(uart);
if (fifo_cnt < 126) {
break;
}
}
UART_WRITE_CHAR(uart,TxChar);
return OK;
}
STATUS uart_tx_one_char_no_wait(uint8_t uart, uint8_t TxChar)
{
uint8_t fifo_cnt = UART_TX_FIFO_COUNT(uart);
if (fifo_cnt < 126) {
UART_WRITE_CHAR(uart,TxChar);
}
return OK;
}
static void tx_timer_timeout(void *arg){
//NODE_DBG("u tout");
if(arg==(void*)0){
uart_transmit(0);
}
else{
uart_transmit(1);
}
}
void uart_write(uint8_t uart,uint8_t *data,int len){
linked_list *list = &tx_list[uart];
uint8_t fifo_cnt = UART_TX_FIFO_COUNT(uart);
if (fifo_cnt > len && list->size==0) {
//we can write on uart buffer
while(len>0){
UART_WRITE_CHAR(uart,*data);
data++;
len--;
}
return;
}
//if fifo is full, buffer on our own
while(len>0){
struct tx_item *tx = (struct tx_item *)list_get_first(list);
if(tx==NULL || tx->len >= TX_ITEM_LEN){
tx = (struct tx_item*)os_zalloc(sizeof(struct tx_item));
list_add_first(list,tx);
}
int remLen = TX_ITEM_LEN-tx->len;
if(len <= remLen){
os_memcpy(tx->data+tx->len,data,len);
tx->len+=len;
len=0;
}
else{
os_memcpy(tx->data+tx->len,data,remLen);
tx->len+=remLen;
len-=remLen;
data+=remLen;
}
}
os_timer_disarm(&tx_timer[uart]);
os_timer_arm(&tx_timer[uart], 20, 0);
}
void uart_write_char(uint8_t uart,char c){
uart_write(uart,&c,1);
}
void uart_write_string(uint8_t uart,const char *s){
int str_len = os_strlen(s);
uart_write(uart,(uint8_t*)s,str_len);
}
void ICACHE_FLASH_ATTR uart_config(uint8_t uart_no)
{
if (uart_no == UART1){
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO2_U, FUNC_U1TXD_BK);
}else{
/* rcv_buff size if 0x100 */
ETS_UART_INTR_ATTACH(uart_rx_intr_handler, &(UartDev.rcv_buff));
PIN_PULLUP_DIS(PERIPHS_IO_MUX_U0TXD_U);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_U0TXD_U, FUNC_U0TXD);
#if UART_HW_RTS
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U, FUNC_U0RTS); //HW FLOW CONTROL RTS PIN
#endif
#if UART_HW_CTS
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTCK_U, FUNC_U0CTS); //HW FLOW CONTROL CTS PIN
#endif
}
uart_div_modify(uart_no, UART_CLK_FREQ / (UartDev.baut_rate));//SET BAUDRATE
WRITE_PERI_REG(UART_CONF0(uart_no), ((UartDev.exist_parity & UART_PARITY_EN_M) << UART_PARITY_EN_S) //SET BIT AND PARITY MODE
| ((UartDev.parity & UART_PARITY_M) <<UART_PARITY_S )
| ((UartDev.stop_bits & UART_STOP_BIT_NUM) << UART_STOP_BIT_NUM_S)
| ((UartDev.data_bits & UART_BIT_NUM) << UART_BIT_NUM_S));
//clear rx and tx fifo,not ready
UART_RESET_FIFO(uart_no);
if (uart_no == UART0){
//set rx fifo trigger
WRITE_PERI_REG(UART_CONF1(uart_no),
((100 & UART_RXFIFO_FULL_THRHD) << UART_RXFIFO_FULL_THRHD_S) |
#if UART_HW_RTS
((110 & UART_RX_FLOW_THRHD) << UART_RX_FLOW_THRHD_S) |
UART_RX_FLOW_EN | //enbale rx flow control
#endif
(0x60 & UART_RX_TOUT_THRHD) << UART_RX_TOUT_THRHD_S |
UART_RX_TOUT_EN|
((0x10 & UART_TXFIFO_EMPTY_THRHD)<<UART_TXFIFO_EMPTY_THRHD_S));//wjl
#if UART_HW_CTS
SET_PERI_REG_MASK( UART_CONF0(uart_no),UART_TX_FLOW_EN); //add this sentense to add a tx flow control via MTCK( CTS )
#endif
SET_PERI_REG_MASK(UART_INT_ENA(uart_no), UART_RXFIFO_TOUT_INT_ENA |UART_FRM_ERR_INT_ENA);
}else{
WRITE_PERI_REG(UART_CONF1(uart_no),((UartDev.rcv_buff.TrigLvl & UART_RXFIFO_FULL_THRHD) << UART_RXFIFO_FULL_THRHD_S));//TrigLvl default val == 1
}
//clear all interrupt
WRITE_PERI_REG(UART_INT_CLR(uart_no), 0xffff);
//enable rx_interrupt
SET_PERI_REG_MASK(UART_INT_ENA(uart_no), UART_RXFIFO_FULL_INT_ENA|UART_RXFIFO_OVF_INT_ENA);
}
LOCAL void uart_transmit(uint8_t uart){
uint8_t tx_fifo_len;
uint8_t fifo_remain;
linked_list *list = &tx_list[uart];
struct tx_item *item=NULL;
process:
tx_fifo_len = UART_TX_FIFO_COUNT(uart);
fifo_remain = UART_FIFO_LEN - tx_fifo_len ;
item = (struct tx_item *)list_remove_last(list);
if(item!=NULL){
int i;
int tx_count = item->len > fifo_remain?fifo_remain:item->len;
if(fifo_remain >= item->len){
for(i = 0; i<item->len;i++)
UART_WRITE_CHAR(uart,item->data[i]);
os_free(item);
goto process;
}
else{
for(i=0;i<fifo_remain;i++)
UART_WRITE_CHAR(uart,item->data[i]);
os_memmove(item->data, item->data+fifo_remain, item->len - fifo_remain);
item->len -= fifo_remain;
list_add_last(list,item); //put back on list
}
if(tx_list->size>0)
UART_TX_INTR_ENABLE(uart); //enable interrupt so we may send data again
}
}
LOCAL void uart0_data_received(){
uint8_t data_len = UART_RX_FIFO_COUNT(0);
if(data_len<=0)
return;
if(uart0_data_received_callback!=NULL){
uint8_t *tmp_data = (uint8_t*)os_malloc(data_len);
int i;
uint8_t c;
for(i=0;i<data_len;i++){
c = UART0_READ_CHAR();
tmp_data[i]=c;
}
uart0_data_received_callback(tmp_data,data_len);
os_free(tmp_data);
}
}
LOCAL void uart_rx_intr_handler(void *para)
{
if( UART_INTERRUPT_IS(0,UART_FRM_ERR_INT_ST) ){
//just clear intr
UART_CLEAR_INTR(0,UART_FRM_ERR_INT_CLR);
return;
}
if( UART_INTERRUPT_IS(1,UART_FRM_ERR_INT_ST) ){
//just clear intr
UART_CLEAR_INTR(1,UART_FRM_ERR_INT_CLR);
return;
}
if( UART_INTERRUPT_IS(0,UART_RXFIFO_FULL_INT_ST) ){
//got data on rx fifo
UART_RX_INTR_DISABLE(0); //disable rx interrupt
uart0_data_received();
UART_CLEAR_INTR(0,UART_RXFIFO_FULL_INT_CLR); //clear interrupt
UART_RX_INTR_ENABLE(0); //enable interrupt back
return;
}
if( UART_INTERRUPT_IS(0,UART_RXFIFO_TOUT_INT_ST) ){
//got data on uart 0 rx fifo, timeout for fifo full
UART_RX_INTR_DISABLE(0); //disable rx interrupt
uart0_data_received();
UART_CLEAR_INTR(0,UART_RXFIFO_TOUT_INT_CLR); //clear interrupt
UART_RX_INTR_ENABLE(0); //enable interrupt back
return;
}
if( UART_INTERRUPT_IS(0,UART_TXFIFO_EMPTY_INT_ST) ){
UART_TX_INTR_DISABLE(0);
uart_transmit(0);
UART_CLEAR_INTR(0,UART_TXFIFO_EMPTY_INT_CLR); //clear interrupt
return;
}
if( UART_INTERRUPT_IS(1,UART_TXFIFO_EMPTY_INT_ST) ){
UART_TX_INTR_DISABLE(1);
uart_transmit(1);
UART_CLEAR_INTR(1,UART_TXFIFO_EMPTY_INT_CLR); //clear interrupt
return;
}
if( UART_INTERRUPT_IS(0,UART_RXFIFO_OVF_INT_ST) ){
UART_CLEAR_INTR(0,UART_RXFIFO_OVF_INT_CLR); //clear interrupt
return;
}
}
void uart_register_data_callback(uart0_data_received_callback_t callback){
uart0_data_received_callback=callback;
}
void uart_clear_data_callback(){
uart0_data_received_callback=NULL;
}
void uart1_write_char(char c){
uart_write_char(1,c);
}
void uart0_write_char(char c){
uart_write_char(0,c);
}
void uart_init(UartBautRate uart0_br, UartBautRate uart1_br)
{
//set timers
os_memset(&tx_timer[0],0,sizeof(os_timer_t));
os_timer_disarm(&tx_timer[0]);
os_timer_setfn(&tx_timer[0], (os_timer_func_t *)tx_timer_timeout, 0);
os_memset(&tx_timer[1],0,sizeof(os_timer_t));
os_timer_disarm(&tx_timer[1]);
os_timer_setfn(&tx_timer[1], (os_timer_func_t *)tx_timer_timeout, 1);
init_linked_list(&tx_list[0]);
init_linked_list(&tx_list[1]);
UartDev.exist_parity = STICK_PARITY_EN;
UartDev.parity = EVEN_BITS;
UartDev.stop_bits = ONE_STOP_BIT;
UartDev.data_bits = EIGHT_BITS;
UartDev.baut_rate = uart0_br;
uart_config(UART0);
UartDev.baut_rate = uart1_br;
uart_config(UART1);
ETS_UART_INTR_ENABLE();
#if(DEBUG_UART==0)
os_install_putc1((void *)uart0_write_char);
#else
os_install_putc1((void *)uart1_write_char);
#endif
}
================================================
FILE: app/http/Makefile
================================================
#############################################################
# Required variables for each makefile
# Discard this section from all parent makefiles
# Expected variables (with automatic defaults):
# CSRCS (all "C" files in the dir)
# SUBDIRS (all subdirs with a Makefile)
# GEN_LIBS - list of libs to be generated ()
# GEN_IMAGES - list of images to be generated ()
# COMPONENTS_xxx - a list of libs/objs in the form
# subdir/lib to be extracted and rolled up into
# a generated lib/image xxx.a ()
#
ifndef PDIR
GEN_LIBS = http.a
endif
#############################################################
# Configuration i.e. compile options etc.
# Target specific stuff (defines etc.) goes in here!
# Generally values applying to a tree are captured in the
# makefile at its root level - these are then overridden
# for a subtree within the makefile rooted therein
#
#DEFINES +=
#############################################################
# Recursion Magic - Don't touch this!!
#
# Each subtree potentially has an include directory
# corresponding to the common APIs applicable to modules
# rooted at that subtree. Accordingly, the INCLUDE PATH
# of a module can only contain the include directories up
# its parent path, and not its siblings
#
# Required for each makefile to inherit from the parent
#
INCLUDES := $(INCLUDES) -I $(PDIR)include
INCLUDES += -I ./
INCLUDES += -I ../libc
INCLUDES += -I ../platform
INCLUDES += -I ../
PDIR := ../$(PDIR)
sinclude $(PDIR)Makefile
================================================
FILE: app/http/app.c
================================================
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* Israel Lot <me@israellot.com> and Jeroen Domburg <jeroen@spritesmods.com>
* wrote this file. As long as you retain this notice you can do whatever you
* want with this stuff. If we meet some day, and you think this stuff is
* worth it, you can buy us a beer in return.
* ----------------------------------------------------------------------------
*/
#include "c_types.h"
#include "user_interface.h"
#include "espconn.h"
#include "mem.h"
#include "osapi.h"
#include "cgi.h"
#include "cgi_wifi.h"
#include "cgi_relay.h"
#include "user_config.h"
#include "http_server.h"
#include "ws_app.h"
#define HTTP_PORT 80
static http_server_url api_urls[]={
//------URL-------------------------CGI----------------------ARGUMENT--------METHOD-------------FLAGS------
{"/api/wifi/status", http_wifi_api_get_status, NULL, HTTP_POST, NO_FLAG},
{"/api/wifi/scan", http_wifi_api_scan, NULL, HTTP_POST, NO_FLAG},
{"/api/wifi/connect", http_wifi_api_connect_ap, NULL, HTTP_POST, NEED_BODY},
{"/api/wifi/disconnect", http_wifi_api_disconnect, NULL, HTTP_POST, NO_FLAG},
{"/api/wifi/checkInternet", http_wifi_api_check_internet, NULL, HTTP_POST, NO_FLAG},
{"/api/relay/state", http_relay_api_status, NULL, HTTP_POST, NO_FLAG},
{"/api/relay/toggle", http_relay_api_toggle, NULL, HTTP_POST, NEED_BODY},
{"/api/dht/read", http_dht_api_read, NULL, HTTP_POST, NO_FLAG},
{NULL, NULL, NULL, HTTP_ANY_METHOD, NO_FLAG}
};
static url_rewrite rewrites[]={
//----PATH---------REWRITE-------
{"/" , "/index.html"},
{"/speed-test" , "/speed_test.html"},
{"/cats" , "/cats.html"},
{NULL,NULL}
};
void ICACHE_FLASH_ATTR init_http_server(){
//general max tcp conns
espconn_tcp_set_max_con(20);
http_server_init();
http_server_bind_domain(INTERFACE_DOMAIN);
http_server_enable_captive_portal();
http_server_enable_cors();
http_server_rewrite(&rewrites);
http_server_bind_urls((http_server_url *)&api_urls);
http_server_start();
//ws
init_ws_server();
}
================================================
FILE: app/http/app.h
================================================
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* Israel Lot <me@israellot.com> and Jeroen Domburg <jeroen@spritesmods.com>
* wrote this file. As long as you retain this notice you can do whatever you
* want with this stuff. If we meet some day, and you think this stuff is
* worth it, you can buy us a beer in return.
* ----------------------------------------------------------------------------
*/
#ifndef __HTTP_H
#define __HTTP_H
void ICACHE_FLASH_ATTR init_http_server();
#endif
================================================
FILE: app/http/cgi.c
================================================
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* Israel Lot <me@israellot.com> and Jeroen Domburg <jeroen@spritesmods.com>
* wrote this file. As long as you retain this notice you can do whatever you
* want with this stuff. If we meet some day, and you think this stuff is
* worth it, you can buy us a beer in return.
* ----------------------------------------------------------------------------
*/
#include "c_string.h"
#include "osapi.h"
#include "user_interface.h"
#include "c_stdio.h"
#include "mem.h"
#include "user_config.h"
#include "http.h"
#include "http_parser.h"
#include "http_server.h"
#include "http_process.h"
#include "http_helper.h"
#include "rofs.h"
#include "cgi.h"
// If a request to transmit data overflows the send buffer, the cgi function will be temporarely
// replaced by this one and later restored when all data is sent.
int ICACHE_FLASH_ATTR cgi_transmit(http_connection *connData){
NODE_DBG("cgi_transmit");
struct cgi_transmit_arg *arg = (struct cgi_transmit_arg*)connData->cgi.data;
if(arg->len > 0){
NODE_DBG("cgi_transmit %d bytes",arg->len);
int rem = connData->output.buffer + HTTP_BUFFER_SIZE - connData->output.bufferPos;
int bytesToWrite = rem;
if(arg->len < rem )
bytesToWrite = arg->len;
http_nwrite(connData,arg->dataPos,bytesToWrite);
arg->len -= bytesToWrite;
arg->dataPos+=bytesToWrite;
}
if(arg->len==0){
//all written
//free data
os_free(arg->data);
//copy old cgi back
os_memcpy(&connData->cgi,&arg->previous_cgi,sizeof(cgi_struct));
//free cgi arg
os_free(arg);
}
return HTTPD_CGI_MORE;
}
// This makes sure we aren't serving static files on POST requests for example
int ICACHE_FLASH_ATTR cgi_enforce_method(http_connection *connData) {
enum http_method *method = (enum http_method *)connData->cgi.argument;
if(connData->state == HTTPD_STATE_BODY_END)
if(connData->parser.method!=*method && (int)*method>=0)
{
NODE_DBG("Wrong HTTP method. Enforce is %d and request is %d",method,connData->parser.method);
http_response_BAD_REQUEST(connData);
return HTTPD_CGI_DONE;
}
return HTTPD_CGI_NEXT_RULE;
}
// This makes sure we have a body
int ICACHE_FLASH_ATTR cgi_enforce_body(http_connection *connData) {
if(connData->state ==HTTPD_STATE_ON_URL){
http_set_save_body(connData); //request body to be saved
}
//wait for whole body
if(connData->state <HTTPD_STATE_BODY_END)
return HTTPD_CGI_NEXT_RULE;
//if body empty, bad request
if(connData->body.len <=0){
http_response_BAD_REQUEST(connData);
NODE_DBG("No body");
return HTTPD_CGI_DONE;
}
else
return HTTPD_CGI_NEXT_RULE;
}
//cgi that adds CORS ( Cross Origin Resource Sharing ) to our server
int ICACHE_FLASH_ATTR cgi_cors(http_connection *connData) {
http_server_config *config = (http_server_config*)connData->cgi.argument;;
if(config==NULL)
return HTTPD_CGI_NEXT_RULE;
if(!config->enable_cors)
return HTTPD_CGI_NEXT_RULE;
if(connData->state==HTTPD_STATE_ON_URL){
//save cors headers
http_set_save_header(connData,HTTP_ACCESS_CONTROL_REQUEST_HEADERS);
http_set_save_header(connData,HTTP_ACCESS_CONTROL_REQUEST_METHOD);
return HTTPD_CGI_NEXT_RULE;
}
if(connData->state==HTTPD_STATE_HEADERS_END){
//SET CORS Allow Origin for every request
http_SET_HEADER(connData,HTTP_ACCESS_CONTROL_ALLOW_ORIGIN,"*");
header * allow_headers = http_get_header(connData,HTTP_ACCESS_CONTROL_REQUEST_HEADERS);
header * allow_methods = http_get_header(connData,HTTP_ACCESS_CONTROL_REQUEST_METHOD);
if(allow_headers!=NULL)
http_SET_HEADER(connData,HTTP_ACCESS_CONTROL_ALLOW_HEADERS,allow_headers->value);
if(allow_methods!=NULL)
http_SET_HEADER(connData,HTTP_ACCESS_CONTROL_ALLOW_METHODS,allow_methods->value);
// Browsers will send an OPTIONS pre-flight request when posting data on a cross-domain situation
// If that's the case here, we can safely return 200 OK with our CORS headers set
if(connData->parser.method==HTTP_OPTIONS)
{
http_response_OK(connData);
return HTTPD_CGI_DONE;
}
}
return HTTPD_CGI_NEXT_RULE;
}
//Simple static url rewriter, allows us to process the request as another url without redirecting the user
//Used to serve index files on root / requests for example
int ICACHE_FLASH_ATTR cgi_url_rewrite(http_connection *connData) {
if(connData->state==HTTPD_STATE_HEADERS_END){
NODE_DBG("Rewrite %s to %s",connData->url,(char*)connData->cgi.argument);
int urlSize = strlen((char*)connData->cgi.argument);
if(urlSize < URL_MAX_SIZE){
strcpy(connData->url,(char*)connData->cgi.argument);
//re-parse url
http_parse_url(connData);
}
}
return HTTPD_CGI_NEXT_RULE;
}
//Simple cgi that redirects the user
int ICACHE_FLASH_ATTR cgi_redirect(http_connection *connData) {
http_response_REDIRECT(connData, (char*)connData->cgi.argument);
return HTTPD_CGI_DONE;
}
//Cgi that check the request has the correct HOST header
//Using it we can ensure our server has a domain of our choice
int ICACHE_FLASH_ATTR cgi_check_host(http_connection *connData) {
http_server_config *config = (http_server_config*)connData->cgi.argument;
if(config==NULL)
return HTTPD_CGI_NEXT_RULE;
if(config->host_domain==NULL)
return HTTPD_CGI_NEXT_RULE;
if(connData->state==HTTPD_STATE_ON_URL){
http_set_save_header(connData,HTTP_HOST);
return HTTPD_CGI_NEXT_RULE;
}
if(connData->state==HTTPD_STATE_HEADERS_END){
header *hostHeader = http_get_header(connData,HTTP_HOST);
if(hostHeader==NULL){
NODE_DBG("Host header not found");
http_response_BAD_REQUEST(connData);
return HTTPD_CGI_DONE;
}
const char * domain = config->host_domain;
NODE_DBG("Host header found: %s, domain: %s",hostHeader->value,domain);
if(os_strncmp(hostHeader->value,domain,strlen(domain))==0) //compare ignoring http:// and last /
{
NODE_DBG("Hosts match");
return HTTPD_CGI_NEXT_RULE;
}
else{
NODE_DBG("Hosts don't match");
if(config->enable_captive){
//to enable a captive portal we should redirect here
char * redirectUrl = (char *)os_zalloc(strlen(domain)+9); // domain lenght + http:// + / + \0
os_strcpy(redirectUrl,"http://");
os_strcat(redirectUrl,domain);
os_strcat(redirectUrl,"/");
http_response_REDIRECT(connData, redirectUrl);
os_free(redirectUrl);
}
else{
//bad request
http_response_BAD_REQUEST(connData);
}
return HTTPD_CGI_DONE;
}
}
return HTTPD_CGI_NEXT_RULE;
}
typedef struct{
RO_FILE *f;
char *buff;
} cgi_fs_state;
//cgi for static file serving
int ICACHE_FLASH_ATTR cgi_file_system(http_connection *connData) {
cgi_fs_state *state = (cgi_fs_state *)connData->cgi.data;
int len;
char buff[HTTP_BUFFER_SIZE];
//wait for body end state
if(connData->state<HTTPD_STATE_BODY_END)
return HTTPD_CGI_NEXT_RULE;
if (state==NULL) {
//First call to this cgi. Open the file so we can read it.
RO_FILE *f;
if( ! connData->url_parsed.field_set & (1<<UF_PATH) ){
//there's no PATH on the url ( WTF? ), so not found
return HTTPD_CGI_NOTFOUND;
}
char * path = http_url_get_path(connData);
f=f_open(path);
if (f==NULL) {
return HTTPD_CGI_NOTFOUND;
}
NODE_DBG("File %s opened",path);
state = (cgi_fs_state*)os_zalloc(sizeof(cgi_fs_state));
state->f = f;
connData->cgi.data=state; //save state for next time
//set headers
http_SET_HEADER(connData,HTTP_CONTENT_TYPE,http_get_mime(connData->url));
http_SET_HEADER(connData,HTTP_CACHE_CONTROL,HTTP_DEFAULT_CACHE);
http_SET_CONTENT_LENGTH(connData,f->file->size);
if(f->file->gzip)
http_SET_HEADER(connData,HTTP_CONTENT_ENCODING,"gzip");
http_response_OK(connData);
return HTTPD_CGI_MORE;
}
else{
//file found, transmit data
len=f_read(state->f, buff, HTTP_BUFFER_SIZE);
if (len>0){
NODE_DBG("Sending %d bytes of data",len);
http_nwrite(connData,(const char*)buff,len);
//http_response_transmit(connData);
}
if (state->f->eof) {
NODE_DBG("End of file reached");
//We're done.
f_close(state->f);
os_free(state);
return HTTPD_CGI_DONE;
} else {
//not done yet
return HTTPD_CGI_MORE;
}
}
}
================================================
FILE: app/http/cgi.h
================================================
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* Israel Lot <me@israellot.com> and Jeroen Domburg <jeroen@spritesmods.com>
* wrote this file. As long as you retain this notice you can do whatever you
* want with this stuff. If we meet some day, and you think this stuff is
* worth it, you can buy us a beer in return.
* ----------------------------------------------------------------------------
*/
#ifndef CGI_H
#define CGI_H
#include "http.h"
struct cgi_transmit_arg{
cgi_struct previous_cgi;
uint8_t *data;
uint8_t *dataPos;
uint16_t len;
};
int ICACHE_FLASH_ATTR cgi_transmit(http_connection *connData);
int ICACHE_FLASH_ATTR cgi_cors(http_connection *connData);
int ICACHE_FLASH_ATTR cgi_url_rewrite(http_connection *connData);
int ICACHE_FLASH_ATTR cgi_redirect(http_connection *connData);
int ICACHE_FLASH_ATTR cgi_check_host(http_connection *connData);
int ICACHE_FLASH_ATTR cgi_file_system(http_connection *connData);
int ICACHE_FLASH_ATTR cgi_enforce_method(http_connection *connData);
#endif
================================================
FILE: app/http/cgi_relay.c
================================================
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* Israel Lot <me@israellot.com> and Jeroen Domburg <jeroen@spritesmods.com>
* wrote this file. As long as you retain this notice you can do whatever you
* want with this stuff. If we meet some day, and you think this stuff is
* worth it, you can buy us a beer in return.
* ----------------------------------------------------------------------------
*/
#include "c_string.h"
#include "osapi.h"
#include "user_interface.h"
#include "mem.h"
#include "c_stdio.h"
#include "platform.h"
#include "user_config.h"
#include "driver/relay.h"
#include "sensor/sensors.h"
#include "cgi.h"
#include "http.h"
#include "http_parser.h"
#include "http_server.h"
#include "http_process.h"
#include "http_helper.h"
#include "http_client.h"
#include "json/cJson.h"
int ICACHE_FLASH_ATTR http_relay_api_status(http_connection *c) {
NODE_DBG("http_wifi_api_get_status");
//wait for whole body
if(c->state <HTTPD_STATE_BODY_END)
return HTTPD_CGI_MORE;
//write headers
http_SET_HEADER(c,HTTP_CONTENT_TYPE,JSON_CONTENT_TYPE);
http_response_OK(c);
cJSON *root, *relays, *fld;
root = cJSON_CreateObject();
cJSON_AddItemToObject(root, "relays", relays = cJSON_CreateArray());
int i;
for(i=0;i<relay_count();i++){
cJSON_AddItemToArray(relays,fld=cJSON_CreateObject());
cJSON_AddNumberToObject(fld,"relay",i);
cJSON_AddNumberToObject(fld,"state",relay_get_state(i));
}
http_write_json(c,root);
//delete json struct
cJSON_Delete(root);
return HTTPD_CGI_DONE;
}
int ICACHE_FLASH_ATTR http_relay_api_toggle(http_connection *c) {
NODE_DBG("http_wifi_api_get_status");
//wait for whole body
if(c->state <HTTPD_STATE_BODY_END)
return HTTPD_CGI_MORE;
//parse json
cJSON * root = cJSON_Parse(c->body.data);
if(root==NULL) goto badrequest;
cJSON * relay = cJSON_GetObjectItem(root,"relay");
if(relay==NULL) goto badrequest;
int relayNumber = relay->valueint;
cJSON_Delete(root);
if(relayNumber<0 || relayNumber >=relay_count()){
http_response_BAD_REQUEST(c);
NODE_DBG("Wrong relay");
return HTTPD_CGI_DONE;
}
else{
//valid relay
unsigned status = relay_get_state(relayNumber);
status = relay_toggle_state(relayNumber);
//write headers
http_SET_HEADER(c,HTTP_CONTENT_TYPE,JSON_CONTENT_TYPE);
http_response_OK(c);
//create json
root = cJSON_CreateObject();
cJSON_AddNumberToObject(root,"relay",relayNumber);
cJSON_AddNumberToObject(root,"state",status);
http_write_json(c,root);
//delete json struct
cJSON_Delete(root);
return HTTPD_CGI_DONE;
}
badrequest:
http_response_BAD_REQUEST(c);
return HTTPD_CGI_DONE;
}
//TODO move to own file
int ICACHE_FLASH_ATTR http_dht_api_read(http_connection *c) {
NODE_DBG("http_dht_api_read");
//wait for whole body
if(c->state <HTTPD_STATE_BODY_END)
return HTTPD_CGI_MORE;
//write headers
http_SET_HEADER(c,HTTP_CONTENT_TYPE,JSON_CONTENT_TYPE);
http_response_OK(c);
sensor_data data;
sensors_get_data(&data);
//create json
cJSON *root = cJSON_CreateObject();
cJSON_AddNumberToObject(root,"temp",data.dht22.temp);
cJSON_AddNumberToObject(root,"hum",data.dht22.hum);
//write json
http_write_json(c,root);
//delete json struct
cJSON_Delete(root);
return HTTPD_CGI_DONE;
}
================================================
FILE: app/http/cgi_relay.h
================================================
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* Israel Lot <me@israellot.com> and Jeroen Domburg <jeroen@spritesmods.com>
* wrote this file. As long as you retain this notice you can do whatever you
* want with this stuff. If we meet some day, and you think this stuff is
* worth it, you can buy us a beer in return.
* ----------------------------------------------------------------------------
*/
#ifndef CGI_RELAY_H
#define CGI_RELAY_H
int ICACHE_FLASH_ATTR http_relay_api_status(http_connection *c);
int ICACHE_FLASH_ATTR http_relay_api_toggle(http_connection *c);
int ICACHE_FLASH_ATTR http_dht_api_read(http_connection *c);
#endif
================================================
FILE: app/http/cgi_wifi.c
================================================
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* Israel Lot <me@israellot.com> and Jeroen Domburg <jeroen@spritesmods.com>
* wrote this file. As long as you retain this notice you can do whatever you
* want with this stuff. If we meet some day, and you think this stuff is
* worth it, you can buy us a beer in return.
* ----------------------------------------------------------------------------
*/
#include "c_string.h"
#include "osapi.h"
#include "user_interface.h"
#include "mem.h"
#include "espconn.h"
#include "c_stdio.h"
#include "user_config.h"
#include <limits.h>
#include "cgi.h"
#include "http.h"
#include "http_parser.h"
#include "http_server.h"
#include "http_process.h"
#include "http_helper.h"
#include "http_client.h"
#include "json/cJson.h"
//WiFi access point data
typedef struct {
char ssid[32];
char rssi;
char enc;
char channel;
} ap;
//Scan result
typedef struct {
ap **ap;
int ap_count;
} scan_result_data;
typedef struct {
uint8_t scanning;
uint8_t connecting;
scan_result_data scan_result;
uint8_t mode;
uint8_t station_status;
struct station_config station_config;
} wifi_status_t;
typedef struct {
uint8_t state;
ETSTimer timer;
} api_cgi_status;
typedef struct {
uint8_t state;
ETSTimer timer;
char ssid[32];
char pwd[64];
} api_cgi_connect_status;
typedef struct {
uint8_t state;
http_connection *http_client;
} api_cgi_check_internet_status;
static wifi_status_t wifi_status;
struct station_config *wifi_st_config;
int ICACHE_FLASH_ATTR http_wifi_api_get_status(http_connection *c) {
NODE_DBG("http_wifi_api_get_status");
//wait for whole body
if(c->state <HTTPD_STATE_BODY_END)
return HTTPD_CGI_MORE;
api_cgi_status * status = c->cgi.data;
if(status==NULL){ //first call, send headers
NODE_DBG("\tSending headers");
status = (api_cgi_status*)os_malloc(sizeof(api_cgi_status));
status->state=1;
c->cgi.data=status;
http_SET_HEADER(c,HTTP_CONTENT_TYPE,JSON_CONTENT_TYPE);
http_response_OK(c);
NODE_DBG("\tHeaders done");
return HTTPD_CGI_MORE;
}
else if(status->state==1){
//json data
NODE_DBG("\tSending json");
wifi_station_get_config(&wifi_status.station_config);
uint8_t c_status = wifi_station_get_connect_status();
cJSON *root = cJSON_CreateObject();
cJSON_AddBoolToObject(root,"scanning",wifi_status.scanning);
cJSON_AddStringToObject(root,"ssid",(const char *)wifi_status.station_config.ssid);
cJSON_AddNumberToObject(root,"mode",wifi_get_opmode());
cJSON_AddNumberToObject(root,"station_status",c_status);
if(c_status==5){ //got ip
struct ip_info ip;
wifi_get_ip_info(0x0,&ip);
char *ip_str = ipaddr_ntoa(&ip.ip);
cJSON_AddStringToObject(root,"ip",ip_str);
}
else{
cJSON_AddStringToObject(root,"ip","");
}
http_write_json(c,root);
cJSON_Delete(root);
status->state=99;
return HTTPD_CGI_MORE;
}
else{
os_free(c->cgi.data);
return HTTPD_CGI_DONE;
}
}
static void ICACHE_FLASH_ATTR http_wifi_api_scan_callback(void *arg, STATUS status){
int n;
struct bss_info *bss_link = (struct bss_info *)arg;
NODE_DBG("Wifi Scan Done, status: %d", status);
if (status!=OK) {
wifi_status.scanning=0;
return;
}
//Clear prev ap data if needed.
if (wifi_status.scan_result.ap!=NULL) {
for (n=0; n<wifi_status.scan_result.ap_count; n++)
os_free(wifi_status.scan_result.ap[n]);
os_free(wifi_status.scan_result.ap);
}
//Count amount of access points found.
n=0;
while (bss_link != NULL) {
bss_link = bss_link->next.stqe_next;
n++;
}
//Allocate memory for access point data
wifi_status.scan_result.ap=(ap **)os_malloc(sizeof(ap *)*n);
wifi_status.scan_result.ap_count=n;
NODE_DBG("Scan done: found %d APs", n);
//Copy access point data to the static struct
n=0;
bss_link = (struct bss_info *)arg;
while (bss_link != NULL) {
if (n>=wifi_status.scan_result.ap_count) {
//This means the bss_link changed under our nose. Shouldn't happen!
//Break because otherwise we will write in unallocated memory.
NODE_DBG("Huh? I have more than the allocated %d aps!", wifi_status.scan_result.ap_count);
break;
}
//Save the ap data.
if(strlen(bss_link->ssid)>0){
wifi_status.scan_result.ap[n]=(ap *)os_malloc(sizeof(ap));
wifi_status.scan_result.ap[n]->rssi=bss_link->rssi;
wifi_status.scan_result.ap[n]->enc=bss_link->authmode;
wifi_status.scan_result.ap[n]->channel=bss_link->channel;
strncpy(wifi_status.scan_result.ap[n]->ssid, (char*)bss_link->ssid, 32);
n++;
}
else{
wifi_status.scan_result.ap_count--;
}
bss_link = bss_link->next.stqe_next;
}
//We're done.
wifi_status.scanning=0;
}
typedef struct {
uint8_t state;
ETSTimer timer;
int ap_index;
} api_cgi_scan_status;
int ICACHE_FLASH_ATTR http_wifi_api_scan(http_connection *c) {
NODE_DBG("http_wifi_api_scan");
//wait for whole body
if(c->state <HTTPD_STATE_BODY_END)
return HTTPD_CGI_MORE;
api_cgi_scan_status * status = c->cgi.data;
if(status==NULL){ //first call, create status
//create status
status = (api_cgi_scan_status*)os_malloc(sizeof(api_cgi_scan_status));
status->state=1;
status->ap_index=0;
c->cgi.data=status;
if(!wifi_status.scanning){
//if not already scanning, request scan
NODE_DBG("Starting scan");
wifi_station_scan(NULL,http_wifi_api_scan_callback);
wifi_status.scanning=1;
}
//write headers
http_SET_HEADER(c,HTTP_CONTENT_TYPE,JSON_CONTENT_TYPE);
http_response_OK(c);
//set state to 1 - waiting
status->state=1;
return HTTPD_CGI_MORE;
}
else{
if(wifi_status.scanning){
NODE_DBG("Waiting scan done");
//set timer to check again
os_timer_disarm(&status->timer);
os_timer_setfn(&status->timer, http_execute_cgi, c);
os_timer_arm(&status->timer, 500, 0);
return HTTPD_CGI_MORE;
}
else if(status->state==1){
//clear timer
os_timer_disarm(&status->timer);
NODE_DBG("Scan complete %d",status->ap_index);
//create json
cJSON *root = cJSON_CreateObject();
cJSON_AddNumberToObject(root,"ap_count",wifi_status.scan_result.ap_count);
cJSON * array;
cJSON * item;
cJSON_AddItemToObject(root, "ap", array = cJSON_CreateArray());
//check max count on query string
char *query=http_url_get_query_param(c,"max");
int max = INT_MAX;
if(query!=NULL)
max = atoi(query);
int i;
for(i=0;i< wifi_status.scan_result.ap_count && i<max;i++){
cJSON_AddItemToArray(array,item=cJSON_CreateObject());
cJSON_AddStringToObject(item,"ssid",(const char *)wifi_status.scan_result.ap[i]->ssid);
cJSON_AddNumberToObject(item,"rssi",wifi_status.scan_result.ap[i]->rssi);
cJSON_AddNumberToObject(item,"enc",wifi_status.scan_result.ap[i]->enc);
cJSON_AddNumberToObject(item,"channel",wifi_status.scan_result.ap[i]->channel);
}
http_write_json(c,root);
//delete json struct
cJSON_Delete(root);
status->state=99;
return HTTPD_CGI_MORE;
}
else{ //free resources
NODE_DBG("Freeing alloced memory");
os_free(c->cgi.data);
return HTTPD_CGI_DONE;
}
}
}
int ICACHE_FLASH_ATTR http_wifi_api_disconnect(http_connection *c){
NODE_DBG("http_wifi_disconnect");
//wait for whole body
if(c->state <HTTPD_STATE_BODY_END)
return HTTPD_CGI_MORE;
//reset wifi cfg
strcpy(wifi_status.station_config.ssid,"");
strcpy(wifi_status.station_config.password,"");
wifi_status.station_config.bssid_set=0;
wifi_station_disconnect();
wifi_station_set_config(&wifi_status.station_config);
http_response_OK(c);
return HTTPD_CGI_DONE;
}
int ICACHE_FLASH_ATTR http_wifi_api_connect_ap(http_connection *c){
NODE_DBG("http_wifi_api_connect_ap");
//wait for whole body
if(c->state <HTTPD_STATE_BODY_END)
return HTTPD_CGI_MORE;
api_cgi_connect_status * status = c->cgi.data;
if(status==NULL){
NODE_DBG("http_wifi_api_connect_ap status NULL");
status = (api_cgi_connect_status*)os_malloc(sizeof(api_cgi_connect_status));
status->state=1;
c->cgi.data=status;
//parse json and validate
cJSON * root = cJSON_Parse(c->body.data);
if(root==NULL) goto badrequest;
cJSON * ssid = cJSON_GetObjectItem(root,"ssid");
if(ssid==NULL) goto badrequest;
else if(ssid->type != cJSON_String) goto badrequest;
cJSON * pwd = cJSON_GetObjectItem(root,"pwd");
if(pwd==NULL) goto badrequest;
else if(pwd->type!=cJSON_String) goto badrequest;
//parse ok
strncpy(status->ssid,ssid->valuestring,32);
strncpy(status->pwd,pwd->valuestring,64);
//set timer to connect
os_timer_disarm(&status->timer);
os_timer_setfn(&status->timer, http_execute_cgi, c);
os_timer_arm(&status->timer, 10, 0);
return HTTPD_CGI_MORE;
}
else if(status->state==1){
NODE_DBG("http_wifi_api_connect_ap status %d",status->state);
//try connect
if(strlen(status->ssid)>32 || strlen(status->pwd)>64)
goto badrequest;
NODE_DBG("http_wifi_api_connect_ap ssid %s",status->ssid);
NODE_DBG("http_wifi_api_connect_ap pwd %s",status->pwd);
strcpy(wifi_status.station_config.ssid,status->ssid);
strcpy(wifi_status.station_config.password,status->pwd);
wifi_status.station_config.bssid_set=0;
wifi_station_disconnect();
wifi_station_set_config(&wifi_status.station_config);
wifi_station_connect();
//set timer to check status
os_timer_disarm(&status->timer);
os_timer_setfn(&status->timer, http_execute_cgi, c);
os_timer_arm(&status->timer, 500, 0);
status->state=2;
return HTTPD_CGI_MORE;
}
else if(status->state==2){
NODE_DBG("http_wifi_api_connect_ap status %d",status->state);
uint8_t c_status = wifi_station_get_connect_status();
NODE_DBG("http_wifi_api_connect_ap wifi status %d",c_status);
if(c_status>=2 && c_status <= 4 ){
wifi_station_disconnect();
strcpy(wifi_status.station_config.ssid,"");
strcpy(wifi_status.station_config.password,"");
wifi_station_set_config(&wifi_status.station_config);
}
if(c_status==1){
//set timer to check status
os_timer_disarm(&status->timer);
os_timer_setfn(&status->timer, http_execute_cgi, c);
os_timer_arm(&status->timer, 500, 0);
return HTTPD_CGI_MORE;
}
else{
//write headers
http_SET_HEADER(c,HTTP_CONTENT_TYPE,JSON_CONTENT_TYPE);
http_response_OK(c);
//create json
cJSON *root = cJSON_CreateObject();
cJSON_AddNumberToObject(root,"status",c_status);
if(c_status==5){ //got ip
struct ip_info ip;
wifi_get_ip_info(0x0,&ip);
char *ip_str = ipaddr_ntoa(&ip.ip);
cJSON_AddStringToObject(root,"ip",ip_str);
}
else{
cJSON_AddStringToObject(root,"ip","");
}
http_write_json(c,root);
//delete json struct
cJSON_Delete(root);
status->state=99;
return HTTPD_CGI_MORE;
}
}
else{ //=99
NODE_DBG("http_wifi_api_connect_ap status %d",status->state);
//clean
os_free(c->cgi.data);
return HTTPD_CGI_DONE;
}
badrequest:
http_response_BAD_REQUEST(c);
status->state=99;
return HTTPD_CGI_MORE;
//shut up compiler
return HTTPD_CGI_DONE;
}
int ICACHE_FLASH_ATTR http_wifi_api_check_internet_cb(http_connection *c){
NODE_DBG("http_wifi_api_check_internet_cb state: %d",c->state);
http_connection *request=c->reverse;
if(request->espConnection==NULL)
{
//client request has been aborted
return HTTP_CLIENT_CGI_DONE;
}
api_cgi_check_internet_status * status = (api_cgi_check_internet_status *)request->cgi.data;
if(c->state==HTTP_CLIENT_DNS_NOT_FOUND){
status->state=3;
http_execute_cgi(request);
return HTTP_CLIENT_CGI_DONE;
}
//wait whole body
if(c->state==HTTPD_STATE_BODY_END){
if(c->parser.status_code==200)
status->state=2;
else
status->state=3;
http_execute_cgi(request);
return HTTP_CLIENT_CGI_DONE;
}
return HTTP_CLIENT_CGI_MORE;
}
int ICACHE_FLASH_ATTR http_wifi_api_check_internet(http_connection *c){
NODE_DBG("http_wifi_api_check_internet");
//wait for whole body
if(c->state <HTTPD_STATE_BODY_END)
return HTTPD_CGI_MORE;
api_cgi_check_internet_status * status = (api_cgi_check_internet_status *)c->cgi.data;
if(status==NULL){ //first call, send headers
NODE_DBG("http_wifi_api_check_internet null");
status = (api_cgi_check_internet_status*)os_malloc(sizeof(api_cgi_check_internet_status));
status->state=1;
c->cgi.data=status;
http_SET_HEADER(c,HTTP_CONTENT_TYPE,JSON_CONTENT_TYPE);
http_response_OK(c);
status->http_client = http_client_new(http_wifi_api_check_internet_cb);
http_client_GET(status->http_client,"http://www.msftncsi.com/ncsi.txt");
status->http_client->reverse = c; //mark reverse so we can find on callback
c->reverse=&status->http_client; //reverse other way around
return HTTPD_CGI_MORE;
}
else if(status->state==1){
// just signal we aren't finished
NODE_DBG("http_wifi_api_check_internet 1");
return HTTPD_CGI_MORE;
}
else if(status->state==2){
//DNS FOUND
NODE_DBG("http_wifi_api_check_internet 2");
status->state=99;
//create json
cJSON *root = cJSON_CreateObject();
cJSON_AddNumberToObject(root,"status",1);
http_write_json(c,root);
//delete json struct
cJSON_Delete(root);
return HTTPD_CGI_MORE;
}
else if(status->state==3){
//DNS NOT FOUND
status->state=99;
//create json
cJSON *root = cJSON_CreateObject();
cJSON_AddNumberToObject(root,"status",0);
http_write_json(c,root);
//delete json struct
cJSON_Delete(root);
return HTTPD_CGI_MORE;
}
else{
NODE_DBG("http_wifi_api_check_internet 99");
os_free(c->cgi.data);
return HTTPD_CGI_DONE;
}
}
================================================
FILE: app/http/cgi_wifi.h
================================================
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* Israel Lot <me@israellot.com> and Jeroen Domburg <jeroen@spritesmods.com>
* wrote this file. As long as you retain this notice you can do whatever you
* want with this stuff. If we meet some day, and you think this stuff is
* worth it, you can buy us a beer in return.
* ----------------------------------------------------------------------------
*/
#ifndef CGI_WIFI_H
#define CGI_WIFI_H
int ICACHE_FLASH_ATTR http_wifi_api_get_status(http_connection *c);
int ICACHE_FLASH_ATTR http_wifi_api_scan(http_connection *c);
int ICACHE_FLASH_ATTR http_wifi_api_connect_ap(http_connection *c);
int ICACHE_FLASH_ATTR http_wifi_api_disconnect(http_connection *c);
int ICACHE_FLASH_ATTR http_wifi_api_check_internet(http_connection *c);
#endif
================================================
FILE: app/http/html/.bak/bootstrap.css
================================================
/*!
* bootswatch v3.3.4+1
* Homepage: http://bootswatch.com
* Copyright 2012-2015 Thomas Park
* Licensed under MIT
* Based on Bootstrap
*/
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
audio,
canvas,
progress,
video {
display: inline-block;
vertical-align: baseline;
}
audio:not([controls]) {
display: none;
height: 0;
}
[hidden],
template {
display: none;
}
a {
background-color: transparent;
}
a:active,
a:hover {
outline: 0;
}
abbr[title] {
border-bottom: 1px dotted;
}
b,
strong {
font-weight: bold;
}
dfn {
font-style: italic;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
mark {
background: #ff0;
color: #000;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
img {
border: 0;
}
svg:not(:root) {
overflow: hidden;
}
figure {
margin: 1em 40px;
}
hr {
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
pre {
overflow: auto;
}
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
button,
input,
optgroup,
select,
textarea {
color: inherit;
font: inherit;
margin: 0;
}
button {
overflow: visible;
}
button,
select {
text-transform: none;
}
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;
cursor: pointer;
}
button[disabled],
html input[disabled] {
cursor: default;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
input {
line-height: normal;
}
input[type="checkbox"],
input[type="radio"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
input[type="search"] {
-webkit-appearance: textfield;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
legend {
border: 0;
padding: 0;
}
textarea {
overflow: auto;
}
optgroup {
font-weight: bold;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}
/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
@media print {
*,
*:before,
*:after {
background: transparent !important;
color: #000 !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
text-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
content: " (" attr(href) ")";
}
abbr[title]:after {
content: " (" attr(title) ")";
}
a[href^="#"]:after,
a[href^="javascript:"]:after {
content: "";
}
pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}
thead {
display: table-header-group;
}
tr,
img {
page-break-inside: avoid;
}
img {
max-width: 100% !important;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
select {
background: #fff !important;
}
.navbar {
display: none;
}
.btn > .caret,
.dropup > .btn > .caret {
border-top-color: #000 !important;
}
.label {
border: 1px solid #000;
}
.table {
border-collapse: collapse !important;
}
.table td,
.table th {
background-color: #fff !important;
}
.table-bordered th,
.table-bordered td {
border: 1px solid #ddd !important;
}
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
*:before,
*:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html {
font-size: 10px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
body {
font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 15px;
line-height: 1.42857143;
color: #ebebeb;
background-color: #2b3e50;
}
input,
button,
select,
textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
a {
color: #df691a;
text-decoration: none;
}
a:hover,
a:focus {
color: #df691a;
text-decoration: underline;
}
a:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
figure {
margin: 0;
}
img {
vertical-align: middle;
}
.img-responsive,
.thumbnail > img,
.thumbnail a > img,
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
display: block;
max-width: 100%;
height: auto;
}
.img-rounded {
border-radius: 0;
}
.img-thumbnail {
padding: 4px;
line-height: 1.42857143;
background-color: #2b3e50;
border: 1px solid #dddddd;
border-radius: 0;
-webkit-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
display: inline-block;
max-width: 100%;
height: auto;
}
.img-circle {
border-radius: 50%;
}
hr {
margin-top: 21px;
margin-bottom: 21px;
border: 0;
border-top: 1px solid #596a7b;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
.sr-only-focusable:active,
.sr-only-focusable:focus {
position: static;
width: auto;
height: auto;
margin: 0;
overflow: visible;
clip: auto;
}
[role="button"] {
cursor: pointer;
}
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
font-family: inherit;
font-weight: 300;
line-height: 1.1;
color: inherit;
}
h1 small,
h2 small,
h3 small,
h4 small,
h5 small,
h6 small,
.h1 small,
.h2 small,
.h3 small,
.h4 small,
.h5 small,
.h6 small,
h1 .small,
h2 .small,
h3 .small,
h4 .small,
h5 .small,
h6 .small,
.h1 .small,
.h2 .small,
.h3 .small,
.h4 .small,
.h5 .small,
.h6 .small {
font-weight: normal;
line-height: 1;
color: #ebebeb;
}
h1,
.h1,
h2,
.h2,
h3,
.h3 {
margin-top: 21px;
margin-bottom: 10.5px;
}
h1 small,
.h1 small,
h2 small,
.h2 small,
h3 small,
.h3 small,
h1 .small,
.h1 .small,
h2 .small,
.h2 .small,
h3 .small,
.h3 .small {
font-size: 65%;
}
h4,
.h4,
h5,
.h5,
h6,
.h6 {
margin-top: 10.5px;
margin-bottom: 10.5px;
}
h4 small,
.h4 small,
h5 small,
.h5 small,
h6 small,
.h6 small,
h4 .small,
.h4 .small,
h5 .small,
.h5 .small,
h6 .small,
.h6 .small {
font-size: 75%;
}
h1,
.h1 {
font-size: 39px;
}
h2,
.h2 {
font-size: 32px;
}
h3,
.h3 {
font-size: 26px;
}
h4,
.h4 {
font-size: 19px;
}
h5,
.h5 {
font-size: 15px;
}
h6,
.h6 {
font-size: 13px;
}
p {
margin: 0 0 10.5px;
}
.lead {
margin-bottom: 21px;
font-size: 17px;
font-weight: 300;
line-height: 1.4;
}
@media (min-width: 768px) {
.lead {
font-size: 22.5px;
}
}
small,
.small {
font-size: 86%;
}
mark,
.mark {
background-color: #f0ad4e;
padding: .2em;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-center {
text-align: center;
}
.text-justify {
text-align: justify;
}
.text-nowrap {
white-space: nowrap;
}
.text-lowercase {
text-transform: lowercase;
}
.text-uppercase {
text-transform: uppercase;
}
.text-capitalize {
text-transform: capitalize;
}
.text-muted {
color: #4e5d6c;
}
.text-primary {
color: #df691a;
}
a.text-primary:hover {
color: #b15315;
}
.text-success {
color: #ebebeb;
}
a.text-success:hover {
color: #d2d2d2;
}
.text-info {
color: #ebebeb;
}
a.text-info:hover {
color: #d2d2d2;
}
.text-warning {
color: #ebebeb;
}
a.text-warning:hover {
color: #d2d2d2;
}
.text-danger {
color: #ebebeb;
}
a.text-danger:hover {
color: #d2d2d2;
}
.bg-primary {
color: #fff;
background-color: #df691a;
}
a.bg-primary:hover {
background-color: #b15315;
}
.bg-success {
background-color: #5cb85c;
}
a.bg-success:hover {
background-color: #449d44;
}
.bg-info {
background-color: #5bc0de;
}
a.bg-info:hover {
background-color: #31b0d5;
}
.bg-warning {
background-color: #f0ad4e;
}
a.bg-warning:hover {
background-color: #ec971f;
}
.bg-danger {
background-color: #d9534f;
}
a.bg-danger:hover {
background-color: #c9302c;
}
.page-header {
padding-bottom: 9.5px;
margin: 42px 0 21px;
border-bottom: 1px solid #ebebeb;
}
ul,
ol {
margin-top: 0;
margin-bottom: 10.5px;
}
ul ul,
ol ul,
ul ol,
ol ol {
margin-bottom: 0;
}
.list-unstyled {
padding-left: 0;
list-style: none;
}
.list-inline {
padding-left: 0;
list-style: none;
margin-left: -5px;
}
.list-inline > li {
display: inline-block;
padding-left: 5px;
padding-right: 5px;
}
dl {
margin-top: 0;
margin-bottom: 21px;
}
dt,
dd {
line-height: 1.42857143;
}
dt {
font-weight: bold;
}
dd {
margin-left: 0;
}
@media (min-width: 768px) {
.dl-horizontal dt {
float: left;
width: 160px;
clear: left;
text-align: right;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.dl-horizontal dd {
margin-left: 180px;
}
}
abbr[title],
abbr[data-original-title] {
cursor: help;
border-bottom: 1px dotted #4e5d6c;
}
.initialism {
font-size: 90%;
text-transform: uppercase;
}
blockquote {
padding: 10.5px 21px;
margin: 0 0 21px;
font-size: 18.75px;
border-left: 5px solid #4e5d6c;
}
blockquote p:last-child,
blockquote ul:last-child,
blockquote ol:last-child {
margin-bottom: 0;
}
blockquote footer,
blockquote small,
blockquote .small {
display: block;
font-size: 80%;
line-height: 1.42857143;
color: #ebebeb;
}
blockquote footer:before,
blockquote small:before,
blockquote .small:before {
content: '\2014 \00A0';
}
.blockquote-reverse,
blockquote.pull-right {
padding-right: 15px;
padding-left: 0;
border-right: 5px solid #4e5d6c;
border-left: 0;
text-align: right;
}
.blockquote-reverse footer:before,
blockquote.pull-right footer:before,
.blockquote-reverse small:before,
blockquote.pull-right small:before,
.blockquote-reverse .small:before,
blockquote.pull-right .small:before {
content: '';
}
.blockquote-reverse footer:after,
blockquote.pull-right footer:after,
.blockquote-reverse small:after,
blockquote.pull-right small:after,
.blockquote-reverse .small:after,
blockquote.pull-right .small:after {
content: '\00A0 \2014';
}
address {
margin-bottom: 21px;
font-style: normal;
line-height: 1.42857143;
}
code,
kbd,
pre,
samp {
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
}
code {
padding: 2px 4px;
font-size: 90%;
color: #c7254e;
background-color: #f9f2f4;
border-radius: 0;
}
kbd {
padding: 2px 4px;
font-size: 90%;
color: #ffffff;
background-color: #333333;
border-radius: 0;
-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}
kbd kbd {
padding: 0;
font-size: 100%;
font-weight: bold;
-webkit-box-shadow: none;
box-shadow: none;
}
pre {
display: block;
padding: 10px;
margin: 0 0 10.5px;
font-size: 14px;
line-height: 1.42857143;
word-break: break-all;
word-wrap: break-word;
color: #333333;
background-color: #f5f5f5;
border: 1px solid #cccccc;
border-radius: 0;
}
pre code {
padding: 0;
font-size: inherit;
color: inherit;
white-space: pre-wrap;
background-color: transparent;
border-radius: 0;
}
.pre-scrollable {
max-height: 340px;
overflow-y: scroll;
}
.container {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 768px) {
.container {
width: 750px;
}
}
@media (min-width: 992px) {
.container {
width: 970px;
}
}
@media (min-width: 1200px) {
.container {
width: 1170px;
}
}
.container-fluid {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
}
.row {
margin-left: -15px;
margin-right: -15px;
}
.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
float: left;
}
.col-xs-12 {
width: 100%;
}
.col-xs-11 {
width: 91.66666667%;
}
.col-xs-10 {
width: 83.33333333%;
}
.col-xs-9 {
width: 75%;
}
.col-xs-8 {
width: 66.66666667%;
}
.col-xs-7 {
width: 58.33333333%;
}
.col-xs-6 {
width: 50%;
}
.col-xs-5 {
width: 41.66666667%;
}
.col-xs-4 {
width: 33.33333333%;
}
.col-xs-3 {
width: 25%;
}
.col-xs-2 {
width: 16.66666667%;
}
.col-xs-1 {
width: 8.33333333%;
}
.col-xs-pull-12 {
right: 100%;
}
.col-xs-pull-11 {
right: 91.66666667%;
}
.col-xs-pull-10 {
right: 83.33333333%;
}
.col-xs-pull-9 {
right: 75%;
}
.col-xs-pull-8 {
right: 66.66666667%;
}
.col-xs-pull-7 {
right: 58.33333333%;
}
.col-xs-pull-6 {
right: 50%;
}
.col-xs-pull-5 {
right: 41.66666667%;
}
.col-xs-pull-4 {
right: 33.33333333%;
}
.col-xs-pull-3 {
right: 25%;
}
.col-xs-pull-2 {
right: 16.66666667%;
}
.col-xs-pull-1 {
right: 8.33333333%;
}
.col-xs-pull-0 {
right: auto;
}
.col-xs-push-12 {
left: 100%;
}
.col-xs-push-11 {
left: 91.66666667%;
}
.col-xs-push-10 {
left: 83.33333333%;
}
.col-xs-push-9 {
left: 75%;
}
.col-xs-push-8 {
left: 66.66666667%;
}
.col-xs-push-7 {
left: 58.33333333%;
}
.col-xs-push-6 {
left: 50%;
}
.col-xs-push-5 {
left: 41.66666667%;
}
.col-xs-push-4 {
left: 33.33333333%;
}
.col-xs-push-3 {
left: 25%;
}
.col-xs-push-2 {
left: 16.66666667%;
}
.col-xs-push-1 {
left: 8.33333333%;
}
.col-xs-push-0 {
left: auto;
}
.col-xs-offset-12 {
margin-left: 100%;
}
.col-xs-offset-11 {
margin-left: 91.66666667%;
}
.col-xs-offset-10 {
margin-left: 83.33333333%;
}
.col-xs-offset-9 {
margin-left: 75%;
}
.col-xs-offset-8 {
margin-left: 66.66666667%;
}
.col-xs-offset-7 {
margin-left: 58.33333333%;
}
.col-xs-offset-6 {
margin-left: 50%;
}
.col-xs-offset-5 {
margin-left: 41.66666667%;
}
.col-xs-offset-4 {
margin-left: 33.33333333%;
}
.col-xs-offset-3 {
margin-left: 25%;
}
.col-xs-offset-2 {
margin-left: 16.66666667%;
}
.col-xs-offset-1 {
margin-left: 8.33333333%;
}
.col-xs-offset-0 {
margin-left: 0%;
}
@media (min-width: 768px) {
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
float: left;
}
.col-sm-12 {
width: 100%;
}
.col-sm-11 {
width: 91.66666667%;
}
.col-sm-10 {
width: 83.33333333%;
}
.col-sm-9 {
width: 75%;
}
.col-sm-8 {
width: 66.66666667%;
}
.col-sm-7 {
width: 58.33333333%;
}
.col-sm-6 {
width: 50%;
}
.col-sm-5 {
width: 41.66666667%;
}
.col-sm-4 {
width: 33.33333333%;
}
.col-sm-3 {
width: 25%;
}
.col-sm-2 {
width: 16.66666667%;
}
.col-sm-1 {
width: 8.33333333%;
}
.col-sm-pull-12 {
right: 100%;
}
.col-sm-pull-11 {
right: 91.66666667%;
}
.col-sm-pull-10 {
right: 83.33333333%;
}
.col-sm-pull-9 {
right: 75%;
}
.col-sm-pull-8 {
right: 66.66666667%;
}
.col-sm-pull-7 {
right: 58.33333333%;
}
.col-sm-pull-6 {
right: 50%;
}
.col-sm-pull-5 {
right: 41.66666667%;
}
.col-sm-pull-4 {
right: 33.33333333%;
}
.col-sm-pull-3 {
right: 25%;
}
.col-sm-pull-2 {
right: 16.66666667%;
}
.col-sm-pull-1 {
right: 8.33333333%;
}
.col-sm-pull-0 {
right: auto;
}
.col-sm-push-12 {
left: 100%;
}
.col-sm-push-11 {
left: 91.66666667%;
}
.col-sm-push-10 {
left: 83.33333333%;
}
.col-sm-push-9 {
left: 75%;
}
.col-sm-push-8 {
left: 66.66666667%;
}
.col-sm-push-7 {
left: 58.33333333%;
}
.col-sm-push-6 {
left: 50%;
}
.col-sm-push-5 {
left: 41.66666667%;
}
.col-sm-push-4 {
left: 33.33333333%;
}
.col-sm-push-3 {
left: 25%;
}
.col-sm-push-2 {
left: 16.66666667%;
}
.col-sm-push-1 {
left: 8.33333333%;
}
.col-sm-push-0 {
left: auto;
}
.col-sm-offset-12 {
margin-left: 100%;
}
.col-sm-offset-11 {
margin-left: 91.66666667%;
}
.col-sm-offset-10 {
margin-left: 83.33333333%;
}
.col-sm-offset-9 {
margin-left: 75%;
}
.col-sm-offset-8 {
margin-left: 66.66666667%;
}
.col-sm-offset-7 {
margin-left: 58.33333333%;
}
.col-sm-offset-6 {
margin-left: 50%;
}
.col-sm-offset-5 {
margin-left: 41.66666667%;
}
.col-sm-offset-4 {
margin-left: 33.33333333%;
}
.col-sm-offset-3 {
margin-left: 25%;
}
.col-sm-offset-2 {
margin-left: 16.66666667%;
}
.col-sm-offset-1 {
margin-left: 8.33333333%;
}
.col-sm-offset-0 {
margin-left: 0%;
}
}
@media (min-width: 992px) {
.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
float: left;
}
.col-md-12 {
width: 100%;
}
.col-md-11 {
width: 91.66666667%;
}
.col-md-10 {
width: 83.33333333%;
}
.col-md-9 {
width: 75%;
}
.col-md-8 {
width: 66.66666667%;
}
.col-md-7 {
width: 58.33333333%;
}
.col-md-6 {
width: 50%;
}
.col-md-5 {
width: 41.66666667%;
}
.col-md-4 {
width: 33.33333333%;
}
.col-md-3 {
width: 25%;
}
.col-md-2 {
width: 16.66666667%;
}
.col-md-1 {
width: 8.33333333%;
}
.col-md-pull-12 {
right: 100%;
}
.col-md-pull-11 {
right: 91.66666667%;
}
.col-md-pull-10 {
right: 83.33333333%;
}
.col-md-pull-9 {
right: 75%;
}
.col-md-pull-8 {
right: 66.66666667%;
}
.col-md-pull-7 {
right: 58.33333333%;
}
.col-md-pull-6 {
right: 50%;
}
.col-md-pull-5 {
right: 41.66666667%;
}
.col-md-pull-4 {
right: 33.33333333%;
}
.col-md-pull-3 {
right: 25%;
}
.col-md-pull-2 {
right: 16.66666667%;
}
.col-md-pull-1 {
right: 8.33333333%;
}
.col-md-pull-0 {
right: auto;
}
.col-md-push-12 {
left: 100%;
}
.col-md-push-11 {
left: 91.66666667%;
}
.col-md-push-10 {
left: 83.33333333%;
}
.col-md-push-9 {
left: 75%;
}
.col-md-push-8 {
left: 66.66666667%;
}
.col-md-push-7 {
left: 58.33333333%;
}
.col-md-push-6 {
left: 50%;
}
.col-md-push-5 {
left: 41.66666667%;
}
.col-md-push-4 {
left: 33.33333333%;
}
.col-md-push-3 {
left: 25%;
}
.col-md-push-2 {
left: 16.66666667%;
}
.col-md-push-1 {
left: 8.33333333%;
}
.col-md-push-0 {
left: auto;
}
.col-md-offset-12 {
margin-left: 100%;
}
.col-md-offset-11 {
margin-left: 91.66666667%;
}
.col-md-offset-10 {
margin-left: 83.33333333%;
}
.col-md-offset-9 {
margin-left: 75%;
}
.col-md-offset-8 {
margin-left: 66.66666667%;
}
.col-md-offset-7 {
margin-left: 58.33333333%;
}
.col-md-offset-6 {
margin-left: 50%;
}
.col-md-offset-5 {
margin-left: 41.66666667%;
}
.col-md-offset-4 {
margin-left: 33.33333333%;
}
.col-md-offset-3 {
margin-left: 25%;
}
.col-md-offset-2 {
margin-left: 16.66666667%;
}
.col-md-offset-1 {
margin-left: 8.33333333%;
}
.col-md-offset-0 {
margin-left: 0%;
}
}
@media (min-width: 1200px) {
.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
float: left;
}
.col-lg-12 {
width: 100%;
}
.col-lg-11 {
width: 91.66666667%;
}
.col-lg-10 {
width: 83.33333333%;
}
.col-lg-9 {
width: 75%;
}
.col-lg-8 {
width: 66.66666667%;
}
.col-lg-7 {
width: 58.33333333%;
}
.col-lg-6 {
width: 50%;
}
.col-lg-5 {
width: 41.66666667%;
}
.col-lg-4 {
width: 33.33333333%;
}
.col-lg-3 {
width: 25%;
}
.col-lg-2 {
width: 16.66666667%;
}
.col-lg-1 {
width: 8.33333333%;
}
.col-lg-pull-12 {
right: 100%;
}
.col-lg-pull-11 {
right: 91.66666667%;
}
.col-lg-pull-10 {
right: 83.33333333%;
}
.col-lg-pull-9 {
right: 75%;
}
.col-lg-pull-8 {
right: 66.66666667%;
}
.col-lg-pull-7 {
right: 58.33333333%;
}
.col-lg-pull-6 {
right: 50%;
}
.col-lg-pull-5 {
right: 41.66666667%;
}
.col-lg-pull-4 {
right: 33.33333333%;
}
.col-lg-pull-3 {
right: 25%;
}
.col-lg-pull-2 {
right: 16.66666667%;
}
.col-lg-pull-1 {
right: 8.33333333%;
}
.col-lg-pull-0 {
right: auto;
}
.col-lg-push-12 {
left: 100%;
}
.col-lg-push-11 {
left: 91.66666667%;
}
.col-lg-push-10 {
left: 83.33333333%;
}
.col-lg-push-9 {
left: 75%;
}
.col-lg-push-8 {
left: 66.66666667%;
}
.col-lg-push-7 {
left: 58.33333333%;
}
.col-lg-push-6 {
left: 50%;
}
.col-lg-push-5 {
left: 41.66666667%;
}
.col-lg-push-4 {
left: 33.33333333%;
}
.col-lg-push-3 {
left: 25%;
}
.col-lg-push-2 {
left: 16.66666667%;
}
.col-lg-push-1 {
left: 8.33333333%;
}
.col-lg-push-0 {
left: auto;
}
.col-lg-offset-12 {
margin-left: 100%;
}
.col-lg-offset-11 {
margin-left: 91.66666667%;
}
.col-lg-offset-10 {
margin-left: 83.33333333%;
}
.col-lg-offset-9 {
margin-left: 75%;
}
.col-lg-offset-8 {
margin-left: 66.66666667%;
}
.col-lg-offset-7 {
margin-left: 58.33333333%;
}
.col-lg-offset-6 {
margin-left: 50%;
}
.col-lg-offset-5 {
margin-left: 41.66666667%;
}
.col-lg-offset-4 {
margin-left: 33.33333333%;
}
.col-lg-offset-3 {
margin-left: 25%;
}
.col-lg-offset-2 {
margin-left: 16.66666667%;
}
.col-lg-offset-1 {
margin-left: 8.33333333%;
}
.col-lg-offset-0 {
margin-left: 0%;
}
}
table {
background-color: transparent;
}
caption {
padding-top: 6px;
padding-bottom: 6px;
color: #4e5d6c;
text-align: left;
}
th {
text-align: left;
}
.table {
width: 100%;
max-width: 100%;
margin-bottom: 21px;
}
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
padding: 10px;
line-height: 1.42857143;
vertical-align: top;
border-top: 1px solid #4e5d6c;
}
.table > thead > tr > th {
vertical-align: bottom;
border-bottom: 2px solid #4e5d6c;
}
.table > caption + thead > tr:first-child > th,
.table > colgroup + thead > tr:first-child > th,
.table > thead:first-child > tr:first-child > th,
.table > caption + thead > tr:first-child > td,
.table > colgroup + thead > tr:first-child > td,
.table > thead:first-child > tr:first-child > td {
border-top: 0;
}
.table > tbody + tbody {
border-top: 2px solid #4e5d6c;
}
.table .table {
background-color: #2b3e50;
}
.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > th,
.table-condensed > tfoot > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > tbody > tr > td,
.table-condensed > tfoot > tr > td {
padding: 3px;
}
.table-bordered {
border: 1px solid #4e5d6c;
}
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
border: 1px solid #4e5d6c;
}
.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td {
border-bottom-width: 2px;
}
.table-striped > tbody > tr:nth-of-type(odd) {
background-color: #4e5d6c;
}
.table-hover > tbody > tr:hover {
background-color: #485563;
}
table col[class*="col-"] {
position: static;
float: none;
display: table-column;
}
table td[class*="col-"],
table th[class*="col-"] {
position: static;
float: none;
display: table-cell;
}
.table > thead > tr > td.active,
.table > tbody > tr > td.active,
.table > tfoot > tr > td.active,
.table > thead > tr > th.active,
.table > tbody > tr > th.active,
.table > tfoot > tr > th.active,
.table > thead > tr.active > td,
.table > tbody > tr.active > td,
.table > tfoot > tr.active > td,
.table > thead > tr.active > th,
.table > tbody > tr.active > th,
.table > tfoot > tr.active > th {
background-color: #485563;
}
.table-hover > tbody > tr > td.active:hover,
.table-hover > tbody > tr > th.active:hover,
.table-hover > tbody > tr.active:hover > td,
.table-hover > tbody > tr:hover > .active,
.table-hover > tbody > tr.active:hover > th {
background-color: #3d4954;
}
.table > thead > tr > td.success,
.table > tbody > tr > td.success,
.table > tfoot > tr > td.success,
.table > thead > tr > th.success,
.table > tbody > tr > th.success,
.table > tfoot > tr > th.success,
.table > thead > tr.success > td,
.table > tbody > tr.success > td,
.table > tfoot > tr.success > td,
.table > thead > tr.success > th,
.table > tbody > tr.success > th,
.table > tfoot > tr.success > th {
background-color: #5cb85c;
}
.table-hover > tbody > tr > td.success:hover,
.table-hover > tbody > tr > th.success:hover,
.table-hover > tbody > tr.success:hover > td,
.table-hover > tbody > tr:hover > .success,
.table-hover > tbody > tr.success:hover > th {
background-color: #4cae4c;
}
.table > thead > tr > td.info,
.table > tbody > tr > td.info,
.table > tfoot > tr > td.info,
.table > thead > tr > th.info,
.table > tbody > tr > th.info,
.table > tfoot > tr > th.info,
.table > thead > tr.info > td,
.table > tbody > tr.info > td,
.table > tfoot > tr.info > td,
.table > thead > tr.info > th,
.table > tbody > tr.info > th,
.table > tfoot > tr.info > th {
background-color: #5bc0de;
}
.table-hover > tbody > tr > td.info:hover,
.table-hover > tbody > tr > th.info:hover,
.table-hover > tbody > tr.info:hover > td,
.table-hover > tbody > tr:hover > .info,
.table-hover > tbody > tr.info:hover > th {
background-color: #46b8da;
}
.table > thead > tr > td.warning,
.table > tbody > tr > td.warning,
.table > tfoot > tr > td.warning,
.table > thead > tr > th.warning,
.table > tbody > tr > th.warning,
.table > tfoot > tr > th.warning,
.table > thead > tr.warning > td,
.table > tbody > tr.warning > td,
.table > tfoot > tr.warning > td,
.table > thead > tr.warning > th,
.table > tbody > tr.warning > th,
.table > tfoot > tr.warning > th {
background-color: #f0ad4e;
}
.table-hover > tbody > tr > td.warning:hover,
.table-hover > tbody > tr > th.warning:hover,
.table-hover > tbody > tr.warning:hover > td,
.table-hover > tbody > tr:hover > .warning,
.table-hover > tbody > tr.warning:hover > th {
background-color: #eea236;
}
.table > thead > tr > td.danger,
.table > tbody > tr > td.danger,
.table > tfoot > tr > td.danger,
.table > thead > tr > th.danger,
.table > tbody > tr > th.danger,
.table > tfoot > tr > th.danger,
.table > thead > tr.danger > td,
.table > tbody > tr.danger > td,
.table > tfoot > tr.danger > td,
.table > thead > tr.danger > th,
.table > tbody > tr.danger > th,
.table > tfoot > tr.danger > th {
background-color: #d9534f;
}
.table-hover > tbody > tr > td.danger:hover,
.table-hover > tbody > tr > th.danger:hover,
.table-hover > tbody > tr.danger:hover > td,
.table-hover > tbody > tr:hover > .danger,
.table-hover > tbody > tr.danger:hover > th {
background-color: #d43f3a;
}
.table-responsive {
overflow-x: auto;
min-height: 0.01%;
}
@media screen and (max-width: 767px) {
.table-responsive {
width: 100%;
margin-bottom: 15.75px;
overflow-y: hidden;
-ms-overflow-style: -ms-autohiding-scrollbar;
border: 1px solid #4e5d6c;
}
.table-responsive > .table {
margin-bottom: 0;
}
.table-responsive > .table > thead > tr > th,
.table-responsive > .table > tbody > tr > th,
.table-responsive > .table > tfoot > tr > th,
.table-responsive > .table > thead > tr > td,
.table-responsive > .table > tbody > tr > td,
.table-responsive > .table > tfoot > tr > td {
white-space: nowrap;
}
.table-responsive > .table-bordered {
border: 0;
}
.table-responsive > .table-bordered > thead > tr > th:first-child,
.table-responsive > .table-bordered > tbody > tr > th:first-child,
.table-responsive > .table-bordered > tfoot > tr > th:first-child,
.table-responsive > .table-bordered > thead > tr > td:first-child,
.table-responsive > .table-bordered > tbody > tr > td:first-child,
.table-responsive > .table-bordered > tfoot > tr > td:first-child {
border-left: 0;
}
.table-responsive > .table-bordered > thead > tr > th:last-child,
.table-responsive > .table-bordered > tbody > tr > th:last-child,
.table-responsive > .table-bordered > tfoot > tr > th:last-child,
.table-responsive > .table-bordered > thead > tr > td:last-child,
.table-responsive > .table-bordered > tbody > tr > td:last-child,
.table-responsive > .table-bordered > tfoot > tr > td:last-child {
border-right: 0;
}
.table-responsive > .table-bordered > tbody > tr:last-child > th,
.table-responsive > .table-bordered > tfoot > tr:last-child > th,
.table-responsive > .table-bordered > tbody > tr:last-child > td,
.table-responsive > .table-bordered > tfoot > tr:last-child > td {
border-bottom: 0;
}
}
fieldset {
padding: 0;
margin: 0;
border: 0;
min-width: 0;
}
legend {
display: block;
width: 100%;
padding: 0;
margin-bottom: 21px;
font-size: 22.5px;
line-height: inherit;
color: #ebebeb;
border: 0;
border-bottom: 1px solid #4e5d6c;
}
label {
display: inline-block;
max-width: 100%;
margin-bottom: 5px;
font-weight: bold;
}
input[type="search"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
input[type="radio"],
input[type="checkbox"] {
margin: 4px 0 0;
margin-top: 1px \9;
line-height: normal;
}
input[type="file"] {
display: block;
}
input[type="range"] {
display: block;
width: 100%;
}
select[multiple],
select[size] {
height: auto;
}
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
output {
display: block;
padding-top: 9px;
font-size: 15px;
line-height: 1.42857143;
color: #2b3e50;
}
.form-control {
display: block;
width: 100%;
height: 39px;
padding: 8px 16px;
font-size: 15px;
line-height: 1.42857143;
color: #2b3e50;
background-color: #ffffff;
background-image: none;
border: 1px solid transparent;
border-radius: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
.form-control:focus {
border-color: transparent;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0, 0, 0, 0.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0, 0, 0, 0.6);
}
.form-control::-moz-placeholder {
color: #cccccc;
opacity: 1;
}
.form-control:-ms-input-placeholder {
color: #cccccc;
}
.form-control::-webkit-input-placeholder {
color: #cccccc;
}
.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
background-color: #ebebeb;
opacity: 1;
}
.form-control[disabled],
fieldset[disabled] .form-control {
cursor: not-allowed;
}
textarea.form-control {
height: auto;
}
input[type="search"] {
-webkit-appearance: none;
}
@media screen and (-webkit-min-device-pixel-ratio: 0) {
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
line-height: 39px;
}
input[type="date"].input-sm,
input[type="time"].input-sm,
input[type="datetime-local"].input-sm,
input[type="month"].input-sm,
.input-group-sm input[type="date"],
.input-group-sm input[type="time"],
.input-group-sm input[type="datetime-local"],
.input-group-sm input[type="month"] {
line-height: 31px;
}
input[type="date"].input-lg,
input[type="time"].input-lg,
input[type="datetime-local"].input-lg,
input[type="month"].input-lg,
.input-group-lg input[type="date"],
.input-group-lg input[type="time"],
.input-group-lg input[type="datetime-local"],
.input-group-lg input[type="month"] {
line-height: 52px;
}
}
.form-group {
margin-bottom: 15px;
}
.radio,
.checkbox {
position: relative;
display: block;
margin-top: 10px;
margin-bottom: 10px;
}
.radio label,
.checkbox label {
min-height: 21px;
padding-left: 20px;
margin-bottom: 0;
font-weight: normal;
cursor: pointer;
}
.radio input[type="radio"],
.radio-inline input[type="radio"],
.checkbox input[type="checkbox"],
.checkbox-inline input[type="checkbox"] {
position: absolute;
margin-left: -20px;
margin-top: 4px \9;
}
.radio + .radio,
.checkbox + .checkbox {
margin-top: -5px;
}
.radio-inline,
.checkbox-inline {
position: relative;
display: inline-block;
padding-left: 20px;
margin-bottom: 0;
vertical-align: middle;
font-weight: normal;
cursor: pointer;
}
.radio-inline + .radio-inline,
.checkbox-inline + .checkbox-inline {
margin-top: 0;
margin-left: 10px;
}
input[type="radio"][disabled],
input[type="checkbox"][disabled],
input[type="radio"].disabled,
input[type="checkbox"].disabled,
fieldset[disabled] input[type="radio"],
fieldset[disabled] input[type="checkbox"] {
cursor: not-allowed;
}
.radio-inline.disabled,
.checkbox-inline.disabled,
fieldset[disabled] .radio-inline,
fieldset[disabled] .checkbox-inline {
cursor: not-allowed;
}
.radio.disabled label,
.checkbox.disabled label,
fieldset[disabled] .radio label,
fieldset[disabled] .checkbox label {
cursor: not-allowed;
}
.form-control-static {
padding-top: 9px;
padding-bottom: 9px;
margin-bottom: 0;
min-height: 36px;
}
.form-control-static.input-lg,
.form-control-static.input-sm {
padding-left: 0;
padding-right: 0;
}
.input-sm {
height: 31px;
padding: 5px 10px;
font-size: 13px;
line-height: 1.5;
border-radius: 0;
}
select.input-sm {
height: 31px;
line-height: 31px;
}
textarea.input-sm,
select[multiple].input-sm {
height: auto;
}
.form-group-sm .form-control {
height: 31px;
padding: 5px 10px;
font-size: 13px;
line-height: 1.5;
border-radius: 0;
}
select.form-group-sm .form-control {
height: 31px;
line-height: 31px;
}
textarea.form-group-sm .form-control,
select[multiple].form-group-sm .form-control {
height: auto;
}
.form-group-sm .form-control-static {
height: 31px;
padding: 5px 10px;
font-size: 13px;
line-height: 1.5;
min-height: 34px;
}
.input-lg {
height: 52px;
padding: 12px 24px;
font-size: 19px;
line-height: 1.3333333;
border-radius: 0;
}
select.input-lg {
height: 52px;
line-height: 52px;
}
textarea.input-lg,
select[multiple].input-lg {
height: auto;
}
.form-group-lg .form-control {
height: 52px;
padding: 12px 24px;
font-size: 19px;
line-height: 1.3333333;
border-radius: 0;
}
select.form-group-lg .form-control {
height: 52px;
line-height: 52px;
}
textarea.form-group-lg .form-control,
select[multiple].form-group-lg .form-control {
height: auto;
}
.form-group-lg .form-control-static {
height: 52px;
padding: 12px 24px;
font-size: 19px;
line-height: 1.3333333;
min-height: 40px;
}
.has-feedback {
position: relative;
}
.has-feedback .form-control {
padding-right: 48.75px;
}
.form-control-feedback {
position: absolute;
top: 0;
right: 0;
z-index: 2;
display: block;
width: 39px;
height: 39px;
line-height: 39px;
text-align: center;
pointer-events: none;
}
.input-lg + .form-control-feedback {
width: 52px;
height: 52px;
line-height: 52px;
}
.input-sm + .form-control-feedback {
width: 31px;
height: 31px;
line-height: 31px;
}
.has-success .help-block,
.has-success .control-label,
.has-success .radio,
.has-success .checkbox,
.has-success .radio-inline,
.has-success .checkbox-inline,
.has-success.radio label,
.has-success.checkbox label,
.has-success.radio-inline label,
.has-success.checkbox-inline label {
color: #ebebeb;
}
.has-success .form-control {
border-color: #ebebeb;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.has-success .form-control:focus {
border-color: #d2d2d2;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff;
}
.has-success .input-group-addon {
color: #ebebeb;
border-color: #ebebeb;
background-color: #5cb85c;
}
.has-success .form-control-feedback {
color: #ebebeb;
}
.has-warning .help-block,
.has-warning .control-label,
.has-warning .radio,
.has-warning .checkbox,
.has-warning .radio-inline,
.has-warning .checkbox-inline,
.has-warning.radio label,
.has-warning.checkbox label,
.has-warning.radio-inline label,
.has-warning.checkbox-inline label {
color: #ebebeb;
}
.has-warning .form-control {
border-color: #ebebeb;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.has-warning .form-control:focus {
border-color: #d2d2d2;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff;
}
.has-warning .input-group-addon {
color: #ebebeb;
border-color: #ebebeb;
background-color: #f0ad4e;
}
.has-warning .form-control-feedback {
color: #ebebeb;
}
.has-error .help-block,
.has-error .control-label,
.has-error .radio,
.has-error .checkbox,
.has-error .radio-inline,
.has-error .checkbox-inline,
.has-error.radio label,
.has-error.checkbox label,
.has-error.radio-inline label,
.has-error.checkbox-inline label {
color: #ebebeb;
}
.has-error .form-control {
border-color: #ebebeb;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.has-error .form-control:focus {
border-color: #d2d2d2;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff;
}
.has-error .input-group-addon {
color: #ebebeb;
border-color: #ebebeb;
background-color: #d9534f;
}
.has-error .form-control-feedback {
color: #ebebeb;
}
.has-feedback label ~ .form-control-feedback {
top: 26px;
}
.has-feedback label.sr-only ~ .form-control-feedback {
top: 0;
}
.help-block {
display: block;
margin-top: 5px;
margin-bottom: 10px;
color: #ffffff;
}
@media (min-width: 768px) {
.form-inline .form-group {
display: inline-block;
margin-bottom: 0;
vertical-align: middle;
}
.form-inline .form-control {
display: inline-block;
width: auto;
vertical-align: middle;
}
.form-inline .form-control-static {
display: inline-block;
}
.form-inline .input-group {
display: inline-table;
vertical-align: middle;
}
.form-inline .input-group .input-group-addon,
.form-inline .input-group .input-group-btn,
.form-inline .input-group .form-control {
width: auto;
}
.form-inline .input-group > .form-control {
width: 100%;
}
.form-inline .control-label {
margin-bottom: 0;
vertical-align: middle;
}
.form-inline .radio,
.form-inline .checkbox {
display: inline-block;
margin-top: 0;
margin-bottom: 0;
vertical-align: middle;
}
.form-inline .radio label,
.form-inline .checkbox label {
padding-left: 0;
}
.form-inline .radio input[type="radio"],
.form-inline .checkbox input[type="checkbox"] {
position: relative;
margin-left: 0;
}
.form-inline .has-feedback .form-control-feedback {
top: 0;
}
}
.form-horizontal .radio,
.form-horizontal .checkbox,
.form-horizontal .radio-inline,
.form-horizontal .checkbox-inline {
margin-top: 0;
margin-bottom: 0;
padding-top: 9px;
}
.form-horizontal .radio,
.form-horizontal .checkbox {
min-height: 30px;
}
.form-horizontal .form-group {
margin-left: -15px;
margin-right: -15px;
}
@media (min-width: 768px) {
.form-horizontal .control-label {
text-align: right;
margin-bottom: 0;
padding-top: 9px;
}
}
.form-horizontal .has-feedback .form-control-feedback {
right: 15px;
}
@media (min-width: 768px) {
.form-horizontal .form-group-lg .control-label {
padding-top: 16.9999996px;
}
}
@media (min-width: 768px) {
.form-horizontal .form-group-sm .control-label {
padding-top: 6px;
}
}
.btn {
display: inline-block;
margin-bottom: 0;
font-weight: normal;
text-align: center;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
white-space: nowrap;
padding: 8px 16px;
font-size: 15px;
line-height: 1.42857143;
border-radius: 0;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.btn:focus,
.btn:active:focus,
.btn.active:focus,
.btn.focus,
.btn:active.focus,
.btn.active.focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
.btn:hover,
.btn:focus,
.btn.focus {
color: #ffffff;
text-decoration: none;
}
.btn:active,
.btn.active {
outline: 0;
background-image: none;
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn {
cursor: not-allowed;
pointer-events: none;
opacity: 0.65;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
box-shadow: none;
}
.btn-default {
color: #ffffff;
background-color: #4e5d6c;
border-color: transparent;
}
.btn-default:hover,
.btn-default:focus,
.btn-default.focus,
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
color: #ffffff;
background-color: #39444e;
border-color: rgba(0, 0, 0, 0);
}
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
background-image: none;
}
.btn-default.disabled,
.btn-default[disabled],
fieldset[disabled] .btn-default,
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled.focus,
.btn-default[disabled].focus,
fieldset[disabled] .btn-default.focus,
.btn-default.disabled:active,
.btn-default[disabled]:active,
fieldset[disabled] .btn-default:active,
.btn-default.disabled.active,
.btn-default[disabled].active,
fieldset[disabled] .btn-default.active {
background-color: #4e5d6c;
border-color: transparent;
}
.btn-default .badge {
color: #4e5d6c;
background-color: #ffffff;
}
.btn-primary {
color: #ffffff;
background-color: #df691a;
border-color: transparent;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus,
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
color: #ffffff;
background-color: #b15315;
border-color: rgba(0, 0, 0, 0);
}
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
background-image: none;
}
.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled.focus,
.btn-primary[disabled].focus,
fieldset[disabled] .btn-primary.focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
background-color: #df691a;
border-color: transparent;
}
.btn-primary .badge {
color: #df691a;
background-color: #ffffff;
}
.btn-success {
color: #ffffff;
background-color: #5cb85c;
border-color: transparent;
}
.btn-success:hover,
.btn-success:focus,
.btn-success.focus,
.btn-success:active,
.btn-success.active,
.open > .dropdown-toggle.btn-success {
color: #ffffff;
background-color: #449d44;
border-color: rgba(0, 0, 0, 0);
}
.btn-success:active,
.btn-success.active,
.open > .dropdown-toggle.btn-success {
background-image: none;
}
.btn-success.disabled,
.btn-success[disabled],
fieldset[disabled] .btn-success,
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
.btn-success.disabled:focus,
.btn-success[disabled]:focus,
fieldset[disabled] .btn-success:focus,
.btn-success.disabled.focus,
.btn-success[disabled].focus,
fieldset[disabled] .btn-success.focus,
.btn-success.disabled:active,
.btn-success[disabled]:active,
fieldset[disabled] .btn-success:active,
.btn-success.disabled.active,
.btn-success[disabled].active,
fieldset[disabled] .btn-success.active {
background-color: #5cb85c;
border-color: transparent;
}
.btn-success .badge {
color: #5cb85c;
background-color: #ffffff;
}
.btn-info {
color: #ffffff;
background-color: #5bc0de;
border-color: transparent;
}
.btn-info:hover,
.btn-info:focus,
.btn-info.focus,
.btn-info:active,
.btn-info.active,
.open > .dropdown-toggle.btn-info {
color: #ffffff;
background-color: #31b0d5;
border-color: rgba(0, 0, 0, 0);
}
.btn-info:active,
.btn-info.active,
.open > .dropdown-toggle.btn-info {
background-image: none;
}
.btn-info.disabled,
.btn-info[disabled],
fieldset[disabled] .btn-info,
.btn-info.disabled:hover,
.btn-info[disabled]:hover,
fieldset[disabled] .btn-info:hover,
.btn-info.disabled:focus,
.btn-info[disabled]:focus,
fieldset[disabled] .btn-info:focus,
.btn-info.disabled.focus,
.btn-info[disabled].focus,
fieldset[disabled] .btn-info.focus,
.btn-info.disabled:active,
.btn-info[disabled]:active,
fieldset[disabled] .btn-info:active,
.btn-info.disabled.active,
.btn-info[disabled].active,
fieldset[disabled] .btn-info.active {
background-color: #5bc0de;
border-color: transparent;
}
.btn-info .badge {
color: #5bc0de;
background-color: #ffffff;
}
.btn-warning {
color: #ffffff;
background-color: #f0ad4e;
border-color: transparent;
}
.btn-warning:hover,
.btn-warning:focus,
.btn-warning.focus,
.btn-warning:active,
.btn-warning.active,
.open > .dropdown-toggle.btn-warning {
color: #ffffff;
background-color: #ec971f;
border-color: rgba(0, 0, 0, 0);
}
.btn-warning:active,
.btn-warning.active,
.open > .dropdown-toggle.btn-warning {
background-image: none;
}
.btn-warning.disabled,
.btn-warning[disabled],
fieldset[disabled] .btn-warning,
.btn-warning.disabled:hover,
.btn-warning[disabled]:hover,
fieldset[disabled] .btn-warning:hover,
.btn-warning.disabled:focus,
.btn-warning[disabled]:focus,
fieldset[disabled] .btn-warning:focus,
.btn-warning.disabled.focus,
.btn-warning[disabled].focus,
fieldset[disabled] .btn-warning.focus,
.btn-warning.disabled:active,
.btn-warning[disabled]:active,
fieldset[disabled] .btn-warning:active,
.btn-warning.disabled.active,
.btn-warning[disabled].active,
fieldset[disabled] .btn-warning.active {
background-color: #f0ad4e;
border-color: transparent;
}
.btn-warning .badge {
color: #f0ad4e;
background-color: #ffffff;
}
.btn-danger {
color: #ffffff;
background-color: #d9534f;
border-color: transparent;
}
.btn-danger:hover,
.btn-danger:focus,
.btn-danger.focus,
.btn-danger:active,
.btn-danger.active,
.open > .dropdown-toggle.btn-danger {
color: #ffffff;
background-color: #c9302c;
border-color: rgba(0, 0, 0, 0);
}
.btn-danger:active,
.btn-danger.active,
.open > .dropdown-toggle.btn-danger {
background-image: none;
}
.btn-danger.disabled,
.btn-danger[disabled],
fieldset[disabled] .btn-danger,
.btn-danger.disabled:hover,
.btn-danger[disabled]:hover,
fieldset[disabled] .btn-danger:hover,
.btn-danger.disabled:focus,
.btn-danger[disabled]:focus,
fieldset[disabled] .btn-danger:focus,
.btn-danger.disabled.focus,
.btn-danger[disabled].focus,
fieldset[disabled] .btn-danger.focus,
.btn-danger.disabled:active,
.btn-danger[disabled]:active,
fieldset[disabled] .btn-danger:active,
.btn-danger.disabled.active,
.btn-danger[disabled].active,
fieldset[disabled] .btn-danger.active {
background-color: #d9534f;
border-color: transparent;
}
.btn-danger .badge {
color: #d9534f;
background-color: #ffffff;
}
.btn-link {
color: #df691a;
font-weight: normal;
border-radius: 0;
}
.btn-link,
.btn-link:active,
.btn-link.active,
.btn-link[disabled],
fieldset[disabled] .btn-link {
background-color: transparent;
-webkit-box-shadow: none;
box-shadow: none;
}
.btn-link,
.btn-link:hover,
.btn-link:focus,
.btn-link:active {
border-color: transparent;
}
.btn-link:hover,
.btn-link:focus {
color: #df691a;
text-decoration: underline;
background-color: transparent;
}
.btn-link[disabled]:hover,
fieldset[disabled] .btn-link:hover,
.btn-link[disabled]:focus,
fieldset[disabled] .btn-link:focus {
color: #4e5d6c;
text-decoration: none;
}
.btn-lg,
.btn-group-lg > .btn {
padding: 12px 24px;
font-size: 19px;
line-height: 1.3333333;
border-radius: 0;
}
.btn-sm,
.btn-group-sm > .btn {
padding: 5px 10px;
font-size: 13px;
line-height: 1.5;
border-radius: 0;
}
.btn-xs,
.btn-group-xs > .btn {
padding: 1px 5px;
font-size: 13px;
line-height: 1.5;
border-radius: 0;
}
.btn-block {
display: block;
width: 100%;
}
.btn-block + .btn-block {
margin-top: 5px;
}
input[type="submit"].btn-block,
input[type="reset"].btn-block,
input[type="button"].btn-block {
width: 100%;
}
.fade {
opacity: 0;
-webkit-transition: opacity 0.15s linear;
-o-transition: opacity 0.15s linear;
transition: opacity 0.15s linear;
}
.fade.in {
opacity: 1;
}
.collapse {
display: none;
}
.collapse.in {
display: block;
}
tr.collapse.in {
display: table-row;
}
tbody.collapse.in {
display: table-row-group;
}
.collapsing {
position: relative;
height: 0;
overflow: hidden;
-webkit-transition-property: height, visibility;
-o-transition-property: height, visibility;
transition-property: height, visibility;
-webkit-transition-duration: 0.35s;
-o-transition-duration: 0.35s;
transition-duration: 0.35s;
-webkit-transition-timing-function: ease;
-o-transition-timing-function: ease;
transition-timing-function: ease;
}
.caret {
display: inline-block;
width: 0;
height: 0;
margin-left: 2px;
vertical-align: middle;
border-top: 4px dashed;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
}
.dropup,
.dropdown {
position: relative;
}
.dropdown-toggle:focus {
outline: 0;
}
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 160px;
padding: 5px 0;
margin: 2px 0 0;
list-style: none;
font-size: 15px;
text-align: left;
background-color: #4e5d6c;
border: 1px solid transparent;
border-radius: 0;
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
.dropdown-menu.pull-right {
right: 0;
left: auto;
}
.dropdown-menu .divider {
height: 1px;
margin: 9.5px 0;
overflow: hidden;
background-color: #2b3e50;
}
.dropdown-menu > li > a {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 1.42857143;
color: #ebebeb;
white-space: nowrap;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
text-decoration: none;
color: #ebebeb;
background-color: #485563;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
color: #ffffff;
text-decoration: none;
outline: 0;
background-color: #df691a;
}
.dropdown-menu > .disabled > a,
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
color: #2b3e50;
}
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
text-decoration: none;
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
cursor: not-allowed;
}
.open > .dropdown-menu {
display: block;
}
.open > a {
outline: 0;
}
.dropdown-menu-right {
left: auto;
right: 0;
}
.dropdown-menu-left {
gitextract_iq5ciyeb/
├── LICENSE
├── Makefile
├── README.md
├── app/
│ ├── .gitignore
│ ├── Makefile
│ ├── dns/
│ │ ├── Makefile
│ │ ├── dns.c
│ │ └── dns.h
│ ├── driver/
│ │ ├── Makefile
│ │ ├── gpio16.c
│ │ ├── i2c_master.c
│ │ ├── key.c
│ │ ├── onewire.c
│ │ ├── pwm.c
│ │ ├── readline.c
│ │ ├── relay.c
│ │ ├── spi.c
│ │ └── uart_interrupt.c
│ ├── http/
│ │ ├── Makefile
│ │ ├── app.c
│ │ ├── app.h
│ │ ├── cgi.c
│ │ ├── cgi.h
│ │ ├── cgi_relay.c
│ │ ├── cgi_relay.h
│ │ ├── cgi_wifi.c
│ │ ├── cgi_wifi.h
│ │ ├── html/
│ │ │ ├── .bak/
│ │ │ │ └── bootstrap.css
│ │ │ ├── bootstrap.css
│ │ │ ├── cats.html
│ │ │ ├── index.html
│ │ │ ├── index.js
│ │ │ ├── lib.js
│ │ │ └── speed_test.html
│ │ ├── http.h
│ │ ├── http_client.c
│ │ ├── http_client.h
│ │ ├── http_helper.c
│ │ ├── http_helper.h
│ │ ├── http_parser.c
│ │ ├── http_parser.h
│ │ ├── http_process.c
│ │ ├── http_process.h
│ │ ├── http_server.c
│ │ ├── http_server.h
│ │ ├── http_websocket_server.c
│ │ ├── http_websocket_server.h
│ │ ├── rofs.c
│ │ ├── rofs.h
│ │ ├── rofs_data.c
│ │ ├── websocket.c
│ │ ├── websocket.h
│ │ ├── ws_app.c
│ │ └── ws_app.h
│ ├── include/
│ │ ├── arch/
│ │ │ ├── cc.h
│ │ │ ├── perf.h
│ │ │ └── sys_arch.h
│ │ ├── driver/
│ │ │ ├── gpio16.h
│ │ │ ├── i2c_master.h
│ │ │ ├── key.h
│ │ │ ├── onewire.h
│ │ │ ├── pwm.h
│ │ │ ├── relay.h
│ │ │ ├── spi.h
│ │ │ ├── spi_master.h
│ │ │ ├── spi_register.h
│ │ │ ├── uart.h
│ │ │ └── uart_register.h
│ │ ├── json/
│ │ │ └── cJson.h
│ │ ├── lwip/
│ │ │ ├── api.h
│ │ │ ├── api_msg.h
│ │ │ ├── app/
│ │ │ │ ├── dhcpserver.h
│ │ │ │ ├── espconn.h
│ │ │ │ ├── espconn_tcp.h
│ │ │ │ ├── espconn_udp.h
│ │ │ │ └── ping.h
│ │ │ ├── arch.h
│ │ │ ├── autoip.h
│ │ │ ├── debug.h
│ │ │ ├── def.h
│ │ │ ├── dhcp.h
│ │ │ ├── dns.h
│ │ │ ├── err.h
│ │ │ ├── icmp.h
│ │ │ ├── igmp.h
│ │ │ ├── inet.h
│ │ │ ├── inet_chksum.h
│ │ │ ├── init.h
│ │ │ ├── ip.h
│ │ │ ├── ip_addr.h
│ │ │ ├── ip_frag.h
│ │ │ ├── mdns.h
│ │ │ ├── mem.h
│ │ │ ├── memp.h
│ │ │ ├── memp_std.h
│ │ │ ├── netbuf.h
│ │ │ ├── netdb.h
│ │ │ ├── netif.h
│ │ │ ├── netifapi.h
│ │ │ ├── opt.h
│ │ │ ├── pbuf.h
│ │ │ ├── puck_def.h
│ │ │ ├── raw.h
│ │ │ ├── sio.h
│ │ │ ├── snmp.h
│ │ │ ├── snmp_asn1.h
│ │ │ ├── snmp_msg.h
│ │ │ ├── snmp_structs.h
│ │ │ ├── sntp.h
│ │ │ ├── sockets.h
│ │ │ ├── stats.h
│ │ │ ├── sys.h
│ │ │ ├── tcp.h
│ │ │ ├── tcp_impl.h
│ │ │ ├── tcpip.h
│ │ │ ├── timers.h
│ │ │ └── udp.h
│ │ ├── lwipopts.h
│ │ ├── mem_manager.h
│ │ ├── netif/
│ │ │ ├── etharp.h
│ │ │ ├── if_llc.h
│ │ │ ├── ppp_oe.h
│ │ │ └── wlan_lwip_if.h
│ │ ├── pp/
│ │ │ └── esf_buf.h
│ │ ├── serial_number.h
│ │ ├── ssl/
│ │ │ ├── app/
│ │ │ │ ├── espconn_secure.h
│ │ │ │ └── espconn_ssl.h
│ │ │ ├── cert.h
│ │ │ ├── private_key.h
│ │ │ ├── ssl_bigint.h
│ │ │ ├── ssl_bigint_impl.h
│ │ │ ├── ssl_cert.h
│ │ │ ├── ssl_config.h
│ │ │ ├── ssl_crypto.h
│ │ │ ├── ssl_crypto_misc.h
│ │ │ ├── ssl_os_int.h
│ │ │ ├── ssl_os_port.h
│ │ │ ├── ssl_private_key.h
│ │ │ ├── ssl_ssl.h
│ │ │ ├── ssl_tls1.h
│ │ │ └── ssl_version.h
│ │ ├── user_config.h
│ │ └── xtensa/
│ │ ├── cacheasm.h
│ │ ├── cacheattrasm.h
│ │ ├── config/
│ │ │ ├── core-isa.h
│ │ │ ├── core-matmap.h
│ │ │ ├── core.h
│ │ │ ├── defs.h
│ │ │ ├── specreg.h
│ │ │ ├── system.h
│ │ │ ├── tie-asm.h
│ │ │ └── tie.h
│ │ ├── coreasm.h
│ │ ├── corebits.h
│ │ ├── hal.h
│ │ ├── sim.h
│ │ ├── simcall-errno.h
│ │ ├── simcall-fcntl.h
│ │ ├── simcall.h
│ │ ├── specreg.h
│ │ ├── tie/
│ │ │ ├── xt_MUL32.h
│ │ │ ├── xt_core.h
│ │ │ ├── xt_debug.h
│ │ │ ├── xt_density.h
│ │ │ ├── xt_exceptions.h
│ │ │ ├── xt_externalregisters.h
│ │ │ ├── xt_interrupt.h
│ │ │ ├── xt_misc.h
│ │ │ ├── xt_mmu.h
│ │ │ ├── xt_mul.h
│ │ │ ├── xt_timer.h
│ │ │ └── xt_trace.h
│ │ ├── xtensa-libdb-macros.h
│ │ ├── xtensa-xer.h
│ │ ├── xtruntime-frames.h
│ │ └── xtruntime.h
│ ├── json/
│ │ ├── Makefile
│ │ └── cJson.c
│ ├── libc/
│ │ ├── Makefile
│ │ ├── c_ctype.c
│ │ ├── c_ctype.h
│ │ ├── c_errno.h
│ │ ├── c_fcntl.h
│ │ ├── c_limits.h
│ │ ├── c_locale.h
│ │ ├── c_math.c
│ │ ├── c_math.h
│ │ ├── c_signal.h
│ │ ├── c_stdarg.h
│ │ ├── c_stddef.h
│ │ ├── c_stdint.h
│ │ ├── c_stdio.c
│ │ ├── c_stdio.h
│ │ ├── c_stdlib.c
│ │ ├── c_stdlib.h
│ │ ├── c_string.c
│ │ └── c_string.h
│ ├── lwip/
│ │ ├── Makefile
│ │ ├── api/
│ │ │ ├── Makefile
│ │ │ ├── api_lib.c
│ │ │ ├── api_msg.c
│ │ │ ├── err.c
│ │ │ ├── netbuf.c
│ │ │ ├── netdb.c
│ │ │ ├── netifapi.c
│ │ │ ├── sockets.c
│ │ │ └── tcpip.c
│ │ ├── app/
│ │ │ ├── Makefile
│ │ │ ├── dhcpserver.c
│ │ │ ├── espconn.c
│ │ │ ├── espconn_mdns.c
│ │ │ ├── espconn_tcp.c
│ │ │ ├── espconn_udp.c
│ │ │ ├── netio.c
│ │ │ └── ping.c
│ │ ├── core/
│ │ │ ├── Makefile
│ │ │ ├── def.c
│ │ │ ├── dhcp.c
│ │ │ ├── dns.c
│ │ │ ├── init.c
│ │ │ ├── ipv4/
│ │ │ │ ├── Makefile
│ │ │ │ ├── autoip.c
│ │ │ │ ├── icmp.c
│ │ │ │ ├── igmp.c
│ │ │ │ ├── inet.c
│ │ │ │ ├── inet_chksum.c
│ │ │ │ ├── ip.c
│ │ │ │ ├── ip_addr.c
│ │ │ │ └── ip_frag.c
│ │ │ ├── mdns.c
│ │ │ ├── mem.c
│ │ │ ├── memp.c
│ │ │ ├── netif.c
│ │ │ ├── pbuf.c
│ │ │ ├── raw.c
│ │ │ ├── sntp.c
│ │ │ ├── stats.c
│ │ │ ├── sys.c
│ │ │ ├── sys_arch.c
│ │ │ ├── tcp.c
│ │ │ ├── tcp_in.c
│ │ │ ├── tcp_out.c
│ │ │ ├── timers.c
│ │ │ └── udp.c
│ │ └── netif/
│ │ ├── Makefile
│ │ └── etharp.c
│ ├── mqtt/
│ │ ├── Makefile
│ │ ├── app.c
│ │ ├── app.h
│ │ ├── mqtt.c
│ │ ├── mqtt.h
│ │ ├── mqtt_msg.c
│ │ ├── mqtt_msg.h
│ │ ├── proto.c
│ │ ├── proto.h
│ │ ├── queue.c
│ │ ├── queue.h
│ │ ├── ringbuf.c
│ │ ├── ringbuf.h
│ │ ├── typedef.h
│ │ ├── utils.c
│ │ └── utils.h
│ ├── platform/
│ │ ├── Makefile
│ │ ├── common.c
│ │ ├── common.h
│ │ ├── config.c
│ │ ├── config.h
│ │ ├── cpu_esp8266.h
│ │ ├── flash_api.c
│ │ ├── flash_api.h
│ │ ├── flash_fs.c
│ │ ├── flash_fs.h
│ │ ├── pin_map.c
│ │ ├── pin_map.h
│ │ ├── platform.c
│ │ └── platform.h
│ ├── sensor/
│ │ ├── Makefile
│ │ ├── bmp180.c
│ │ ├── bmp180.h
│ │ ├── dht22.c
│ │ ├── dht22.h
│ │ ├── ds18b20.c
│ │ ├── ds18b20.h
│ │ ├── sensors.c
│ │ └── sensors.h
│ ├── smart/
│ │ ├── Makefile
│ │ ├── smart.c
│ │ └── smart.h
│ ├── spiffs/
│ │ ├── Makefile
│ │ ├── docs/
│ │ │ ├── IMPLEMENTING
│ │ │ ├── INTEGRATION
│ │ │ ├── TECH_SPEC
│ │ │ └── TODO
│ │ ├── params_test.h
│ │ ├── spiffs.c
│ │ ├── spiffs.h
│ │ ├── spiffs_cache.c
│ │ ├── spiffs_check.c
│ │ ├── spiffs_config.h
│ │ ├── spiffs_gc.c
│ │ ├── spiffs_hydrogen.c
│ │ ├── spiffs_nucleus.c
│ │ └── spiffs_nucleus.h
│ ├── ssl/
│ │ ├── Makefile
│ │ ├── app/
│ │ │ ├── Makefile
│ │ │ ├── espconn_secure.c
│ │ │ └── espconn_ssl.c
│ │ ├── crypto/
│ │ │ ├── Makefile
│ │ │ ├── ssl_aes.c
│ │ │ ├── ssl_bigint.c
│ │ │ ├── ssl_crypto_misc.c
│ │ │ ├── ssl_hmac.c
│ │ │ ├── ssl_md2.c
│ │ │ ├── ssl_md5.c
│ │ │ ├── ssl_rc4.c
│ │ │ ├── ssl_rsa.c
│ │ │ └── ssl_sha1.c
│ │ └── ssl/
│ │ ├── Makefile
│ │ ├── ssl_asn1.c
│ │ ├── ssl_gen_cert.c
│ │ ├── ssl_loader.c
│ │ ├── ssl_openssl.c
│ │ ├── ssl_os_port.c
│ │ ├── ssl_p12.c
│ │ ├── ssl_tls1.c
│ │ ├── ssl_tls1_clnt.c
│ │ ├── ssl_tls1_svr.c
│ │ └── ssl_x509.c
│ ├── user/
│ │ ├── Makefile
│ │ └── user_main.c
│ └── util/
│ ├── Makefile
│ ├── base64.c
│ ├── base64.h
│ ├── linked_list.c
│ └── linked_list.h
├── bin/
│ └── .gitignore
├── include/
│ ├── at_custom.h
│ ├── c_types.h
│ ├── eagle_soc.h
│ ├── espconn.h
│ ├── espnow.h
│ ├── ets_sys.h
│ ├── gpio.h
│ ├── ip_addr.h
│ ├── mem.h
│ ├── mesh.h
│ ├── os_type.h
│ ├── osapi.h
│ ├── ping.h
│ ├── pwm.h
│ ├── queue.h
│ ├── smartconfig.h
│ ├── sntp.h
│ ├── spi_flash.h
│ ├── upgrade.h
│ └── user_interface.h
├── ld/
│ ├── eagle.app.v6.ld
│ └── eagle.rom.addr.v6.ld
├── lib/
│ ├── libat.a
│ ├── libcrypto.a
│ ├── libespnow.a
│ ├── libjson.a
│ ├── liblwip.a
│ ├── liblwip_536.a
│ ├── libmain.a
│ ├── libmesh.a
│ ├── libnet80211.a
│ ├── libphy.a
│ ├── libpp.a
│ ├── libpwm.a
│ ├── libsmartconfig.a
│ ├── libssl.a
│ ├── libupgrade.a
│ ├── libwpa.a
│ └── libwps.a
└── tools/
├── .gitattributes
├── esptool.py
├── makefile.sh
└── mkfs.py
SYMBOL INDEX (2749 symbols across 224 files)
FILE: app/dns/dns.c
type espconn (line 9) | struct espconn
function isKnownDNS (line 32) | static int ICACHE_FLASH_ATTR isKnownDNS(char *dns){
function dnsQueryReceived (line 51) | static void ICACHE_FLASH_ATTR dnsQueryReceived(void *arg, char *data, un...
function init_dns (line 130) | void ICACHE_FLASH_ATTR init_dns() {
FILE: app/driver/gpio16.c
function gpio16_output_conf (line 6) | gpio16_output_conf(void)
function gpio16_output_set (line 18) | void ICACHE_FLASH_ATTR
function gpio16_input_conf (line 26) | gpio16_input_conf(void)
function gpio16_input_get (line 39) | gpio16_input_get(void)
FILE: app/driver/i2c_master.c
function ICACHE_FLASH_ATTR (line 33) | ICACHE_FLASH_ATTR
function ICACHE_FLASH_ATTR (line 59) | ICACHE_FLASH_ATTR
function i2c_master_init (line 74) | i2c_master_init(void)
function uint8 (line 100) | uint8 i2c_master_get_pinSDA(){
function uint8 (line 104) | uint8 i2c_master_get_pinSCL(){
function i2c_master_gpio_init (line 115) | void ICACHE_FLASH_ATTR
function i2c_master_start (line 147) | i2c_master_start(void)
function i2c_master_stop (line 164) | i2c_master_stop(void)
function i2c_master_setAck (line 182) | void ICACHE_FLASH_ATTR
function i2c_master_getAck (line 204) | i2c_master_getAck(void)
function i2c_master_checkAck (line 229) | i2c_master_checkAck(void)
function i2c_master_send_ack (line 245) | i2c_master_send_ack(void)
function i2c_master_send_nack (line 256) | i2c_master_send_nack(void)
function i2c_master_readByte (line 268) | i2c_master_readByte(void)
function i2c_master_writeByte (line 307) | void ICACHE_FLASH_ATTR
FILE: app/driver/key.c
type keys_param (line 20) | struct keys_param
type single_key_param (line 32) | struct single_key_param
type single_key_param (line 35) | struct single_key_param
type single_key_param (line 35) | struct single_key_param
type single_key_param (line 35) | struct single_key_param
function key_init (line 52) | void ICACHE_FLASH_ATTR
function ICACHE_FLASH_ATTR (line 88) | ICACHE_FLASH_ATTR
function ICACHE_FLASH_ATTR (line 107) | ICACHE_FLASH_ATTR
function LOCAL (line 132) | LOCAL void
FILE: app/driver/onewire.c
function onewire_init (line 75) | void onewire_init(uint8_t pin)
function onewire_reset (line 91) | uint8_t onewire_reset(uint8_t pin)
function onewire_write_bit (line 123) | static void onewire_write_bit(uint8_t pin, uint8_t v)
function onewire_read_bit (line 148) | static uint8_t onewire_read_bit(uint8_t pin)
function onewire_write (line 171) | void onewire_write(uint8_t pin, uint8_t v, uint8_t power /* = 0 */) {
function onewire_write_bytes (line 185) | void onewire_write_bytes(uint8_t pin, const uint8_t *buf, uint16_t count...
function onewire_read (line 200) | uint8_t onewire_read(uint8_t pin) {
function onewire_read_bytes (line 210) | void onewire_read_bytes(uint8_t pin, uint8_t *buf, uint16_t count) {
function onewire_select (line 219) | void onewire_select(uint8_t pin, const uint8_t rom[8])
function onewire_skip (line 231) | void onewire_skip(uint8_t pin)
function onewire_depower (line 236) | void onewire_depower(uint8_t pin)
function onewire_reset_search (line 249) | void onewire_reset_search(uint8_t pin)
function onewire_target_search (line 265) | void onewire_target_search(uint8_t pin, uint8_t family_code)
function onewire_search (line 293) | uint8_t onewire_search(uint8_t pin, uint8_t *newAddr)
function onewire_crc8 (line 452) | uint8_t onewire_crc8(const uint8_t *addr, uint8_t len)
function onewire_crc8 (line 466) | uint8_t onewire_crc8(const uint8_t *addr, uint8_t len)
function onewire_check_crc16 (line 505) | bool onewire_check_crc16(const uint8_t* input, uint16_t len, const uint8...
function onewire_crc16 (line 523) | uint16_t onewire_crc16(const uint8_t* input, uint16_t len, uint16_t crc)
FILE: app/driver/pwm.c
type TIMER_PREDIVED_MODE (line 55) | typedef enum {
type TIMER_INT_MODE (line 61) | typedef enum {
function ICACHE_FLASH_ATTR (line 66) | ICACHE_FLASH_ATTR
function pwm_start (line 104) | pwm_start(void)
function pwm_set_duty (line 200) | void ICACHE_FLASH_ATTR
function pwm_set_freq (line 230) | void ICACHE_FLASH_ATTR
function ICACHE_FLASH_ATTR (line 253) | ICACHE_FLASH_ATTR
function uint16 (line 273) | uint16 ICACHE_FLASH_ATTR
function uint16 (line 295) | uint16 ICACHE_FLASH_ATTR
function ICACHE_RAM_ATTR (line 308) | ICACHE_RAM_ATTR
function pwm_init (line 347) | void ICACHE_FLASH_ATTR
function pwm_add (line 381) | bool ICACHE_FLASH_ATTR
function pwm_delete (line 406) | bool ICACHE_FLASH_ATTR
function pwm_exist (line 433) | bool ICACHE_FLASH_ATTR
FILE: app/driver/readline.c
function uart_getc (line 14) | bool uart_getc(char *c){
function readline4lua (line 33) | int readline4lua(const char *prompt, char *buffer, int length){
FILE: app/driver/relay.c
function relay_register_listener (line 22) | void ICACHE_FLASH_ATTR relay_register_listener(relay_change_callback f){
function relay_unregister_listener (line 38) | void ICACHE_FLASH_ATTR relay_unregister_listener(relay_change_callback f){
function relay_notify_listeners (line 51) | static void ICACHE_FLASH_ATTR relay_notify_listeners(int relayId,int sta...
function relay (line 66) | static relay * ICACHE_FLASH_ATTR find_relay(int relayNumber){
function relay_get_state (line 79) | int ICACHE_FLASH_ATTR relay_get_state(int relayNumber){
function relay_set_state (line 89) | int ICACHE_FLASH_ATTR relay_set_state(int relayNumber,unsigned state){
function relay_toggle_state (line 105) | int ICACHE_FLASH_ATTR relay_toggle_state(int relayNumber){
function relay_init (line 122) | void ICACHE_FLASH_ATTR relay_init(){
function relay_count (line 172) | int ICACHE_FLASH_ATTR relay_count(){
FILE: app/driver/spi.c
function spi_lcd_mode_init (line 9) | void spi_lcd_mode_init(uint8 spi_no)
function spi_lcd_9bit_write (line 46) | void spi_lcd_9bit_write(uint8 spi_no,uint8 high_bit,uint8 low_8bit)
function spi_master_init (line 67) | void spi_master_init(uint8 spi_no, unsigned cpol, unsigned cpha, unsigne...
function spi_mast_byte_write (line 131) | void spi_mast_byte_write(uint8 spi_no, uint8 *data)
function spi_byte_write_espslave (line 153) | void spi_byte_write_espslave(uint8 spi_no,uint8 data)
function spi_byte_read_espslave (line 179) | void spi_byte_read_espslave(uint8 spi_no,uint8 *data)
function spi_slave_init (line 206) | void spi_slave_init(uint8 spi_no)
function hspi_master_readwrite_repeat (line 302) | void hspi_master_readwrite_repeat(void)
function gpio_init (line 345) | void ICACHE_FLASH_ATTR
function spi_slave_isr_handler (line 359) | void spi_slave_isr_handler(void *para)
function set_miso_data (line 420) | void ICACHE_FLASH_ATTR
function disp_spi_data (line 439) | void ICACHE_FLASH_ATTR
function spi_task (line 450) | void ICACHE_FLASH_ATTR
function spi_task_init (line 482) | spi_task_init(void)
function spi_test_init (line 490) | void ICACHE_FLASH_ATTR
FILE: app/driver/uart_interrupt.c
type tx_item (line 41) | struct tx_item{
function STATUS (line 50) | STATUS uart_tx_one_char(uint8_t uart, uint8_t TxChar)
function STATUS (line 62) | STATUS uart_tx_one_char_no_wait(uint8_t uart, uint8_t TxChar)
function tx_timer_timeout (line 71) | static void tx_timer_timeout(void *arg){
function uart_write (line 84) | void uart_write(uint8_t uart,uint8_t *data,int len){
function uart_write_char (line 130) | void uart_write_char(uint8_t uart,char c){
function uart_write_string (line 134) | void uart_write_string(uint8_t uart,const char *s){
function uart_config (line 140) | void ICACHE_FLASH_ATTR uart_config(uint8_t uart_no)
function LOCAL (line 190) | LOCAL void uart_transmit(uint8_t uart){
function LOCAL (line 234) | LOCAL void uart0_data_received(){
function LOCAL (line 259) | LOCAL void uart_rx_intr_handler(void *para)
function uart_register_data_callback (line 330) | void uart_register_data_callback(uart0_data_received_callback_t callback){
function uart_clear_data_callback (line 334) | void uart_clear_data_callback(){
function uart1_write_char (line 339) | void uart1_write_char(char c){
function uart0_write_char (line 342) | void uart0_write_char(char c){
function uart_init (line 346) | void uart_init(UartBautRate uart0_br, UartBautRate uart1_br)
FILE: app/http/app.c
function init_http_server (line 53) | void ICACHE_FLASH_ATTR init_http_server(){
FILE: app/http/cgi.c
function cgi_transmit (line 32) | int ICACHE_FLASH_ATTR cgi_transmit(http_connection *connData){
function cgi_enforce_method (line 72) | int ICACHE_FLASH_ATTR cgi_enforce_method(http_connection *connData) {
function cgi_enforce_body (line 90) | int ICACHE_FLASH_ATTR cgi_enforce_body(http_connection *connData) {
function cgi_cors (line 113) | int ICACHE_FLASH_ATTR cgi_cors(http_connection *connData) {
function cgi_url_rewrite (line 159) | int ICACHE_FLASH_ATTR cgi_url_rewrite(http_connection *connData) {
function cgi_redirect (line 178) | int ICACHE_FLASH_ATTR cgi_redirect(http_connection *connData) {
function cgi_check_host (line 186) | int ICACHE_FLASH_ATTR cgi_check_host(http_connection *connData) {
type cgi_fs_state (line 256) | typedef struct{
function cgi_file_system (line 262) | int ICACHE_FLASH_ATTR cgi_file_system(http_connection *connData) {
FILE: app/http/cgi.h
type cgi_transmit_arg (line 17) | struct cgi_transmit_arg{
FILE: app/http/cgi_relay.c
function http_relay_api_status (line 34) | int ICACHE_FLASH_ATTR http_relay_api_status(http_connection *c) {
function http_relay_api_toggle (line 71) | int ICACHE_FLASH_ATTR http_relay_api_toggle(http_connection *c) {
function http_dht_api_read (line 129) | int ICACHE_FLASH_ATTR http_dht_api_read(http_connection *c) {
FILE: app/http/cgi_wifi.c
type ap (line 32) | typedef struct {
type scan_result_data (line 40) | typedef struct {
type wifi_status_t (line 45) | typedef struct {
type api_cgi_status (line 56) | typedef struct {
type api_cgi_connect_status (line 65) | typedef struct {
type api_cgi_check_internet_status (line 74) | typedef struct {
type station_config (line 81) | struct station_config
function http_wifi_api_get_status (line 83) | int ICACHE_FLASH_ATTR http_wifi_api_get_status(http_connection *c) {
function http_wifi_api_scan_callback (line 150) | static void ICACHE_FLASH_ATTR http_wifi_api_scan_callback(void *arg, STA...
type api_cgi_scan_status (line 211) | typedef struct {
function http_wifi_api_scan (line 219) | int ICACHE_FLASH_ATTR http_wifi_api_scan(http_connection *c) {
function http_wifi_api_disconnect (line 326) | int ICACHE_FLASH_ATTR http_wifi_api_disconnect(http_connection *c){
function http_wifi_api_connect_ap (line 348) | int ICACHE_FLASH_ATTR http_wifi_api_connect_ap(http_connection *c){
function http_wifi_api_check_internet_cb (line 493) | int ICACHE_FLASH_ATTR http_wifi_api_check_internet_cb(http_connection *c){
function http_wifi_api_check_internet (line 531) | int ICACHE_FLASH_ATTR http_wifi_api_check_internet(http_connection *c){
FILE: app/http/html/index.js
function wifiConnectModal (line 7) | function wifiConnectModal(id){
function wifiScan (line 38) | function wifiScan(){
function wifiConnect (line 144) | function wifiConnect(ssid,pwd){
function checkInternet (line 180) | function checkInternet(){
function wifiStatus (line 205) | function wifiStatus(){
function wifiDisconnect (line 258) | function wifiDisconnect(){
function relayQueryStatus (line 278) | function relayQueryStatus(){
function relayStatus (line 302) | function relayStatus(id,status){
function relayToggle (line 319) | function relayToggle(id){
function sensorRead (line 371) | function sensorRead(){
FILE: app/http/html/lib.js
function F (line 2) | function F(a){return null==a?String(a):x[y.call(a)]||"object"}
function G (line 2) | function G(a){return"function"==F(a)}
function H (line 2) | function H(a){return null!=a&&a==a.window}
function I (line 2) | function I(a){return null!=a&&a.nodeType==a.DOCUMENT_NODE}
function J (line 2) | function J(a){return"object"==F(a)}
function K (line 2) | function K(a){return J(a)&&!H(a)&&Object.getPrototypeOf(a)==Object.proto...
function L (line 2) | function L(a){return"number"==typeof a.length}
function M (line 2) | function M(a){return g.call(a,function(a){return null!=a})}
function N (line 2) | function N(a){return a.length>0?c.fn.concat.apply([],a):a}
function O (line 2) | function O(a){return a.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/...
function P (line 2) | function P(a){return a in j?j[a]:j[a]=new RegExp("(^|\\s)"+a+"(\\s|$)")}
function Q (line 2) | function Q(a,b){return"number"!=typeof b||k[O(a)]?b:b+"px"}
function R (line 2) | function R(a){var b,c;return i[a]||(b=h.createElement(a),h.body.appendCh...
function S (line 2) | function S(a){return"children"in a?f.call(a.children):c.map(a.childNodes...
function T (line 2) | function T(c,d,e){for(b in d)e&&(K(d[b])||E(d[b]))?(K(d[b])&&!K(c[b])&&(...
function U (line 2) | function U(a,b){return null==b?c(a):c(a).filter(b)}
function V (line 2) | function V(a,b,c,d){return G(b)?b.call(a,c,d):b}
function W (line 2) | function W(a,b,c){null==c?a.removeAttribute(b):a.setAttribute(b,c)}
function X (line 2) | function X(b,c){var d=b.className||"",e=d&&d.baseVal!==a;return c===a?e?...
function Y (line 2) | function Y(a){try{return a?"true"==a||("false"==a?!1:"null"==a?null:+a+"...
function Z (line 2) | function Z(a,b){b(a);for(var c=0,d=a.childNodes.length;d>c;c++)Z(a.child...
function l (line 2) | function l(a){return a._zid||(a._zid=b++)}
function m (line 2) | function m(a,b,c,d){if(b=n(b),b.ns)var e=o(b.ns);return(g[l(a)]||[]).fil...
function n (line 2) | function n(a){var b=(""+a).split(".");return{e:b[0],ns:b.slice(1).sort()...
function o (line 2) | function o(a){return new RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$...
function p (line 2) | function p(a,b){return a.del&&!i&&a.e in j||!!b}
function q (line 2) | function q(a){return k[a]||i&&j[a]||a}
function r (line 2) | function r(b,d,e,f,h,i,j){var m=l(b),o=g[m]||(g[m]=[]);d.split(/\s/).for...
function s (line 2) | function s(a,b,c,d,e){var f=l(a);(b||"").split(/\s/).forEach(function(b)...
function x (line 2) | function x(b,d){return(d||!b.isDefaultPrevented)&&(d||(d=b),a.each(w,fun...
function y (line 2) | function y(a){var b,d={originalEvent:a};for(b in a)v.test(b)||a[b]===c||...
function m (line 2) | function m(b,c,d){var e=a.Event(c);return a(b).trigger(e,d),!e.isDefault...
function n (line 2) | function n(a,b,d,e){return a.global?m(b||c,d,e):void 0}
function o (line 2) | function o(b){b.global&&0===a.active++&&n(b,null,"ajaxStart")}
function p (line 2) | function p(b){b.global&&!--a.active&&n(b,null,"ajaxStop")}
function q (line 2) | function q(a,b){var c=b.context;return b.beforeSend.call(c,a,b)===!1||n(...
function r (line 2) | function r(a,b,c,d){var e=c.context,f="success";c.success.call(e,a,f,b),...
function s (line 2) | function s(a,b,c,d,e){var f=d.context;d.error.call(f,c,b,a),e&&e.rejectW...
function t (line 2) | function t(a,b,c){var d=c.context;c.complete.call(d,b,a),n(c,d,"ajaxComp...
function u (line 2) | function u(){}
function v (line 2) | function v(a){return a&&(a=a.split(";",2)[0]),a&&(a==j?"html":a==i?"json...
function w (line 2) | function w(a,b){return""==b?a:(a+"&"+b).replace(/[&?]{1,2}/,"?")}
function x (line 2) | function x(b){b.processData&&b.data&&"string"!=a.type(b.data)&&(b.data=a...
function y (line 2) | function y(b,c,d,e){return a.isFunction(c)&&(e=d,d=c,c=void 0),a.isFunct...
function A (line 2) | function A(b,c,d,e){var f,g=a.isArray(c),h=a.isPlainObject(c);a.each(c,f...
function g (line 2) | function g(f,g){var i=f[e],j=i&&b[i];if(void 0===g)return j||h(f);if(j){...
function h (line 2) | function h(c,f,g){var h=c[e]||(c[e]=++a.uuid),j=b[h]||(b[h]=i(c));return...
function i (line 2) | function i(b){var c={};return a.each(b.attributes||f,function(b,e){0==e....
function e (line 4) | function e(t,i){var e=/\W/.test(t)?new Function("obj","var p=[],print=fu...
function c (line 7) | function c(c,d){return this.each(function(){var e=a(this),f=e.data("bs.m...
FILE: app/http/http.h
type http_connection (line 24) | typedef struct http_connection http_connection;
type header (line 28) | typedef struct {
type http_buffer (line 34) | typedef struct {
type cgi_struct (line 40) | typedef struct {
type http_connection (line 53) | struct http_connection{
FILE: app/http/http_client.c
function http_client_request_execute (line 27) | void ICACHE_FLASH_ATTR http_client_request_execute(http_connection *c)
function http_client_dns_found_cb (line 98) | void ICACHE_FLASH_ATTR http_client_dns_found_cb(const char *name, ip_add...
function http_client_dns_timeout (line 139) | void ICACHE_FLASH_ATTR http_client_dns_timeout(void *arg){
function http_client_dns (line 151) | void ICACHE_FLASH_ATTR http_client_dns(http_connection *c){
function http_client_connect_callback (line 165) | void ICACHE_FLASH_ATTR http_client_connect_callback(void *arg) {
function http_client_cgi_execute (line 182) | int ICACHE_FLASH_ATTR http_client_cgi_execute(http_connection *c){
function http_client_open_url (line 233) | int ICACHE_FLASH_ATTR http_client_open_url(http_connection *c,char *url){
function http_client_GET (line 251) | int ICACHE_FLASH_ATTR http_client_GET(http_connection *c,char *url){
FILE: app/http/http_helper.c
type MimeMap (line 29) | typedef struct {
function http_reset_buffer (line 52) | int ICACHE_FLASH_ATTR http_reset_buffer(http_connection *c){
function http_write_json (line 63) | int ICACHE_FLASH_ATTR http_write_json(http_connection *c,cJSON *root){
function http_end_line (line 75) | int ICACHE_FLASH_ATTR http_end_line(http_connection *c){
function http_SET_HEADER (line 80) | int ICACHE_FLASH_ATTR http_SET_HEADER(http_connection *c,const char * he...
function http_SET_CONTENT_LENGTH (line 111) | int ICACHE_FLASH_ATTR http_SET_CONTENT_LENGTH(http_connection *c,int len){
function http_HEADER (line 119) | int ICACHE_FLASH_ATTR http_HEADER(http_connection *c,const char *header,...
function http_end_headers (line 130) | int ICACHE_FLASH_ATTR http_end_headers(http_connection *c){
function http_request_start (line 157) | int ICACHE_FLASH_ATTR http_request_start(http_connection *c,const char *...
function http_request_GET (line 171) | int ICACHE_FLASH_ATTR http_request_GET(http_connection *c,const char *pa...
function http_request_POST (line 175) | int ICACHE_FLASH_ATTR http_request_POST(http_connection *c,const char *p...
function http_response_start (line 181) | int ICACHE_FLASH_ATTR http_response_start(http_connection *c){
function http_response_STATUS (line 188) | int ICACHE_FLASH_ATTR http_response_STATUS(http_connection *c,const char...
function http_response_OK (line 200) | int ICACHE_FLASH_ATTR http_response_OK(http_connection *c){
function http_response_BAD_REQUEST (line 205) | int ICACHE_FLASH_ATTR http_response_BAD_REQUEST(http_connection *c){
function http_response_NOT_FOUND (line 210) | int ICACHE_FLASH_ATTR http_response_NOT_FOUND(http_connection *c){
function http_response_REDIRECT (line 216) | int ICACHE_FLASH_ATTR http_response_REDIRECT(http_connection *c,const ch...
function http_websocket_HANDSHAKE (line 224) | int ICACHE_FLASH_ATTR http_websocket_HANDSHAKE(http_connection *c){
FILE: app/http/http_parser.c
type state (line 278) | enum state
type header_states (line 362) | enum header_states
type http_host_state (line 392) | enum http_host_state
function parse_url_char (line 477) | static enum state ICACHE_FLASH_ATTR parse_url_char(enum state s, const c...
function http_parser_execute (line 624) | size_t ICACHE_FLASH_ATTR http_parser_execute (http_parser *parser,
function http_message_needs_eof (line 2077) | int ICACHE_FLASH_ATTR http_message_needs_eof (const http_parser *parser)
function http_should_keep_alive (line 2099) | int ICACHE_FLASH_ATTR http_should_keep_alive (const http_parser *parser)
type http_method (line 2117) | enum http_method
function ICACHE_FLASH_ATTR (line 2123) | void ICACHE_FLASH_ATTR http_parser_init (http_parser *parser, enum http_...
function http_parser_settings_init (line 2133) | void ICACHE_FLASH_ATTR http_parser_settings_init(http_parser_settings *s...
type http_errno (line 2138) | enum http_errno
type http_errno (line 2143) | enum http_errno
function http_parse_host_char (line 2148) | static enum http_host_state ICACHE_FLASH_ATTR http_parse_host_char(enum ...
function http_parse_host (line 2212) | static int ICACHE_FLASH_ATTR http_parse_host(const char * buf, struct ht...
function http_parser_parse_url (line 2284) | int ICACHE_FLASH_ATTR http_parser_parse_url(const char *buf, size_t bufl...
function http_parser_pause (line 2382) | void ICACHE_FLASH_ATTR http_parser_pause(http_parser *parser, int paused) {
function http_body_is_final (line 2395) | int ICACHE_FLASH_ATTR http_body_is_final(const struct http_parser *parse...
function http_parser_version (line 2399) | unsigned long ICACHE_FLASH_ATTR http_parser_version(void) {
FILE: app/http/http_parser.h
type http_parser (line 58) | typedef struct http_parser http_parser;
type http_parser_settings (line 59) | typedef struct http_parser_settings http_parser_settings;
type http_method (line 115) | enum http_method
type http_parser_type (line 123) | enum http_parser_type { HTTP_REQUEST, HTTP_RESPONSE, HTTP_BOTH }
type flags (line 127) | enum flags
type http_errno (line 186) | enum http_errno {
type http_parser (line 196) | struct http_parser {
type http_parser_settings (line 226) | struct http_parser_settings {
type http_parser_url_fields (line 238) | enum http_parser_url_fields
type http_parser_url (line 257) | struct http_parser_url {
type http_parser_type (line 280) | enum http_parser_type
type http_method (line 305) | enum http_method
type http_errno (line 308) | enum http_errno
type http_errno (line 311) | enum http_errno
type http_parser_url (line 316) | struct http_parser_url
FILE: app/http/http_process.c
function http_execute_cgi (line 28) | void http_execute_cgi(http_connection *conn){
function http_transmit (line 40) | int ICACHE_FLASH_ATTR http_transmit(http_connection *c){
function http_nwrite (line 59) | int ICACHE_FLASH_ATTR http_nwrite(http_connection *c,const char * messag...
function http_write (line 100) | int ICACHE_FLASH_ATTR http_write(http_connection *c,const char * message){
function http_set_save_header (line 132) | void ICACHE_FLASH_ATTR http_set_save_header(http_connection *conn,const ...
function http_set_save_body (line 145) | void ICACHE_FLASH_ATTR http_set_save_body(http_connection *conn){
type http_parser_url_fields (line 161) | enum http_parser_url_fields
function http_parse_url (line 253) | void ICACHE_FLASH_ATTR http_parse_url(http_connection *c){
function on_message_begin (line 305) | static int ICACHE_FLASH_ATTR on_message_begin(http_parser *parser){
function on_url (line 312) | static int ICACHE_FLASH_ATTR on_url(http_parser *parser, const char *url...
function on_status (line 336) | static int ICACHE_FLASH_ATTR on_status(http_parser *parser, const char *...
function on_header_field (line 353) | static int ICACHE_FLASH_ATTR on_header_field(http_parser *parser, const ...
function on_header_value (line 378) | static int ICACHE_FLASH_ATTR on_header_value(http_parser *parser, const ...
function on_headers_complete (line 408) | static int ICACHE_FLASH_ATTR on_headers_complete(http_parser *parser){
function on_body (line 421) | static int ICACHE_FLASH_ATTR on_body(http_parser *parser, const char *at...
function on_websocket_data (line 467) | static int ICACHE_FLASH_ATTR on_websocket_data(http_parser *parser, char...
function on_message_complete (line 495) | static int ICACHE_FLASH_ATTR on_message_complete(http_parser *parser){
function http_connection (line 518) | static http_connection ICACHE_FLASH_ATTR *http_process_find_connection(v...
function http_process_free_connection (line 537) | void ICACHE_FLASH_ATTR http_process_free_connection(http_connection *conn){
function http_process_sent_cb (line 567) | static void ICACHE_FLASH_ATTR http_process_sent_cb(void *arg) {
function http_process_received_cb (line 592) | static void ICACHE_FLASH_ATTR http_process_received_cb(void *arg, char *...
function http_process_disconnect_cb (line 621) | static void ICACHE_FLASH_ATTR http_process_disconnect_cb(void *arg) {
function http_process_reconnect_cb (line 677) | static void ICACHE_FLASH_ATTR http_process_reconnect_cb(void *arg, sint8...
function http_connection (line 688) | http_connection ICACHE_FLASH_ATTR * http_new_connection(uint8_t in,struc...
function http_process_init (line 788) | static void ICACHE_FLASH_ATTR http_process_init(){
FILE: app/http/http_process.h
type espconn (line 64) | struct espconn
FILE: app/http/http_server.c
function http_send_response (line 32) | void ICACHE_FLASH_ATTR http_send_response(http_connection * conn){
function http_server_flag_check (line 51) | int ICACHE_FLASH_ATTR http_server_flag_check(http_connection *c,http_ser...
function http_server_cgi_execute (line 71) | int ICACHE_FLASH_ATTR http_server_cgi_execute(http_connection * conn){
function http_server_connect_callback (line 185) | void ICACHE_FLASH_ATTR http_server_connect_callback(void *arg) {
function http_server_init (line 199) | void ICACHE_FLASH_ATTR http_server_init() {
function http_server_bind_port (line 213) | void ICACHE_FLASH_ATTR http_server_bind_port(int port){
function http_server_bind_urls (line 229) | void ICACHE_FLASH_ATTR http_server_bind_urls(http_server_url *urls){
function http_server_rewrite (line 283) | void ICACHE_FLASH_ATTR http_server_rewrite(url_rewrite *rewrites){
function http_server_bind_domain (line 293) | void ICACHE_FLASH_ATTR http_server_bind_domain(const char * domain){
function http_server_enable_captive_portal (line 298) | void ICACHE_FLASH_ATTR http_server_enable_captive_portal(){
function http_server_enable_cors (line 303) | void ICACHE_FLASH_ATTR http_server_enable_cors(){
function http_server_start (line 308) | void ICACHE_FLASH_ATTR http_server_start(){
FILE: app/http/http_server.h
type http_server_url (line 25) | typedef struct {
type url_rewrite (line 33) | typedef struct{
type http_server_config (line 38) | typedef struct {
FILE: app/http/http_websocket_server.c
function ws_output_write_function (line 34) | static void ICACHE_FLASH_ATTR ws_output_write_function(const char * data...
function http_ws_handle_message (line 45) | static void http_ws_handle_message(http_connection *c,ws_frame *msg){
function http_ws_handle_connect (line 74) | int ICACHE_FLASH_ATTR http_ws_handle_connect(http_connection *c) {
function http_ws_cgi_execute (line 142) | static int ICACHE_FLASH_ATTR http_ws_cgi_execute(http_connection * c){
function http_ws_connect_callback (line 214) | static void ICACHE_FLASH_ATTR http_ws_connect_callback(void *arg) {
function http_ws_push_text (line 236) | void ICACHE_FLASH_ATTR http_ws_push_text(http_connection *c,char *msg,si...
function http_ws_push_bin (line 245) | void ICACHE_FLASH_ATTR http_ws_push_bin(http_connection *c,char *msg,siz...
function http_ws_server_init (line 254) | void ICACHE_FLASH_ATTR http_ws_server_init(http_callback connect,http_ca...
function http_ws_server_start (line 274) | void ICACHE_FLASH_ATTR http_ws_server_start(){
FILE: app/http/http_websocket_server.h
type http_ws_config (line 14) | typedef struct {
FILE: app/http/rofs.c
function memcpyAligned (line 27) | void ICACHE_FLASH_ATTR memcpyAligned(char *dst,const uint8 *src, int len) {
function RO_FILE (line 55) | RO_FILE* f_open(const char *fileName){
function f_read (line 90) | int f_read(RO_FILE *f,char * buff,int len){
function f_close (line 111) | void f_close(RO_FILE *file){
FILE: app/http/rofs.h
type RO_FILE_ENTRY (line 20) | typedef struct {
type RO_FS (line 29) | typedef struct {
type RO_FILE (line 37) | typedef struct {
FILE: app/http/websocket.c
function ws_write_frame (line 21) | void ICACHE_FLASH_ATTR ws_write_frame(ws_frame *frame,write_function w,v...
function ws_output_frame (line 64) | void ICACHE_FLASH_ATTR ws_output_frame(ws_frame *frame,enum ws_frame_typ...
function ws_parse_frame (line 80) | void ICACHE_FLASH_ATTR ws_parse_frame(ws_frame *frame,char * data,size_t...
FILE: app/http/websocket.h
type ws_frame_type (line 19) | enum ws_frame_type{
type ws_frame (line 30) | typedef struct{
type ws_frame_type (line 42) | enum ws_frame_type
FILE: app/http/ws_app.c
type ws_app_context (line 32) | struct ws_app_context {
function ws_app_send_packet (line 43) | static void ICACHE_FLASH_ATTR ws_app_send_packet(struct ws_app_context *...
function ws_app_msg_sent (line 78) | static int ICACHE_FLASH_ATTR ws_app_msg_sent(http_connection *c){
function ws_app_client_disconnected (line 99) | static int ICACHE_FLASH_ATTR ws_app_client_disconnected(http_connection...
function ws_app_client_connected (line 116) | static int ICACHE_FLASH_ATTR ws_app_client_connected(http_connection *c){
function ws_app_msg_received (line 129) | static int ICACHE_FLASH_ATTR ws_app_msg_received(http_connection *c){
function init_ws_server (line 182) | void ICACHE_FLASH_ATTR init_ws_server(){
FILE: app/include/arch/cc.h
type u8_t (line 52) | typedef unsigned char u8_t;
type s8_t (line 53) | typedef signed char s8_t;
type u16_t (line 54) | typedef unsigned short u16_t;
type s16_t (line 55) | typedef signed short s16_t;
type u32_t (line 56) | typedef unsigned long u32_t;
type s32_t (line 57) | typedef signed long s32_t;
type mem_ptr_t (line 58) | typedef unsigned long mem_ptr_t;
FILE: app/include/driver/key.h
type single_key_param (line 8) | struct single_key_param {
type keys_param (line 19) | struct keys_param {
type single_key_param (line 24) | struct single_key_param
type keys_param (line 25) | struct keys_param
FILE: app/include/driver/pwm.h
type pwm_single_param (line 6) | struct pwm_single_param {
type pwm_param (line 12) | struct pwm_param {
FILE: app/include/driver/uart.h
type UartBitsNum4Char (line 22) | typedef enum {
type UartStopBitsNum (line 29) | typedef enum {
type UartParityMode (line 35) | typedef enum {
type UartExistParity (line 41) | typedef enum {
type UartBautRate (line 46) | typedef enum {
type UartFlowCtrl (line 61) | typedef enum {
type RcvMsgBuffState (line 67) | typedef enum {
type RcvMsgBuff (line 73) | typedef struct {
type TrxMsgBuff (line 82) | typedef struct {
type RcvMsgState (line 87) | typedef enum {
type UartDevice (line 95) | typedef struct {
FILE: app/include/json/cJson.h
type cJSON (line 43) | typedef struct cJSON {
FILE: app/include/lwip/api.h
type netconn_type (line 83) | enum netconn_type {
type netconn_state (line 97) | enum netconn_state {
type netconn_evt (line 106) | enum netconn_evt {
type netconn_igmp (line 116) | enum netconn_igmp {
type ip_pcb (line 123) | struct ip_pcb
type tcp_pcb (line 124) | struct tcp_pcb
type udp_pcb (line 125) | struct udp_pcb
type raw_pcb (line 126) | struct raw_pcb
type netconn (line 127) | struct netconn
type api_msg_msg (line 128) | struct api_msg_msg
type netconn (line 131) | struct netconn
type netconn_evt (line 131) | enum netconn_evt
type netconn (line 134) | struct netconn {
type netconn (line 209) | struct
type netconn_type (line 210) | enum netconn_type
type netconn (line 212) | struct netconn
type netconn (line 216) | struct netconn
type netconn (line 221) | struct netconn
type netconn (line 222) | struct netconn
type netconn (line 223) | struct netconn
type netconn (line 224) | struct netconn
type netconn (line 226) | struct netconn
type netconn (line 226) | struct netconn
type netconn (line 227) | struct netconn
type netbuf (line 227) | struct netbuf
type netconn (line 228) | struct netconn
type pbuf (line 228) | struct pbuf
type netconn (line 229) | struct netconn
type netconn (line 230) | struct netconn
type netbuf (line 230) | struct netbuf
type netconn (line 232) | struct netconn
type netbuf (line 232) | struct netbuf
type netconn (line 233) | struct netconn
type netconn (line 235) | struct netconn
type netconn (line 236) | struct netconn
type netconn (line 239) | struct netconn
type netconn_igmp (line 240) | enum netconn_igmp
FILE: app/include/lwip/api_msg.h
type api_msg_msg (line 62) | struct api_msg_msg {
type api_msg (line 120) | struct api_msg {
type dns_api_msg (line 132) | struct dns_api_msg {
type api_msg_msg (line 145) | struct api_msg_msg
type api_msg_msg (line 146) | struct api_msg_msg
type api_msg_msg (line 147) | struct api_msg_msg
type api_msg_msg (line 148) | struct api_msg_msg
type api_msg_msg (line 149) | struct api_msg_msg
type api_msg_msg (line 150) | struct api_msg_msg
type api_msg_msg (line 151) | struct api_msg_msg
type api_msg_msg (line 152) | struct api_msg_msg
type api_msg_msg (line 153) | struct api_msg_msg
type api_msg_msg (line 154) | struct api_msg_msg
type api_msg_msg (line 155) | struct api_msg_msg
type api_msg_msg (line 156) | struct api_msg_msg
type api_msg_msg (line 158) | struct api_msg_msg
type netconn (line 165) | struct netconn
type netconn_type (line 165) | enum netconn_type
type netconn (line 166) | struct netconn
FILE: app/include/lwip/app/dhcpserver.h
type dhcps_state (line 6) | typedef struct dhcps_state{
type dhcps_msg (line 11) | typedef struct dhcps_msg {
type dhcps_lease (line 26) | struct dhcps_lease {
type dhcps_offer_option (line 32) | enum dhcps_offer_option{
type dhcps_pool (line 39) | struct dhcps_pool{
type list_node (line 45) | typedef struct _list_node{
type ip_info (line 98) | struct ip_info
FILE: app/include/lwip/app/espconn.h
type espconn_type (line 51) | enum espconn_type {
type espconn_state (line 60) | enum espconn_state {
type esp_tcp (line 70) | typedef struct _esp_tcp {
type esp_udp (line 81) | typedef struct _esp_udp {
type remot_info (line 88) | typedef struct _remot_info{
type espconn (line 99) | struct espconn {
type espconn_option (line 115) | enum espconn_option{
type espconn_level (line 124) | enum espconn_level{
type espconn_packet (line 130) | struct espconn_packet{
type espconn_buf (line 140) | typedef struct _espconn_buf{
type comon_pkt (line 149) | typedef struct _comon_pkt{
type espconn_msg (line 168) | typedef struct _espconn_msg{
type mdns_info (line 184) | struct mdns_info {
type espconn_sig (line 206) | enum espconn_sig {
type espconn (line 224) | struct espconn
type espconn (line 224) | struct espconn
type espconn (line 252) | struct espconn
type espconn (line 262) | struct espconn
type espconn (line 272) | struct espconn
type espconn_packet (line 272) | struct espconn_packet
type espconn (line 281) | struct espconn
type espconn (line 290) | struct espconn
type espconn (line 299) | struct espconn
type espconn (line 308) | struct espconn
type espconn (line 317) | struct espconn
type espconn (line 396) | struct espconn
type espconn (line 405) | struct espconn
type espconn (line 415) | struct espconn
type espconn (line 425) | struct espconn
type espconn (line 437) | struct espconn
type espconn (line 448) | struct espconn
type espconn (line 459) | struct espconn
type espconn (line 470) | struct espconn
type espconn (line 481) | struct espconn
type espconn (line 492) | struct espconn
type espconn (line 502) | struct espconn
type espconn (line 521) | struct espconn
type espconn (line 532) | struct espconn
type espconn (line 542) | struct espconn
type espconn (line 562) | struct espconn
type mdns_info (line 589) | struct mdns_info
FILE: app/include/lwip/app/espconn_tcp.h
type espconn (line 42) | struct espconn
type espconn (line 52) | struct espconn
FILE: app/include/lwip/app/espconn_udp.h
type espconn (line 17) | struct espconn
type espconn (line 35) | struct espconn
FILE: app/include/lwip/app/ping.h
type ping_option (line 50) | struct ping_option{
type ping_msg (line 59) | struct ping_msg{
type ping_resp (line 70) | struct ping_resp{
type ping_option (line 81) | struct ping_option
type ping_option (line 82) | struct ping_option
type ping_option (line 83) | struct ping_option
FILE: app/include/lwip/autoip.h
type autoip (line 81) | struct autoip
type netif (line 96) | struct netif
type autoip (line 96) | struct autoip
type netif (line 99) | struct netif
type netif (line 102) | struct netif
type netif (line 105) | struct netif
type etharp_hdr (line 105) | struct etharp_hdr
type netif (line 111) | struct netif
FILE: app/include/lwip/dhcp.h
type dhcp (line 29) | struct dhcp
function PACK_STRUCT_BEGIN (line 73) | PACK_STRUCT_BEGIN
type netif (line 109) | struct netif
type dhcp (line 109) | struct dhcp
type netif (line 112) | struct netif
type netif (line 114) | struct netif
type netif (line 116) | struct netif
type netif (line 118) | struct netif
type netif (line 120) | struct netif
type netif (line 122) | struct netif
type netif (line 124) | struct netif
type netif (line 128) | struct netif
FILE: app/include/lwip/dns.h
type local_hostlist_entry (line 82) | struct local_hostlist_entry {
FILE: app/include/lwip/err.h
type LWIP_ERR_T (line 45) | typedef LWIP_ERR_T err_t;
type s8_t (line 47) | typedef s8_t err_t;
FILE: app/include/lwip/icmp.h
type icmp_dur_type (line 56) | enum icmp_dur_type {
type icmp_te_type (line 65) | enum icmp_te_type {
function PACK_STRUCT_BEGIN (line 81) | PACK_STRUCT_BEGIN
type pbuf (line 105) | struct pbuf
type netif (line 105) | struct netif
type pbuf (line 106) | struct pbuf
type icmp_dur_type (line 106) | enum icmp_dur_type
type pbuf (line 107) | struct pbuf
type icmp_te_type (line 107) | enum icmp_te_type
FILE: app/include/lwip/igmp.h
type igmp_group (line 72) | struct igmp_group {
type netif (line 91) | struct netif
type netif (line 92) | struct netif
type netif (line 93) | struct netif
type igmp_group (line 94) | struct igmp_group
type netif (line 94) | struct netif
type pbuf (line 95) | struct pbuf
type netif (line 95) | struct netif
FILE: app/include/lwip/inet.h
type in_addr (line 44) | struct in_addr {
FILE: app/include/lwip/inet_chksum.h
type pbuf (line 74) | struct pbuf
type pbuf (line 75) | struct pbuf
type pbuf (line 78) | struct pbuf
FILE: app/include/lwip/ip.h
type ip_pcb (line 89) | struct ip_pcb {
function PACK_STRUCT_BEGIN (line 115) | PACK_STRUCT_BEGIN
type netif (line 163) | struct netif
type ip_hdr (line 165) | struct ip_hdr
type netif (line 172) | struct netif
type netif (line 173) | struct netif
type pbuf (line 175) | struct pbuf
type netif (line 175) | struct netif
type pbuf (line 176) | struct pbuf
type pbuf (line 178) | struct pbuf
type netif (line 180) | struct netif
type pbuf (line 182) | struct pbuf
type pbuf (line 186) | struct pbuf
type netif (line 187) | struct netif
type pbuf (line 204) | struct pbuf
FILE: app/include/lwip/ip_addr.h
type ip_addr (line 44) | struct ip_addr {
function PACK_STRUCT_BEGIN (line 53) | PACK_STRUCT_BEGIN
type ip_addr_t (line 64) | typedef struct ip_addr ip_addr_t;
type ip_addr_p_t (line 65) | typedef struct ip_addr_packed ip_addr_p_t;
function PACK_STRUCT_BEGIN (line 74) | PACK_STRUCT_BEGIN
type netif (line 84) | struct netif
type netif (line 203) | struct netif
type ip_info (line 247) | struct ip_info {
FILE: app/include/lwip/ip_frag.h
type ip_reassdata (line 54) | struct ip_reassdata {
type pbuf (line 65) | struct pbuf
type pbuf (line 65) | struct pbuf
type pbuf_custom_ref (line 73) | struct pbuf_custom_ref {
type pbuf (line 81) | struct pbuf
type netif (line 81) | struct netif
FILE: app/include/lwip/mdns.h
type mdns_info (line 91) | struct mdns_info {
FILE: app/include/lwip/mem.h
type mem_size_t (line 46) | typedef size_t mem_size_t;
type u32_t (line 116) | typedef u32_t mem_size_t;
type u16_t (line 119) | typedef u16_t mem_size_t;
FILE: app/include/lwip/memp.h
type memp_pool_helper_t (line 51) | typedef enum {
type memp_malloc_helper (line 94) | struct memp_malloc_helper
FILE: app/include/lwip/memp_std.h
type raw_pcb (line 34) | struct raw_pcb
type udp_pcb (line 38) | struct udp_pcb
type tcp_pcb (line 42) | struct tcp_pcb
type tcp_pcb_listen (line 43) | struct tcp_pcb_listen
type tcp_seg (line 44) | struct tcp_seg
type ip_reassdata (line 48) | struct ip_reassdata
type pbuf_custom_ref (line 51) | struct pbuf_custom_ref
type netbuf (line 55) | struct netbuf
type netconn (line 56) | struct netconn
type tcpip_msg (line 60) | struct tcpip_msg
type tcpip_msg (line 62) | struct tcpip_msg
type etharp_q_entry (line 67) | struct etharp_q_entry
type igmp_group (line 71) | struct igmp_group
type sys_timeo (line 75) | struct sys_timeo
type mib_list_rootnode (line 79) | struct mib_list_rootnode
type mib_list_node (line 80) | struct mib_list_node
type snmp_varbind (line 81) | struct snmp_varbind
type pppoe_softc (line 91) | struct pppoe_softc
FILE: app/include/lwip/netbuf.h
type netbuf (line 48) | struct netbuf {
type netbuf (line 64) | struct netbuf
type netbuf (line 65) | struct netbuf
type netbuf (line 66) | struct netbuf
type netbuf (line 67) | struct netbuf
type netbuf (line 68) | struct netbuf
type netbuf (line 70) | struct netbuf
type netbuf (line 71) | struct netbuf
type netbuf (line 73) | struct netbuf
type netbuf (line 75) | struct netbuf
type netbuf (line 76) | struct netbuf
FILE: app/include/lwip/netdb.h
type hostent (line 72) | struct hostent {
type addrinfo (line 83) | struct addrinfo {
type hostent (line 100) | struct hostent
type hostent (line 101) | struct hostent
type hostent (line 102) | struct hostent
type addrinfo (line 103) | struct addrinfo
type addrinfo (line 106) | struct addrinfo
type addrinfo (line 107) | struct addrinfo
FILE: app/include/lwip/netif.h
type dhcp (line 46) | struct dhcp
type autoip (line 49) | struct autoip
type err_t (line 102) | typedef err_t (*netif_init_fn)(struct netif *netif);
type err_t (line 109) | typedef err_t (*netif_input_fn)(struct pbuf *p, struct netif *inp);
type err_t (line 118) | typedef err_t (*netif_output_fn)(struct netif *netif, struct pbuf *p,
type err_t (line 126) | typedef err_t (*netif_linkoutput_fn)(struct netif *netif, struct pbuf *p);
type netif (line 128) | struct netif
type err_t (line 130) | typedef err_t (*netif_igmp_mac_filter_fn)(struct netif *netif,
type netif (line 139) | struct netif {
type netif (line 254) | struct netif
type netif (line 256) | struct netif
type netif (line 260) | struct netif
type netif (line 260) | struct netif
type netif (line 264) | struct netif
type netif (line 266) | struct netif
type netif (line 272) | struct netif
type netif (line 274) | struct netif
type netif (line 276) | struct netif
type netif (line 277) | struct netif
type netif (line 278) | struct netif
type netif (line 280) | struct netif
type netif (line 281) | struct netif
type netif (line 286) | struct netif
type netif (line 289) | struct netif
type netif (line 290) | struct netif
type netif (line 295) | struct netif
type netif (line 309) | struct netif
type pbuf (line 309) | struct pbuf
type netif (line 310) | struct netif
FILE: app/include/lwip/netifapi.h
type netif (line 44) | struct netif
type err_t (line 45) | typedef err_t (*netifapi_errt_fn)(struct netif *netif);
type netifapi_msg_msg (line 47) | struct netifapi_msg_msg {
type netifapi_msg (line 69) | struct netifapi_msg {
type netif (line 76) | struct netif
type netif (line 84) | struct netif
type netif (line 89) | struct netif
FILE: app/include/lwip/pbuf.h
type pbuf_layer (line 50) | typedef enum {
type pbuf_type (line 57) | typedef enum {
type pbuf (line 76) | struct pbuf {
type pbuf (line 114) | struct pbuf
type pbuf_custom (line 117) | struct pbuf_custom {
type pbuf (line 128) | struct pbuf
type pbuf (line 130) | struct pbuf
type pbuf_custom (line 131) | struct pbuf_custom
type pbuf (line 134) | struct pbuf
type pbuf (line 135) | struct pbuf
type pbuf (line 136) | struct pbuf
type pbuf (line 137) | struct pbuf
type pbuf (line 138) | struct pbuf
type pbuf (line 139) | struct pbuf
type pbuf (line 139) | struct pbuf
type pbuf (line 140) | struct pbuf
type pbuf (line 140) | struct pbuf
type pbuf (line 141) | struct pbuf
type pbuf (line 141) | struct pbuf
type pbuf (line 142) | struct pbuf
type pbuf (line 142) | struct pbuf
type pbuf (line 143) | struct pbuf
type pbuf (line 144) | struct pbuf
type pbuf (line 145) | struct pbuf
type pbuf (line 145) | struct pbuf
type pbuf (line 147) | struct pbuf
type pbuf (line 151) | struct pbuf
type pbuf (line 152) | struct pbuf
type pbuf (line 153) | struct pbuf
type pbuf (line 154) | struct pbuf
FILE: app/include/lwip/raw.h
type raw_pcb (line 48) | struct raw_pcb
type u8_t (line 60) | typedef u8_t (*raw_recv_fn)(void *arg, struct raw_pcb *pcb, struct pbuf *p,
type raw_pcb (line 63) | struct raw_pcb {
type raw_pcb (line 79) | struct raw_pcb
type raw_pcb (line 80) | struct raw_pcb
type raw_pcb (line 81) | struct raw_pcb
type raw_pcb (line 82) | struct raw_pcb
type raw_pcb (line 84) | struct raw_pcb
type raw_pcb (line 85) | struct raw_pcb
type pbuf (line 85) | struct pbuf
type raw_pcb (line 86) | struct raw_pcb
type pbuf (line 86) | struct pbuf
type pbuf (line 89) | struct pbuf
type netif (line 89) | struct netif
FILE: app/include/lwip/snmp.h
type udp_pcb (line 44) | struct udp_pcb
type netif (line 45) | struct netif
type snmp_ifType (line 50) | enum snmp_ifType {
type snmp_obj_id (line 94) | struct snmp_obj_id
type snmp_obj_id (line 102) | struct snmp_obj_id
type snmp_obj_id (line 103) | struct snmp_obj_id
type netif (line 112) | struct netif
type netif (line 113) | struct netif
type netif (line 114) | struct netif
type netif (line 115) | struct netif
type netif (line 116) | struct netif
type netif (line 117) | struct netif
type netif (line 118) | struct netif
type netif (line 119) | struct netif
type netif (line 124) | struct netif
type netif (line 125) | struct netif
type netif (line 145) | struct netif
type netif (line 146) | struct netif
type netif (line 147) | struct netif
type netif (line 148) | struct netif
type udp_pcb (line 194) | struct udp_pcb
type udp_pcb (line 195) | struct udp_pcb
type snmp_obj_id (line 225) | struct snmp_obj_id
FILE: app/include/lwip/snmp_asn1.h
type pbuf (line 77) | struct pbuf
type pbuf (line 78) | struct pbuf
type pbuf (line 79) | struct pbuf
type pbuf (line 80) | struct pbuf
type pbuf (line 81) | struct pbuf
type snmp_obj_id (line 81) | struct snmp_obj_id
type pbuf (line 82) | struct pbuf
type pbuf (line 88) | struct pbuf
type pbuf (line 89) | struct pbuf
type pbuf (line 90) | struct pbuf
type pbuf (line 91) | struct pbuf
type pbuf (line 92) | struct pbuf
type pbuf (line 93) | struct pbuf
FILE: app/include/lwip/snmp_msg.h
type snmp_varbind (line 79) | struct snmp_varbind
type snmp_varbind_root (line 112) | struct snmp_varbind_root
type snmp_resp_header_lengths (line 125) | struct snmp_resp_header_lengths
type snmp_trap_header_lengths (line 159) | struct snmp_trap_header_lengths
type snmp_msg_pstat (line 221) | struct snmp_msg_pstat
type snmp_msg_trap (line 260) | struct snmp_msg_trap
type snmp_msg_trap (line 288) | struct snmp_msg_trap
type snmp_varbind (line 296) | struct snmp_varbind
type snmp_obj_id (line 296) | struct snmp_obj_id
type snmp_varbind (line 297) | struct snmp_varbind
type snmp_varbind_root (line 298) | struct snmp_varbind_root
type snmp_varbind_root (line 299) | struct snmp_varbind_root
type snmp_varbind (line 299) | struct snmp_varbind
type snmp_varbind (line 300) | struct snmp_varbind
type snmp_varbind_root (line 300) | struct snmp_varbind_root
type snmp_msg_pstat (line 304) | struct snmp_msg_pstat
type snmp_obj_id (line 305) | struct snmp_obj_id
FILE: app/include/lwip/snmp_structs.h
type obj_def (line 72) | struct obj_def
type snmp_name_ptr (line 88) | struct snmp_name_ptr
type mib_node (line 106) | struct mib_node
type mib_scalar_node (line 124) | typedef struct mib_node mib_scalar_node;
type mib_array_node (line 128) | struct mib_array_node
type mib_ram_array_node (line 146) | struct mib_ram_array_node
type mib_list_node (line 162) | struct mib_list_node
type mib_list_rootnode (line 172) | struct mib_list_rootnode
type mib_external_node (line 192) | struct mib_external_node
type mib_array_node (line 235) | struct mib_array_node
type obj_def (line 238) | struct obj_def
type obj_def (line 239) | struct obj_def
type obj_def (line 240) | struct obj_def
type obj_def (line 241) | struct obj_def
type netif (line 245) | struct netif
type netif (line 246) | struct netif
type mib_list_node (line 248) | struct mib_list_node
type mib_list_node (line 249) | struct mib_list_node
type mib_list_rootnode (line 250) | struct mib_list_rootnode
type mib_list_rootnode (line 251) | struct mib_list_rootnode
type mib_list_rootnode (line 253) | struct mib_list_rootnode
type mib_list_node (line 253) | struct mib_list_node
type mib_list_rootnode (line 254) | struct mib_list_rootnode
type mib_list_node (line 254) | struct mib_list_node
type mib_list_rootnode (line 255) | struct mib_list_rootnode
type mib_list_rootnode (line 255) | struct mib_list_rootnode
type mib_list_node (line 255) | struct mib_list_node
type mib_node (line 257) | struct mib_node
type mib_node (line 257) | struct mib_node
type snmp_name_ptr (line 257) | struct snmp_name_ptr
type mib_node (line 258) | struct mib_node
type mib_node (line 258) | struct mib_node
type snmp_obj_id (line 258) | struct snmp_obj_id
type snmp_obj_id (line 260) | struct snmp_obj_id
FILE: app/include/lwip/sockets.h
type sockaddr_in (line 51) | struct sockaddr_in {
type sockaddr (line 59) | struct sockaddr {
type linger (line 108) | struct linger {
type ip_mreq (line 173) | typedef struct ip_mreq {
type fd_set (line 298) | typedef struct fd_set {
type timeval (line 311) | struct timeval {
type sockaddr (line 319) | struct sockaddr
type sockaddr (line 320) | struct sockaddr
type sockaddr (line 322) | struct sockaddr
type sockaddr (line 323) | struct sockaddr
type sockaddr (line 327) | struct sockaddr
type sockaddr (line 332) | struct sockaddr
type sockaddr (line 335) | struct sockaddr
type timeval (line 339) | struct timeval
FILE: app/include/lwip/stats.h
type stats_proto (line 58) | struct stats_proto {
type stats_igmp (line 73) | struct stats_igmp {
type stats_mem (line 90) | struct stats_mem {
type stats_syselem (line 101) | struct stats_syselem {
type stats_sys (line 107) | struct stats_sys {
type stats_ (line 113) | struct stats_ {
type stats_ (line 149) | struct stats_
type stats_proto (line 274) | struct stats_proto
type stats_igmp (line 275) | struct stats_igmp
type stats_mem (line 276) | struct stats_mem
type stats_mem (line 277) | struct stats_mem
type stats_sys (line 278) | struct stats_sys
FILE: app/include/lwip/sys.h
type u8_t (line 47) | typedef u8_t sys_sem_t;
type u8_t (line 48) | typedef u8_t sys_mutex_t;
type u8_t (line 49) | typedef u8_t sys_mbox_t;
function u32_t (line 235) | static inline u32_t sys_now(void)
FILE: app/include/lwip/tcp.h
type tcp_pcb (line 50) | struct tcp_pcb
type err_t (line 61) | typedef err_t (*tcp_accept_fn)(void *arg, struct tcp_pcb *newpcb, err_t ...
type err_t (line 73) | typedef err_t (*tcp_recv_fn)(void *arg, struct tcp_pcb *tpcb,
type err_t (line 87) | typedef err_t (*tcp_sent_fn)(void *arg, struct tcp_pcb *tpcb,
type err_t (line 99) | typedef err_t (*tcp_poll_fn)(void *arg, struct tcp_pcb *tpcb);
type err_t (line 125) | typedef err_t (*tcp_connected_fn)(void *arg, struct tcp_pcb *tpcb, err_t...
type tcp_state (line 127) | enum tcp_state {
type tcp_state (line 159) | enum tcp_state
function local_port (line 165) | local_port
type tcp_pcb_listen (line 282) | struct tcp_pcb_listen {
type lwip_event (line 296) | enum lwip_event {
type tcp_pcb (line 305) | struct tcp_pcb
type lwip_event (line 306) | enum lwip_event
type pbuf (line 307) | struct pbuf
type tcp_pcb (line 314) | struct tcp_pcb
type tcp_pcb (line 316) | struct tcp_pcb
type tcp_pcb (line 317) | struct tcp_pcb
type tcp_pcb (line 318) | struct tcp_pcb
type tcp_pcb (line 319) | struct tcp_pcb
type tcp_pcb (line 320) | struct tcp_pcb
type tcp_pcb (line 321) | struct tcp_pcb
type tcp_pcb (line 339) | struct tcp_pcb
type tcp_pcb (line 340) | struct tcp_pcb
type tcp_pcb (line 342) | struct tcp_pcb
type tcp_pcb (line 345) | struct tcp_pcb
type tcp_pcb (line 345) | struct tcp_pcb
type tcp_pcb (line 348) | struct tcp_pcb
type tcp_pcb (line 349) | struct tcp_pcb
type tcp_pcb (line 350) | struct tcp_pcb
type tcp_pcb (line 356) | struct tcp_pcb
type tcp_pcb (line 359) | struct tcp_pcb
type tcp_pcb (line 365) | struct tcp_pcb
type tcp_state (line 368) | enum tcp_state
FILE: app/include/lwip/tcp_impl.h
type pbuf (line 65) | struct pbuf
type netif (line 65) | struct netif
type tcp_pcb (line 67) | struct tcp_pcb
type tcp_pcb (line 68) | struct tcp_pcb
type tcp_pcb (line 69) | struct tcp_pcb
type tcp_pcb (line 70) | struct tcp_pcb
type tcp_pcb (line 71) | struct tcp_pcb
type tcp_pcb (line 72) | struct tcp_pcb
type tcp_pcb (line 73) | struct tcp_pcb
function PACK_STRUCT_BEGIN (line 157) | PACK_STRUCT_BEGIN
type tcp_seg (line 278) | struct tcp_seg {
type tcp_pcb (line 311) | struct tcp_pcb
type tcp_pcb_listen (line 316) | struct tcp_pcb_listen
type tcp_pcb (line 317) | struct tcp_pcb
type tcp_pcb (line 319) | struct tcp_pcb
type tcp_pcb (line 321) | struct tcp_pcb
type tcp_pcb (line 324) | struct tcp_pcb
type tcp_pcb (line 326) | struct tcp_pcb
type tcp_pcb (line 401) | struct tcp_pcb
type tcp_pcb (line 401) | struct tcp_pcb
type tcp_pcb (line 402) | struct tcp_pcb
type tcp_pcb (line 403) | struct tcp_pcb
type tcp_pcb (line 403) | struct tcp_pcb
type tcp_seg (line 405) | struct tcp_seg
type tcp_seg (line 406) | struct tcp_seg
type tcp_seg (line 407) | struct tcp_seg
type tcp_seg (line 407) | struct tcp_seg
type tcp_pcb (line 425) | struct tcp_pcb
type tcp_pcb (line 426) | struct tcp_pcb
type tcp_pcb (line 428) | struct tcp_pcb
type tcp_seg (line 428) | struct tcp_seg
type tcp_pcb (line 436) | struct tcp_pcb
type tcp_pcb (line 437) | struct tcp_pcb
type tcp_pcb (line 444) | struct tcp_pcb
type pbuf (line 444) | struct pbuf
type tcp_hdr (line 448) | struct tcp_hdr
type tcp_state (line 450) | enum tcp_state
FILE: app/include/lwip/tcpip.h
type api_msg (line 83) | struct api_msg
type api_msg (line 85) | struct api_msg
type pbuf (line 89) | struct pbuf
type netif (line 89) | struct netif
type netifapi_msg (line 92) | struct netifapi_msg
type netifapi_msg (line 94) | struct netifapi_msg
type pbuf (line 102) | struct pbuf
type tcpip_msg_type (line 110) | enum tcpip_msg_type {
type tcpip_msg (line 125) | struct tcpip_msg {
FILE: app/include/lwip/timers.h
type sys_timeo (line 65) | struct sys_timeo {
FILE: app/include/lwip/udp.h
function PACK_STRUCT_BEGIN (line 54) | PACK_STRUCT_BEGIN
type udp_pcb (line 71) | struct udp_pcb
type udp_pcb (line 87) | struct udp_pcb
type pbuf (line 87) | struct pbuf
type udp_pcb (line 91) | struct udp_pcb {
type udp_pcb (line 119) | struct udp_pcb
type udp_pcb (line 123) | struct udp_pcb
type udp_pcb (line 124) | struct udp_pcb
type udp_pcb (line 125) | struct udp_pcb
type udp_pcb (line 127) | struct udp_pcb
type udp_pcb (line 129) | struct udp_pcb
type udp_pcb (line 130) | struct udp_pcb
type udp_pcb (line 132) | struct udp_pcb
type pbuf (line 132) | struct pbuf
type netif (line 134) | struct netif
type udp_pcb (line 135) | struct udp_pcb
type pbuf (line 135) | struct pbuf
type udp_pcb (line 137) | struct udp_pcb
type pbuf (line 137) | struct pbuf
type udp_pcb (line 140) | struct udp_pcb
type pbuf (line 140) | struct pbuf
type netif (line 142) | struct netif
type udp_pcb (line 144) | struct udp_pcb
type pbuf (line 144) | struct pbuf
type udp_pcb (line 147) | struct udp_pcb
type pbuf (line 147) | struct pbuf
type pbuf (line 155) | struct pbuf
type netif (line 155) | struct netif
type udp_hdr (line 160) | struct udp_hdr
FILE: app/include/mem_manager.h
type xBlockLink (line 49) | typedef struct A_BLOCK_LINK
FILE: app/include/netif/etharp.h
function PACK_STRUCT_BEGIN (line 58) | PACK_STRUCT_BEGIN
function PACK_STRUCT_BEGIN (line 70) | PACK_STRUCT_BEGIN
function PACK_STRUCT_BEGIN (line 92) | PACK_STRUCT_BEGIN
function PACK_STRUCT_BEGIN (line 113) | PACK_STRUCT_BEGIN
type etharp_q_entry (line 178) | struct etharp_q_entry {
type netif (line 186) | struct netif
type eth_addr (line 187) | struct eth_addr
type netif (line 188) | struct netif
type pbuf (line 188) | struct pbuf
type netif (line 189) | struct netif
type pbuf (line 189) | struct pbuf
type netif (line 190) | struct netif
type netif (line 196) | struct netif
type eth_addr (line 199) | struct eth_addr
type netif (line 204) | struct netif
type eth_addr (line 204) | struct eth_addr
type eth_addr (line 205) | struct eth_addr
type eth_addr (line 206) | struct eth_addr
type eth_addr (line 207) | struct eth_addr
type pbuf (line 213) | struct pbuf
type netif (line 213) | struct netif
type eth_addr (line 217) | struct eth_addr
type eth_addr (line 228) | struct eth_addr {
type eth_hdr (line 233) | struct eth_hdr {
FILE: app/include/netif/if_llc.h
type llc (line 46) | struct llc {
type frmrinfo (line 88) | struct frmrinfo {
type llc (line 118) | struct llc
FILE: app/include/netif/ppp_oe.h
function PACK_STRUCT_BEGIN (line 82) | PACK_STRUCT_BEGIN
function PACK_STRUCT_BEGIN (line 97) | PACK_STRUCT_BEGIN
type pppoe_softc (line 147) | struct pppoe_softc {
type netif (line 174) | struct netif
type pppoe_softc (line 174) | struct pppoe_softc
type netif (line 175) | struct netif
type pppoe_softc (line 177) | struct pppoe_softc
type pppoe_softc (line 178) | struct pppoe_softc
type netif (line 180) | struct netif
type pbuf (line 180) | struct pbuf
type netif (line 181) | struct netif
type pbuf (line 181) | struct pbuf
type pppoe_softc (line 183) | struct pppoe_softc
type pbuf (line 183) | struct pbuf
FILE: app/include/netif/wlan_lwip_if.h
type netif (line 16) | struct netif
type ieee80211_conn (line 16) | struct ieee80211_conn
type ip_info (line 16) | struct ip_info
type netif (line 17) | struct netif
type netif (line 20) | struct netif
type pbuf (line 20) | struct pbuf
type ieee80211_conn (line 22) | struct ieee80211_conn
FILE: app/include/ssl/app/espconn_secure.h
type espconn (line 13) | struct espconn
type espconn (line 22) | struct espconn
type espconn (line 33) | struct espconn
type espconn (line 42) | struct espconn
FILE: app/include/ssl/app/espconn_ssl.h
type ssl_msg (line 9) | typedef struct _ssl_msg {
type espconn (line 26) | struct espconn
type espconn (line 36) | struct espconn
FILE: app/include/ssl/ssl_bigint_impl.h
type comp (line 51) | typedef uint8_t comp;
type long_comp (line 52) | typedef uint16_t long_comp;
type slong_comp (line 53) | typedef int16_t slong_comp;
type comp (line 60) | typedef uint16_t comp;
type long_comp (line 61) | typedef uint32_t long_comp;
type slong_comp (line 62) | typedef int32_t slong_comp;
type comp (line 74) | typedef uint32_t comp;
type long_comp (line 75) | typedef uint64_t long_comp;
type sint64_t (line 76) | typedef sint64_t slong_comp;
type _bigint (line 83) | struct _bigint
type bigint (line 92) | typedef struct _bigint bigint;
type BI_CTX (line 98) | typedef struct /**< A big integer "session" context. */
FILE: app/include/ssl/ssl_crypto.h
type AES_CTX (line 70) | typedef struct aes_key_st
type AES_MODE (line 78) | typedef enum
type RC4_CTX (line 95) | typedef struct
type SHA1_CTX (line 113) | typedef struct
type MD2_CTX (line 132) | typedef struct
type MD5_CTX (line 150) | typedef struct
type RSA_CTX (line 173) | typedef struct
FILE: app/include/ssl/ssl_crypto_misc.h
type _x509_ctx (line 67) | struct _x509_ctx
type X509_CTX (line 82) | typedef struct _x509_ctx X509_CTX;
type CA_CERT_CTX (line 85) | typedef struct
FILE: app/include/ssl/ssl_os_int.h
type UINT8 (line 45) | typedef UINT8 uint8_t;
type INT8 (line 46) | typedef INT8 int8_t;
type UINT16 (line 47) | typedef UINT16 uint16_t;
type INT16 (line 48) | typedef INT16 int16_t;
type UINT32 (line 49) | typedef UINT32 uint32_t;
type INT32 (line 50) | typedef INT32 int32_t;
type UINT64 (line 51) | typedef UINT64 uint64_t;
type INT64 (line 52) | typedef INT64 int64_t;
FILE: app/include/ssl/ssl_os_port.h
type timeval (line 58) | struct timeval {
FILE: app/include/ssl/ssl_ssl.h
type time_t (line 71) | typedef long time_t;
type tcp_pcb (line 230) | struct tcp_pcb
type tcp_pcb (line 251) | struct tcp_pcb
FILE: app/include/ssl/ssl_tls1.h
type cipher_info_t (line 117) | typedef struct
type _SSLObjLoader (line 130) | struct _SSLObjLoader
type SSLObjLoader (line 136) | typedef struct _SSLObjLoader SSLObjLoader;
type SSL_SESSION (line 138) | typedef struct
type SSL_CERT (line 145) | typedef struct
type DISPOSABLE_CTX (line 151) | typedef struct
type _SSL (line 163) | struct _SSL
type SSL (line 205) | typedef struct _SSL SSL;
type _SSL_CTX (line 207) | struct _SSL_CTX
type SSL_CTX (line 230) | typedef struct _SSL_CTX SSL_CTX;
type SSLCTX (line 233) | typedef struct _SSL_CTX SSLCTX;
type tcp_pcb (line 238) | struct tcp_pcb
FILE: app/include/xtensa/hal.h
type XTHAL_STATE (line 905) | typedef struct xthal_state {
FILE: app/include/xtensa/xtruntime.h
type _xtos_handler_func (line 53) | typedef _xtos_handler_func *_xtos_handler;
FILE: app/json/cJson.c
function cJSON_GetErrorPtr (line 54) | cJSON_GetErrorPtr(void)
function cJSON_strcasecmp (line 59) | static int ICACHE_FLASH_ATTR
function cJSON_New_Item (line 95) | cJSON_New_Item(void)
function cJSON_Delete (line 107) | void ICACHE_FLASH_ATTR
function parse_hex4 (line 206) | static unsigned ICACHE_FLASH_ATTR
function cJSON_GetArraySize (line 1030) | int ICACHE_FLASH_ATTR cJSON_GetArraySize(cJSON *array)
function suffix_object (line 1063) | static void ICACHE_FLASH_ATTR suffix_object(cJSON *prev, cJSON *item)
function cJSON (line 1069) | static cJSON *ICACHE_FLASH_ATTR create_reference(cJSON *item)
function cJSON_AddItemToArray (line 1085) | void ICACHE_FLASH_ATTR cJSON_AddItemToArray(cJSON *array, cJSON *item)
function cJSON_AddItemToObject (line 1103) | void ICACHE_FLASH_ATTR cJSON_AddItemToObject(cJSON *object, const char *...
function cJSON_AddItemReferenceToArray (line 1116) | void ICACHE_FLASH_ATTR cJSON_AddItemReferenceToArray(cJSON *array, cJS...
function cJSON_AddItemReferenceToObject (line 1120) | void ICACHE_FLASH_ATTR cJSON_AddItemReferenceToObject(cJSON *object, c...
function cJSON_DeleteItemFromArray (line 1152) | void ICACHE_FLASH_ATTR cJSON_DeleteItemFromArray(cJSON *array, int which)
function cJSON_DeleteItemFromObject (line 1172) | void ICACHE_FLASH_ATTR
function cJSON_ReplaceItemInArray (line 1179) | void ICACHE_FLASH_ATTR
function cJSON_ReplaceItemInObject (line 1208) | void ICACHE_FLASH_ATTR
function cJSON_Minify (line 1468) | void ICACHE_FLASH_ATTR cJSON_Minify(char *json)
FILE: app/libc/c_locale.h
type lconv (line 25) | struct lconv
type lconv (line 55) | struct lconv
FILE: app/libc/c_math.c
function floor (line 4) | double floor(double x)
function pow (line 9) | double pow(double x, double y)
function atan (line 131) | double atan(double x)
function cos (line 135) | double cos(double x)
function sin (line 139) | double sin(double x)
function tan (line 143) | double tan(double x)
function tanh (line 147) | double tanh(double x)
function frexp (line 151) | double frexp(double x, int *y)
function modf (line 155) | double modf(double x, double *y)
function ceil (line 159) | double ceil(double x)
function fabs (line 163) | double fabs(double x)
function floor (line 167) | double floor(double x)
function acos (line 177) | double acos(double x)
function asin (line 181) | double asin(double x)
function atan2 (line 185) | double atan2(double x, double y)
function cosh (line 189) | double cosh(double x)
function sinh (line 193) | double sinh(double x)
function exp (line 197) | double exp(double x)
function ldexp (line 201) | double ldexp(double x, int y)
function log (line 205) | double log(double x)
function log10 (line 209) | double log10(double x)
function pow (line 213) | double pow(double x, double y)
function sqrt (line 217) | double sqrt(double x)
function fmod (line 221) | double fmod(double x, double y)
FILE: app/libc/c_stdint.h
function namespace (line 25) | namespace std {
FILE: app/libc/c_stdio.c
function uli2a (line 123) | static int uli2a(unsigned long int num, unsigned int base, int uc, char ...
function li2a (line 148) | static int li2a (long num, char *bf)
function ui2a (line 163) | static int ui2a(unsigned int num, unsigned int base, int uc, char *bf)
function i2a (line 188) | static int i2a (int num, char *bf)
function d2a (line 202) | static int d2a(double num, char *bf)
function a2d (line 269) | int a2d(char ch)
function a2i (line 280) | char a2i(char ch, char **src, int base, int *nump)
function putchw (line 296) | static void putchw(void *putp, putcf putf, int n, char z, char *bf)
function c_format (line 309) | void c_format(void *putp, putcf putf, char *fmt, va_list va)
function putcp (line 414) | static void putcp(void *p, char c)
function c_sprintf (line 420) | void c_sprintf(char *s, char *fmt, ...)
function nprintf (line 429) | void nprintf(const char *s,size_t size)
FILE: app/libc/c_stdlib.c
function c_strtod (line 52) | double c_strtod(const char *string, char **endPtr)
FILE: app/libc/c_string.c
function os_strcasecmp (line 49) | int os_strcasecmp(const char *s1, const char *s2)
FILE: app/lwip/api/api_lib.c
type netconn (line 67) | struct netconn
type netconn_type (line 68) | enum netconn_type
type netconn (line 70) | struct netconn
type api_msg (line 71) | struct api_msg
function err_t (line 102) | err_t
function err_t (line 134) | err_t
function err_t (line 165) | err_t
function err_t (line 191) | err_t
function err_t (line 216) | err_t
function err_t (line 240) | err_t
function err_t (line 276) | err_t
function err_t (line 341) | static err_t
function err_t (line 433) | err_t
function err_t (line 450) | err_t
function netconn_recved (line 507) | void
function err_t (line 539) | err_t
function err_t (line 557) | err_t
function err_t (line 587) | err_t
function err_t (line 622) | static err_t
function err_t (line 648) | err_t
function err_t (line 661) | err_t
function err_t (line 678) | err_t
function err_t (line 712) | err_t
FILE: app/lwip/api/api_msg.c
type netconn (line 65) | struct netconn
type netconn (line 66) | struct netconn
function u8_t (line 77) | static u8_t
type udp_pcb (line 144) | struct udp_pcb
type pbuf (line 144) | struct pbuf
type netbuf (line 147) | struct netbuf
type netconn (line 148) | struct netconn
type netconn (line 157) | struct netconn
type netbuf (line 171) | struct netbuf
type ip_hdr (line 182) | struct ip_hdr
type udp_hdr (line 184) | struct udp_hdr
function err_t (line 215) | static err_t
function err_t (line 276) | static err_t
function err_t (line 312) | static err_t
function err_tcp (line 346) | static void
function setup_tcp (line 412) | static void
function err_t (line 431) | static err_t
function pcb_new (line 481) | static void
function do_newconn (line 539) | void
type netconn (line 563) | struct netconn
type netconn_type (line 564) | enum netconn_type
type netconn (line 566) | struct netconn
type netconn (line 569) | struct netconn
function netconn_free (line 644) | void
function netconn_drain (line 669) | static void
function do_close_internal (line 734) | static void
function do_delconn (line 819) | void
function do_bind (line 885) | void
function err_t (line 924) | static err_t
function do_connect (line 976) | void
function do_disconnect (line 1034) | void
function do_listen (line 1056) | void
function do_send (line 1110) | void
function do_recv (line 1163) | void
function err_t (line 1198) | static err_t
function do_write (line 1317) | void
function do_getaddr (line 1372) | void
function do_close (line 1425) | void
function do_join_leave_group (line 1466) | void
function do_dns_found (line 1500) | static void
function do_gethostbyname (line 1526) | void
FILE: app/lwip/api/netbuf.c
type netbuf (line 55) | struct
type netbuf (line 58) | struct netbuf
type netbuf (line 60) | struct netbuf
function netbuf_delete (line 86) | void
type netbuf (line 107) | struct netbuf
function netbuf_free (line 130) | void
function err_t (line 149) | err_t
function netbuf_chain (line 173) | void
function err_t (line 192) | err_t
function s8_t (line 217) | s8_t
function netbuf_first (line 238) | void
FILE: app/lwip/api/netdb.c
type gethostbyname_r_helper (line 51) | struct gethostbyname_r_helper {
type hostent (line 84) | struct hostent
function lwip_gethostbyname_r (line 161) | int
function lwip_freeaddrinfo (line 234) | void
function lwip_getaddrinfo (line 265) | int
FILE: app/lwip/api/netifapi.c
function do_netifapi_netif_add (line 44) | void
function do_netifapi_netif_set_addr (line 64) | void
function do_netifapi_netif_common (line 79) | void
function err_t (line 97) | err_t
function err_t (line 125) | err_t
function err_t (line 147) | err_t
FILE: app/lwip/api/sockets.c
type lwip_sock (line 64) | struct lwip_sock {
type lwip_select_cb (line 86) | struct lwip_select_cb {
type lwip_setgetsockopt_data (line 105) | struct lwip_setgetsockopt_data {
type lwip_sock (line 126) | struct lwip_sock
type lwip_select_cb (line 128) | struct lwip_select_cb
type netconn (line 175) | struct netconn
type netconn_evt (line 175) | enum netconn_evt
function lwip_socket_init (line 183) | void
type lwip_sock (line 194) | struct lwip_sock
type lwip_sock (line 197) | struct lwip_sock
type lwip_sock (line 222) | struct lwip_sock
function alloc_socket (line 242) | static int
function free_socket (line 279) | static void
function lwip_accept (line 311) | int
function lwip_bind (line 400) | int
function lwip_close (line 440) | int
function lwip_connect (line 466) | int
function lwip_listen (line 520) | int
function lwip_recvfrom (line 548) | int
function lwip_read (line 733) | int
function lwip_recv (line 739) | int
function lwip_send (line 745) | int
type sockaddr (line 789) | struct sockaddr
type lwip_sock (line 791) | struct lwip_sock
type sockaddr_in (line 794) | struct sockaddr_in
type netbuf (line 797) | struct netbuf
type sockaddr_in (line 819) | struct sockaddr_in
type sockaddr_in (line 822) | struct sockaddr_in
type pbuf (line 827) | struct pbuf
function lwip_socket (line 930) | int
function lwip_write (line 986) | int
function lwip_selscan (line 1008) | static int
function lwip_select (line 1070) | int
function event_callback (line 1229) | static void
function lwip_shutdown (line 1349) | int
function lwip_getaddrname (line 1390) | static int
function lwip_getpeername (line 1425) | int
function lwip_getsockname (line 1431) | int
function lwip_getsockopt (line 1437) | int
function lwip_getsockopt_internal (line 1635) | static void
function lwip_setsockopt (line 1838) | int
function lwip_setsockopt_internal (line 2045) | static void
function lwip_ioctl (line 2249) | int
function lwip_fcntl (line 2315) | int
FILE: app/lwip/api/tcpip.c
function tcpip_thread (line 73) | static void
function err_t (line 155) | err_t
function err_t (line 205) | err_t
function err_t (line 241) | err_t
function err_t (line 270) | err_t
function err_t (line 300) | err_t
function err_t (line 328) | err_t
function err_t (line 354) | err_t
function err_t (line 384) | err_t
function tcpip_init (line 403) | void
function pbuf_free_int (line 428) | static void
function err_t (line 441) | err_t
function err_t (line 454) | err_t
FILE: app/lwip/app/dhcpserver.c
type udp_pcb (line 24) | struct udp_pcb
type ip_addr (line 25) | struct ip_addr
type ip_addr (line 26) | struct ip_addr
type ip_addr (line 27) | struct ip_addr
type ip_addr (line 28) | struct ip_addr
type dhcps_lease (line 30) | struct dhcps_lease
function node_insert_to_list (line 43) | void ICACHE_FLASH_ATTR node_insert_to_list(list_node **phead, list_node*...
function node_remove_from_list (line 83) | void ICACHE_FLASH_ATTR node_remove_from_list(list_node **phead, list_nod...
type ip_addr (line 132) | struct ip_addr
type ip_info (line 167) | struct ip_info
type ip_info (line 168) | struct ip_info
function create_msg (line 247) | static void ICACHE_FLASH_ATTR create_msg(struct dhcps_msg *m)
function send_offer (line 279) | static void ICACHE_FLASH_ATTR send_offer(struct dhcps_msg *m)
function send_nak (line 345) | static void ICACHE_FLASH_ATTR send_nak(struct dhcps_msg *m)
function send_ack (line 411) | static void ICACHE_FLASH_ATTR send_ack(struct dhcps_msg *m)
function parse_options (line 482) | static uint8_t ICACHE_FLASH_ATTR parse_options(uint8_t *optptr, sint16_t...
function sint16_t (line 575) | static sint16_t ICACHE_FLASH_ATTR parse_msg(struct dhcps_msg *m, u16_t len)
function handle_dhcp (line 741) | static void ICACHE_FLASH_ATTR handle_dhcp(void *arg,
function wifi_softap_init_dhcps_lease (line 840) | static void ICACHE_FLASH_ATTR wifi_softap_init_dhcps_lease(uint32 ip)
function dhcps_start (line 883) | void ICACHE_FLASH_ATTR dhcps_start(struct ip_info *info)
function dhcps_stop (line 912) | dhcps_stop(void)
function wifi_softap_set_dhcps_lease (line 945) | bool ICACHE_FLASH_ATTR wifi_softap_set_dhcps_lease(struct dhcps_lease *p...
function wifi_softap_get_dhcps_lease (line 1000) | bool ICACHE_FLASH_ATTR wifi_softap_get_dhcps_lease(struct dhcps_lease *p...
function kill_oldest_dhcps_pool (line 1033) | kill_oldest_dhcps_pool(void)
function dhcps_coarse_tmr (line 1059) | dhcps_coarse_tmr(void)
function wifi_softap_set_dhcps_offer_option (line 1087) | bool ICACHE_FLASH_ATTR wifi_softap_set_dhcps_offer_option(uint8 level, v...
function wifi_softap_set_dhcps_lease_time (line 1109) | bool ICACHE_FLASH_ATTR wifi_softap_set_dhcps_lease_time(uint32 minute)
function wifi_softap_reset_dhcps_lease_time (line 1128) | wifi_softap_reset_dhcps_lease_time(void)
function wifi_softap_get_dhcps_lease_time (line 1143) | wifi_softap_get_dhcps_lease_time(void) // minute
FILE: app/lwip/app/espconn.c
type espconn_packet (line 36) | struct espconn_packet
function espconn_copy_partial (line 45) | void ICACHE_FLASH_ATTR
function espconn_list_creat (line 76) | void ICACHE_FLASH_ATTR espconn_list_creat(espconn_msg **phead, espconn_m...
function espconn_list_delete (line 104) | void ICACHE_FLASH_ATTR espconn_list_delete(espconn_msg **phead, espconn_...
function espconn_pbuf_create (line 136) | void ICACHE_FLASH_ATTR espconn_pbuf_create(espconn_buf **phead, espconn_...
function espconn_pbuf_delete (line 158) | void ICACHE_FLASH_ATTR espconn_pbuf_delete(espconn_buf **phead, espconn_...
function espconn_find_connection (line 186) | bool ICACHE_FLASH_ATTR espconn_find_connection(struct espconn *pespconn,...
function uint8 (line 238) | static uint8 ICACHE_FLASH_ATTR
function sint8 (line 259) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 333) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 367) | sint8 ICACHE_FLASH_ATTR
function sint16 (line 447) | sint16 ICACHE_FLASH_ATTR
type espconn (line 475) | struct espconn
function espconn_tcp_get_wnd (line 483) | espconn_tcp_get_wnd(void)
function sint8 (line 498) | sint8 ICACHE_FLASH_ATTR espconn_tcp_set_wnd(uint8 num)
function espconn_tcp_get_mss (line 513) | espconn_tcp_get_mss(void)
function espconn_tcp_get_max_con (line 528) | espconn_tcp_get_max_con(void)
function sint8 (line 543) | sint8 ICACHE_FLASH_ATTR espconn_tcp_set_max_con(uint8 num)
function espconn_tcp_get_max_retran (line 558) | espconn_tcp_get_max_retran(void)
function sint8 (line 573) | sint8 ICACHE_FLASH_ATTR espconn_tcp_set_max_retran(uint8 num)
function espconn_tcp_get_max_syn (line 588) | espconn_tcp_get_max_syn(void)
function sint8 (line 603) | sint8 ICACHE_FLASH_ATTR espconn_tcp_set_max_syn(uint8 num)
function sint8 (line 618) | sint8 ICACHE_FLASH_ATTR espconn_tcp_get_max_con_allow(struct espconn *es...
function sint8 (line 640) | sint8 ICACHE_FLASH_ATTR espconn_tcp_set_max_con_allow(struct espconn *es...
function sint8 (line 665) | sint8 ICACHE_FLASH_ATTR espconn_tcp_set_buf_count(struct espconn *espcon...
function uint8 (line 689) | static uint8 ICACHE_FLASH_ATTR espconn_tcp_get_buf_count(espconn_buf *pe...
function sint8 (line 711) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 731) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 750) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 769) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 788) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 806) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 824) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 872) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 903) | sint8 ICACHE_FLASH_ATTR espconn_regist_time(struct espconn *espconn, uin...
function sint8 (line 939) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 970) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 1022) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 1058) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 1095) | sint8 ICACHE_FLASH_ATTR espconn_set_keepalive(struct espconn *espconn, u...
function sint8 (line 1140) | sint8 ICACHE_FLASH_ATTR espconn_get_keepalive(struct espconn *espconn, u...
function sint8 (line 1183) | sint8 ICACHE_FLASH_ATTR
function espconn_port (line 1212) | espconn_port(void)
function err_t (line 1254) | err_t ICACHE_FLASH_ATTR
function espconn_dns_setserver (line 1268) | void ICACHE_FLASH_ATTR
FILE: app/lwip/app/espconn_mdns.c
function espconn_mdns_enable (line 25) | espconn_mdns_enable(void)
function espconn_mdns_disable (line 37) | espconn_mdns_disable(void)
function espconn_mdns_set_hostname (line 49) | void ICACHE_FLASH_ATTR
function espconn_mdns_get_hostname (line 63) | espconn_mdns_get_hostname(void)
function espconn_mdns_set_servername (line 73) | void ICACHE_FLASH_ATTR
function espconn_mdns_get_servername (line 85) | espconn_mdns_get_servername(void)
function espconn_mdns_server_register (line 96) | espconn_mdns_server_register(void)
function espconn_mdns_server_unregister (line 107) | espconn_mdns_server_unregister(void)
function espconn_mdns_close (line 119) | espconn_mdns_close(void)
function espconn_mdns_init (line 130) | void ICACHE_FLASH_ATTR
FILE: app/lwip/app/espconn_tcp.c
type espconn_packet (line 33) | struct espconn_packet
type tcp_pcb (line 34) | struct tcp_pcb
type tcp_pcb (line 39) | struct tcp_pcb
type pbuf (line 39) | struct pbuf
type tcp_pcb (line 41) | struct tcp_pcb
type tcp_pcb (line 44) | struct tcp_pcb
type pbuf (line 44) | struct pbuf
type tcp_pcb (line 46) | struct tcp_pcb
function espconn_kill_oldest (line 56) | espconn_kill_oldest(void)
function espconn_kill_oldest_pcb (line 115) | espconn_kill_oldest_pcb(void)
function espconn_kill_pcb (line 150) | void ICACHE_FLASH_ATTR espconn_kill_pcb(u16_t port)
type tcp_pcb (line 185) | struct tcp_pcb
type tcp_pcb (line 191) | struct tcp_pcb
function espconn_tcp_reconnect (line 228) | static void ICACHE_FLASH_ATTR
function espconn_tcp_disconnect_successful (line 286) | static void ICACHE_FLASH_ATTR
function espconn_Task (line 387) | static void ICACHE_FLASH_ATTR
function err_t (line 433) | err_t ICACHE_FLASH_ATTR
function espconn_tcp_disconnect (line 498) | void ICACHE_FLASH_ATTR espconn_tcp_disconnect(espconn_msg *pdiscon)
function espconn_client_close (line 519) | static void ICACHE_FLASH_ATTR
function sint8 (line 544) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 569) | sint8 ICACHE_FLASH_ATTR
function err_t (line 608) | static err_t ICACHE_FLASH_ATTR
function err_t (line 663) | err_t ICACHE_FLASH_ATTR espconn_tcp_write(void *arg)
function espconn_tcp_finish (line 696) | static void ICACHE_FLASH_ATTR espconn_tcp_finish(void *arg)
function err_t (line 733) | static err_t ICACHE_FLASH_ATTR
function espconn_client_err (line 756) | static void ICACHE_FLASH_ATTR
function err_t (line 821) | static err_t ICACHE_FLASH_ATTR
function sint8 (line 873) | sint8 ICACHE_FLASH_ATTR
function espconn_server_close (line 945) | static void ICACHE_FLASH_ATTR
function err_t (line 979) | static err_t ICACHE_FLASH_ATTR
function err_t (line 1043) | static err_t ICACHE_FLASH_ATTR
function err_t (line 1070) | static err_t ICACHE_FLASH_ATTR
function esponn_server_err (line 1123) | static void ICACHE_FLASH_ATTR
function err_t (line 1190) | static err_t ICACHE_FLASH_ATTR
function sint8 (line 1272) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 1327) | sint8 ICACHE_FLASH_ATTR espconn_tcp_delete(struct espconn *pdeletecon)
function espconn_init (line 1371) | espconn_init(void)
FILE: app/lwip/app/espconn_udp.c
type send_opt (line 32) | enum send_opt{
function espconn_data_sentcb (line 36) | static void ICACHE_FLASH_ATTR espconn_data_sentcb(struct espconn *pespconn)
function espconn_data_sent (line 47) | static void ICACHE_FLASH_ATTR espconn_data_sent(void *arg, enum send_opt...
function err_t (line 80) | err_t ICACHE_FLASH_ATTR
function err_t (line 182) | err_t ICACHE_FLASH_ATTR
function espconn_udp_recv (line 282) | static void ICACHE_FLASH_ATTR
function espconn_udp_disconnect (line 344) | void ICACHE_FLASH_ATTR espconn_udp_disconnect(espconn_msg *pdiscon)
function sint8 (line 368) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 401) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 419) | sint8 ICACHE_FLASH_ATTR
FILE: app/lwip/app/netio.c
type netio_state (line 67) | struct netio_state {
type tcp_pcb (line 84) | struct tcp_pcb
type pbuf (line 84) | struct pbuf
function netio_close (line 86) | static void ICACHE_FLASH_ATTR
function err_t (line 115) | static err_t ICACHE_FLASH_ATTR
function err_t (line 251) | static err_t ICACHE_FLASH_ATTR
function err_t (line 303) | static err_t ICACHE_FLASH_ATTR
function err_t (line 321) | static err_t ICACHE_FLASH_ATTR
function netio_init (line 359) | netio_init(void)
FILE: app/lwip/app/ping.c
function ping_timeout (line 74) | static void ICACHE_FLASH_ATTR ping_timeout(void* arg)
function ping_prepare_echo (line 89) | static void ICACHE_FLASH_ATTR
function ping_prepare_er (line 113) | static void ICACHE_FLASH_ATTR
function u8_t (line 125) | static u8_t ICACHE_FLASH_ATTR
function ping_send (line 196) | static void ICACHE_FLASH_ATTR
function ping_coarse_tmr (line 223) | static void ICACHE_FLASH_ATTR
function ping_raw_init (line 263) | static bool ICACHE_FLASH_ATTR
function ping_start (line 285) | bool ICACHE_FLASH_ATTR
function ping_regist_recv (line 309) | bool ICACHE_FLASH_ATTR
function ping_regist_sent (line 319) | bool ICACHE_FLASH_ATTR
FILE: app/lwip/core/def.c
function u16_t (line 63) | u16_t
function u16_t (line 75) | u16_t
function u32_t (line 87) | u32_t
function u32_t (line 102) | u32_t
FILE: app/lwip/core/dhcp.c
type netif (line 142) | struct netif
type netif (line 143) | struct netif
type netif (line 144) | struct netif
type netif (line 146) | struct netif
type netif (line 148) | struct netif
type netif (line 149) | struct netif
type dhcp (line 150) | struct dhcp
type udp_pcb (line 153) | struct udp_pcb
type pbuf (line 153) | struct pbuf
type netif (line 156) | struct netif
type netif (line 157) | struct netif
type netif (line 158) | struct netif
type netif (line 162) | struct netif
type dhcp (line 162) | struct dhcp
type dhcp (line 164) | struct dhcp
type dhcp (line 166) | struct dhcp
type dhcp (line 168) | struct dhcp
type dhcp (line 169) | struct dhcp
type dhcp (line 170) | struct dhcp
type dhcp (line 172) | struct dhcp
function dhcp_handle_nak (line 186) | static void ICACHE_FLASH_ATTR
function dhcp_check (line 214) | static void ICACHE_FLASH_ATTR
function dhcp_handle_offer (line 241) | static void ICACHE_FLASH_ATTR
function err_t (line 272) | static err_t ICACHE_FLASH_ATTR
function dhcp_coarse_tmr (line 344) | void ICACHE_FLASH_ATTR
function dhcp_fine_tmr (line 376) | void ICACHE_FLASH_ATTR
function dhcp_timeout (line 419) | static void ICACHE_FLASH_ATTR
function dhcp_t1_timeout (line 482) | static void ICACHE_FLASH_ATTR
function dhcp_t2_timeout (line 504) | static void ICACHE_FLASH_ATTR
function dhcp_handle_ack (line 525) | static void ICACHE_FLASH_ATTR
function dhcp_set_struct (line 604) | void ICACHE_FLASH_ATTR
function dhcp_cleanup (line 624) | void ICACHE_FLASH_ATTR dhcp_cleanup(struct netif *netif)
function err_t (line 646) | err_t ICACHE_FLASH_ATTR
function dhcp_inform (line 728) | void ICACHE_FLASH_ATTR
function dhcp_network_changed (line 782) | void ICACHE_FLASH_ATTR
function dhcp_arp_reply (line 820) | void ICACHE_FLASH_ATTR dhcp_arp_reply(struct netif *netif, ip_addr_t *addr)
function err_t (line 848) | static err_t ICACHE_FLASH_ATTR
function err_t (line 888) | static err_t ICACHE_FLASH_ATTR
function dhcp_bind (line 964) | static void ICACHE_FLASH_ATTR
function err_t (line 1070) | err_t ICACHE_FLASH_ATTR
function err_t (line 1133) | static err_t ICACHE_FLASH_ATTR
function err_t (line 1193) | static err_t ICACHE_FLASH_ATTR
function err_t (line 1235) | err_t ICACHE_FLASH_ATTR
function dhcp_stop (line 1290) | void ICACHE_FLASH_ATTR
function dhcp_set_state (line 1322) | static void ICACHE_FLASH_ATTR
function dhcp_option (line 1337) | static void ICACHE_FLASH_ATTR
function dhcp_option_byte (line 1348) | static void ICACHE_FLASH_ATTR
function dhcp_option_short (line 1355) | static void ICACHE_FLASH_ATTR
function dhcp_option_long (line 1363) | static void ICACHE_FLASH_ATTR
function err_t (line 1383) | static err_t ICACHE_FLASH_ATTR
function dhcp_recv (line 1582) | static void ICACHE_FLASH_ATTR
function err_t (line 1686) | static err_t ICACHE_FLASH_ATTR
function dhcp_delete_msg (line 1777) | static void ICACHE_FLASH_ATTR
function dhcp_option_trailer (line 1798) | static void ICACHE_FLASH_ATTR
FILE: app/lwip/core/dns.c
function PACK_STRUCT_BEGIN (line 132) | PACK_STRUCT_BEGIN
type dns_query (line 151) | struct dns_query {
type dns_answer (line 161) | struct dns_answer {
type dns_table_entry (line 172) | struct dns_table_entry {
type local_hostlist_entry (line 192) | struct local_hostlist_entry
type udp_pcb (line 215) | struct udp_pcb
type pbuf (line 215) | struct pbuf
type udp_pcb (line 223) | struct udp_pcb
type dns_table_entry (line 225) | struct dns_table_entry
function dns_init (line 235) | void ICACHE_FLASH_ATTR
function dns_setserver (line 276) | void ICACHE_FLASH_ATTR
function ip_addr_t (line 292) | ip_addr_t ICACHE_FLASH_ATTR
function dns_tmr (line 307) | dns_tmr(void)
function dns_init_local (line 316) | static void ICACHE_FLASH_ATTR
function u32_t (line 351) | static u32_t ICACHE_FLASH_ATTR
function dns_local_removehost (line 382) | int ICACHE_FLASH_ATTR
function err_t (line 417) | err_t ICACHE_FLASH_ATTR
function u32_t (line 453) | static u32_t ICACHE_FLASH_ATTR
function u8_t (line 496) | static u8_t ICACHE_FLASH_ATTR
function err_t (line 563) | static err_t ICACHE_FLASH_ATTR
function dns_check_entry (line 639) | static void ICACHE_FLASH_ATTR
function dns_check_entries (line 722) | dns_check_entries(void)
function dns_recv (line 736) | static void ICACHE_FLASH_ATTR
function err_t (line 868) | static err_t ICACHE_FLASH_ATTR
function err_t (line 944) | err_t ICACHE_FLASH_ATTR
FILE: app/lwip/core/init.c
function lwip_sanity_check (line 215) | lwip_sanity_check(void)
function lwip_init (line 259) | void
FILE: app/lwip/core/ipv4/autoip.c
type netif (line 108) | struct netif
type netif (line 111) | struct netif
type netif (line 114) | struct netif
type netif (line 117) | struct netif
type netif (line 120) | struct netif
type netif (line 123) | struct netif
function autoip_init (line 128) | void
function autoip_set_struct (line 140) | void
function autoip_restart (line 157) | static void
function autoip_handle_arp_conflict (line 167) | static void
function autoip_create_addr (line 203) | static void
function err_t (line 236) | static err_t
function err_t (line 249) | static err_t
function err_t (line 262) | static err_t
function err_t (line 292) | err_t
function autoip_start_probing (line 340) | static void
function autoip_network_changed (line 374) | void
function err_t (line 388) | err_t
function autoip_tmr (line 399) | void
function autoip_arp_reply (line 485) | void
FILE: app/lwip/core/ipv4/icmp.c
type pbuf (line 66) | struct pbuf
function icmp_input (line 77) | void
function icmp_dest_unreach (line 257) | void
function icmp_time_exceeded (line 271) | void
function icmp_send_response (line 287) | static void ICACHE_FLASH_ATTR
FILE: app/lwip/core/ipv4/igmp.c
function PACK_STRUCT_BEGIN (line 129) | PACK_STRUCT_BEGIN
type igmp_group (line 142) | struct igmp_group
type netif (line 142) | struct netif
type igmp_group (line 143) | struct igmp_group
type igmp_group (line 144) | struct igmp_group
type igmp_group (line 145) | struct igmp_group
type igmp_group (line 146) | struct igmp_group
type igmp_group (line 147) | struct igmp_group
type pbuf (line 148) | struct pbuf
type netif (line 148) | struct netif
type igmp_group (line 149) | struct igmp_group
type igmp_group (line 152) | struct igmp_group
function igmp_init (line 160) | void
function igmp_dump_group_list (line 173) | void
function err_t (line 195) | err_t
function err_t (line 227) | err_t
function igmp_report_groups (line 271) | void
type igmp_group (line 294) | struct igmp_group
type netif (line 295) | struct netif
type igmp_group (line 297) | struct igmp_group
type igmp_group (line 320) | struct igmp_group
type netif (line 321) | struct netif
type igmp_group (line 323) | struct igmp_group
type igmp_group (line 333) | struct igmp_group
function err_t (line 359) | static err_t
function igmp_input (line 393) | void
function err_t (line 519) | err_t
function err_t (line 589) | err_t
function igmp_tmr (line 659) | void
function igmp_timeout (line 681) | static void
function igmp_start_timer (line 702) | static void
function igmp_stop_timer (line 718) | static void
function igmp_delaying_member (line 730) | static void
function err_t (line 760) | static err_t
function igmp_send (line 777) | static void
FILE: app/lwip/core/ipv4/inet_chksum.c
function u16_t (line 80) | static u16_t ICACHE_FLASH_ATTR
function u16_t (line 134) | static u16_t ICACHE_FLASH_ATTR
function u16_t (line 190) | static u16_t ICACHE_FLASH_ATTR
function u16_t (line 271) | u16_t
function u16_t (line 331) | u16_t
function u16_t (line 395) | u16_t
function u16_t (line 408) | u16_t
function u16_t (line 444) | u16_t
FILE: app/lwip/core/ipv4/ip.c
type netif (line 100) | struct netif
type ip_hdr (line 105) | struct ip_hdr
type netif (line 123) | struct netif
type netif (line 126) | struct netif
type netif (line 142) | struct netif
type netif (line 168) | struct netif
type netif (line 170) | struct netif
function ip_forward (line 212) | static void ICACHE_FLASH_ATTR
type pbuf (line 295) | struct pbuf
type netif (line 295) | struct netif
type ip_hdr (line 297) | struct ip_hdr
type netif (line 298) | struct netif
type ip_hdr (line 309) | struct ip_hdr
type udp_hdr (line 441) | struct udp_hdr
type udp_hdr (line 441) | struct udp_hdr
type ip_hdr (line 500) | struct ip_hdr
function err_t (line 624) | err_t
function err_t (line 639) | err_t ip_output_if_opt(struct pbuf *p, ip_addr_t *src, ip_addr_t *dest,
function err_t (line 800) | err_t
function err_t (line 839) | err_t
function ip_debug_print (line 869) | void
FILE: app/lwip/core/ipv4/ip_addr.c
function u8_t (line 54) | u8_t
function u8_t (line 89) | u8_t
function u32_t (line 129) | u32_t
function ipaddr_aton (line 151) | int
FILE: app/lwip/core/ipv4/ip_frag.c
function PACK_STRUCT_BEGIN (line 91) | PACK_STRUCT_BEGIN
type ip_reassdata (line 108) | struct ip_reassdata
type ip_reassdata (line 112) | struct ip_reassdata
type ip_reassdata (line 112) | struct ip_reassdata
type ip_reassdata (line 113) | struct ip_reassdata
type ip_reassdata (line 113) | struct ip_reassdata
function ip_reass_tmr (line 121) | void
function ip_reass_free_complete_datagram (line 157) | static int
function ip_reass_remove_oldest_datagram (line 220) | static int
type ip_reassdata (line 268) | struct ip_reassdata
type ip_hdr (line 269) | struct ip_hdr
type ip_reassdata (line 271) | struct ip_reassdata
type ip_reassdata (line 273) | struct ip_reassdata
type ip_reassdata (line 277) | struct ip_reassdata
type ip_reassdata (line 287) | struct ip_reassdata
function ip_reass_dequeue_datagram (line 303) | static void ICACHE_FLASH_ATTR
function ip_reass_chain_frag_into_datagram_and_validate (line 330) | static int ICACHE_FLASH_ATTR
type pbuf (line 475) | struct pbuf
type pbuf (line 476) | struct pbuf
type pbuf (line 478) | struct pbuf
type ip_hdr (line 479) | struct ip_hdr
type ip_reassdata (line 480) | struct ip_reassdata
type ip_reass_helper (line 481) | struct ip_reass_helper
type ip_reassdata (line 484) | struct ip_reassdata
type ip_hdr (line 489) | struct ip_hdr
type ip_reass_helper (line 573) | struct ip_reass_helper
type ip_hdr (line 576) | struct ip_hdr
type ip_reass_helper (line 588) | struct ip_reass_helper
type pbuf_custom_ref (line 623) | struct pbuf_custom_ref
function ip_frag_alloc_pbuf_custom_ref (line 624) | ip_frag_alloc_pbuf_custom_ref(void)
function ip_frag_free_pbuf_custom_ref (line 630) | static void ICACHE_FLASH_ATTR
function ipfrag_free_pbuf_custom (line 639) | static void ICACHE_FLASH_ATTR
function err_t (line 666) | err_t
FILE: app/lwip/core/mdns.c
function PACK_STRUCT_BEGIN (line 124) | PACK_STRUCT_BEGIN
function PACK_STRUCT_BEGIN (line 139) | PACK_STRUCT_BEGIN
function PACK_STRUCT_BEGIN (line 150) | PACK_STRUCT_BEGIN
function PACK_STRUCT_BEGIN (line 162) | PACK_STRUCT_BEGIN
function PACK_STRUCT_BEGIN (line 170) | PACK_STRUCT_BEGIN
type udp_pcb (line 184) | struct udp_pcb
type pbuf (line 184) | struct pbuf
type ip_addr (line 185) | struct ip_addr
type udp_pcb (line 196) | struct udp_pcb
type ip_addr (line 198) | struct ip_addr
type ip_addr (line 199) | struct ip_addr
function getPcb (line 208) | void ICACHE_FLASH_ATTR
function u8_t (line 224) | static u8_t ICACHE_FLASH_ATTR
function err_t (line 259) | static err_t ICACHE_FLASH_ATTR
function err_t (line 549) | static err_t ICACHE_FLASH_ATTR
function mdns_recv (line 837) | static void ICACHE_FLASH_ATTR
function mdns_close (line 901) | mdns_close(void)
function mdns_set_name (line 907) | void ICACHE_FLASH_ATTR
function mdns_enable (line 915) | mdns_enable(void)
function mdns_disable (line 923) | mdns_disable(void)
function mdns_get_hostname (line 934) | mdns_get_hostname(void) {
function mdns_set_hostname (line 944) | void ICACHE_FLASH_ATTR
function mdns_set_servername (line 958) | void ICACHE_FLASH_ATTR
function mdns_get_servername (line 969) | mdns_get_servername(void) {
function mdns_server_unregister (line 978) | mdns_server_unregister(void) {
function mdns_server_register (line 999) | mdns_server_register(void) {
function mdns_reg (line 1011) | void ICACHE_FLASH_ATTR
function mdns_init (line 1027) | void ICACHE_FLASH_ATTR
FILE: app/lwip/core/mem.c
type memp_malloc_helper (line 81) | struct memp_malloc_helper
type memp_malloc_helper (line 83) | struct memp_malloc_helper
type memp_malloc_helper (line 99) | struct memp_malloc_helper
function mem_free (line 128) | void
type mem (line 155) | struct mem {
type mem (line 190) | struct mem
type mem (line 192) | struct mem
function plug_holes (line 234) | static void ICACHE_FLASH_ATTR
function mem_init (line 272) | void
function mem_free (line 309) | void
type mem (line 372) | struct mem
type mem (line 402) | struct mem
type mem (line 420) | struct mem
type mem (line 429) | struct mem
type mem (line 431) | struct mem
type mem (line 443) | struct mem
type mem (line 456) | struct mem
type mem (line 465) | struct mem
type mem (line 496) | struct mem
type mem (line 532) | struct mem
type mem (line 533) | struct mem
type mem (line 563) | struct mem
type mem (line 572) | struct mem
type mem (line 593) | struct mem
FILE: app/lwip/core/memp.c
type memp (line 66) | struct memp {
type memp (line 117) | struct memp
function memp_sanity (line 185) | memp_sanity(void)
function memp_overflow_check_element_overflow (line 219) | static void ICACHE_FLASH_ATTR
function memp_overflow_check_element_underflow (line 252) | static void ICACHE_FLASH_ATTR
function memp_overflow_check_all (line 284) | memp_overflow_check_all(void)
function memp_overflow_init (line 311) | memp_overflow_init(void)
function memp_init (line 340) | void
function memp_malloc_fn (line 393) | memp_malloc(memp_t type)
function memp_free (line 437) | void
function memp_dump (line 475) | void memp_dump(void)
FILE: app/lwip/core/netif.c
type netif (line 75) | struct netif
type netif (line 76) | struct netif
type netif (line 79) | struct netif
function err_t (line 88) | static err_t ICACHE_FLASH_ATTR
function netif_init (line 103) | void
type netif (line 136) | struct netif
type netif (line 137) | struct netif
function netif_set_addr (line 222) | void
function netif_remove (line 236) | void
type netif (line 286) | struct netif
type netif (line 289) | struct netif
function netif_set_ipaddr (line 319) | void
function netif_set_gw (line 384) | void
function netif_set_netmask (line 405) | void
function netif_set_default (line 426) | void
function netif_set_up (line 450) | void netif_set_up(struct netif *netif)
function netif_set_down (line 487) | void netif_set_down(struct netif *netif)
function netif_set_status_callback (line 508) | void netif_set_status_callback(struct netif *netif, netif_status_callbac...
function netif_set_link_up (line 519) | void netif_set_link_up(struct netif *netif )
function netif_set_link_down (line 558) | void netif_set_link_down(struct netif *netif )
function netif_set_link_callback (line 570) | void netif_set_link_callback(struct netif *netif, netif_status_callback_...
function err_t (line 593) | err_t
function netif_poll (line 681) | void
function netif_poll_all (line 746) | void
FILE: app/lwip/core/pbuf.c
function pbuf_free_ooseq_new (line 103) | void ICACHE_FLASH_ATTR
function pbuf_free_ooseq (line 156) | static void ICACHE_FLASH_ATTR
function pbuf_pool_is_empty (line 180) | pbuf_pool_is_empty(void)
type pbuf (line 233) | struct pbuf
type pbuf (line 236) | struct pbuf
type pbuf (line 297) | struct pbuf
type pbuf (line 330) | struct pbuf
type pbuf (line 366) | struct pbuf
type pbuf (line 388) | struct pbuf
type pbuf (line 428) | struct pbuf
type pbuf_custom (line 429) | struct pbuf_custom
function pbuf_realloc (line 491) | void
function u8_t (line 572) | u8_t
function u8_t (line 684) | u8_t
function u8_t (line 781) | u8_t
function pbuf_ref (line 800) | void
function pbuf_cat (line 822) | void
function pbuf_chain (line 863) | void
type pbuf (line 880) | struct pbuf
type pbuf (line 881) | struct pbuf
type pbuf (line 883) | struct pbuf
function err_t (line 929) | err_t
function u16_t (line 995) | u16_t
function err_t (line 1043) | err_t
type pbuf (line 1087) | struct pbuf
type pbuf (line 1088) | struct pbuf
type pbuf (line 1090) | struct pbuf
function err_t (line 1119) | err_t
function u8_t (line 1154) | u8_t
function u16_t (line 1181) | u16_t
function u16_t (line 1217) | u16_t
function u16_t (line 1245) | u16_t
FILE: app/lwip/core/raw.c
type raw_pcb (line 60) | struct raw_pcb
function u8_t (line 79) | u8_t ICACHE_FLASH_ATTR
function err_t (line 145) | err_t ICACHE_FLASH_ATTR
function err_t (line 165) | err_t ICACHE_FLASH_ATTR
function raw_recv (line 186) | void ICACHE_FLASH_ATTR
function err_t (line 206) | err_t ICACHE_FLASH_ATTR
function err_t (line 293) | err_t ICACHE_FLASH_ATTR
function raw_remove (line 307) | void ICACHE_FLASH_ATTR
type raw_pcb (line 338) | struct raw_pcb
type raw_pcb (line 341) | struct raw_pcb
type raw_pcb (line 345) | struct raw_pcb
type raw_pcb (line 349) | struct raw_pcb
FILE: app/lwip/core/sntp.c
type sntp_msg (line 237) | struct sntp_msg {
type udp_pcb (line 259) | struct udp_pcb
type sntp_server (line 263) | struct sntp_server {
type sntp_server (line 269) | struct sntp_server
type time_t (line 298) | typedef long time_t;
type tm (line 333) | struct tm
type tm (line 346) | struct tm
type __tzrule_type (line 347) | typedef struct __tzrule_struct
type tm (line 359) | struct tm
type tm (line 360) | struct tm
type tm (line 522) | struct tm
type tm (line 524) | struct tm
type tm (line 529) | struct tm
function sntp__tzcalc_limits (line 536) | int ICACHE_FLASH_ATTR
type tm (line 593) | struct tm
type tm (line 610) | struct tm
function uint32 (line 616) | uint32 sntp_get_current_timestamp()
function sntp_get_timezone (line 634) | sntp_get_timezone(void)
function sntp_set_timezone (line 642) | bool ICACHE_FLASH_ATTR
function sntp_time_inc (line 654) | sntp_time_inc(void)
function sntp_process (line 661) | static void ICACHE_FLASH_ATTR
function sntp_initialize_request (line 694) | static void ICACHE_FLASH_ATTR
function sntp_retry (line 719) | static void ICACHE_FLASH_ATTR
function sntp_try_next_server (line 753) | static void
function sntp_recv (line 789) | static void ICACHE_FLASH_ATTR
function sntp_send_request (line 875) | static void ICACHE_FLASH_ATTR
function sntp_dns_found (line 908) | static void
function sntp_request (line 931) | static void ICACHE_FLASH_ATTR
function sntp_init (line 978) | sntp_init(void)
function sntp_stop (line 1007) | sntp_stop(void)
function sntp_servermode_dhcp (line 1023) | void
function sntp_setserver (line 1039) | void ICACHE_FLASH_ATTR
function dhcp_set_ntp_servers (line 1062) | void
function ip_addr_t (line 1087) | ip_addr_t ICACHE_FLASH_ATTR
function sntp_setservername (line 1103) | void ICACHE_FLASH_ATTR
FILE: app/lwip/core/stats.c
type stats_ (line 49) | struct stats_
function stats_init (line 51) | void stats_init(void)
function stats_display_proto (line 71) | void
function stats_display_igmp (line 90) | void
function stats_display_mem (line 112) | void
function stats_display_memp (line 123) | void
function stats_display_sys (line 138) | void
function stats_display (line 154) | void
FILE: app/lwip/core/sys.c
function sys_msleep (line 53) | void
FILE: app/lwip/core/tcp.c
type tcp_pcb (line 90) | struct tcp_pcb
type tcp_pcb (line 95) | struct tcp_pcb
type tcp_pcb (line 97) | struct tcp_pcb
type tcp_pcb (line 102) | struct tcp_pcb
type tcp_pcb (line 106) | struct tcp_pcb
function tcp_tmr (line 116) | void
function err_t (line 145) | static err_t
function err_t (line 272) | err_t
function err_t (line 298) | err_t
function tcp_abandon (line 338) | void
function tcp_abort (line 400) | void
function err_t (line 419) | err_t
function err_t (line 478) | static err_t
type tcp_pcb (line 503) | struct tcp_pcb
type tcp_pcb (line 504) | struct tcp_pcb
type tcp_pcb_listen (line 506) | struct tcp_pcb_listen
type tcp_pcb_listen (line 530) | struct tcp_pcb_listen
type tcp_pcb (line 554) | struct tcp_pcb
type tcp_pcb (line 555) | struct tcp_pcb
function u32_t (line 564) | u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb)
function tcp_recved (line 595) | void
function u16_t (line 629) | static u16_t
function err_t (line 667) | err_t
function tcp_slowtmr (line 769) | void
function tcp_fasttmr (line 1014) | void
function tcp_segs_free (line 1052) | void
function tcp_seg_free (line 1067) | void
function tcp_setprio (line 1087) | void
type tcp_seg (line 1101) | struct tcp_seg
type tcp_seg (line 1102) | struct tcp_seg
type tcp_seg (line 1104) | struct tcp_seg
type tcp_seg (line 1106) | struct tcp_seg
type tcp_seg (line 1110) | struct tcp_seg
function err_t (line 1121) | err_t
function tcp_kill_prio (line 1140) | static void ICACHE_FLASH_ATTR
function tcp_kill_timewait (line 1174) | tcp_kill_timewait(void)
type tcp_pcb (line 1201) | struct tcp_pcb
type tcp_pcb (line 1204) | struct tcp_pcb
type tcp_pcb (line 1207) | struct tcp_pcb
type tcp_pcb (line 1214) | struct tcp_pcb
type tcp_pcb (line 1220) | struct tcp_pcb
type tcp_pcb (line 1232) | struct tcp_pcb
type tcp_pcb (line 1286) | struct tcp_pcb
function tcp_arg (line 1300) | void
function tcp_recv (line 1314) | void
function tcp_sent (line 1327) | void
function tcp_err (line 1341) | void
function tcp_accept (line 1355) | void
function tcp_poll (line 1369) | void
function tcp_pcb_purge (line 1386) | void
function tcp_pcb_remove (line 1454) | void
function u32_t (line 1487) | u32_t
function u16_t (line 1506) | u16_t
type tcp_state (line 1527) | enum tcp_state
function tcp_debug_print (line 1541) | void
function tcp_debug_print_state (line 1577) | void
function tcp_debug_print_flags (line 1588) | void
function tcp_debug_print_pcbs (line 1621) | void
function s16_t (line 1651) | s16_t
FILE: app/lwip/core/tcp_in.c
type tcp_seg (line 66) | struct tcp_seg
type tcp_hdr (line 67) | struct tcp_hdr
type ip_hdr (line 68) | struct ip_hdr
type pbuf (line 74) | struct pbuf
type tcp_pcb (line 76) | struct tcp_pcb
type tcp_pcb (line 79) | struct tcp_pcb
type tcp_pcb (line 80) | struct tcp_pcb
type tcp_pcb (line 81) | struct tcp_pcb
type tcp_pcb_listen (line 83) | struct tcp_pcb_listen
type tcp_pcb (line 84) | struct tcp_pcb
function tcp_input (line 101) | void
function err_t (line 489) | static err_t
function err_t (line 592) | static err_t
function err_t (line 631) | static err_t
function tcp_oos_insert_segment (line 856) | static void ICACHE_FLASH_ATTR
function tcp_receive (line 903) | static void
function tcp_parseopt (line 1555) | static void
FILE: app/lwip/core/tcp_out.c
type tcp_seg (line 84) | struct tcp_seg
type tcp_pcb (line 84) | struct tcp_pcb
type pbuf (line 96) | struct pbuf
type tcp_pcb (line 97) | struct tcp_pcb
type tcp_hdr (line 100) | struct tcp_hdr
type pbuf (line 101) | struct pbuf
type tcp_hdr (line 105) | struct tcp_hdr
function err_t (line 127) | err_t
type tcp_seg (line 160) | struct tcp_seg
type tcp_pcb (line 161) | struct tcp_pcb
type pbuf (line 161) | struct pbuf
type tcp_seg (line 163) | struct tcp_seg
type tcp_seg (line 166) | struct tcp_seg
type tcp_hdr (line 193) | struct tcp_hdr
type pbuf (line 220) | struct pbuf
type tcp_pcb (line 222) | struct tcp_pcb
type pbuf (line 225) | struct pbuf
function tcp_seg_add_chksum (line 273) | static void ICACHE_FLASH_ATTR
function err_t (line 295) | static err_t ICACHE_FLASH_ATTR
function err_t (line 355) | err_t
function err_t (line 719) | err_t
function tcp_build_timestamp_option (line 826) | static void ICACHE_FLASH_ATTR
function err_t (line 840) | err_t
function err_t (line 896) | err_t ICACHE_FLASH_ATTR
function tcp_output_segment (line 1055) | static void
function tcp_rst (line 1195) | void
function tcp_rexmit_rto (line 1239) | void
function tcp_rexmit (line 1311) | void
function tcp_rexmit_fast (line 1351) | void
function tcp_keepalive (line 1394) | void
function tcp_zero_window_probe (line 1444) | void
FILE: app/lwip/core/timers.c
type sys_timeo (line 65) | struct sys_timeo
function tcpip_tcp_timer (line 79) | static void ICACHE_FLASH_ATTR
function tcp_timer_needed (line 101) | void
function tcp_timer_coarse (line 118) | static void ICACHE_FLASH_ATTR
function ip_reass_timer (line 135) | static void ICACHE_FLASH_ATTR
function arp_timer (line 151) | static void ICACHE_FLASH_ATTR
function dhcp_timer_coarse (line 168) | static void
function dhcp_timer_fine (line 183) | static void
function autoip_timer (line 199) | static void
function igmp_timer (line 215) | static void
function dns_timer (line 231) | static void
function sys_timeouts_init (line 242) | void sys_timeouts_init(void)
function sys_timeout (line 290) | void
function sys_untimeout (line 345) | void
function sys_check_timeouts (line 382) | void
function sys_restart_timeouts (line 433) | void
function sys_timeouts_mbox_fetch (line 448) | void
function tcp_timer_needed (line 509) | void
FILE: app/lwip/core/udp.c
type udp_pcb (line 73) | struct udp_pcb
type pbuf (line 88) | struct pbuf
type netif (line 88) | struct netif
type udp_hdr (line 90) | struct udp_hdr
type udp_pcb (line 91) | struct udp_pcb
type udp_pcb (line 92) | struct udp_pcb
type ip_hdr (line 93) | struct ip_hdr
type ip_hdr (line 102) | struct ip_hdr
type udp_hdr (line 117) | struct udp_hdr
type udp_hdr (line 238) | struct udp_hdr
type udp_pcb (line 297) | struct udp_pcb
type pbuf (line 315) | struct pbuf
function err_t (line 393) | err_t ICACHE_FLASH_ATTR
function err_t (line 403) | err_t ICACHE_FLASH_ATTR
function err_t (line 430) | err_t ICACHE_FLASH_ATTR
function err_t (line 439) | err_t ICACHE_FLASH_ATTR
function err_t (line 488) | err_t ICACHE_FLASH_ATTR
function err_t (line 497) | err_t ICACHE_FLASH_ATTR
type udp_pcb (line 714) | struct udp_pcb
type udp_pcb (line 716) | struct udp_pcb
function err_t (line 816) | err_t ICACHE_FLASH_ATTR
function udp_disconnect (line 874) | void ICACHE_FLASH_ATTR
function udp_recv (line 893) | void ICACHE_FLASH_ATTR
function udp_remove (line 909) | void ICACHE_FLASH_ATTR
type udp_pcb (line 940) | struct udp_pcb
function udp_new (line 941) | udp_new(void)
function udp_debug_print (line 963) | void ICACHE_FLASH_ATTR
FILE: app/lwip/netif/etharp.c
type eth_addr (line 69) | struct eth_addr
type eth_addr (line 70) | struct eth_addr
type etharp_state (line 93) | enum etharp_state {
type etharp_entry (line 100) | struct etharp_entry {
type etharp_entry (line 120) | struct etharp_entry
type netif (line 139) | struct netif
type eth_addr (line 139) | struct eth_addr
function free_etharp_q (line 154) | static void
function free_entry (line 176) | static void ICACHE_FLASH_ATTR
function etharp_tmr (line 210) | void
function s8_t (line 270) | static s8_t ICACHE_FLASH_ATTR
function err_t (line 422) | static err_t ICACHE_FLASH_ATTR
type netif (line 456) | struct netif
type eth_addr (line 456) | struct eth_addr
type pbuf (line 503) | struct pbuf
type etharp_q_entry (line 505) | struct etharp_q_entry
type pbuf (line 514) | struct pbuf
type eth_addr (line 518) | struct eth_addr
function err_t (line 534) | err_t
function err_t (line 559) | err_t
function etharp_cleanup_netif (line 589) | void ICACHE_FLASH_ATTR etharp_cleanup_netif(struct netif *netif)
function s8_t (line 612) | s8_t
function etharp_ip_input (line 648) | static void ICACHE_FLASH_ATTR
function etharp_arp_input (line 697) | static void ICACHE_FLASH_ATTR
function err_t (line 873) | static err_t ICACHE_FLASH_ATTR
function err_t (line 910) | err_t
function err_t (line 1041) | err_t
function err_t (line 1210) | err_t ICACHE_FLASH_ATTR
function err_t (line 1292) | err_t
function err_t (line 1310) | err_t
FILE: app/mqtt/app.c
type mqtt_relay (line 29) | typedef struct mqtt_relay{
function mqtt_relay_change_cb (line 36) | static void mqtt_relay_change_cb(int id,int state){
function mqtt_app_timer_cb (line 49) | static void ICACHE_FLASH_ATTR mqtt_app_timer_cb(void *arg){
function mqttConnectedCb (line 77) | static void mqttConnectedCb(uint32_t *args)
function mqttDisconnectedCb (line 100) | static void mqttDisconnectedCb(uint32_t *args)
function mqttPublishedCb (line 106) | static void mqttPublishedCb(uint32_t *args)
function mqttDataCb (line 112) | static void mqttDataCb(uint32_t *args, const char* topic, uint32_t topic...
function sensor_read_timer_cb (line 162) | static void ICACHE_FLASH_ATTR sensor_read_timer_cb(void *arg){
function mqtt_app_init (line 186) | void ICACHE_FLASH_ATTR mqtt_app_init(){
FILE: app/mqtt/mqtt.c
function ICACHE_FLASH_ATTR (line 53) | ICACHE_FLASH_ATTR
function ICACHE_FLASH_ATTR (line 92) | ICACHE_FLASH_ATTR
function mqtt_tcpclient_recv (line 115) | void ICACHE_FLASH_ATTR
function mqtt_tcpclient_sent_cb (line 248) | void ICACHE_FLASH_ATTR
function mqtt_timer (line 262) | void ICACHE_FLASH_ATTR mqtt_timer(void *arg)
function mqtt_tcpclient_discon_cb (line 304) | void ICACHE_FLASH_ATTR
function mqtt_tcpclient_connect_cb (line 325) | void ICACHE_FLASH_ATTR
function mqtt_tcpclient_recon_cb (line 366) | void ICACHE_FLASH_ATTR
function BOOL (line 390) | BOOL ICACHE_FLASH_ATTR
function BOOL (line 422) | BOOL ICACHE_FLASH_ATTR
function MQTT_Task (line 443) | void ICACHE_FLASH_ATTR
function MQTT_InitConnection (line 493) | void ICACHE_FLASH_ATTR
function MQTT_InitClient (line 517) | void ICACHE_FLASH_ATTR
function MQTT_InitLWT (line 548) | void ICACHE_FLASH_ATTR
function MQTT_Connect (line 571) | void ICACHE_FLASH_ATTR
function MQTT_Disconnect (line 609) | void ICACHE_FLASH_ATTR
function MQTT_OnConnected (line 622) | void ICACHE_FLASH_ATTR
function MQTT_OnDisconnected (line 628) | void ICACHE_FLASH_ATTR
function MQTT_OnData (line 634) | void ICACHE_FLASH_ATTR
function MQTT_OnPublished (line 640) | void ICACHE_FLASH_ATTR
FILE: app/mqtt/mqtt.h
type mqtt_event_data_t (line 49) | typedef struct mqtt_event_data_t
type mqtt_state_t (line 59) | typedef struct mqtt_state_t
type tConnState (line 77) | typedef enum {
type MQTT_Client (line 101) | typedef struct {
FILE: app/mqtt/mqtt_msg.c
type mqtt_connect_flag (line 37) | enum mqtt_connect_flag
type mqtt_connect_variable_header (line 46) | struct __attribute((__packed__)) mqtt_connect_variable_header
function append_string (line 63) | static int ICACHE_FLASH_ATTR append_string(mqtt_connection_t* connection...
function append_message_id (line 76) | static uint16_t ICACHE_FLASH_ATTR append_message_id(mqtt_connection_t* c...
function init_message (line 92) | static int ICACHE_FLASH_ATTR init_message(mqtt_connection_t* connection)
function mqtt_message_t (line 98) | static mqtt_message_t* ICACHE_FLASH_ATTR fail_message(mqtt_connection_t*...
function mqtt_message_t (line 105) | static mqtt_message_t* ICACHE_FLASH_ATTR fini_message(mqtt_connection_t*...
function mqtt_msg_init (line 128) | void ICACHE_FLASH_ATTR mqtt_msg_init(mqtt_connection_t* connection, uint...
function mqtt_get_total_length (line 135) | int ICACHE_FLASH_ATTR mqtt_get_total_length(uint8_t* buffer, uint16_t le...
function mqtt_get_id (line 228) | uint16_t ICACHE_FLASH_ATTR mqtt_get_id(uint8_t* buffer, uint16_t length)
type mqtt_connect_variable_header (line 292) | struct mqtt_connect_variable_header
FILE: app/mqtt/mqtt_msg.h
type mqtt_message_type (line 51) | enum mqtt_message_type
type mqtt_message_t (line 69) | typedef struct mqtt_message
type mqtt_connection_t (line 76) | typedef struct mqtt_connection
type mqtt_connect_info_t (line 86) | typedef struct mqtt_connect_info
function mqtt_get_type (line 101) | static inline int ICACHE_FLASH_ATTR mqtt_get_type(uint8_t* buffer) { ret...
function mqtt_get_dup (line 102) | static inline int ICACHE_FLASH_ATTR mqtt_get_dup(uint8_t* buffer) { retu...
function mqtt_get_qos (line 103) | static inline int ICACHE_FLASH_ATTR mqtt_get_qos(uint8_t* buffer) { retu...
function mqtt_get_retain (line 104) | static inline int ICACHE_FLASH_ATTR mqtt_get_retain(uint8_t* buffer) { r...
FILE: app/mqtt/proto.c
function I8 (line 3) | I8 ICACHE_FLASH_ATTR PROTO_Init(PROTO_PARSER *parser, PROTO_PARSE_CALLBA...
function I8 (line 13) | I8 ICACHE_FLASH_ATTR PROTO_ParseByte(PROTO_PARSER *parser, U8 value)
function I8 (line 49) | I8 ICACHE_FLASH_ATTR PROTO_Parse(PROTO_PARSER *parser, U8 *buf, U16 len)
function I16 (line 56) | I16 ICACHE_FLASH_ATTR PROTO_ParseRb(RINGBUF* rb, U8 *bufOut, U16* len, U...
function I16 (line 70) | I16 ICACHE_FLASH_ATTR PROTO_Add(U8 *buf, const U8 *packet, I16 bufSize)
function I16 (line 106) | I16 ICACHE_FLASH_ATTR PROTO_AddRb(RINGBUF *rb, const U8 *packet, I16 len)
FILE: app/mqtt/proto.h
type PROTO_PARSER (line 16) | typedef struct{
FILE: app/mqtt/queue.c
function QUEUE_Init (line 37) | void ICACHE_FLASH_ATTR QUEUE_Init(QUEUE *queue, int bufferSize)
function QUEUE_Puts (line 42) | int32_t ICACHE_FLASH_ATTR QUEUE_Puts(QUEUE *queue, uint8_t* buffer, uint...
function QUEUE_Gets (line 46) | int32_t ICACHE_FLASH_ATTR QUEUE_Gets(QUEUE *queue, uint8_t* buffer, uint...
function BOOL (line 52) | BOOL ICACHE_FLASH_ATTR QUEUE_IsEmpty(QUEUE *queue)
FILE: app/mqtt/queue.h
type QUEUE (line 35) | typedef struct {
FILE: app/mqtt/ringbuf.c
function I16 (line 16) | I16 ICACHE_FLASH_ATTR RINGBUF_Init(RINGBUF *r, U8* buf, I32 size)
function I16 (line 32) | I16 ICACHE_FLASH_ATTR RINGBUF_Put(RINGBUF *r, U8 c)
function I16 (line 53) | I16 ICACHE_FLASH_ATTR RINGBUF_Get(RINGBUF *r, U8* c)
FILE: app/mqtt/ringbuf.h
type RINGBUF (line 8) | typedef struct{
FILE: app/mqtt/typedef.h
type I8 (line 9) | typedef char I8;
type U8 (line 10) | typedef unsigned char U8;
type I16 (line 11) | typedef short I16;
type U16 (line 12) | typedef unsigned short U16;
type I32 (line 13) | typedef long I32;
type U32 (line 14) | typedef unsigned long U32;
type U64 (line 15) | typedef unsigned long long U64;
FILE: app/mqtt/utils.c
function ICACHE_FLASH_ATTR (line 41) | uint8_t ICACHE_FLASH_ATTR UTILS_IsIPV4 (int8_t *str)
function UTILS_StrToIP (line 91) | uint8_t ICACHE_FLASH_ATTR UTILS_StrToIP(const int8_t* str, void *ip)
function UTILS_Atoh (line 130) | uint32_t ICACHE_FLASH_ATTR UTILS_Atoh(const int8_t *s)
FILE: app/platform/common.c
function cmn_platform_init (line 9) | void cmn_platform_init(void)
function platform_gpio_exists (line 17) | int platform_gpio_exists( unsigned pin )
function platform_can_exists (line 25) | int platform_can_exists( unsigned id )
function platform_spi_exists (line 34) | int platform_spi_exists( unsigned id )
function platform_pwm_exists (line 42) | int platform_pwm_exists( unsigned id )
function platform_adc_exists (line 50) | int platform_adc_exists( unsigned id )
function platform_uart_exists (line 58) | int platform_uart_exists( unsigned id )
function platform_ow_exists (line 66) | int platform_ow_exists( unsigned id )
function platform_tmr_exists (line 74) | int platform_tmr_exists( unsigned id )
function platform_i2c_exists (line 80) | int platform_i2c_exists( unsigned id )
function flashh_find_sector (line 103) | static uint32_t flashh_find_sector( uint32_t address, uint32_t *pstart, ...
function platform_flash_get_sector_of_address (line 131) | uint32_t platform_flash_get_sector_of_address( uint32_t addr )
function platform_flash_get_num_sectors (line 136) | uint32_t platform_flash_get_num_sectors(void)
function platform_flash_get_first_free_block_address (line 147) | uint32_t platform_flash_get_first_free_block_address( uint32_t *psect )
function platform_flash_write (line 166) | uint32_t platform_flash_write( const void *from, uint32_t toaddr, uint32...
function platform_flash_read (line 216) | uint32_t platform_flash_read( void *to, uint32_t fromaddr, uint32_t size )
FILE: app/platform/config.c
function config_save (line 15) | void config_save(config_data * data){
function config_data (line 32) | static config_data * config_read_s(){
function config_data (line 40) | config_data * config_read(){
function config_init (line 55) | void config_init(){
FILE: app/platform/config.h
type relay (line 16) | typedef struct {
type config_data (line 24) | typedef struct {
FILE: app/platform/flash_api.c
function SPIFlashInfo (line 23) | SPIFlashInfo flash_get_info(void)
function flash_get_size (line 30) | uint8_t flash_get_size(void)
function flash_get_size_byte (line 35) | uint32_t flash_get_size_byte(void)
function flash_set_size (line 68) | bool flash_set_size(uint8_t size)
function flash_set_size_byte (line 84) | bool flash_set_size_byte(uint32_t size)
function flash_get_sec_num (line 126) | uint16_t flash_get_sec_num(void)
function flash_get_mode (line 131) | uint8_t flash_get_mode(void)
function flash_get_speed (line 149) | uint32_t flash_get_speed(void)
function flash_init_data_written (line 175) | bool flash_init_data_written(void)
function flash_init_data_default (line 189) | bool flash_init_data_default(void)
function flash_init_data_blank (line 206) | bool flash_init_data_blank(void)
function flash_self_destruct (line 222) | bool flash_self_destruct(void)
function byte_of_aligned_array (line 229) | uint8_t byte_of_aligned_array(const uint8_t* aligned_array, uint32_t index)
FILE: app/platform/flash_api.h
type ICACHE_STORE_TYPEDEF_ATTR (line 30) | typedef struct
FILE: app/platform/flash_fs.c
function fs_mode2flag (line 10) | int fs_mode2flag(const char *mode){
FILE: app/platform/platform.c
function output_redirect (line 15) | void output_redirect(const char *str){
function platform_init (line 22) | int platform_init()
function platform_key_led (line 34) | uint8_t platform_key_led( uint8_t level){
function platform_gpio_mode (line 46) | int platform_gpio_mode( unsigned pin, unsigned mode, unsigned pull )
function platform_gpio_write (line 116) | int platform_gpio_write( unsigned pin, unsigned level )
function platform_gpio_read (line 130) | int platform_gpio_read( unsigned pin )
function platform_gpio_intr_dispatcher (line 146) | static void platform_gpio_intr_dispatcher( platform_gpio_intr_handler_fn...
function platform_gpio_init (line 164) | void platform_gpio_init( platform_gpio_intr_handler_fn_t cb )
function platform_gpio_intr_init (line 169) | int platform_gpio_intr_init( unsigned pin, GPIO_INT_TYPE type )
function platform_uart_send (line 190) | void platform_uart_send( unsigned id, u8 data )
function pwms_init (line 200) | static void pwms_init()
function platform_pwm_get_clock (line 214) | uint32_t platform_pwm_get_clock( unsigned pin )
function platform_pwm_set_clock (line 226) | uint32_t platform_pwm_set_clock( unsigned pin, uint32_t clock )
function platform_pwm_get_duty (line 239) | uint32_t platform_pwm_get_duty( unsigned pin )
function platform_pwm_set_duty (line 252) | uint32_t platform_pwm_set_duty( unsigned pin, uint32_t duty )
function platform_pwm_setup (line 268) | uint32_t platform_pwm_setup( unsigned pin, uint32_t frequency, unsigned ...
function platform_pwm_close (line 288) | void platform_pwm_close( unsigned pin )
function platform_pwm_start (line 298) | void platform_pwm_start( unsigned pin )
function platform_pwm_stop (line 310) | void platform_pwm_stop( unsigned pin )
function platform_i2c_setup (line 325) | uint32_t platform_i2c_setup( unsigned id, uint8_t sda, uint8_t scl, uint...
function platform_i2c_send_start (line 340) | void platform_i2c_send_start( unsigned id ){
function platform_i2c_send_stop (line 344) | void platform_i2c_send_stop( unsigned id ){
function platform_i2c_send_address (line 348) | int platform_i2c_send_address( unsigned id, uint16_t address, int direct...
function platform_i2c_send_byte (line 361) | int platform_i2c_send_byte( unsigned id, uint8_t data ){
function platform_i2c_recv_byte (line 367) | int platform_i2c_recv_byte( unsigned id, int ack ){
function platform_spi_setup (line 375) | uint32_t platform_spi_setup( unsigned id, int mode, unsigned cpol, unsig...
function spi_data_type (line 381) | spi_data_type platform_spi_send_recv( unsigned id, spi_data_type data )
function platform_s_flash_write (line 390) | uint32_t platform_s_flash_write( const void *from, uint32_t toaddr, uint...
function platform_s_flash_read (line 414) | uint32_t platform_s_flash_read( void *to, uint32_t fromaddr, uint32_t si...
function platform_flash_erase_sector (line 428) | int platform_flash_erase_sector( uint32_t sector_id )
FILE: app/platform/platform.h
type timer_data_type (line 51) | typedef uint32_t timer_data_type;
type spi_data_type (line 99) | typedef uint32_t spi_data_type;
FILE: app/sensor/bmp180.c
type bmp_cal_data (line 50) | struct bmp_cal_data{
function bmp180_write_wait_ack (line 68) | static uint8_t ICACHE_FLASH_ATTR bmp180_write_wait_ack(uint8_t byte,uint...
function bmp180_read_byte_ack (line 84) | static uint8_t ICACHE_FLASH_ATTR bmp180_read_byte_ack(uint8_t ack_level){
function bmp180_read_reg_16 (line 94) | static int16_t ICACHE_FLASH_ATTR bmp180_read_reg_16(uint8_t reg) {
function bmp180_read_raw (line 122) | static int16_t ICACHE_FLASH_ATTR bmp180_read_raw(uint8_t cmd) {
function bmp180_read (line 142) | int ICACHE_FLASH_ATTR bmp180_read(bmp_data *data){
function bmp180_init (line 202) | int ICACHE_FLASH_ATTR bmp180_init(){
FILE: app/sensor/bmp180.h
type bmp_data (line 14) | typedef struct {
FILE: app/sensor/dht22.c
function dht22_read (line 34) | int ICACHE_FLASH_ATTR dht22_read(dht_data *read){
function dht22_init (line 186) | void ICACHE_FLASH_ATTR dht22_init(){
FILE: app/sensor/dht22.h
type dht_data (line 14) | typedef struct{
FILE: app/sensor/ds18b20.c
function ds18b20_read (line 29) | int ICACHE_FLASH_ATTR ds18b20_read(ds18b20_data *read) {
function ds18b20_init (line 132) | void ICACHE_FLASH_ATTR ds18b20_init(uint8_t pin) {
FILE: app/sensor/ds18b20.h
type boolean (line 4) | typedef uint8_t boolean;
type byte (line 5) | typedef uint8_t byte;
type ds18b20_data (line 7) | typedef struct{
FILE: app/sensor/sensors.c
function sensors_get_data (line 35) | void ICACHE_FLASH_ATTR sensors_get_data(sensor_data *return_data)
function sensor_read_task (line 42) | static void ICACHE_FLASH_ATTR sensor_read_task(os_event_t *e){
function sensor_read_timer_cb (line 52) | static void ICACHE_FLASH_ATTR sensor_read_timer_cb(void *arg){
function sensors_init (line 56) | void ICACHE_FLASH_ATTR sensors_init(){
FILE: app/sensor/sensors.h
type sensor_data (line 16) | typedef struct {
FILE: app/smart/smart.c
type station_config (line 15) | struct station_config
function smart_check (line 35) | int smart_check(uint8_t *nibble, uint16_t len, uint8_t *dst, uint8_t *got){
function detect (line 130) | void detect(uint8 *buf, uint16 len){
function reset_map (line 438) | void reset_map(smart_addr_map **am, size_t num){
function smart_enable (line 464) | void smart_enable(void){
function smart_disable (line 468) | void smart_disable(void){
function smart_end (line 472) | void smart_end(){
function smart_next_channel (line 535) | void smart_next_channel(){
function smart_begin (line 589) | void smart_begin(int chnl, smart_succeed s, void *arg){
function station_check_connect (line 677) | void station_check_connect(bool smart){
FILE: app/smart/smart.h
type _my_addr_map (line 62) | struct _my_addr_map {
type smart_addr_map (line 76) | typedef struct _my_addr_map smart_addr_map;
FILE: app/spiffs/params_test.h
type s32_t (line 27) | typedef signed int s32_t;
type u32_t (line 28) | typedef unsigned int u32_t;
type s16_t (line 29) | typedef signed short s16_t;
type u16_t (line 30) | typedef unsigned short u16_t;
type s8_t (line 31) | typedef signed char s8_t;
type u8_t (line 32) | typedef unsigned char u8_t;
FILE: app/spiffs/spiffs.c
function s32_t (line 13) | static s32_t my_spiffs_read(u32_t addr, u32_t size, u8_t *dst) {
function s32_t (line 18) | static s32_t my_spiffs_write(u32_t addr, u32_t size, u8_t *src) {
function s32_t (line 23) | static s32_t my_spiffs_erase(u32_t addr, u32_t size) {
function myspiffs_check_callback (line 32) | void myspiffs_check_callback(spiffs_check_type type, spiffs_check_report...
function spiffs_mount (line 45) | void spiffs_mount() {
function myspiffs_format (line 74) | int myspiffs_format( void )
function myspiffs_check (line 92) | int myspiffs_check( void )
function myspiffs_open (line 100) | int myspiffs_open(const char *name, int flags){
function myspiffs_close (line 104) | int myspiffs_close( int fd ){
function myspiffs_write (line 108) | size_t myspiffs_write( int fd, const void* ptr, size_t len ){
function myspiffs_read (line 122) | size_t myspiffs_read( int fd, void* ptr, size_t len){
function myspiffs_lseek (line 130) | int myspiffs_lseek( int fd, int off, int whence ){
function myspiffs_eof (line 133) | int myspiffs_eof( int fd ){
function myspiffs_tell (line 136) | int myspiffs_tell( int fd ){
function myspiffs_getc (line 139) | int myspiffs_getc( int fd ){
function myspiffs_ungetc (line 153) | int myspiffs_ungetc( int c, int fd ){
function myspiffs_flush (line 156) | int myspiffs_flush( int fd ){
function myspiffs_error (line 159) | int myspiffs_error( int fd ){
function myspiffs_clearerr (line 162) | void myspiffs_clearerr( int fd ){
function test_spiffs (line 166) | void test_spiffs() {
FILE: app/spiffs/spiffs.h
type s16_t (line 46) | typedef s16_t spiffs_file;
type u16_t (line 48) | typedef u16_t spiffs_flags;
type u16_t (line 50) | typedef u16_t spiffs_mode;
type u8_t (line 52) | typedef u8_t spiffs_obj_type;
type s32_t (line 55) | typedef s32_t (*spiffs_read)(u32_t addr, u32_t size, u8_t *dst);
type s32_t (line 57) | typedef s32_t (*spiffs_write)(u32_t addr, u32_t size, u8_t *src);
type s32_t (line 59) | typedef s32_t (*spiffs_erase)(u32_t addr, u32_t size);
type spiffs_check_type (line 62) | typedef enum {
type spiffs_check_report (line 69) | typedef enum {
type spiffs_config (line 132) | typedef struct {
type spiffs (line 158) | typedef struct {
type spiffs_stat (line 216) | typedef struct {
type spiffs_dirent (line 223) | struct spiffs_dirent {
type spiffs_DIR (line 230) | typedef struct {
type spiffs_dirent (line 385) | struct spiffs_dirent
type spiffs_dirent (line 385) | struct spiffs_dirent
FILE: app/spiffs/spiffs_cache.c
function spiffs_cache_page (line 14) | static spiffs_cache_page *spiffs_cache_page_get(spiffs *fs, spiffs_page_...
function s32_t (line 33) | static s32_t spiffs_cache_page_free(spiffs *fs, int ix, u8_t write_back) {
function s32_t (line 59) | static s32_t spiffs_cache_page_remove_oldest(spiffs *fs, u8_t flag_mask,...
function spiffs_cache_page (line 89) | static spiffs_cache_page *spiffs_cache_page_allocate(spiffs *fs) {
function spiffs_cache_drop_page (line 110) | void spiffs_cache_drop_page(spiffs *fs, spiffs_page_ix pix) {
function s32_t (line 120) | s32_t spiffs_phys_rd(
function s32_t (line 168) | s32_t spiffs_phys_wr(
function spiffs_cache_page (line 210) | spiffs_cache_page *spiffs_cache_page_get_by_fd(spiffs *fs, spiffs_fd *fd) {
function spiffs_cache_page (line 233) | spiffs_cache_page *spiffs_cache_page_allocate_by_fd(spiffs *fs, spiffs_f...
function spiffs_cache_fd_release (line 250) | void spiffs_cache_fd_release(spiffs *fs, spiffs_cache_page *cp) {
function spiffs_cache_init (line 268) | void spiffs_cache_init(spiffs *fs) {
FILE: app/spiffs/spiffs_check.c
function s32_t (line 31) | static s32_t spiffs_object_get_data_page_index_reference(
function s32_t (line 62) | static s32_t spiffs_rewrite_page(spiffs *fs, spiffs_page_ix cur_pix, spi...
function s32_t (line 76) | static s32_t spiffs_rewrite_index(spiffs *fs, spiffs_obj_id obj_id, spif...
function s32_t (line 140) | static s32_t spiffs_delete_obj_lazy(spiffs *fs, spiffs_obj_id obj_id) {
function s32_t (line 157) | static s32_t spiffs_lookup_check_validate(spiffs *fs, spiffs_obj_id lu_o...
function s32_t (line 427) | static s32_t spiffs_lookup_check_v(spiffs *fs, spiffs_obj_id obj_id, spi...
function s32_t (line 455) | s32_t spiffs_lookup_consistency_check(spiffs *fs, u8_t check_all_objects) {
function s32_t (line 488) | static s32_t spiffs_page_consistency_check_i(spiffs *fs) {
function s32_t (line 825) | s32_t spiffs_page_consistency_check(spiffs *fs) {
function spiffs_object_index_search (line 840) | static int spiffs_object_index_search(spiffs *fs, spiffs_obj_id obj_id) {
function s32_t (line 852) | s32_t spiffs_object_index_consistency_check_v(spiffs *fs, spiffs_obj_id ...
function s32_t (line 946) | s32_t spiffs_object_index_consistency_check(spiffs *fs) {
FILE: app/spiffs/spiffs_config.h
type sint32_t (line 22) | typedef sint32_t s32_t;
type u32_t (line 23) | typedef uint32_t u32_t;
type sint16_t (line 24) | typedef sint16_t s16_t;
type u16_t (line 25) | typedef uint16_t u16_t;
type sint8_t (line 26) | typedef sint8_t s8_t;
type u8_t (line 27) | typedef uint8_t u8_t;
type u16_t (line 197) | typedef u16_t spiffs_block_ix;
type u16_t (line 200) | typedef u16_t spiffs_page_ix;
type u16_t (line 204) | typedef u16_t spiffs_obj_id;
type u16_t (line 208) | typedef u16_t spiffs_span_ix;
FILE: app/spiffs/spiffs_gc.c
function s32_t (line 7) | static s32_t spiffs_gc_erase_block(
function s32_t (line 50) | s32_t spiffs_gc_quick(
function s32_t (line 114) | s32_t spiffs_gc_check(
function s32_t (line 182) | s32_t spiffs_gc_erase_page_stats(
function s32_t (line 219) | s32_t spiffs_gc_find_candidate(
type spiffs_gc_clean_state (line 324) | typedef enum {
type spiffs_gc (line 331) | typedef struct {
function s32_t (line 353) | s32_t spiffs_gc_clean(spiffs *fs, spiffs_block_ix bix) {
FILE: app/spiffs/spiffs_hydrogen.c
function u32_t (line 14) | u32_t SPIFFS_buffer_bytes_for_filedescs(spiffs *fs, u32_t num_descs) {
function u32_t (line 18) | u32_t SPIFFS_buffer_bytes_for_cache(spiffs *fs, u32_t num_pages) {
function s32_t (line 24) | s32_t SPIFFS_mount(spiffs *fs, spiffs_config *config, u8_t *work,
function SPIFFS_unmount (line 85) | void SPIFFS_unmount(spiffs *fs) {
function s32_t (line 103) | s32_t SPIFFS_errno(spiffs *fs) {
function s32_t (line 107) | s32_t SPIFFS_creat(spiffs *fs, const char *path, spiffs_mode mode) {
function spiffs_file (line 121) | spiffs_file SPIFFS_open(spiffs *fs, const char *path, spiffs_flags flags...
function s32_t (line 178) | s32_t SPIFFS_read(spiffs *fs, spiffs_file fh, void *buf, u32_t len) {
function s32_t (line 223) | static s32_t spiffs_hydro_write(spiffs *fs, spiffs_fd *fd, void *buf, u3...
function s32_t (line 242) | s32_t SPIFFS_write(spiffs *fs, spiffs_file fh, void *buf, u32_t len) {
function s32_t (line 360) | s32_t SPIFFS_lseek(spiffs *fs, spiffs_file fh, s32_t offs, int whence) {
function s32_t (line 404) | s32_t SPIFFS_remove(spiffs *fs, const char *path) {
function s32_t (line 437) | s32_t SPIFFS_fremove(spiffs *fs, spiffs_file fh) {
function s32_t (line 464) | static s32_t spiffs_stat_pix(spiffs *fs, spiffs_page_ix pix, spiffs_file...
function s32_t (line 485) | s32_t SPIFFS_stat(spiffs *fs, const char *path, spiffs_stat *s) {
function s32_t (line 502) | s32_t SPIFFS_fstat(spiffs *fs, spiffs_file fh, spiffs_stat *s) {
function s32_t (line 525) | static s32_t spiffs_fflush_cache(spiffs *fs, spiffs_file fh) {
function s32_t (line 555) | s32_t SPIFFS_fflush(spiffs *fs, spiffs_file fh) {
function SPIFFS_close (line 568) | void SPIFFS_close(spiffs *fs, spiffs_file fh) {
function spiffs_DIR (line 583) | spiffs_DIR *SPIFFS_opendir(spiffs *fs, const char *name, spiffs_DIR *d) {
function s32_t (line 594) | static s32_t spiffs_read_dir_v(
type spiffs_dirent (line 627) | struct spiffs_dirent
type spiffs_dirent (line 627) | struct spiffs_dirent
type spiffs_dirent (line 637) | struct spiffs_dirent
function s32_t (line 660) | s32_t SPIFFS_closedir(spiffs_DIR *d) {
function s32_t (line 665) | s32_t SPIFFS_check(spiffs *fs) {
function s32_t (line 682) | s32_t SPIFFS_eof(spiffs *fs, spiffs_file fh) {
function s32_t (line 701) | s32_t SPIFFS_tell(spiffs *fs, spiffs_file fh) {
function s32_t (line 721) | s32_t SPIFFS_vis(spiffs *fs) {
FILE: app/spiffs/spiffs_nucleus.c
function s32_t (line 4) | static s32_t spiffs_page_data_check(spiffs *fs, spiffs_fd *fd, spiffs_pa...
function s32_t (line 32) | static s32_t spiffs_page_index_check(spiffs *fs, spiffs_fd *fd, spiffs_p...
function s32_t (line 62) | s32_t spiffs_phys_rd(
function s32_t (line 70) | s32_t spiffs_phys_wr(
function s32_t (line 80) | s32_t spiffs_phys_cpy(
function s32_t (line 119) | s32_t spiffs_obj_lu_find_entry_visitor(
function s32_t (line 217) | static s32_t spiffs_obj_lu_scan_v(
function s32_t (line 240) | s32_t spiffs_obj_lu_scan(
function s32_t (line 302) | s32_t spiffs_obj_lu_find_free(
function s32_t (line 334) | s32_t spiffs_obj_lu_find_id(
function s32_t (line 350) | static s32_t spiffs_obj_lu_find_id_and_span_v(
function s32_t (line 376) | s32_t spiffs_obj_lu_find_id_and_span(
function s32_t (line 415) | s32_t spiffs_obj_lu_find_id_and_span_by_phdr(
function s32_t (line 455) | s32_t spiffs_page_allocate_data(
function s32_t (line 512) | s32_t spiffs_page_move(
function s32_t (line 574) | s32_t spiffs_page_delete(
function s32_t (line 603) | s32_t spiffs_object_create(
function s32_t (line 658) | s32_t spiffs_object_update_index_hdr(
function spiffs_cb_object_event (line 709) | void spiffs_cb_object_event(
function s32_t (line 748) | s32_t spiffs_object_open_by_id(
function s32_t (line 766) | s32_t spiffs_object_open_by_page(
function s32_t (line 804) | s32_t spiffs_object_append(spiffs_fd *fd, u32_t offset, u8_t *data, u32_...
function s32_t (line 1035) | s32_t spiffs_object_modify(spiffs_fd *fd, u32_t offset, u8_t *data, u32_...
function s32_t (line 1234) | static s32_t spiffs_object_find_object_index_header_by_name_v(
function s32_t (line 1263) | s32_t spiffs_object_find_object_index_header_by_name(
function s32_t (line 1298) | s32_t spiffs_object_truncate(
function s32_t (line 1505) | s32_t spiffs_object_read(
type spiffs_free_obj_id_state (line 1583) | typedef struct {
function s32_t (line 1589) | static s32_t spiffs_obj_lu_find_free_obj_id_bitmap_v(spiffs *fs, spiffs_...
function s32_t (line 1603) | static s32_t spiffs_obj_lu_find_free_obj_id_compact_v(spiffs *fs, spiffs...
function s32_t (line 1632) | s32_t spiffs_obj_lu_find_free_obj_id(spiffs *fs, spiffs_obj_id *obj_id) {
function s32_t (line 1723) | s32_t spiffs_fd_find_new(spiffs *fs, spiffs_fd **fd) {
function s32_t (line 1737) | s32_t spiffs_fd_return(spiffs *fs, spiffs_file f) {
function s32_t (line 1750) | s32_t spiffs_fd_get(spiffs *fs, spiffs_file f, spiffs_fd **fd) {
FILE: app/spiffs/spiffs_nucleus.h
type spiffs_cache_page (line 314) | typedef struct {
type spiffs_cache (line 342) | typedef struct {
type spiffs_fd (line 354) | typedef struct {
type spiffs_page_header (line 384) | typedef struct __attribute(( packed )) {
type spiffs_page_object_ix_header (line 394) | typedef struct __attribute(( packed )) {
type spiffs_page_object_ix (line 410) | typedef struct __attribute(( packed )) {
type s32_t (line 416) | typedef s32_t (*spiffs_visitor_f)(spiffs *fs, spiffs_obj_id id, spiffs_b...
FILE: app/ssl/app/espconn_secure.c
function sint8 (line 30) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 45) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 70) | sint8 ICACHE_FLASH_ATTR
function sint8 (line 88) | sint8 ICACHE_FLASH_ATTR
FILE: app/ssl/app/espconn_ssl.c
type pbuf (line 27) | struct pbuf
type tcp_pcb (line 30) | struct tcp_pcb
type pbuf (line 30) | struct pbuf
type tcp_pcb (line 31) | struct tcp_pcb
type pbuf (line 31) | struct pbuf
type tcp_pcb (line 33) | struct tcp_pcb
type tcp_pcb (line 34) | struct tcp_pcb
function display_session_id (line 43) | static void ICACHE_FLASH_ATTR display_session_id(SSL *ssl)
function display_cipher (line 67) | static void ICACHE_FLASH_ATTR display_cipher(SSL *ssl)
function espconn_ssl_reconnect (line 103) | static void ICACHE_FLASH_ATTR
function espconn_ssl_dissuccessful (line 157) | static void ICACHE_FLASH_ATTR
function espconn_ssl_sent (line 218) | void ICACHE_FLASH_ATTR
function espconn_sent_packet (line 259) | void ICACHE_FLASH_ATTR
function espconn_ssl_cclose_cb (line 297) | static void ICACHE_FLASH_ATTR
function espconn_ssl_cclose (line 328) | static void ICACHE_FLASH_ATTR
function err_t (line 359) | static err_t ICACHE_FLASH_ATTR
function err_t (line 403) | static err_t ICACHE_FLASH_ATTR
function espconn_ssl_cerr (line 484) | static void ICACHE_FLASH_ATTR
function err_t (line 559) | static err_t ICACHE_FLASH_ATTR
function err_t (line 594) | static err_t ICACHE_FLASH_ATTR
function espconn_ssl_disconnect (line 645) | void ICACHE_FLASH_ATTR espconn_ssl_disconnect(espconn_msg *pdis)
function sint8 (line 664) | sint8 ICACHE_FLASH_ATTR
function espconn_ssl_sclose_cb (line 713) | static void ICACHE_FLASH_ATTR
function espconn_ssl_sclose (line 745) | static void ICACHE_FLASH_ATTR
function err_t (line 776) | static err_t ICACHE_FLASH_ATTR
function err_t (line 842) | static err_t ICACHE_FLASH_ATTR
function err_t (line 903) | static err_t ICACHE_FLASH_ATTR
function espconn_ssl_serr (line 937) | static void ICACHE_FLASH_ATTR
function err_t (line 1005) | static err_t ICACHE_FLASH_ATTR
function sint8 (line 1077) | sint8 ICACHE_FLASH_ATTR espconn_ssl_server(struct espconn *espconn)
FILE: app/ssl/crypto/ssl_aes.c
function AES_xtime (line 173) | static unsigned char ICACHE_FLASH_ATTR AES_xtime(uint32_t x)
function AES_set_key (line 181) | void ICACHE_FLASH_ATTR AES_set_key(AES_CTX *ctx, const uint8_t *key,
function AES_convert_key (line 264) | void ICACHE_FLASH_ATTR AES_convert_key(AES_CTX *ctx)
function AES_cbc_encrypt (line 283) | void ICACHE_FLASH_ATTR AES_cbc_encrypt(AES_CTX *ctx, const uint8_t *msg,...
function AES_cbc_decrypt (line 322) | void ICACHE_FLASH_ATTR AES_cbc_decrypt(AES_CTX *ctx, const uint8_t *msg,...
function AES_encrypt (line 365) | static void ICACHE_FLASH_ATTR AES_encrypt(const AES_CTX *ctx, uint32_t *...
function AES_decrypt (line 420) | static void ICACHE_FLASH_ATTR AES_decrypt(const AES_CTX *ctx, uint32_t *...
FILE: app/ssl/crypto/ssl_bigint.c
function bi_terminate (line 120) | void ICACHE_FLASH_ATTR bi_terminate(BI_CTX *ctx)
function bi_clear_cache (line 141) | void ICACHE_FLASH_ATTR bi_clear_cache(BI_CTX *ctx)
function bi_permanent (line 179) | void ICACHE_FLASH_ATTR bi_permanent(bigint *bi)
function bi_depermanent (line 197) | void ICACHE_FLASH_ATTR bi_depermanent(bigint *bi)
function bi_free (line 218) | void ICACHE_FLASH_ATTR bi_free(BI_CTX *ctx, bigint *bi)
function bigint (line 352) | static bigint * ICACHE_FLASH_ATTR bi_int_multiply(BI_CTX *ctx, bigint *b...
function bigint (line 511) | static bigint * ICACHE_FLASH_ATTR bi_int_divide(BI_CTX *ctx, bigint *biR...
function comp (line 535) | static comp ICACHE_FLASH_ATTR modular_inverse(bigint *bim)
function bigint (line 563) | static bigint * ICACHE_FLASH_ATTR comp_right_shift(bigint *biR, int num_...
function bigint (line 590) | static bigint * ICACHE_FLASH_ATTR comp_left_shift(bigint *biR, int num_s...
function bi_print (line 676) | void ICACHE_FLASH_ATTR bi_print(const char *label, bigint *x)
function bi_export (line 711) | void ICACHE_FLASH_ATTR bi_export(BI_CTX *ctx, bigint *x, uint8_t *data, ...
function bi_set_mod (line 750) | void ICACHE_FLASH_ATTR bi_set_mod(BI_CTX *ctx, bigint *bim, int mod_offset)
function bi_free_mod (line 789) | void ICACHE_FLASH_ATTR bi_free_mod(BI_CTX *ctx, int mod_offset)
function bigint (line 813) | static bigint * ICACHE_FLASH_ATTR regular_multiply(BI_CTX *ctx, bigint *...
function bigint (line 869) | static bigint * ICACHE_FLASH_ATTR karatsuba(BI_CTX *ctx, bigint *bia, bi...
function bigint (line 948) | static bigint * ICACHE_FLASH_ATTR regular_square(BI_CTX *ctx, bigint *bi)
function bi_compare (line 1027) | int ICACHE_FLASH_ATTR bi_compare(bigint *bia, bigint *bib)
function more_comps (line 1069) | static void ICACHE_FLASH_ATTR more_comps(bigint *bi, int n)
function bigint (line 1089) | static bigint * ICACHE_FLASH_ATTR alloc(BI_CTX *ctx, int size)
function find_max_exp_index (line 1129) | static int ICACHE_FLASH_ATTR find_max_exp_index(bigint *biexp)
function exp_bit_is_one (line 1154) | static int ICACHE_FLASH_ATTR exp_bit_is_one(bigint *biexp, int offset)
function check (line 1175) | static void ICACHE_FLASH_ATTR check(const bigint *bi)
function bigint (line 1195) | static bigint * ICACHE_FLASH_ATTR trim(bigint *bi)
function bigint (line 1251) | static bigint * ICACHE_FLASH_ATTR comp_mod(bigint *bi, int mod)
function precompute_slide_window (line 1310) | static void ICACHE_FLASH_ATTR precompute_slide_window(BI_CTX *ctx, int w...
FILE: app/ssl/crypto/ssl_crypto_misc.c
function get_file (line 67) | int get_file(const char *filename, uint8_t **buf)
function STDCALL (line 109) | STDCALL ICACHE_FLASH_ATTR RNG_initialize()
function STDCALL (line 139) | STDCALL ICACHE_FLASH_ATTR RNG_custom_init(const uint8_t *seed_buf, int s...
function RNG_terminate (line 152) | RNG_terminate(void)
function STDCALL (line 164) | STDCALL ICACHE_FLASH_ATTR get_random(int num_rand_bytes, uint8_t *rand_d...
function get_random_NZ (line 211) | void ICACHE_FLASH_ATTR get_random_NZ(int num_rand_bytes, uint8_t *rand_d...
function print_hex_init (line 230) | static void ICACHE_FLASH_ATTR print_hex_init(int finish)
function print_hex (line 236) | static void ICACHE_FLASH_ATTR print_hex(uint8_t hex)
function STDCALL (line 271) | STDCALL ICACHE_FLASH_ATTR print_blob(const char *format,
function STDCALL (line 292) | STDCALL print_blob(const char *format, const unsigned char *data,
function STDCALL (line 313) | STDCALL ICACHE_FLASH_ATTR base64_decode(const char *in, int len,
FILE: app/ssl/crypto/ssl_hmac.c
function ssl_hmac_md5 (line 45) | void ICACHE_FLASH_ATTR ssl_hmac_md5(const uint8_t *msg, int length, cons...
function ssl_hmac_sha1 (line 78) | void ICACHE_FLASH_ATTR ssl_hmac_sha1(const uint8_t *msg, int length, con...
FILE: app/ssl/crypto/ssl_md2.c
function STDCALL (line 84) | STDCALL ICACHE_FLASH_ATTR MD2_Init(MD2_CTX *ctx)
function md2_process (line 89) | static void ICACHE_FLASH_ATTR md2_process(MD2_CTX *ctx)
function STDCALL (line 117) | STDCALL ICACHE_FLASH_ATTR MD2_Update(MD2_CTX *ctx, const uint8_t *input,...
function STDCALL (line 145) | STDCALL ICACHE_FLASH_ATTR MD2_Final(uint8_t *output, MD2_CTX *ctx)
FILE: app/ssl/crypto/ssl_md5.c
function STDCALL (line 107) | STDCALL ICACHE_FLASH_ATTR MD5_Init(MD5_CTX *ctx)
function STDCALL (line 122) | STDCALL ICACHE_FLASH_ATTR MD5_Update(MD5_CTX *ctx, const uint8_t * msg, ...
function STDCALL (line 158) | STDCALL ICACHE_FLASH_ATTR MD5_Final(uint8_t *digest, MD5_CTX *ctx)
function MD5Transform (line 182) | static void ICACHE_FLASH_ATTR MD5Transform(uint32_t state[4], const uint...
function Encode (line 271) | static void ICACHE_FLASH_ATTR Encode(uint8_t *output, uint32_t *input, u...
function Decode (line 288) | static void ICACHE_FLASH_ATTR Decode(uint32_t *output, const uint8_t *in...
FILE: app/ssl/crypto/ssl_rc4.c
function RC4_setup (line 43) | void ICACHE_FLASH_ATTR RC4_setup(RC4_CTX *ctx, const uint8_t *key, int l...
function RC4_crypt (line 72) | void ICACHE_FLASH_ATTR RC4_crypt(RC4_CTX *ctx, const uint8_t *msg, uint8...
FILE: app/ssl/crypto/ssl_rsa.c
function RSA_priv_key_new (line 44) | void ICACHE_FLASH_ATTR RSA_priv_key_new(RSA_CTX **ctx,
function RSA_pub_key_new (line 79) | void ICACHE_FLASH_ATTR RSA_pub_key_new(RSA_CTX **ctx,
function RSA_free (line 103) | void ICACHE_FLASH_ATTR RSA_free(RSA_CTX *rsa_ctx)
function RSA_decrypt (line 144) | int ICACHE_FLASH_ATTR RSA_decrypt(const RSA_CTX *ctx, const uint8_t *in_...
function RSA_print (line 209) | void ICACHE_FLASH_ATTR RSA_print(const RSA_CTX *rsa_ctx)
function RSA_encrypt (line 236) | int ICACHE_FLASH_ATTR RSA_encrypt(const RSA_CTX *ctx, const uint8_t *in_...
FILE: app/ssl/crypto/ssl_sha1.c
function SHA1_Init (line 54) | void ICACHE_FLASH_ATTR SHA1_Init(SHA1_CTX *ctx)
function SHA1_Update (line 69) | void ICACHE_FLASH_ATTR SHA1_Update(SHA1_CTX *ctx, const uint8_t *msg, in...
function SHA1_Final (line 89) | void ICACHE_FLASH_ATTR SHA1_Final(uint8_t *digest, SHA1_CTX *ctx)
function SHA1ProcessMessageBlock (line 107) | static void ICACHE_FLASH_ATTR SHA1ProcessMessageBlock(SHA1_CTX *ctx)
function SHA1PadMessage (line 205) | static void ICACHE_FLASH_ATTR SHA1PadMessage(SHA1_CTX *ctx)
FILE: app/ssl/ssl/ssl_asn1.c
type tm (line 44) | struct tm
function get_asn1_length (line 89) | int ICACHE_FLASH_ATTR get_asn1_length(const uint8_t *buf, int *offset)
function asn1_next_obj (line 115) | int ICACHE_FLASH_ATTR asn1_next_obj(const uint8_t *buf, int *offset, int...
function asn1_skip_obj (line 127) | int ICACHE_FLASH_ATTR asn1_skip_obj(const uint8_t *buf, int *offset, int...
function asn1_get_int (line 143) | int ICACHE_FLASH_ATTR asn1_get_int(const uint8_t *buf, int *offset, uint...
function asn1_get_private_key (line 167) | int ICACHE_FLASH_ATTR asn1_get_private_key(const uint8_t *buf, int len, ...
function asn1_get_utc_time (line 229) | static int ICACHE_FLASH_ATTR asn1_get_utc_time(const uint8_t *buf, int *...
function asn1_version (line 263) | int ICACHE_FLASH_ATTR asn1_version(const uint8_t *cert, int *offset, X50...
function asn1_validity (line 279) | int ICACHE_FLASH_ATTR asn1_validity(const uint8_t *cert, int *offset, X5...
function asn1_get_oid_x520 (line 289) | static int ICACHE_FLASH_ATTR asn1_get_oid_x520(const uint8_t *buf, int *...
function asn1_get_printable_str (line 313) | static int ICACHE_FLASH_ATTR asn1_get_printable_str(const uint8_t *buf, ...
function asn1_name (line 355) | int ICACHE_FLASH_ATTR asn1_name(const uint8_t *cert, int *offset, char *...
function asn1_public_key (line 408) | int ICACHE_FLASH_ATTR asn1_public_key(const uint8_t *cert, int *offset, ...
function asn1_signature (line 440) | int ICACHE_FLASH_ATTR asn1_signature(const uint8_t *cert, int *offset, X...
function asn1_compare_dn_comp (line 462) | static int ICACHE_FLASH_ATTR asn1_compare_dn_comp(const char *dn1, const...
function remove_ca_certs (line 477) | void ICACHE_FLASH_ATTR remove_ca_certs(CA_CERT_CTX *ca_cert_ctx)
function asn1_compare_dn (line 497) | int ICACHE_FLASH_ATTR asn1_compare_dn(char * const dn1[], char * const d...
function asn1_find_oid (line 510) | int ICACHE_FLASH_ATTR asn1_find_oid(const uint8_t* cert, int* offset,
function asn1_find_subjectaltname (line 544) | int ICACHE_FLASH_ATTR asn1_find_subjectaltname(const uint8_t* cert, int ...
function asn1_signature_type (line 561) | int ICACHE_FLASH_ATTR asn1_signature_type(const uint8_t *cert,
FILE: app/ssl/ssl/ssl_gen_cert.c
function set_gen_length (line 43) | static uint8_t ICACHE_FLASH_ATTR set_gen_length(int len, uint8_t *buf, i...
function pre_adjust_with_size (line 74) | static int ICACHE_FLASH_ATTR pre_adjust_with_size(uint8_t type,
function adjust_with_size (line 83) | static void ICACHE_FLASH_ATTR adjust_with_size(int seq_size, int seq_start,
function gen_serial_number (line 101) | static void ICACHE_FLASH_ATTR gen_serial_number(uint8_t *buf, int *offset)
function gen_signature_alg (line 108) | static void ICACHE_FLASH_ATTR gen_signature_alg(uint8_t *buf, int *offset)
function gen_dn (line 122) | static int ICACHE_FLASH_ATTR gen_dn(const char *name, uint8_t dn_type,
function gen_issuer (line 152) | static int ICACHE_FLASH_ATTR gen_issuer(const char * dn[], uint8_t *buf,...
function gen_utc_time (line 199) | static void ICACHE_FLASH_ATTR gen_utc_time(uint8_t *buf, int *offset)
function gen_pub_key2 (line 215) | static void ICACHE_FLASH_ATTR gen_pub_key2(const RSA_CTX *rsa_ctx, uint8...
function gen_pub_key1 (line 245) | static void ICACHE_FLASH_ATTR gen_pub_key1(const RSA_CTX *rsa_ctx, uint8...
function gen_pub_key (line 255) | static void ICACHE_FLASH_ATTR gen_pub_key(const RSA_CTX *rsa_ctx, uint8_...
function gen_signature (line 275) | static void ICACHE_FLASH_ATTR gen_signature(const RSA_CTX *rsa_ctx, cons...
function gen_tbs_cert (line 303) | static int ICACHE_FLASH_ATTR gen_tbs_cert(const char * dn[],
function ICACHE_FLASH_ATTR (line 341) | ICACHE_FLASH_ATTR STDCALL ssl_x509_create(SSL_CTX *ssl_ctx, uint32_t opt...
FILE: app/ssl/ssl/ssl_loader.c
function STDCALL (line 57) | STDCALL ICACHE_FLASH_ATTR ssl_obj_load(SSL_CTX *ssl_ctx, int obj_type,
function STDCALL (line 104) | STDCALL ICACHE_FLASH_ATTR ssl_obj_memory_load(SSL_CTX *ssl_ctx, int mem_...
function do_obj (line 122) | static int ICACHE_FLASH_ATTR do_obj(SSL_CTX *ssl_ctx, int obj_type,
function ssl_obj_free (line 164) | void ICACHE_FLASH_ATTR ssl_obj_free(SSLObjLoader *ssl_obj)
function pem_decrypt (line 211) | static int ICACHE_FLASH_ATTR pem_decrypt(const char *where, const char *...
function new_pem_obj (line 293) | static int ICACHE_FLASH_ATTR new_pem_obj(SSL_CTX *ssl_ctx, int is_cacert...
function ssl_obj_PEM_load (line 392) | static int ICACHE_FLASH_ATTR ssl_obj_PEM_load(SSL_CTX *ssl_ctx, int obj_...
function load_key_certs (line 411) | int ICACHE_FLASH_ATTR load_key_certs(SSL_CTX *ssl_ctx)
FILE: app/ssl/ssl/ssl_openssl.c
type OPENSSL_CTX (line 62) | typedef struct
function SSL_CTX_free (line 75) | void ICACHE_FLASH_ATTR SSL_CTX_free(SSL_CTX *ssl_ctx)
function SSL_set_fd (line 105) | int ICACHE_FLASH_ATTR SSL_set_fd(SSL *s, int fd)
function SSL_accept (line 111) | int ICACHE_FLASH_ATTR SSL_accept(SSL *ssl)
function SSL_connect (line 123) | int ICACHE_FLASH_ATTR SSL_connect(SSL *ssl)
function SSL_free (line 129) | void ICACHE_FLASH_ATTR SSL_free(SSL *ssl)
function SSL_read (line 134) | int ICACHE_FLASH_ATTR SSL_read(SSL *ssl, void *buf, int num)
function SSL_write (line 149) | int ICACHE_FLASH_ATTR SSL_write(SSL *ssl, const void *buf, int num)
function SSL_CTX_use_certificate_file (line 154) | int ICACHE_FLASH_ATTR SSL_CTX_use_certificate_file(SSL_CTX *ssl_ctx, con...
function SSL_CTX_use_PrivateKey_file (line 159) | int ICACHE_FLASH_ATTR SSL_CTX_use_PrivateKey_file(SSL_CTX *ssl_ctx, cons...
function SSL_CTX_use_certificate_ASN1 (line 164) | int ICACHE_FLASH_ATTR SSL_CTX_use_certificate_ASN1(SSL_CTX *ssl_ctx, int...
function SSL_CTX_set_session_id_context (line 170) | int ICACHE_FLASH_ATTR SSL_CTX_set_session_id_context(SSL_CTX *ctx, const...
function SSL_CTX_set_default_verify_paths (line 176) | int ICACHE_FLASH_ATTR SSL_CTX_set_default_verify_paths(SSL_CTX *ctx)
function SSL_CTX_use_certificate_chain_file (line 181) | int ICACHE_FLASH_ATTR SSL_CTX_use_certificate_chain_file(SSL_CTX *ssl_ct...
function SSL_shutdown (line 187) | int ICACHE_FLASH_ATTR SSL_shutdown(SSL *ssl)
function SSL_set_session (line 198) | int ICACHE_FLASH_ATTR SSL_set_session(SSL *ssl, SSL_SESSION *session)
function SSL_SESSION_free (line 204) | void ICACHE_FLASH_ATTR SSL_SESSION_free(SSL_SESSION *session) { }
function SSL_CTX_ctrl (line 207) | long ICACHE_FLASH_ATTR SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, vo...
function SSL_CTX_set_verify (line 212) | void ICACHE_FLASH_ATTR SSL_CTX_set_verify(SSL_CTX *ctx, int mode,
function SSL_CTX_set_verify_depth (line 215) | void ICACHE_FLASH_ATTR SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth)...
function SSL_CTX_load_verify_locations (line 217) | int ICACHE_FLASH_ATTR SSL_CTX_load_verify_locations(SSL_CTX *ctx, const ...
function SSL_CTX_set_client_CA_list (line 228) | void ICACHE_FLASH_ATTR SSL_CTX_set_client_CA_list(SSL_CTX *ssl_ctx, void...
function SSLv23_method (line 233) | SSLv23_method(void) { }
function SSL_CTX_set_default_passwd_cb (line 235) | void ICACHE_FLASH_ATTR SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, void ...
function SSL_CTX_set_default_passwd_cb_userdata (line 237) | void ICACHE_FLASH_ATTR SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *c...
function SSL_peek (line 242) | int ICACHE_FLASH_ATTR SSL_peek(SSL *ssl, void *buf, int num)
function SSL_set_bio (line 248) | void ICACHE_FLASH_ATTR SSL_set_bio(SSL *ssl, void *rbio, void *wbio) { }
function SSL_get_verify_result (line 250) | long ICACHE_FLASH_ATTR SSL_get_verify_result(const SSL *ssl)
function SSL_state (line 255) | int ICACHE_FLASH_ATTR SSL_state(SSL *ssl)
function SSL_clear (line 267) | int ICACHE_FLASH_ATTR SSL_clear(SSL *ssl)
function SSL_CTX_check_private_key (line 273) | int ICACHE_FLASH_ATTR SSL_CTX_check_private_key(const SSL_CTX *ctx)
function SSL_CTX_set_cipher_list (line 278) | int ICACHE_FLASH_ATTR SSL_CTX_set_cipher_list(SSL *s, const char *str)
function SSL_get_error (line 283) | int ICACHE_FLASH_ATTR SSL_get_error(const SSL *ssl, int ret)
function SSL_CTX_set_options (line 289) | void ICACHE_FLASH_ATTR SSL_CTX_set_options(SSL_CTX *ssl_ctx, int option) {}
function SSL_library_init (line 290) | SSL_library_init(void ) { return 1; }
function SSL_load_error_strings (line 291) | SSL_load_error_strings(void ) {}
function ERR_print_errors_fp (line 292) | void ICACHE_FLASH_ATTR ERR_print_errors_fp(FILE *fp) {}
function SSL_CTX_get_timeout (line 295) | long ICACHE_FLASH_ATTR SSL_CTX_get_timeout(const SSL_CTX *ssl_ctx) {
function SSL_CTX_set_timeout (line 297) | long ICACHE_FLASH_ATTR SSL_CTX_set_timeout(SSL_CTX *ssl_ctx, long t) {
function BIO_printf (line 300) | void ICACHE_FLASH_ATTR BIO_printf(FILE *f, const char *format, ...)
function BIO_s_null (line 308) | BIO_s_null(void) { return NULL; }
function BIO_free (line 318) | int ICACHE_FLASH_ATTR BIO_free(FILE *a) { if (a != stdout && a != stderr...
FILE: app/ssl/ssl/ssl_os_port.c
function STDCALL (line 46) | STDCALL gettimeofday(struct timeval* t, void* timezone)
function STDCALL (line 62) | STDCALL strcasecmp(const char *s1, const char *s2)
function STDCALL (line 76) | STDCALL getdomainname(char *buf, int buf_size)
function EXP_FUNC (line 106) | EXP_FUNC void * STDCALL ax_malloc(size_t s)
function EXP_FUNC (line 116) | EXP_FUNC void * STDCALL ax_realloc(void *y, size_t s)
function EXP_FUNC (line 126) | EXP_FUNC void * STDCALL ax_calloc(size_t n, size_t s)
function STDCALL (line 136) | STDCALL ax_open(const char *pathname, int flags)
function exit_now (line 150) | void exit_now(const char *format, ...)
function STDCALL (line 164) | STDCALL gettimeofday(struct timeval* t, void* timezone)
FILE: app/ssl/ssl/ssl_p12.c
function pkcs8_decode (line 87) | int ICACHE_FLASH_ATTR pkcs8_decode(SSL_CTX *ssl_ctx, SSLObjLoader *ssl_o...
function p8_add_key (line 135) | static int ICACHE_FLASH_ATTR p8_add_key(SSL_CTX *ssl_ctx, uint8_t *priv_...
function p8_decrypt (line 186) | static int ICACHE_FLASH_ATTR p8_decrypt(const char *uni_pass, int uni_pa...
function pkcs12_decode (line 233) | int ICACHE_FLASH_ATTR pkcs12_decode(SSL_CTX *ssl_ctx, SSLObjLoader *ssl_...
function get_pbe_params (line 430) | static int ICACHE_FLASH_ATTR get_pbe_params(uint8_t *buf, int *offset,
FILE: app/ssl/ssl/ssl_tls1.c
type pbuf (line 44) | struct pbuf
function DISPLAY_BYTES (line 161) | void DISPLAY_BYTES(SSL *ssl, const char *format,
function ICACHE_FLASH_ATTR (line 168) | ICACHE_FLASH_ATTR ssl_ctx_new(uint32_t options, int num_sessions)
function STDCALL (line 200) | STDCALL ICACHE_FLASH_ATTR ssl_ctx_free(SSL_CTX *ssl_ctx)
function STDCALL (line 248) | STDCALL ICACHE_FLASH_ATTR ssl_free(SSL *ssl)
function STDCALL (line 292) | STDCALL ICACHE_FLASH_ATTR ssl_read(SSL *ssl, uint8_t **in_data)
function STDCALL (line 315) | STDCALL ICACHE_FLASH_ATTR ssl_write(SSL *ssl, const uint8_t *out_data, i...
function add_cert (line 344) | int ICACHE_FLASH_ATTR add_cert(SSL_CTX *ssl_ctx, const uint8_t *buf, int...
function add_cert_auth (line 395) | int ICACHE_FLASH_ATTR add_cert_auth(SSL_CTX *ssl_ctx, const uint8_t *buf...
function ICACHE_FLASH_ATTR (line 442) | ICACHE_FLASH_ATTR ssl_get_cert_dn(const SSL *ssl, int component)
function ICACHE_FLASH_ATTR (line 475) | ICACHE_FLASH_ATTR ssl_get_cert_subject_alt_dnsname(const SSL *ssl,
function ICACHE_FLASH_ATTR (line 497) | ICACHE_FLASH_ATTR ssl_find(SSL_CTX *ssl_ctx, int client_fd)
function STDCALL (line 523) | STDCALL ICACHE_FLASH_ATTR ssl_renegotiate(SSL *ssl)
function cipher_info_t (line 551) | static const cipher_info_t *ICACHE_FLASH_ATTR get_cipher_info(uint8_t ci...
function add_private_key (line 640) | int ICACHE_FLASH_ATTR add_private_key(SSL_CTX *ssl_ctx, SSLObjLoader *ss...
function increment_read_sequence (line 658) | static void ICACHE_FLASH_ATTR increment_read_sequence(SSL *ssl)
function increment_write_sequence (line 672) | static void ICACHE_FLASH_ATTR increment_write_sequence(SSL *ssl)
function add_hmac_digest (line 686) | static void ICACHE_FLASH_ATTR add_hmac_digest(SSL *ssl, int mode, uint8_...
function verify_digest (line 734) | static int ICACHE_FLASH_ATTR verify_digest(SSL *ssl, int mode, const uin...
function add_packet (line 789) | void ICACHE_FLASH_ATTR add_packet(SSL *ssl, const uint8_t *pkt, int len)
function p_hash_md5 (line 798) | static void ICACHE_FLASH_ATTR p_hash_md5(const uint8_t *sec, int sec_len,
function p_hash_sha1 (line 826) | static void ICACHE_FLASH_ATTR p_hash_sha1(const uint8_t *sec, int sec_len,
function prf (line 854) | static void ICACHE_FLASH_ATTR prf(const uint8_t *sec, int sec_len, uint8...
function generate_master_secret (line 878) | void ICACHE_FLASH_ATTR generate_master_secret(SSL *ssl, const uint8_t *p...
function generate_key_block (line 891) | static void ICACHE_FLASH_ATTR generate_key_block(uint8_t *client_random,...
function finished_digest (line 905) | void ICACHE_FLASH_ATTR finished_digest(SSL *ssl, const char *label, uint...
function err_t (line 992) | static err_t ICACHE_FLASH_ATTR send_raw_packet(SSL *ssl, uint8_t protocol)
function send_packet (line 1039) | int ICACHE_FLASH_ATTR send_packet(SSL *ssl, uint8_t protocol, const uint...
function set_key_block (line 1137) | static int ICACHE_FLASH_ATTR set_key_block(SSL *ssl, int is_write)
function basic_read (line 1225) | int ICACHE_FLASH_ATTR basic_read(SSL *ssl, uint8_t **in_data)
function do_handshake (line 1449) | static int ICACHE_FLASH_ATTR do_handshake(SSL *ssl, uint8_t *buf, int re...
function send_change_cipher_spec (line 1497) | int ICACHE_FLASH_ATTR send_change_cipher_spec(SSL *ssl)
function send_finished (line 1513) | int ICACHE_FLASH_ATTR send_finished(SSL *ssl)
function send_alert (line 1540) | int ICACHE_FLASH_ATTR send_alert(SSL *ssl, int error_code)
function process_finished (line 1613) | int ICACHE_FLASH_ATTR process_finished(SSL *ssl, uint8_t *buf, int hs_len)
function send_certificate (line 1642) | int ICACHE_FLASH_ATTR send_certificate(SSL *ssl)
function disposable_new (line 1678) | void ICACHE_FLASH_ATTR disposable_new(SSL *ssl)
function disposable_free (line 1691) | void ICACHE_FLASH_ATTR disposable_free(SSL *ssl)
function session_free (line 1784) | static void ICACHE_FLASH_ATTR session_free(SSL_SESSION *ssl_sessions[], ...
function kill_ssl_session (line 1796) | void ICACHE_FLASH_ATTR kill_ssl_session(SSL_SESSION **ssl_sessions, SSL ...
function ICACHE_FLASH_ATTR (line 1813) | ICACHE_FLASH_ATTR ssl_get_session_id(const SSL *ssl)
function STDCALL (line 1821) | STDCALL ICACHE_FLASH_ATTR ssl_get_session_id_size(const SSL *ssl)
function STDCALL (line 1829) | STDCALL ICACHE_FLASH_ATTR ssl_get_cipher_id(const SSL *ssl)
function STDCALL (line 1837) | STDCALL ICACHE_FLASH_ATTR ssl_handshake_status(const SSL *ssl)
function STDCALL (line 1845) | STDCALL ICACHE_FLASH_ATTR ssl_get_config(int offset)
function STDCALL (line 1883) | STDCALL ICACHE_FLASH_ATTR ssl_verify_cert(const SSL *ssl)
function process_certificate (line 1901) | int ICACHE_FLASH_ATTR process_certificate(SSL *ssl, X509_CTX **x509_ctx)
function DISPLAY_STATE (line 1954) | void ICACHE_FLASH_ATTR DISPLAY_STATE(SSL *ssl, int is_send, uint8_t stat...
function DISPLAY_RSA (line 2019) | void ICACHE_FLASH_ATTR DISPLAY_RSA(SSL *ssl, const RSA_CTX *rsa_ctx)
function DISPLAY_BYTES (line 2031) | void ICACHE_FLASH_ATTR DISPLAY_BYTES(SSL *ssl, const char *format,
function STDCALL (line 2049) | STDCALL ICACHE_FLASH_ATTR ssl_display_error(int error_code)
function DISPLAY_ALERT (line 2140) | void ICACHE_FLASH_ATTR DISPLAY_ALERT(SSL *ssl, int alert)
function ICACHE_FLASH_ATTR (line 2203) | ICACHE_FLASH_ATTR ssl_version()
function STDCALL (line 2214) | STDCALL ssl_display_error(int error_code) {}
function ICACHE_FLASH_ATTR (line 2219) | ICACHE_FLASH_ATTR ssl_client_new(SSL_CTX *ssl_ctx, int client_fd, const
function STDCALL (line 2228) | STDCALL ICACHE_FLASH_ATTR ssl_verify_cert(const SSL *ssl)
function ICACHE_FLASH_ATTR (line 2235) | ICACHE_FLASH_ATTR ssl_get_cert_dn(const SSL *ssl, int component)
function ICACHE_FLASH_ATTR (line 2241) | ICACHE_FLASH_ATTR ssl_get_cert_subject_alt_dnsname(const SSL *ssl, int i...
FILE: app/ssl/ssl/ssl_tls1_clnt.c
function ICACHE_FLASH_ATTR (line 53) | ICACHE_FLASH_ATTR ssl_client_new(SSL_CTX *ssl_ctx, int client_fd, const
function ICACHE_FLASH_ATTR (line 81) | ICACHE_FLASH_ATTR SSLClient_new(SSL_CTX *ssl_ctx, struct tcp_pcb *SslCli...
function do_clnt_handshake (line 102) | int ICACHE_FLASH_ATTR do_clnt_handshake(SSL *ssl, int handshake_type, ui...
function do_client_connect (line 168) | int ICACHE_FLASH_ATTR do_client_connect(SSL *ssl)
function send_client_hello (line 197) | static int ICACHE_FLASH_ATTR send_client_hello(SSL *ssl)
function process_server_hello (line 254) | static int ICACHE_FLASH_ATTR process_server_hello(SSL *ssl)
function process_server_hello_done (line 322) | static int ICACHE_FLASH_ATTR process_server_hello_done(SSL *ssl)
function send_client_key_xchg (line 331) | static int ICACHE_FLASH_ATTR send_client_key_xchg(SSL *ssl)
function process_cert_req (line 363) | static int ICACHE_FLASH_ATTR process_cert_req(SSL *ssl)
function send_cert_verify (line 382) | static int ICACHE_FLASH_ATTR send_cert_verify(SSL *ssl)
FILE: app/ssl/ssl/ssl_tls1_svr.c
function ICACHE_FLASH_ATTR (line 55) | ICACHE_FLASH_ATTR ssl_server_new(SSL_CTX *ssl_ctx, int client_fd)
function ICACHE_FLASH_ATTR (line 74) | ICACHE_FLASH_ATTR sslserver_new(SSL_CTX *ssl_ctx, struct tcp_pcb* client...
function do_svr_handshake (line 89) | int ICACHE_FLASH_ATTR do_svr_handshake(SSL *ssl, int handshake_type, uin...
function process_client_hello (line 137) | static int ICACHE_FLASH_ATTR process_client_hello(SSL *ssl)
function process_sslv23_client_hello (line 206) | int process_sslv23_client_hello(SSL *ssl)
function send_server_hello_sequence (line 277) | static int ICACHE_FLASH_ATTR send_server_hello_sequence(SSL *ssl)
function send_server_hello (line 322) | static int ICACHE_FLASH_ATTR send_server_hello(SSL *ssl)
function send_server_hello_done (line 381) | static int ICACHE_FLASH_ATTR send_server_hello_done(SSL *ssl)
function process_client_key_xchg (line 392) | static int ICACHE_FLASH_ATTR process_client_key_xchg(SSL *ssl)
function send_certificate_request (line 453) | static int ICACHE_FLASH_ATTR send_certificate_request(SSL *ssl)
function process_cert_verify (line 463) | static int ICACHE_FLASH_ATTR process_cert_verify(SSL *ssl)
FILE: app/ssl/ssl/ssl_x509.c
function x509_new (line 77) | int ICACHE_FLASH_ATTR x509_new(const uint8_t *cert, int *len, X509_CTX *...
function x509_free (line 230) | void ICACHE_FLASH_ATTR x509_free(X509_CTX *x509_ctx)
function bigint (line 271) | static bigint *ICACHE_FLASH_ATTR sig_verify(BI_CTX *ctx, const uint8_t *...
function x509_verify (line 323) | int ICACHE_FLASH_ATTR x509_verify(const CA_CERT_CTX *ca_cert_ctx, const ...
function x509_print (line 455) | void ICACHE_FLASH_ATTR x509_print(const X509_CTX *cert, CA_CERT_CTX *ca_...
FILE: app/user/user_main.c
function heapTimerCb (line 38) | static void heapTimerCb(void *arg){
function config_wifi (line 49) | static void config_wifi(){
function user_init (line 81) | void user_init(void)
FILE: app/util/base64.c
function Base64decode_len (line 111) | int Base64decode_len(const char *bufcoded)
function Base64decode (line 126) | int Base64decode(char *bufplain, const char *bufcoded)
function Base64encode_len (line 174) | int Base64encode_len(int len)
function Base64encode (line 179) | int Base64encode(char *encoded, const char *string, int len)
FILE: app/util/linked_list.c
function node (line 7) | static node* list_create_node (void* item) {
function list_add_first (line 17) | void list_add_first (linked_list* _this,void* item) {
function list_add_last (line 38) | void list_add_last (linked_list* _this, void* item) {
function list_add (line 58) | void list_add (linked_list* _this, void* item, int position) {
function list_insert_before (line 90) | void list_insert_before (linked_list* _this,node* n,node* newNode) {
function linked_list (line 270) | linked_list* create_linked_list () {
function init_linked_list (line 277) | void init_linked_list(linked_list *list){
FILE: app/util/linked_list.h
type node (line 20) | typedef struct node {
type linked_list (line 35) | typedef struct linked_list {
FILE: include/at_custom.h
type at_funcationType (line 26) | typedef struct
FILE: include/c_types.h
type sint8_t (line 10) | typedef signed char sint8_t;
type sint16_t (line 13) | typedef signed short sint16_t;
type sint32_t (line 16) | typedef signed long sint32_t;
type sint64_t (line 18) | typedef signed long long sint64_t;
type u_int64_t (line 20) | typedef unsigned long long u_int64_t;
type real32_t (line 21) | typedef float real32_t;
type real64_t (line 22) | typedef double real64_t;
type uint8 (line 24) | typedef unsigned char uint8;
type u8 (line 25) | typedef unsigned char u8;
type sint8 (line 26) | typedef signed char sint8;
type int8 (line 27) | typedef signed char int8;
type s8 (line 28) | typedef signed char s8;
type uint16 (line 29) | typedef unsigned short uint16;
type u16 (line 30) | typedef unsigned short u16;
type sint16 (line 31) | typedef signed short sint16;
type s16 (line 32) | typedef signed short s16;
type uint32 (line 33) | typedef unsigned int uint32;
type u_int (line 34) | typedef unsigned int u_int;
type u32 (line 35) | typedef unsigned int u32;
type sint32 (line 36) | typedef signed int sint32;
type s32 (line 37) | typedef signed int s32;
type int32 (line 38) | typedef int int32;
type sint64 (line 39) | typedef signed long long sint64;
type uint64 (line 40) | typedef unsigned long long uint64;
type u64 (line 41) | typedef unsigned long long u64;
type real32 (line 42) | typedef float real32;
type real64 (line 43) | typedef double real64;
type STATUS (line 58) | typedef enum {
FILE: include/espconn.h
type sint8 (line 4) | typedef sint8 err_t;
type espconn_type (line 32) | enum espconn_type {
type espconn_state (line 41) | enum espconn_state {
type esp_tcp (line 51) | typedef struct _esp_tcp {
type esp_udp (line 62) | typedef struct _esp_udp {
type remot_info (line 69) | typedef struct _remot_info{
type espconn (line 80) | struct espconn {
type espconn_option (line 96) | enum espconn_option{
type espconn_level (line 105) | enum espconn_level{
type espconn_packet (line 119) | struct espconn_packet{
type mdns_info (line 129) | struct mdns_info {
type espconn (line 143) | struct espconn
type espconn (line 152) | struct espconn
type espconn (line 161) | struct espconn
type espconn (line 170) | struct espconn
type espconn (line 179) | struct espconn
type espconn (line 206) | struct espconn
type espconn (line 216) | struct espconn
type espconn (line 226) | struct espconn
type espconn (line 236) | struct espconn
type espconn (line 246) | struct espconn
type espconn_packet (line 246) | struct espconn_packet
type espconn (line 258) | struct espconn
type espconn (line 270) | struct espconn
type espconn (line 281) | struct espconn
type espconn (line 292) | struct espconn
type espconn (line 303) | struct espconn
type espconn (line 314) | struct espconn
type espconn (line 325) | struct espconn
type espconn (line 336) | struct espconn
type espconn (line 346) | struct espconn
type espconn (line 366) | struct espconn
type espconn (line 377) | struct espconn
type espconn (line 389) | struct espconn
type espconn (line 400) | struct espconn
type espconn (line 433) | struct espconn
type espconn (line 442) | struct espconn
type espconn (line 451) | struct espconn
type espconn (line 462) | struct espconn
type espconn (line 473) | struct espconn
type espconn (line 570) | struct espconn
type espconn (line 596) | struct espconn
type espconn (line 604) | struct espconn
type mdns_info (line 614) | struct mdns_info
FILE: include/espnow.h
type esp_now_role (line 9) | enum esp_now_role {
FILE: include/ets_sys.h
type ETSSignal (line 14) | typedef uint32_t ETSSignal;
type ETSParam (line 15) | typedef uint32_t ETSParam;
type ETSEvent (line 17) | typedef struct ETSEventTag ETSEvent;
type ETSEventTag (line 19) | struct ETSEventTag {
type ETSHandle (line 27) | typedef uint32_t ETSHandle;
type ETSTimer (line 30) | typedef struct _ETSTIMER_ {
FILE: include/gpio.h
type GPIO_INT_TYPE (line 16) | typedef enum {
FILE: include/ip_addr.h
type ip_addr (line 6) | struct ip_addr {
type ip_addr_t (line 10) | typedef struct ip_addr ip_addr_t;
type ip_info (line 12) | struct ip_info {
FILE: include/mesh.h
type mesh_type (line 10) | enum mesh_type {
type mesh_status (line 17) | enum mesh_status {
type mesh_node_type (line 25) | enum mesh_node_type {
type ip_addr (line 31) | struct ip_addr
type mesh_node_type (line 32) | enum mesh_node_type
type station_config (line 34) | struct station_config
type station_config (line 35) | struct station_config
type espconn (line 42) | struct espconn
type espconn (line 43) | struct espconn
type espconn (line 45) | struct espconn
type ip_addr (line 48) | struct ip_addr
type mesh_type (line 52) | enum mesh_type
FILE: include/ping.h
type ping_option (line 8) | struct ping_option{
type ping_resp (line 17) | struct ping_resp{
type ping_option (line 28) | struct ping_option
type ping_option (line 29) | struct ping_option
type ping_option (line 30) | struct ping_option
FILE: include/pwm.h
type pwm_param (line 14) | struct pwm_param {
FILE: include/queue.h
type type (line 90) | struct type
FILE: include/smartconfig.h
type sc_status (line 9) | typedef enum {
type sc_type (line 17) | typedef enum {
FILE: include/spi_flash.h
type SpiFlashOpResult (line 9) | typedef enum {
type SpiFlashChip (line 15) | typedef struct{
type SpiFlashOpResult (line 31) | typedef SpiFlashOpResult (* user_spi_flash_read)(
FILE: include/upgrade.h
type upgrade_server_info (line 20) | struct upgrade_server_info {
type upgrade_server_info (line 41) | struct upgrade_server_info
type upgrade_server_info (line 47) | struct upgrade_server_info
type upgrade_server_info (line 49) | struct upgrade_server_info
FILE: include/user_interface.h
type rst_reason (line 25) | enum rst_reason {
type rst_info (line 35) | struct rst_info{
type rst_info (line 45) | struct rst_info
type flash_size_map (line 120) | enum flash_size_map {
type flash_size_map (line 130) | enum flash_size_map
type AUTH_MODE (line 151) | typedef enum _auth_mode {
type bss_info (line 167) | struct bss_info {
type scaninfo (line 182) | typedef struct _scaninfo {
type station_config (line 193) | struct station_config {
type station_config (line 201) | struct station_config
type station_config (line 202) | struct station_config
type station_config (line 203) | struct station_config
type station_config (line 204) | struct station_config
type scan_config (line 211) | struct scan_config {
type scan_config (line 218) | struct scan_config
type dhcp_status (line 234) | enum dhcp_status {
type station_config (line 244) | struct station_config
type dhcp_status (line 248) | enum dhcp_status
type softap_config (line 254) | struct softap_config {
type softap_config (line 265) | struct softap_config
type softap_config (line 266) | struct softap_config
type softap_config (line 267) | struct softap_config
type softap_config (line 268) | struct softap_config
type station_info (line 270) | struct station_info {
type dhcps_lease (line 277) | struct dhcps_lease {
type dhcps_offer_option (line 283) | enum dhcps_offer_option{
type station_info (line 290) | struct station_info
type dhcps_lease (line 296) | struct dhcps_lease
type dhcps_lease (line 297) | struct dhcps_lease
type dhcp_status (line 302) | enum dhcp_status
type ip_info (line 308) | struct ip_info
type ip_info (line 309) | struct ip_info
type phy_mode (line 331) | enum phy_mode {
type phy_mode (line 337) | enum phy_mode
type phy_mode (line 338) | enum phy_mode
type sleep_type (line 340) | enum sleep_type {
type sleep_type (line 346) | enum sleep_type
type sleep_type (line 347) | enum sleep_type
type sleep_type (line 353) | enum sleep_type
type sleep_type (line 354) | enum sleep_type
type Event_StaMode_Connected_t (line 400) | typedef struct {
type Event_StaMode_Disconnected_t (line 407) | typedef struct {
type Event_StaMode_AuthMode_Change_t (line 414) | typedef struct {
type Event_StaMode_Got_IP_t (line 419) | typedef struct {
type Event_SoftAPMode_StaConnected_t (line 425) | typedef struct {
type Event_SoftAPMode_StaDisconnected_t (line 430) | typedef struct {
type Event_SoftAPMode_ProbeReqRecved_t (line 435) | typedef struct {
type Event_Info_u (line 440) | typedef union {
type System_Event_t (line 450) | typedef struct _esp_event {
type WPS_TYPE_t (line 459) | typedef enum wps_type {
type wps_cb_status (line 467) | enum wps_cb_status {
type FIXED_RATE (line 493) | enum FIXED_RATE {
type support_rate (line 512) | enum support_rate {
type RATE_11B_ID (line 529) | enum RATE_11B_ID {
type RATE_11G_ID (line 536) | enum RATE_11G_ID {
type RATE_11N_ID (line 550) | enum RATE_11N_ID {
FILE: tools/esptool.py
class ESPROM (line 29) | class ESPROM:
method __init__ (line 61) | def __init__(self, port = 0, baud = ESP_ROM_BAUD):
method read (line 66) | def read(self, length = 1):
method write (line 83) | def write(self, packet):
method checksum (line 97) | def checksum(data, state = ESP_CHECKSUM_MAGIC):
method command (line 103) | def command(self, op = None, data = None, chk = 0):
method sync (line 127) | def sync(self):
method connect (line 133) | def connect(self):
method read_reg (line 158) | def read_reg(self, addr):
method write_reg (line 165) | def write_reg(self, addr, value, mask, delay_us = 0):
method mem_begin (line 171) | def mem_begin(self, size, blocks, blocksize, offset):
method mem_block (line 177) | def mem_block(self, data, seq):
method mem_finish (line 183) | def mem_finish(self, entrypoint = 0):
method flash_begin (line 189) | def flash_begin(self, size, offset):
method flash_block (line 199) | def flash_block(self, data, seq):
method flash_finish (line 205) | def flash_finish(self, reboot = False):
method run (line 211) | def run(self, reboot = False):
class ESPFirmwareImage (line 217) | class ESPFirmwareImage:
method __init__ (line 219) | def __init__(self, filename = None):
method add_segment (line 244) | def add_segment(self, addr, data):
method save (line 251) | def save(self, filename):
class ELFFile (line 266) | class ELFFile:
method __init__ (line 268) | def __init__(self, name):
method _fetch_symbols (line 272) | def _fetch_symbols(self):
method get_symbol_addr (line 288) | def get_symbol_addr(self, sym):
method load_section (line 292) | def load_section(self, section):
function arg_auto_int (line 304) | def arg_auto_int(x):
FILE: tools/mkfs.py
class MKFS (line 14) | class MKFS:
method __init__ (line 16) | def __init__(self, src, dest):
method output_writeln (line 23) | def output_writeln(self,line):
method writeFile (line 26) | def writeFile(self,path,filename,compress):
method count (line 75) | def count(self):
method run (line 89) | def run(self):
Condensed preview — 379 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,103K chars).
[
{
"path": "LICENSE",
"chars": 1077,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2015 Israel Lot\n\nPermission is hereby granted, free of charge, to any person obtain"
},
{
"path": "Makefile",
"chars": 6904,
"preview": "# copyright (c) 2010 Espressif System\n#\nifndef PDIR\n\nendif\n\n# Base directory for the compiler\nXTENSA_TOOLS_ROOT ?= /opt"
},
{
"path": "README.md",
"chars": 4633,
"preview": "esp-ginx\n--------\n\n##Robust HTTP server for the ESP8266\n\nThis project was inspired esp-httpd by Sprite_tm, NodeMcu ( htt"
},
{
"path": "app/.gitignore",
"chars": 22,
"preview": "*.output*\n!.gitignore\n"
},
{
"path": "app/Makefile",
"chars": 3384,
"preview": "#############################################################\n# Required variables for each makefile\n# Discard this sect"
},
{
"path": "app/dns/Makefile",
"chars": 1462,
"preview": "\n#############################################################\n# Required variables for each makefile\n# Discard this sec"
},
{
"path": "app/dns/dns.c",
"chars": 3690,
"preview": "#include \"c_types.h\"\n#include \"user_interface.h\"\n#include \"user_config.h\"\n#include \"espconn.h\"\n#include \"mem.h\"\n#include"
},
{
"path": "app/dns/dns.h",
"chars": 71,
"preview": "#ifndef DNS_H\n#define DNS_H\n\nvoid ICACHE_FLASH_ATTR init_dns();\n\n#endif"
},
{
"path": "app/driver/Makefile",
"chars": 1515,
"preview": "\n#############################################################\n# Required variables for each makefile\n# Discard this sec"
},
{
"path": "app/driver/gpio16.c",
"chars": 1401,
"preview": "#include \"ets_sys.h\"\n#include \"osapi.h\"\n#include \"driver/gpio16.h\"\n\nvoid ICACHE_FLASH_ATTR\ngpio16_output_conf(void)\n{\n "
},
{
"path": "app/driver/i2c_master.c",
"chars": 9698,
"preview": "/******************************************************************************\n * Copyright 2013-2014 Espressif Systems"
},
{
"path": "app/driver/key.c",
"chars": 6330,
"preview": "/******************************************************************************\n * Copyright 2013-2014 Espressif Systems"
},
{
"path": "app/driver/onewire.c",
"chars": 17259,
"preview": "/*\nAdaptation of Paul Stoffregen's One wire library to the NodeMcu\n\nThe latest version of this library may be found at:\n"
},
{
"path": "app/driver/pwm.c",
"chars": 15261,
"preview": "/******************************************************************************\n * Copyright 2013-2014 Espressif Systems"
},
{
"path": "app/driver/readline.c",
"chars": 2809,
"preview": "#include \"ets_sys.h\"\n#include \"os_type.h\"\n#include \"osapi.h\"\n#include \"driver/uart.h\"\n#include \"c_types.h\"\n\nLOCAL os_tim"
},
{
"path": "app/driver/relay.c",
"chars": 3287,
"preview": "#include \"ets_sys.h\"\n#include \"os_type.h\"\n#include \"osapi.h\"\n#include \"mem.h\"\n#include \"c_types.h\"\n#include \"c_string.h\""
},
{
"path": "app/driver/spi.c",
"chars": 19742,
"preview": "#include \"driver/spi.h\"\n\n\n/******************************************************************************\n * FunctionNam"
},
{
"path": "app/driver/uart_interrupt.c",
"chars": 10106,
"preview": "#include \"ets_sys.h\"\n#include \"osapi.h\"\n#include \"driver/uart.h\"\n#include \"osapi.h\"\n#include \"driver/uart_register.h\"\n#i"
},
{
"path": "app/http/Makefile",
"chars": 1509,
"preview": "\n#############################################################\n# Required variables for each makefile\n# Discard this sec"
},
{
"path": "app/http/app.c",
"chars": 2155,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/app.h",
"chars": 576,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/cgi.c",
"chars": 8269,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/cgi.h",
"chars": 1104,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/cgi_relay.c",
"chars": 3379,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/cgi_relay.h",
"chars": 727,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/cgi_wifi.c",
"chars": 13680,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/cgi_wifi.h",
"chars": 872,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/html/.bak/bootstrap.css",
"chars": 131494,
"preview": "/*!\r\n * bootswatch v3.3.4+1\r\n * Homepage: http://bootswatch.com\r\n * Copyright 2012-2015 Thomas Park\r\n * Licensed under M"
},
{
"path": "app/http/html/bootstrap.css",
"chars": 100984,
"preview": "html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,"
},
{
"path": "app/http/html/cats.html",
"chars": 1199,
"preview": "<html>\r\n\r\n<head>\r\n <title>Smart Relay</title>\r\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"> \r\n"
},
{
"path": "app/http/html/index.html",
"chars": 5812,
"preview": "\r\n<html>\r\n\r\n<head>\r\n <title>Smart Relay</title>\r\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"> "
},
{
"path": "app/http/html/index.js",
"chars": 10136,
"preview": "$(function(){\r\n\r\n\tvar scanning = 0;\r\n\t\r\n\tvar scanResult=null;\r\n\r\n\tfunction wifiConnectModal(id){\r\n\r\n\t\tif(scanResult==nul"
},
{
"path": "app/http/html/lib.js",
"chars": 84055,
"preview": "//ZEPTO\nvar Zepto=function(){function F(a){return null==a?String(a):x[y.call(a)]||\"object\"}function G(a){return\"function"
},
{
"path": "app/http/html/speed_test.html",
"chars": 5086,
"preview": "<html>\n\n<head>\n <title>Smart Relay</title>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"> \n <me"
},
{
"path": "app/http/http.h",
"chars": 1975,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/http_client.c",
"chars": 6165,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/http_client.h",
"chars": 698,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/http_helper.c",
"chars": 5837,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/http_helper.h",
"chars": 2920,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/http_parser.c",
"chars": 70027,
"preview": "/* Based on src/http/ngx_http_parse.c from NGINX copyright Igor Sysoev\n *\n * Additional changes are licensed under the s"
},
{
"path": "app/http/http_parser.h",
"chars": 12546,
"preview": "/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.\n *\n * Permission is hereby granted, free of "
},
{
"path": "app/http/http_process.c",
"chars": 18720,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/http_process.h",
"chars": 2512,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/http_server.c",
"chars": 8565,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/http_server.h",
"chars": 1660,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/http_websocket_server.c",
"chars": 7235,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/http_websocket_server.h",
"chars": 972,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/rofs.c",
"chars": 2532,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/rofs.h",
"chars": 1086,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/rofs_data.c",
"chars": 382892,
"preview": "//Generated by MKFS tool\r\n//\r\n#include \"rofs.h\"\r\n#include \"c_types.h\"\r\n#define ROFS_FILE_COUNT 7\r\nconst RO_FS ro_file_sy"
},
{
"path": "app/http/websocket.c",
"chars": 3723,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/websocket.h",
"chars": 1224,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/ws_app.c",
"chars": 4541,
"preview": "/*\n * ----------------------------------------------------------------------------\n * \"THE BEER-WARE LICENSE\" (Revision "
},
{
"path": "app/http/ws_app.h",
"chars": 47,
"preview": "#ifndef __WS_APP_H\n#define __WS_APP_H\n\n\n\n#endif"
},
{
"path": "app/include/arch/cc.h",
"chars": 3638,
"preview": "/*\n * Copyright (c) 2001, Swedish Institute of Computer Science.\n * All rights reserved. \n *\n * Redistribution and use i"
},
{
"path": "app/include/arch/perf.h",
"chars": 1856,
"preview": "/*\n * Copyright (c) 2001, Swedish Institute of Computer Science.\n * All rights reserved. \n *\n * Redistribution and use i"
},
{
"path": "app/include/arch/sys_arch.h",
"chars": 0,
"preview": ""
},
{
"path": "app/include/driver/gpio16.h",
"chars": 179,
"preview": "#ifndef __GPIO16_H__\n#define __GPIO16_H__\n\nvoid gpio16_output_conf(void);\nvoid gpio16_output_set(uint8 value);\nvoid gpio"
},
{
"path": "app/include/driver/i2c_master.h",
"chars": 2483,
"preview": "#ifndef __I2C_MASTER_H__\n#define __I2C_MASTER_H__\n\n#define I2C_MASTER_SDA_MUX (pin_mux[sda])\n#define I2C_MASTER_SCL_MUX "
},
{
"path": "app/include/driver/key.h",
"chars": 589,
"preview": "#ifndef __KEY_H__\n#define __KEY_H__\n\n#include \"gpio.h\"\n\ntypedef void (* key_function)(void);\n\nstruct single_key_param {\n"
},
{
"path": "app/include/driver/onewire.h",
"chars": 5953,
"preview": "#ifndef __ONEWIRE_H__\n#define __ONEWIRE_H__\n\n#include \"c_types.h\"\n\n// You can exclude certain features from OneWire. In"
},
{
"path": "app/include/driver/pwm.h",
"chars": 1014,
"preview": "#ifndef __PWM_H__\n#define __PWM_H__\n\n#define PWM_CHANNEL 6\n\nstruct pwm_single_param {\n\tuint16 gpio_set;\n\tuint16 gpio_cle"
},
{
"path": "app/include/driver/relay.h",
"chars": 557,
"preview": "#ifndef __RELAY_H\n#define __RELAY_H\n\n#define RELAY_COUNT 2\n\ntypedef void (*relay_change_callback)(int relay,int state); "
},
{
"path": "app/include/driver/spi.h",
"chars": 1319,
"preview": "#ifndef SPI_APP_H\n#define SPI_APP_H\n\n#include \"spi_register.h\"\n#include \"ets_sys.h\"\n#include \"osapi.h\"\n#include \"uart.h\""
},
{
"path": "app/include/driver/spi_master.h",
"chars": 270,
"preview": "#ifndef __SPI_MASTER_H__\n#define __SPI_MASTER_H__\n\n#include \"driver/spi_register.h\"\n\n/*SPI number define*/\n#define SPI "
},
{
"path": "app/include/driver/spi_register.h",
"chars": 6318,
"preview": "/*\n * Copyright (c) 2010 - 2011 Espressif System\n *\n */\n\n#ifndef SPI_REGISTER_H_INCLUDED\n#define SPI_REGISTER_H_INCLUDE"
},
{
"path": "app/include/driver/uart.h",
"chars": 2853,
"preview": "#ifndef UART_APP_H\n#define UART_APP_H\n\n#include \"uart_register.h\"\n#include \"eagle_soc.h\"\n#include \"c_types.h\"\n\ntypedef v"
},
{
"path": "app/include/driver/uart_register.h",
"chars": 7038,
"preview": "/*\n * File\t: uart_register.h\n * Copyright (C) 2013 - 2016, Espressif Systems\n *\n * This program is free software: you ca"
},
{
"path": "app/include/json/cJson.h",
"chars": 6469,
"preview": "/*\n Copyright (c) 2009 Dave Gamble\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of"
},
{
"path": "app/include/lwip/api.h",
"chars": 10801,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/api_msg.h",
"chars": 5815,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/app/dhcpserver.h",
"chars": 2360,
"preview": "#ifndef __DHCPS_H__\r\n#define __DHCPS_H__\r\n\r\n#define USE_DNS\r\n\r\ntypedef struct dhcps_state{\r\n sint16_t state;\r\n} d"
},
{
"path": "app/include/lwip/app/espconn.h",
"chars": 28188,
"preview": "#ifndef __ESPCONN_H__\n#define __ESPCONN_H__\n\n#include \"lwip/dns.h\"\n#include \"os_type.h\"\n\n#if 0\n#define espconn_printf(fm"
},
{
"path": "app/include/lwip/app/espconn_tcp.h",
"chars": 2158,
"preview": "#ifndef __ESPCONN_TCP_H__\r\n#define __ESPCONN_TCP_H__\r\n\r\n#ifndef ESPCONN_TCP_DEBUG\r\n#define ESPCONN_TCP_DEBUG LWIP_DBG_OF"
},
{
"path": "app/include/lwip/app/espconn_udp.h",
"chars": 2719,
"preview": "#ifndef __ESPCONN_UDP_H__\r\n#define __ESPCONN_UDP_H__\r\n\r\n#ifndef ESPCONN_UDP_DEBUG\r\n#define ESPCONN_UDP_DEBUG LWIP_DBG_OF"
},
{
"path": "app/include/lwip/app/ping.h",
"chars": 1829,
"preview": "#ifndef __PING_H__\n#define __PING_H__\n#include \"lwip/ip_addr.h\"\n#include \"lwip/icmp.h\"\n/**\n * PING_USE_SOCKETS: Set to 1"
},
{
"path": "app/include/lwip/arch.h",
"chars": 10871,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/autoip.h",
"chars": 4609,
"preview": "/**\n * @file\n *\n * AutoIP Automatic LinkLocal IP Configuration\n */\n\n/*\n *\n * Copyright (c) 2007 Dominik Spies <kontakt@d"
},
{
"path": "app/include/lwip/debug.h",
"chars": 4145,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/def.h",
"chars": 4125,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/dhcp.h",
"chars": 8124,
"preview": "/** @file\n */\n\n#ifndef __LWIP_DHCP_H__\n#define __LWIP_DHCP_H__\n\n#include \"lwip/opt.h\"\n\n#if LWIP_DHCP /* don't build if n"
},
{
"path": "app/include/lwip/dns.h",
"chars": 5723,
"preview": "/**\n * lwip DNS resolver header file.\n\n * Author: Jim Pettinato \n * April 2007\n\n * ported from uIP resolv.c Copyright "
},
{
"path": "app/include/lwip/err.h",
"chars": 3207,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/icmp.h",
"chars": 3990,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/igmp.h",
"chars": 4084,
"preview": "/*\n * Copyright (c) 2002 CITEL Technologies Ltd.\n * All rights reserved.\n *\n * Redistribution and use in source and bina"
},
{
"path": "app/include/lwip/inet.h",
"chars": 4234,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/inet_chksum.h",
"chars": 3601,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/init.h",
"chars": 3001,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/ip.h",
"chars": 8272,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/ip_addr.h",
"chars": 10094,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved.\n *\n * Redistribution and us"
},
{
"path": "app/include/lwip/ip_frag.h",
"chars": 3011,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/mdns.h",
"chars": 5251,
"preview": "/**\n * lwip MDNS resolver header file.\n *\n * Created on: Jul 29, 2010\n * Author: Daniel Toma\n\n\n * ported from uIP resolv"
},
{
"path": "app/include/lwip/mem.h",
"chars": 5294,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/memp.h",
"chars": 4017,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/memp_std.h",
"chars": 5766,
"preview": "/*\n * SETUP: Make sure we define everything we will need.\n *\n * We have create three types of pools:\n * 1) MEMPOOL - s"
},
{
"path": "app/include/lwip/netbuf.h",
"chars": 4244,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/netdb.h",
"chars": 4653,
"preview": "/*\n * Redistribution and use in source and binary forms, with or without modification, \n * are permitted provided that t"
},
{
"path": "app/include/lwip/netif.h",
"chars": 12275,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/netifapi.h",
"chars": 3950,
"preview": "/*\n * Redistribution and use in source and binary forms, with or without modification, \n * are permitted provided that t"
},
{
"path": "app/include/lwip/opt.h",
"chars": 55414,
"preview": "/**\n * @file\n *\n * lwIP Options Configuration\n */\n\n/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n"
},
{
"path": "app/include/lwip/pbuf.h",
"chars": 5936,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/puck_def.h",
"chars": 1186,
"preview": "/*\r\n * puck_def.h\r\n *\r\n * Created on: Jul 22, 2010\r\n * Author: dtoma\r\n */\r\n\r\n#ifndef PUCK_DEF_H_\r\n#define PUCK_DEF"
},
{
"path": "app/include/lwip/raw.h",
"chars": 3691,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved.\n *\n * Redistribution and us"
},
{
"path": "app/include/lwip/sio.h",
"chars": 4351,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/snmp.h",
"chars": 12426,
"preview": "/*\n * Copyright (c) 2001, 2002 Leon Woestenberg <leon.woestenberg@axon.tv>\n * Copyright (c) 2001, 2002 Axon Digital Desi"
},
{
"path": "app/include/lwip/snmp_asn1.h",
"chars": 4041,
"preview": "/**\n * @file\n * Abstract Syntax Notation One (ISO 8824, 8825) codec.\n */\n \n/*\n * Copyright (c) 2006 Axon Digital Design "
},
{
"path": "app/include/lwip/snmp_msg.h",
"chars": 9520,
"preview": "/**\n * @file\n * SNMP Agent message handling structures.\n */\n\n/*\n * Copyright (c) 2006 Axon Digital Design B.V., The Neth"
},
{
"path": "app/include/lwip/snmp_structs.h",
"chars": 9873,
"preview": "/**\n * @file\n * Generic MIB tree structures.\n *\n * @todo namespace prefixes\n */\n\n/*\n * Copyright (c) 2006 Axon Digital D"
},
{
"path": "app/include/lwip/sntp.h",
"chars": 1408,
"preview": "#ifndef LWIP_SNTP_H\n#define LWIP_SNTP_H\n\n#include \"lwip/opt.h\"\n#include \"lwip/ip_addr.h\"\n\n#ifdef __cplusplus\nextern \"C\" "
},
{
"path": "app/include/lwip/sockets.h",
"chars": 14285,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/stats.h",
"chars": 8664,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/sys.h",
"chars": 12914,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/tcp.h",
"chars": 13946,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/tcp_impl.h",
"chars": 20639,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/tcpip.h",
"chars": 5096,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/timers.h",
"chars": 3373,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwip/udp.h",
"chars": 6308,
"preview": "/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n * All rights reserved. \n * \n * Redistribution and "
},
{
"path": "app/include/lwipopts.h",
"chars": 55834,
"preview": "/**\n * @file\n *\n * lwIP Options Configuration\n */\n\n/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Science.\n"
},
{
"path": "app/include/mem_manager.h",
"chars": 2410,
"preview": "#ifndef __MEM_MANAGER_H__\n#define __MEM_MANAGER_H__\n\n#include \"c_types.h\"\n\n/*-------------------------------------------"
},
{
"path": "app/include/netif/etharp.h",
"chars": 8289,
"preview": "/*\n * Copyright (c) 2001-2003 Swedish Institute of Computer Science.\n * Copyright (c) 2003-2004 Leon Woestenberg <leon.w"
},
{
"path": "app/include/netif/if_llc.h",
"chars": 4911,
"preview": "/*\t$NetBSD: if_llc.h,v 1.12 1999/11/19 20:41:19 thorpej Exp $\t*/\n\n/*-\n * Copyright (c) 1988, 1993\n *\tThe Regents of the "
},
{
"path": "app/include/netif/ppp_oe.h",
"chars": 7584,
"preview": "/*****************************************************************************\n* ppp_oe.h - PPP Over Ethernet implementa"
},
{
"path": "app/include/netif/wlan_lwip_if.h",
"chars": 553,
"preview": "/*\n * Copyright (c) 2010-2011 \tEspressif System\n * \n*/\n\n#ifndef _WLAN_LWIP_IF_H_\n#define _WLAN_LWIP_IF_H_\n\n#define LW"
},
{
"path": "app/include/pp/esf_buf.h",
"chars": 213,
"preview": "/* \n * copyright (c) 2008 - 2012 Espressif System \n * \n * esf buffer data structure\n */\n\n#ifndef _ESF_BUF_H_\n#define _ES"
},
{
"path": "app/include/serial_number.h",
"chars": 91,
"preview": "#ifndef __SERIAL_NUMBER_H\n#define __SERIAL_NUMBER_H\n\n#define SERIAL_NUMBER \"865732\"\n\n#endif"
},
{
"path": "app/include/ssl/app/espconn_secure.h",
"chars": 1841,
"preview": "#ifndef __ESPCONN_ENCRY_H__\n#define __ESPCONN_ENCRY_H__\n\n#include \"espconn/espconn.h\"\n\n/********************************"
},
{
"path": "app/include/ssl/app/espconn_ssl.h",
"chars": 2155,
"preview": "#ifndef ESPCONN_SSL_CLIENT_H\n#define ESPCONN_SSL_CLIENT_H\n\n#include \"ssl/ssl_ssl.h\"\n#include \"ssl/ssl_tls1.h\"\n\n#include "
},
{
"path": "app/include/ssl/cert.h",
"chars": 2492,
"preview": "unsigned char default_certificate[] = {\n 0x30, 0x82, 0x01, 0x82, 0x30, 0x81, 0xec, 0x02, 0x09, 0x00, 0x88, 0xf2,\n 0x5f"
},
{
"path": "app/include/ssl/private_key.h",
"chars": 2048,
"preview": "unsigned char default_private_key[] = {\n 0x30, 0x82, 0x01, 0x3a, 0x02, 0x01, 0x00, 0x02, 0x41, 0x00, 0xb9, 0x83,\n 0x30"
},
{
"path": "app/include/ssl/ssl_bigint.h",
"chars": 3856,
"preview": "/*\n * Copyright (c) 2007, Cameron Rich\n * \n * All rights reserved.\n * \n * Redistribution and use in source and binary fo"
},
{
"path": "app/include/ssl/ssl_bigint_impl.h",
"chars": 6047,
"preview": "/*\n * Copyright (c) 2007, Cameron Rich\n * \n * All rights reserved.\n * \n * Redistribution and use in source and binary fo"
},
{
"path": "app/include/ssl/ssl_cert.h",
"chars": 3016,
"preview": "unsigned char default_certificate[] = {\n 0x30, 0x82, 0x01, 0xd7, 0x30, 0x82, 0x01, 0x40, 0x02, 0x09, 0x00, 0xab,\n 0x08"
},
{
"path": "app/include/ssl/ssl_config.h",
"chars": 3337,
"preview": "/*\n * Automatically generated header file: don't edit\n */\n\n#define HAVE_DOT_CONFIG 1\n#undef CONFIG_PLATFORM_LINUX\n#defin"
},
{
"path": "app/include/ssl/ssl_crypto.h",
"chars": 8140,
"preview": "/*\n * Copyright (c) 2007, Cameron Rich\n * \n * All rights reserved.\n * \n * Redistribution and use in source and binary fo"
},
{
"path": "app/include/ssl/ssl_crypto_misc.h",
"chars": 6320,
"preview": "/*\n * Copyright (c) 2007, Cameron Rich\n * \n * All rights reserved.\n * \n * Redistribution and use in source and binary fo"
},
{
"path": "app/include/ssl/ssl_os_int.h",
"chars": 2130,
"preview": "/*\n * Copyright (c) 2012, Cameron Rich\n * \n * All rights reserved.\n * \n * Redistribution and use in source and binary fo"
},
{
"path": "app/include/ssl/ssl_os_port.h",
"chars": 2297,
"preview": "/*\n * Copyright (c) 2007, Cameron Rich\n * \n * All rights reserved.\n * \n * Redistribution and use in source and binary fo"
},
{
"path": "app/include/ssl/ssl_private_key.h",
"chars": 3842,
"preview": "unsigned char default_private_key[] = {\n 0x30, 0x82, 0x02, 0x5d, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, 0x00, 0xcd,\n 0xfd"
},
{
"path": "app/include/ssl/ssl_ssl.h",
"chars": 20431,
"preview": "/*\n * Copyright (c) 2007, Cameron Rich\n * \n * All rights reserved.\n * \n * Redistribution and use in source and binary fo"
},
{
"path": "app/include/ssl/ssl_tls1.h",
"chars": 9341,
"preview": "/*\n * Copyright (c) 2007, Cameron Rich\n * \n * All rights reserved.\n * \n * Redistribution and use in source and binary fo"
},
{
"path": "app/include/ssl/ssl_version.h",
"chars": 33,
"preview": "#define AXTLS_VERSION \"1.4.9\"\n"
},
{
"path": "app/include/user_config.h",
"chars": 1053,
"preview": "#ifndef __USER_CONFIG_H__\n#define __USER_CONFIG_H__\n\n\n#define INTERFACE_DOMAIN \"smart.relay.com\"\n\n\n#define FLASH_512K\n//"
},
{
"path": "app/include/xtensa/cacheasm.h",
"chars": 25367,
"preview": "/*\r\n * xtensa/cacheasm.h -- assembler-specific cache related definitions\r\n *\t\t\tthat depend on CORE configuration\r\n *\r\n *"
},
{
"path": "app/include/xtensa/cacheattrasm.h",
"chars": 13551,
"preview": "/*\r\n * xtensa/cacheattrasm.h -- assembler-specific CACHEATTR register related definitions\r\n *\t\t\tthat depend on CORE conf"
},
{
"path": "app/include/xtensa/config/core-isa.h",
"chars": 20051,
"preview": "/* \r\n * xtensa/config/core-isa.h -- HAL definitions that are dependent on Xtensa\r\n *\t\t\t\tprocessor CORE configuration\r\n *"
},
{
"path": "app/include/xtensa/config/core-matmap.h",
"chars": 16355,
"preview": "/* \r\n * xtensa/config/core-matmap.h -- Memory access and translation mapping\r\n *\tparameters (CHAL) of the Xtensa process"
},
{
"path": "app/include/xtensa/config/core.h",
"chars": 52958,
"preview": "/* \r\n * xtensa/config/core.h -- HAL definitions dependent on CORE configuration\r\n *\r\n * This header file is sometimes r"
},
{
"path": "app/include/xtensa/config/defs.h",
"chars": 1618,
"preview": "/* Definitions for Xtensa instructions, types, and protos. */\r\n\r\n/* Customer ID=7011; Build=0x2b6f6; Copyright (c) 2003-"
},
{
"path": "app/include/xtensa/config/specreg.h",
"chars": 2481,
"preview": "/*\r\n * Xtensa Special Register symbolic names\r\n */\r\n\r\n/* $Id: //depot/rel/Boreal/Xtensa/SWConfig/hal/specreg.h.tpp#2 $ *"
},
{
"path": "app/include/xtensa/config/system.h",
"chars": 11978,
"preview": "/* \r\n * xtensa/config/system.h -- HAL definitions that are dependent on SYSTEM configuration\r\n *\r\n * NOTE: The location"
},
{
"path": "app/include/xtensa/config/tie-asm.h",
"chars": 3307,
"preview": "/* \r\n * tie-asm.h -- compile-time HAL assembler definitions dependent on CORE & TIE\r\n *\r\n * NOTE: This header file is "
},
{
"path": "app/include/xtensa/config/tie.h",
"chars": 4956,
"preview": "/* \r\n * tie.h -- compile-time HAL definitions dependent on CORE & TIE configuration\r\n *\r\n * NOTE: This header file is "
},
{
"path": "app/include/xtensa/coreasm.h",
"chars": 28382,
"preview": "/*\r\n * xtensa/coreasm.h -- assembler-specific definitions that depend on CORE configuration\r\n *\r\n * Source for configur"
},
{
"path": "app/include/xtensa/corebits.h",
"chars": 7748,
"preview": "/*\r\n * xtensa/corebits.h - Xtensa Special Register field positions, masks, values.\r\n *\r\n * (In previous releases, these "
},
{
"path": "app/include/xtensa/hal.h",
"chars": 39428,
"preview": "/*\r\n xtensa/hal.h -- contains a definition of the Core HAL interface\r\n\r\n All definitions in this header file are ind"
},
{
"path": "app/include/xtensa/sim.h",
"chars": 1839,
"preview": "/* Copyright (c) 2004-2006 by Tensilica Inc. ALL RIGHTS RESERVED.\r\n/ These coded instructions, statements, and compute"
},
{
"path": "app/include/xtensa/simcall-errno.h",
"chars": 3953,
"preview": "/* Error numbers for Xtensa ISS semihosting. */\r\n\r\n/* Copyright (c) 2003 by Tensilica Inc. ALL RIGHTS RESERVED.\r\n Th"
},
{
"path": "app/include/xtensa/simcall-fcntl.h",
"chars": 798,
"preview": "/* File control operations for Xtensa ISS semihosting. */\r\n\r\n/* Copyright (c) 2003 by Tensilica Inc. ALL RIGHTS RESERV"
},
{
"path": "app/include/xtensa/simcall.h",
"chars": 6857,
"preview": "/*\r\n * simcall.h - Simulator call numbers\r\n *\r\n * Software that runs on a simulated Xtensa processor using\r\n * the "
},
{
"path": "app/include/xtensa/specreg.h",
"chars": 3874,
"preview": "/*\r\n * Xtensa Special Register symbolic names\r\n */\r\n\r\n/* $Id: //depot/rel/Boreal/Xtensa/OS/include/xtensa/specreg.h#2 $ "
},
{
"path": "app/include/xtensa/tie/xt_MUL32.h",
"chars": 895,
"preview": "/* Definitions for the 32-bit Integer Multiply Option. */\r\n\r\n/*\r\n * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2009 "
},
{
"path": "app/include/xtensa/tie/xt_core.h",
"chars": 11376,
"preview": "/* Definitions for the xt_core TIE package */\r\n\r\n/*\r\n * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Tensilica"
},
{
"path": "app/include/xtensa/tie/xt_debug.h",
"chars": 4327,
"preview": "/* Definitions for the xt_debug TIE package */\r\n\r\n/*\r\n * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Tensilic"
},
{
"path": "app/include/xtensa/tie/xt_density.h",
"chars": 2241,
"preview": "/* Definitions for the xt_density TIE package */\r\n\r\n/*\r\n * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Tensil"
},
{
"path": "app/include/xtensa/tie/xt_exceptions.h",
"chars": 1755,
"preview": "/* Definitions for the xt_exceptions TIE package */\r\n\r\n/*\r\n * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Ten"
},
{
"path": "app/include/xtensa/tie/xt_externalregisters.h",
"chars": 1702,
"preview": "/* Definitions for the xt_externalregisters TIE package */\r\n\r\n/*\r\n * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004"
},
{
"path": "app/include/xtensa/tie/xt_interrupt.h",
"chars": 2302,
"preview": "/* Definitions for the xt_interrupt TIE package */\r\n\r\n/*\r\n * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Tens"
},
{
"path": "app/include/xtensa/tie/xt_misc.h",
"chars": 1644,
"preview": "/* Definitions for the xt_misc TIE package */\r\n\r\n/*\r\n * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Tensilica"
},
{
"path": "app/include/xtensa/tie/xt_mmu.h",
"chars": 2371,
"preview": "/* Definitions for the xt_mmu TIE package */\r\n\r\n/*\r\n * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Tensilica "
},
{
"path": "app/include/xtensa/tie/xt_mul.h",
"chars": 1764,
"preview": "/* Definitions for the xt_mul TIE package */\r\n\r\n/*\r\n * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Tensilica "
},
{
"path": "app/include/xtensa/tie/xt_timer.h",
"chars": 2140,
"preview": "/* Definitions for the xt_timer TIE package */\r\n\r\n/*\r\n * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Tensilic"
},
{
"path": "app/include/xtensa/tie/xt_trace.h",
"chars": 1590,
"preview": "/* Definitions for the xt_trace TIE package */\r\n\r\n/*\r\n * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Tensilic"
},
{
"path": "app/include/xtensa/xtensa-libdb-macros.h",
"chars": 9169,
"preview": "/*\r\n * xtensa-libdb-macros.h\r\n */\r\n\r\n/* $Id: //depot/rel/Boreal/Xtensa/Software/libdb/xtensa-libdb-macros.h#2 $ */\r\n\r\n/"
},
{
"path": "app/include/xtensa/xtensa-xer.h",
"chars": 3785,
"preview": "/* xer-constants.h -- various constants describing external registers accessed \r\n via wer and rer.\r\n\r\n TODO: f"
},
{
"path": "app/include/xtensa/xtruntime-frames.h",
"chars": 5645,
"preview": "/* xtruntime-frames.h - exception stack frames for single-threaded run-time */\r\n/* $Id: //depot/rel/Boreal/Xtensa/OS"
},
{
"path": "app/include/xtensa/xtruntime.h",
"chars": 8212,
"preview": "/*\r\n * xtruntime.h -- general C definitions for single-threaded run-time\r\n *\r\n * Copyright (c) 2002-2008 Tensilica Inc"
},
{
"path": "app/json/Makefile",
"chars": 1469,
"preview": "\n#############################################################\n# Required variables for each makefile\n# Discard this sec"
},
{
"path": "app/json/cJson.c",
"chars": 32834,
"preview": "/*\n Copyright (c) 2009 Dave Gamble\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of"
},
{
"path": "app/libc/Makefile",
"chars": 1466,
"preview": "\n#############################################################\n# Required variables for each makefile\n# Discard this sec"
},
{
"path": "app/libc/c_ctype.c",
"chars": 359,
"preview": "#include \"c_ctype.h\"\n#include \"c_types.h\"\n\n// int isalnum(int c){}\n// int isalpha(int c){}\n// int iscntrl(int c){}\n// in"
},
{
"path": "app/libc/c_ctype.h",
"chars": 810,
"preview": "#ifndef _C_CTYPE_H_\n#define _C_CTYPE_H_\n\n#if 0\nint isalnum(int);\nint isalpha(int);\nint iscntrl(int);\nint isdigit(int);\n/"
},
{
"path": "app/libc/c_errno.h",
"chars": 268,
"preview": "#ifndef __c_errno_h\n#define __c_errno_h\n\n#include <errno.h>\n// #ifndef errno\n// extern int errno;\n// #endif\n\n// #define "
},
{
"path": "app/libc/c_fcntl.h",
"chars": 93,
"preview": "#ifndef __c_fcntl_h\n#define __c_fcntl_h\n\n#include <fcntl.h>\n\n#endif\n\n/* end of c_fcntl.h */\n\n"
},
{
"path": "app/libc/c_limits.h",
"chars": 2045,
"preview": "#ifndef __c_limits_h\n#define __c_limits_h\n\n#include <limits.h>\n#if 0\n#define CHAR_BIT 8\n /* max number of bits for sm"
},
{
"path": "app/libc/c_locale.h",
"chars": 1238,
"preview": "/*\n\tc_locale.h\n\tValues appropriate for the formatting of monetary and other\n\tnumberic quantities.\n*/\n\n#ifndef _C_LOCALE_"
},
{
"path": "app/libc/c_math.c",
"chars": 4319,
"preview": "#include \"c_math.h\"\n#include \"c_types.h\"\n\ndouble floor(double x)\n{\n return (double) (x < 0.f ? (((int) x) - 1) : ((in"
},
{
"path": "app/libc/c_math.h",
"chars": 1259,
"preview": "#ifndef _C_MATH_H_\n#define _C_MATH_H_\n#include <math.h>\n\ndouble floor(double);\ndouble pow(double, double);\n\n#if 0\n#ifn"
},
{
"path": "app/libc/c_signal.h",
"chars": 90,
"preview": "#ifndef _C_SIGNAL_H_\n#define _C_SIGNAL_H_\n\n#include <signal.h>\n\n#endif /* _C_SIGNAL_H_ */\n"
},
{
"path": "app/libc/c_stdarg.h",
"chars": 412,
"preview": "#ifndef __c_stdarg_h\n#define __c_stdarg_h\n\n#if defined(__GNUC__)\n\n#include <stdarg.h>\n\n#else\n\ntypedef char * va_list;\n\n#"
},
{
"path": "app/libc/c_stddef.h",
"chars": 491,
"preview": "#ifndef __c_stddef_h\n#define __c_stddef_h\n\ntypedef signed int ptrdiff_t;\n\n#if !defined(offsetof)\n#define offsetof(s, m) "
},
{
"path": "app/libc/c_stdint.h",
"chars": 8271,
"preview": "#ifndef __c_stdint_h\n#define __c_stdint_h\n\n#include \"c_types.h\"\n#if 0\n/*\n * Depending on compiler version __int64 or __I"
},
{
"path": "app/libc/c_stdio.c",
"chars": 11346,
"preview": "#include \"c_stdio.h\"\n#include \"c_types.h\"\n// #include \"driver/uart.h\"\n\nint c_stdin = 999;\nint c_stdout = 1000;\nint c_std"
},
{
"path": "app/libc/c_stdio.h",
"chars": 2597,
"preview": "#ifndef _C_STDIO_H_\n#define _C_STDIO_H_\n\n#define __need_size_t\n\n#include \"c_stddef.h\"\n#include \"osapi.h\"\n// #include \"dr"
},
{
"path": "app/libc/c_stdlib.c",
"chars": 5446,
"preview": "#include \"c_stdlib.h\"\n#include \"c_stdio.h\"\n#include \"c_types.h\"\n#include \"c_string.h\"\n#include \"user_interface.h\"\n\n\n\n// "
},
{
"path": "app/libc/c_stdlib.h",
"chars": 1293,
"preview": "/*\n * c_stdlib.h\n *\n * Definitions for common types, variables, and functions.\n */\n\n#ifndef _C_STDLIB_H_\n#define _C_STDL"
},
{
"path": "app/libc/c_string.c",
"chars": 1393,
"preview": "#include \"c_string.h\"\n\nchar* itoa(int i, char b[]) // Convert Integer to ASCII!!\n{\n char const digit[] = \"0123456789"
},
{
"path": "app/libc/c_string.h",
"chars": 1200,
"preview": "/*\n * c_string.h\n *\n * Definitions for memory and string functions.\n */\n\n#ifndef _C_STRING_H_\n#define\t_C_STRING_H_\n#incl"
},
{
"path": "app/lwip/Makefile",
"chars": 1615,
"preview": "\n#############################################################\n# Required variables for each makefile\n# Discard this sec"
},
{
"path": "app/lwip/api/Makefile",
"chars": 1495,
"preview": "\r\n#############################################################\r\n# Required variables for each makefile\r\n# Discard this "
},
{
"path": "app/lwip/api/api_lib.c",
"chars": 22574,
"preview": "/**\n * @file\n * Sequential API External module\n *\n */\n \n/*\n * Copyright (c) 2001-2004 Swedish Institute of Computer Scie"
}
]
// ... and 179 more files (download for full content)
About this extraction
This page contains the full source code of the israellot/esp-ginx GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 379 files (3.7 MB), approximately 994.4k tokens, and a symbol index with 2749 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.