├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── bin ├── blank.bin ├── boot_v1.3(b3).bin └── esp_init_data_default.bin ├── examples ├── driver_lib │ ├── driver │ │ ├── Makefile │ │ ├── gpio.c │ │ └── uart.c │ └── include │ │ ├── gpio.h │ │ └── uart.h └── smart_config │ ├── Makefile │ ├── gen_misc.bat │ ├── gen_misc.sh │ ├── include │ └── user_config.h │ ├── readme.txt │ └── user │ ├── Makefile │ └── user_main.c ├── extra_include ├── _ansi.h ├── _syslist.h ├── alloca.h ├── ar.h ├── argz.h ├── assert.h ├── ctype.h ├── dirent.h ├── envz.h ├── errno.h ├── fastmath.h ├── fcntl.h ├── grp.h ├── iconv.h ├── ieeefp.h ├── inttypes.h ├── langinfo.h ├── limits.h ├── locale.h ├── machine │ ├── ansi.h │ ├── endian.h │ ├── fastmath.h │ ├── ieeefp.h │ ├── malloc.h │ ├── param.h │ ├── setjmp-dj.h │ ├── setjmp.h │ ├── stdlib.h │ ├── termios.h │ ├── time.h │ ├── types.h │ └── xtensa-hal.h ├── malloc.h ├── math.h ├── memory.h ├── newlib.h ├── paths.h ├── process.h ├── pthread.h ├── pwd.h ├── reent.h ├── regdef.h ├── search.h ├── setjmp.h ├── signal.h ├── stdint.h ├── stdio.h ├── stdlib.h ├── string.h ├── sys │ ├── _types.h │ ├── cdefs.h │ ├── config.h │ ├── dirent.h │ ├── errno.h │ ├── fcntl.h │ ├── features.h │ ├── file.h │ ├── iconvnls.h │ ├── lock.h │ ├── param.h │ ├── queue.h │ ├── reent.h │ ├── resource.h │ ├── sched.h │ ├── signal.h │ ├── stat.h │ ├── stdio.h │ ├── syslimits.h │ ├── time.h │ ├── timeb.h │ ├── times.h │ ├── types.h │ ├── unistd.h │ ├── utime.h │ └── wait.h ├── termios.h ├── time.h ├── unctrl.h ├── unistd.h ├── utime.h ├── utmp.h ├── wchar.h ├── wctype.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 ├── include ├── espressif │ ├── c_types.h │ ├── esp8266 │ │ ├── eagle_soc.h │ │ ├── esp8266.h │ │ ├── ets_sys.h │ │ ├── gpio_register.h │ │ ├── pin_mux_register.h │ │ ├── spi_register.h │ │ ├── timer_register.h │ │ └── uart_register.h │ ├── esp_common.h │ ├── esp_libc.h │ ├── esp_misc.h │ ├── esp_softap.h │ ├── esp_sta.h │ ├── esp_system.h │ ├── esp_timer.h │ ├── esp_wifi.h │ ├── queue.h │ ├── smartconfig.h │ └── spi_flash.h ├── freertos │ ├── FreeRTOS.h │ ├── FreeRTOSConfig.h │ ├── StackMacros.h │ ├── croutine.h │ ├── list.h │ ├── mpu_wrappers.h │ ├── portable.h │ ├── portmacro.h │ ├── projdefs.h │ ├── queue.h │ ├── semphr.h │ ├── task.h │ ├── timers.h │ ├── xtensa_context.h │ ├── xtensa_rtos.h │ └── xtensa_timer.h ├── json │ └── cJSON.h ├── lwip │ ├── arch │ │ ├── cc.h │ │ ├── perf.h │ │ └── sys_arch.h │ ├── ipv4 │ │ └── lwip │ │ │ ├── autoip.h │ │ │ ├── icmp.h │ │ │ ├── igmp.h │ │ │ ├── inet.h │ │ │ ├── ip4.h │ │ │ ├── ip4_addr.h │ │ │ └── ip_frag.h │ ├── ipv6 │ │ └── lwip │ │ │ ├── dhcp6.h │ │ │ ├── ethip6.h │ │ │ ├── icmp6.h │ │ │ ├── inet6.h │ │ │ ├── ip6.h │ │ │ ├── ip6_addr.h │ │ │ ├── ip6_frag.h │ │ │ ├── mld6.h │ │ │ └── nd6.h │ ├── lwip │ │ ├── api.h │ │ ├── api_msg.h │ │ ├── arch.h │ │ ├── debug.h │ │ ├── def.h │ │ ├── dhcp.h │ │ ├── dns.h │ │ ├── err.h │ │ ├── inet_chksum.h │ │ ├── init.h │ │ ├── ip.h │ │ ├── ip_addr.h │ │ ├── mem.h │ │ ├── memp.h │ │ ├── memp_std.h │ │ ├── netbuf.h │ │ ├── netdb.h │ │ ├── netif.h │ │ ├── netifapi.h │ │ ├── opt.h │ │ ├── pbuf.h │ │ ├── raw.h │ │ ├── sio.h │ │ ├── snmp.h │ │ ├── snmp_asn1.h │ │ ├── snmp_msg.h │ │ ├── snmp_structs.h │ │ ├── sockets.h │ │ ├── stats.h │ │ ├── sys.h │ │ ├── tcp.h │ │ ├── tcp_impl.h │ │ ├── tcpip.h │ │ ├── timers.h │ │ └── udp.h │ ├── lwipopts.h │ ├── netif │ │ ├── etharp.h │ │ ├── if_llc.h │ │ ├── ppp_oe.h │ │ ├── slipif.h │ │ └── wlan_lwip_if.h │ └── posix │ │ ├── netdb.h │ │ └── sys │ │ └── socket.h ├── ssl │ ├── ssl_bigint.h │ ├── ssl_bigint_impl.h │ ├── ssl_config.h │ ├── ssl_crypto.h │ ├── ssl_crypto_misc.h │ ├── ssl_os_port.h │ ├── ssl_ssl.h │ ├── ssl_tls1.h │ └── ssl_version.h └── udhcp │ ├── common.h │ ├── dhcpc.h │ └── dhcpd.h ├── ld ├── eagle.app.v6.ld ├── eagle.app.v6.new.1024.app1.ld ├── eagle.app.v6.new.1024.app2.ld ├── eagle.app.v6.new.512.app1.ld ├── eagle.app.v6.new.512.app2.ld ├── eagle.app.v6.old.1024.app1.ld ├── eagle.app.v6.old.1024.app2.ld ├── eagle.app.v6.old.512.app1.ld ├── eagle.app.v6.old.512.app2.ld └── eagle.rom.addr.v6.ld ├── lib ├── libfreertos.a ├── libjson.a ├── liblwip.a ├── libmain.a ├── libnet80211.a ├── libphy.a ├── libpp.a ├── libsmartconfig.a ├── libssl.a ├── libudhcp.a └── libwpa.a ├── mp3 ├── Makefile ├── driver │ ├── .output │ │ └── eagle │ │ │ └── release │ │ │ ├── lib │ │ │ └── libdriver.a │ │ │ └── obj │ │ │ ├── gpio.d │ │ │ ├── gpio.o │ │ │ ├── uart.d │ │ │ └── uart.o │ ├── Makefile │ ├── gpio.c │ ├── i2s_freertos.c │ ├── spiram.c │ └── uart.c ├── gen_misc.bat ├── gen_misc.sh ├── include │ ├── gpio.h │ ├── i2s_freertos.h │ ├── i2s_reg.h │ ├── mad.h │ ├── sdio_slv.h │ ├── slc_register.h │ ├── spiram.h │ ├── spiram_fifo.h │ ├── uart.h │ ├── user_config.h │ └── user_interface.h ├── mad │ ├── .output │ │ └── eagle │ │ │ └── release │ │ │ ├── lib │ │ │ └── libmad.a │ │ │ └── obj │ │ │ ├── bit.d │ │ │ ├── bit.o │ │ │ ├── decoder.d │ │ │ ├── decoder.o │ │ │ ├── fixed.d │ │ │ ├── fixed.o │ │ │ ├── frame.d │ │ │ ├── frame.o │ │ │ ├── huffman.d │ │ │ ├── huffman.o │ │ │ ├── layer12.d │ │ │ ├── layer12.o │ │ │ ├── layer3.d │ │ │ ├── layer3.o │ │ │ ├── stream.d │ │ │ ├── stream.o │ │ │ ├── synth.d │ │ │ ├── synth.o │ │ │ ├── timer.d │ │ │ ├── timer.o │ │ │ ├── version.d │ │ │ └── version.o │ ├── D.dat │ ├── Makefile │ ├── align.c │ ├── align.h │ ├── bit.c │ ├── bit.h │ ├── config.h │ ├── decoder.c │ ├── decoder.h │ ├── fixed.c │ ├── fixed.h │ ├── frame.c │ ├── frame.h │ ├── global.h │ ├── huffman.c │ ├── huffman.h │ ├── imdct_s.dat │ ├── layer3.c │ ├── layer3.h │ ├── mad.h │ ├── mpg12 │ │ ├── layer12.c │ │ ├── layer12.h │ │ └── readme.txt │ ├── qc_table.dat │ ├── rq_table.dat │ ├── sf_table.dat │ ├── stream.c │ ├── stream.h │ ├── synth.c │ ├── synth.h │ ├── synth_stereo.c.unused │ ├── timer.c │ ├── timer.h │ ├── version.c │ └── version.h ├── make.sh └── user │ ├── Makefile │ ├── playerconfig.h │ ├── spiram_fifo.c │ └── user_main.c ├── third_party ├── freertos │ ├── Makefile │ ├── croutine.c │ ├── heap_4.c │ ├── list.c │ ├── port.c │ ├── queue.c │ ├── readme.txt │ ├── tasks.c │ └── timers.c ├── json │ ├── Makefile │ └── cJSON.c ├── ssl │ ├── Makefile │ ├── 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 └── udhcp │ ├── Makefile │ ├── arpping.c │ ├── common.c │ ├── dhcpd.c │ ├── files.c │ ├── leases.c │ ├── packet.c │ ├── read.c │ ├── socket.c │ ├── static_leases.c │ └── time.c └── tools ├── gen_appbin.py └── makefile.sh /.gitignore: -------------------------------------------------------------------------------- 1 | bin/eagle.* 2 | mp3/driver/.output 3 | mp3/mad/.output 4 | mp3/user/.output 5 | mp3/.output 6 | mp3/mapfile 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/LICENSE -------------------------------------------------------------------------------- /bin/blank.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/bin/blank.bin -------------------------------------------------------------------------------- /bin/boot_v1.3(b3).bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/bin/boot_v1.3(b3).bin -------------------------------------------------------------------------------- /bin/esp_init_data_default.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/bin/esp_init_data_default.bin -------------------------------------------------------------------------------- /examples/driver_lib/driver/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ############################################################# 3 | # Required variables for each makefile 4 | # Discard this section from all parent makefiles 5 | # Expected variables (with automatic defaults): 6 | # CSRCS (all "C" files in the dir) 7 | # SUBDIRS (all subdirs with a Makefile) 8 | # GEN_LIBS - list of libs to be generated () 9 | # GEN_IMAGES - list of images to be generated () 10 | # COMPONENTS_xxx - a list of libs/objs in the form 11 | # subdir/lib to be extracted and rolled up into 12 | # a generated lib/image xxx.a () 13 | # 14 | ifndef PDIR 15 | GEN_LIBS = libdriver.a 16 | endif 17 | 18 | 19 | ############################################################# 20 | # Configuration i.e. compile options etc. 21 | # Target specific stuff (defines etc.) goes in here! 22 | # Generally values applying to a tree are captured in the 23 | # makefile at its root level - these are then overridden 24 | # for a subtree within the makefile rooted therein 25 | # 26 | #DEFINES += 27 | 28 | ############################################################# 29 | # Recursion Magic - Don't touch this!! 30 | # 31 | # Each subtree potentially has an include directory 32 | # corresponding to the common APIs applicable to modules 33 | # rooted at that subtree. Accordingly, the INCLUDE PATH 34 | # of a module can only contain the include directories up 35 | # its parent path, and not its siblings 36 | # 37 | # Required for each makefile to inherit from the parent 38 | # 39 | 40 | INCLUDES := $(INCLUDES) -I $(PDIR)include 41 | PDIR := ../$(PDIR) 42 | sinclude $(PDIR)Makefile 43 | 44 | -------------------------------------------------------------------------------- /examples/smart_config/gen_misc.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | echo Please follow below steps(1-5) to generate specific bin(s): 4 | echo STEP 1: choose boot version(0=boot_v1.1, 1=boot_v1.2+, 2=none) 5 | set input=default 6 | set /p input=enter(0/1/2, default 2): 7 | 8 | if %input% equ 0 ( 9 | set boot=old 10 | ) else ( 11 | if %input% equ 1 ( 12 | set boot=new 13 | ) else ( 14 | set boot=none 15 | ) 16 | ) 17 | 18 | echo boot mode: %boot% 19 | echo. 20 | 21 | echo STEP 2: choose bin generate(0=eagle.flash.bin+eagle.irom0text.bin, 1=user1.bin, 2=user2.bin) 22 | set input=default 23 | set /p input=enter (0/1/2, default 0): 24 | 25 | if %input% equ 1 ( 26 | if %boot% equ none ( 27 | set app=0 28 | echo choose no boot before 29 | echo generate bin: eagle.flash.bin+eagle.irom0text.bin 30 | ) else ( 31 | set app=1 32 | echo generate bin: user1.bin 33 | ) 34 | ) else ( 35 | if %input% equ 2 ( 36 | if %boot% equ none ( 37 | set app=0 38 | echo choose no boot before 39 | echo generate bin: eagle.flash.bin+eagle.irom0text.bin 40 | ) else ( 41 | set app=2 42 | echo generate bin: user2.bin 43 | ) 44 | ) else ( 45 | if %boot% neq none ( 46 | set boot=none 47 | echo ignore boot 48 | ) 49 | set app=0 50 | echo generate bin: eagle.flash.bin+eagle.irom0text.bin 51 | )) 52 | 53 | echo. 54 | 55 | echo STEP 3: choose spi speed(0=20MHz, 1=26.7MHz, 2=40MHz, 3=80MHz) 56 | set input=default 57 | set /p input=enter (0/1/2/3, default 2): 58 | 59 | if %input% equ 0 ( 60 | set spi_speed=20 61 | ) else ( 62 | if %input% equ 1 ( 63 | set spi_speed=26.7 64 | ) else ( 65 | if %input% equ 3 ( 66 | set spi_speed=80 67 | ) else ( 68 | set spi_speed=40 69 | ))) 70 | 71 | echo spi speed: %spi_speed% MHz 72 | echo. 73 | 74 | echo STEP 4: choose spi mode(0=QIO, 1=QOUT, 2=DIO, 3=DOUT) 75 | set input=default 76 | set /p input=enter (0/1/2/3, default 0): 77 | 78 | if %input% equ 1 ( 79 | set spi_mode=QOUT 80 | ) else ( 81 | if %input% equ 2 ( 82 | set spi_mode=DIO 83 | ) else ( 84 | if %input% equ 3 ( 85 | set spi_mode=DOUT 86 | ) else ( 87 | set spi_mode=QIO 88 | ))) 89 | 90 | echo spi mode: %spi_mode% 91 | echo. 92 | 93 | echo STEP 5: choose spi size(0=256KB, 1=512KB, 2=1024KB, 3=2048KB, 4=4096KB) 94 | set input=default 95 | set /p input=enter (0/1/2/3/4, default 1): 96 | 97 | if %input% equ 0 ( 98 | set spi_size=256 99 | ) else ( 100 | if %input% equ 2 ( 101 | set spi_size=1024 102 | ) else ( 103 | if %input% equ 3 ( 104 | set spi_size=2048 105 | ) else ( 106 | if %input% equ 4 ( 107 | set spi_size=4096 108 | ) else ( 109 | set spi_size=512 110 | )))) 111 | 112 | echo spi size: %spi_size% KB 113 | 114 | touch user/user_main.c 115 | 116 | echo. 117 | echo start... 118 | echo. 119 | 120 | make BOOT=%boot% APP=%app% SPI_SPEED=%spi_speed% SPI_MODE=%spi_mode% SPI_SIZE=%spi_size% 121 | 122 | -------------------------------------------------------------------------------- /examples/smart_config/include/user_config.h: -------------------------------------------------------------------------------- 1 | #ifndef __USER_CONFIG_H__ 2 | #define __USER_CONFIG_H__ 3 | 4 | #endif 5 | 6 | -------------------------------------------------------------------------------- /examples/smart_config/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/examples/smart_config/readme.txt -------------------------------------------------------------------------------- /examples/smart_config/user/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ############################################################# 3 | # Required variables for each makefile 4 | # Discard this section from all parent makefiles 5 | # Expected variables (with automatic defaults): 6 | # CSRCS (all "C" files in the dir) 7 | # SUBDIRS (all subdirs with a Makefile) 8 | # GEN_LIBS - list of libs to be generated () 9 | # GEN_IMAGES - list of images to be generated () 10 | # COMPONENTS_xxx - a list of libs/objs in the form 11 | # subdir/lib to be extracted and rolled up into 12 | # a generated lib/image xxx.a () 13 | # 14 | ifndef PDIR 15 | GEN_LIBS = libuser.a 16 | endif 17 | 18 | 19 | ############################################################# 20 | # Configuration i.e. compile options etc. 21 | # Target specific stuff (defines etc.) goes in here! 22 | # Generally values applying to a tree are captured in the 23 | # makefile at its root level - these are then overridden 24 | # for a subtree within the makefile rooted therein 25 | # 26 | #DEFINES += 27 | 28 | ############################################################# 29 | # Recursion Magic - Don't touch this!! 30 | # 31 | # Each subtree potentially has an include directory 32 | # corresponding to the common APIs applicable to modules 33 | # rooted at that subtree. Accordingly, the INCLUDE PATH 34 | # of a module can only contain the include directories up 35 | # its parent path, and not its siblings 36 | # 37 | # Required for each makefile to inherit from the parent 38 | # 39 | 40 | INCLUDES := $(INCLUDES) -I $(PDIR)include 41 | PDIR := ../$(PDIR) 42 | sinclude $(PDIR)Makefile 43 | 44 | -------------------------------------------------------------------------------- /examples/smart_config/user/user_main.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright 2013-2014 Espressif Systems (Wuxi) 3 | * 4 | * FileName: user_main.c 5 | * 6 | * Description: entry file of user application 7 | * 8 | * Modification history: 9 | * 2014/12/1, v1.0 create this file. 10 | *******************************************************************************/ 11 | #include "esp_common.h" 12 | 13 | #include "freertos/FreeRTOS.h" 14 | #include "freertos/task.h" 15 | 16 | #include "lwip/sockets.h" 17 | #include "lwip/dns.h" 18 | #include "lwip/netdb.h" 19 | 20 | #include "udhcp/dhcpd.h" 21 | 22 | #define server_ip "192.168.101.142" 23 | #define server_port 9669 24 | 25 | void ICACHE_FLASH_ATTR 26 | smartconfig_done(void *data) 27 | { 28 | struct station_config *sta_conf = data; 29 | 30 | wifi_station_set_config(sta_conf); 31 | wifi_station_disconnect(); 32 | wifi_station_connect(); 33 | } 34 | 35 | void ICACHE_FLASH_ATTR 36 | smartconfig_task(void *pvParameters) 37 | { 38 | smartconfig_start(SC_TYPE_ESPTOUCH, smartconfig_done);//SC_TYPE_AIRKISS 39 | 40 | vTaskDelete(NULL); 41 | } 42 | 43 | void ICACHE_FLASH_ATTR 44 | sc_smartconfig_check(void) 45 | { 46 | if(SC_STATUS_LINK_OVER == smartconfig_get_status()) { 47 | smartconfig_stop(); 48 | } 49 | 50 | } 51 | /****************************************************************************** 52 | * FunctionName : user_init 53 | * Description : entry of user application, init user function here 54 | * Parameters : none 55 | * Returns : none 56 | *******************************************************************************/ 57 | void ICACHE_FLASH_ATTR 58 | user_init(void) 59 | { 60 | printf("SDK version:%s\n", system_get_sdk_version()); 61 | 62 | /* need to set opmode before you set config */ 63 | wifi_set_opmode(STATION_MODE); 64 | 65 | xTaskCreate(smartconfig_task, "smartconfig_task", 256, NULL, 2, NULL); 66 | } 67 | 68 | -------------------------------------------------------------------------------- /extra_include/_ansi.h: -------------------------------------------------------------------------------- 1 | /* Provide support for both ANSI and non-ANSI environments. */ 2 | 3 | /* Some ANSI environments are "broken" in the sense that __STDC__ cannot be 4 | relied upon to have it's intended meaning. Therefore we must use our own 5 | concoction: _HAVE_STDC. Always use _HAVE_STDC instead of __STDC__ in newlib 6 | sources! 7 | 8 | To get a strict ANSI C environment, define macro __STRICT_ANSI__. This will 9 | "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header 10 | files aren't affected). */ 11 | 12 | #ifndef _ANSIDECL_H_ 13 | #define _ANSIDECL_H_ 14 | 15 | #include 16 | #include 17 | 18 | /* First try to figure out whether we really are in an ANSI C environment. */ 19 | /* FIXME: This probably needs some work. Perhaps sys/config.h can be 20 | prevailed upon to give us a clue. */ 21 | 22 | #ifdef __STDC__ 23 | #define _HAVE_STDC 24 | #endif 25 | 26 | #ifdef _HAVE_STDC 27 | #define _PTR void * 28 | #define _AND , 29 | #define _NOARGS void 30 | #define _CONST const 31 | #define _VOLATILE volatile 32 | #define _SIGNED signed 33 | #define _DOTS , ... 34 | #define _VOID void 35 | #ifdef __CYGWIN__ 36 | #define _EXFUN(name, proto) __cdecl name proto 37 | #define _EXPARM(name, proto) (* __cdecl name) proto 38 | #else 39 | #define _EXFUN(name, proto) name proto 40 | #define _EXPARM(name, proto) (* name) proto 41 | #endif 42 | #define _DEFUN(name, arglist, args) name(args) 43 | #define _DEFUN_VOID(name) name(_NOARGS) 44 | #define _CAST_VOID (void) 45 | #ifndef _LONG_DOUBLE 46 | #define _LONG_DOUBLE long double 47 | #endif 48 | #ifndef _PARAMS 49 | #define _PARAMS(paramlist) paramlist 50 | #endif 51 | #else 52 | #define _PTR char * 53 | #define _AND ; 54 | #define _NOARGS 55 | #define _CONST 56 | #define _VOLATILE 57 | #define _SIGNED 58 | #define _DOTS 59 | #define _VOID void 60 | #define _EXFUN(name, proto) name() 61 | #define _DEFUN(name, arglist, args) name arglist args; 62 | #define _DEFUN_VOID(name) name() 63 | #define _CAST_VOID 64 | #define _LONG_DOUBLE double 65 | #ifndef _PARAMS 66 | #define _PARAMS(paramlist) () 67 | #endif 68 | #endif 69 | 70 | /* Support gcc's __attribute__ facility. */ 71 | 72 | #ifdef __GNUC__ 73 | #define _ATTRIBUTE(attrs) __attribute__ (attrs) 74 | #else 75 | #define _ATTRIBUTE(attrs) 76 | #endif 77 | 78 | /* ISO C++. */ 79 | 80 | #ifdef __cplusplus 81 | #if !(defined(_BEGIN_STD_C) && defined(_END_STD_C)) 82 | #ifdef _HAVE_STD_CXX 83 | #define _BEGIN_STD_C namespace std { extern "C" { 84 | #define _END_STD_C } } 85 | #else 86 | #define _BEGIN_STD_C extern "C" { 87 | #define _END_STD_C } 88 | #endif 89 | #endif 90 | #else 91 | #define _BEGIN_STD_C 92 | #define _END_STD_C 93 | #endif 94 | 95 | #endif /* _ANSIDECL_H_ */ 96 | -------------------------------------------------------------------------------- /extra_include/_syslist.h: -------------------------------------------------------------------------------- 1 | /* internal use only -- mapping of "system calls" for libraries that lose 2 | and only provide C names, so that we end up in violation of ANSI */ 3 | #ifndef __SYSLIST_H 4 | #define __SYSLIST_H 5 | #ifdef MISSING_SYSCALL_NAMES 6 | #define _close close 7 | #define _execve execve 8 | #define _fcntl fcntl 9 | #define _fork fork 10 | #define _fstat fstat 11 | #define _getpid getpid 12 | #define _gettimeofday gettimeofday 13 | #define _kill kill 14 | #define _link link 15 | #define _lseek lseek 16 | #define _open open 17 | #define _read read 18 | #define _sbrk sbrk 19 | #define _stat stat 20 | #define _times times 21 | #define _unlink unlink 22 | #define _wait wait 23 | #define _write write 24 | /* functions not yet sysfaked */ 25 | #define _opendir opendir 26 | #define _readdir readdir 27 | #define _closedir closedir 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /extra_include/alloca.h: -------------------------------------------------------------------------------- 1 | /* libc/include/alloca.h - Allocate memory on stack */ 2 | 3 | /* Written 2000 by Werner Almesberger */ 4 | /* Rearranged for general inclusion by stdlib.h. 5 | 2001, Corinna Vinschen */ 6 | 7 | #ifndef _NEWLIB_ALLOCA_H 8 | #define _NEWLIB_ALLOCA_H 9 | 10 | #include "_ansi.h" 11 | #include 12 | 13 | #ifdef __GNUC__ 14 | #define alloca(size) __builtin_alloca(size) 15 | #else 16 | void * _EXFUN(alloca,(size_t)); 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /extra_include/argz.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved. 2 | * 3 | * Permission to use, copy, modify, and distribute this software 4 | * is freely granted, provided that this notice is preserved. 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | /* The newlib implementation of these functions assumes that sizeof(char) == 1. */ 11 | error_t argz_create (char *const argv[], char **argz, size_t *argz_len); 12 | error_t argz_create_sep (const char *string, int sep, char **argz, size_t *argz_len); 13 | size_t argz_count (const char *argz, size_t argz_len); 14 | void argz_extract (char *argz, size_t argz_len, char **argv); 15 | void argz_stringify (char *argz, size_t argz_len, int sep); 16 | error_t argz_add (char **argz, size_t *argz_len, const char *str); 17 | error_t argz_add_sep (char **argz, size_t *argz_len, const char *str, int sep); 18 | error_t argz_append (char **argz, size_t *argz_len, const char *buf, size_t buf_len); 19 | error_t argz_delete (char **argz, size_t *argz_len, char *entry); 20 | error_t argz_insert (char **argz, size_t *argz_len, char *before, const char *entry); 21 | char * argz_next (char *argz, size_t argz_len, const char *entry); 22 | error_t argz_replace (char **argz, size_t *argz_len, const char *str, const char *with, unsigned *replace_count); 23 | -------------------------------------------------------------------------------- /extra_include/assert.h: -------------------------------------------------------------------------------- 1 | /* 2 | assert.h 3 | */ 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #include "_ansi.h" 10 | 11 | #undef assert 12 | 13 | #ifdef NDEBUG /* required by ANSI standard */ 14 | #define assert(p) ((void)0) 15 | #else 16 | 17 | #ifdef __STDC__ 18 | #define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, #e)) 19 | #else /* PCC */ 20 | #define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, "e")) 21 | #endif 22 | 23 | #endif /* NDEBUG */ 24 | 25 | void _EXFUN(__assert,(const char *, int, const char *)); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | -------------------------------------------------------------------------------- /extra_include/ctype.h: -------------------------------------------------------------------------------- 1 | #ifndef _CTYPE_H_ 2 | #define _CTYPE_H_ 3 | 4 | #include "_ansi.h" 5 | 6 | _BEGIN_STD_C 7 | 8 | int _EXFUN(isalnum, (int __c)); 9 | int _EXFUN(isalpha, (int __c)); 10 | int _EXFUN(iscntrl, (int __c)); 11 | int _EXFUN(isdigit, (int __c)); 12 | int _EXFUN(isgraph, (int __c)); 13 | int _EXFUN(islower, (int __c)); 14 | int _EXFUN(isprint, (int __c)); 15 | int _EXFUN(ispunct, (int __c)); 16 | int _EXFUN(isspace, (int __c)); 17 | int _EXFUN(isupper, (int __c)); 18 | int _EXFUN(isxdigit,(int __c)); 19 | int _EXFUN(tolower, (int __c)); 20 | int _EXFUN(toupper, (int __c)); 21 | 22 | #ifndef __STRICT_ANSI__ 23 | int _EXFUN(isblank, (int __c)); 24 | int _EXFUN(isascii, (int __c)); 25 | int _EXFUN(toascii, (int __c)); 26 | int _EXFUN(_tolower, (int __c)); 27 | int _EXFUN(_toupper, (int __c)); 28 | #endif 29 | 30 | #define _U 01 31 | #define _L 02 32 | #define _N 04 33 | #define _S 010 34 | #define _P 020 35 | #define _C 040 36 | #define _X 0100 37 | #define _B 0200 38 | 39 | extern __IMPORT _CONST char _ctype_[]; 40 | 41 | #ifndef __cplusplus 42 | #define isalpha(c) ((_ctype_+1)[(unsigned)(c)]&(_U|_L)) 43 | #define isupper(c) ((_ctype_+1)[(unsigned)(c)]&_U) 44 | #define islower(c) ((_ctype_+1)[(unsigned)(c)]&_L) 45 | #define isdigit(c) ((_ctype_+1)[(unsigned)(c)]&_N) 46 | #define isxdigit(c) ((_ctype_+1)[(unsigned)(c)]&(_X|_N)) 47 | #define isspace(c) ((_ctype_+1)[(unsigned)(c)]&_S) 48 | #define ispunct(c) ((_ctype_+1)[(unsigned)(c)]&_P) 49 | #define isalnum(c) ((_ctype_+1)[(unsigned)(c)]&(_U|_L|_N)) 50 | #define isprint(c) ((_ctype_+1)[(unsigned)(c)]&(_P|_U|_L|_N|_B)) 51 | #define isgraph(c) ((_ctype_+1)[(unsigned)(c)]&(_P|_U|_L|_N)) 52 | #define iscntrl(c) ((_ctype_+1)[(unsigned)(c)]&_C) 53 | /* Non-gcc versions will get the library versions, and will be 54 | slightly slower */ 55 | #ifdef __GNUC__ 56 | # define toupper(c) \ 57 | __extension__ ({ int __x = (c); islower(__x) ? (__x - 'a' + 'A') : __x;}) 58 | # define tolower(c) \ 59 | __extension__ ({ int __x = (c); isupper(__x) ? (__x - 'A' + 'a') : __x;}) 60 | #endif 61 | #endif /* !__cplusplus */ 62 | 63 | #ifndef __STRICT_ANSI__ 64 | #define isascii(c) ((unsigned)(c)<=0177) 65 | #define toascii(c) ((c)&0177) 66 | #endif 67 | 68 | _END_STD_C 69 | 70 | #endif /* _CTYPE_H_ */ 71 | -------------------------------------------------------------------------------- /extra_include/dirent.h: -------------------------------------------------------------------------------- 1 | #ifndef _DIRENT_H_ 2 | #define _DIRENT_H_ 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | #include 7 | 8 | #if !defined(MAXNAMLEN) && !defined(_POSIX_SOURCE) 9 | #define MAXNAMLEN 1024 10 | #endif 11 | 12 | #ifdef __cplusplus 13 | } 14 | #endif 15 | #endif /*_DIRENT_H_*/ 16 | -------------------------------------------------------------------------------- /extra_include/envz.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved. 2 | * 3 | * Permission to use, copy, modify, and distribute this software 4 | * is freely granted, provided that this notice is preserved. 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | /* The newlib implementation of these functions assumes that sizeof(char) == 1. */ 11 | char * envz_entry (const char *envz, size_t envz_len, const char *name); 12 | char * envz_get (const char *envz, size_t envz_len, const char *name); 13 | error_t envz_add (char **envz, size_t *envz_len, const char *name, const char *value); 14 | error_t envz_merge (char **envz, size_t *envz_len, const char *envz2, size_t envz2_len, int override); 15 | void envz_remove(char **envz, size_t *envz_len, const char *name); 16 | void envz_strip (char **envz, size_t *envz_len); 17 | -------------------------------------------------------------------------------- /extra_include/errno.h: -------------------------------------------------------------------------------- 1 | #ifndef __ERRNO_H__ 2 | #define __ERRNO_H__ 3 | 4 | #ifndef __error_t_defined 5 | typedef int error_t; 6 | #define __error_t_defined 1 7 | #endif 8 | 9 | #include 10 | 11 | #endif /* !__ERRNO_H__ */ 12 | -------------------------------------------------------------------------------- /extra_include/fastmath.h: -------------------------------------------------------------------------------- 1 | #ifndef _FASTMATH_H_ 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | #define _FASTMATH_H_ 6 | 7 | #include 8 | #include 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif /* _FASTMATH_H_ */ 14 | -------------------------------------------------------------------------------- /extra_include/fcntl.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /extra_include/iconv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003-2004, Artem B. Bityuckiy, SoftMine Corporation. 3 | * Rights transferred to Franklin Electronic Publishers. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 | * SUCH DAMAGE. 25 | */ 26 | #ifndef _ICONV_H_ 27 | #define _ICONV_H_ 28 | 29 | #include <_ansi.h> 30 | #include 31 | #include 32 | #include 33 | 34 | /* iconv_t: charset conversion descriptor type */ 35 | typedef _iconv_t iconv_t; 36 | 37 | _BEGIN_STD_C 38 | 39 | #ifndef _REENT_ONLY 40 | iconv_t 41 | _EXFUN(iconv_open, (_CONST char *, _CONST char *)); 42 | 43 | size_t 44 | _EXFUN(iconv, (iconv_t, _CONST char **, size_t *, char **, size_t *)); 45 | 46 | int 47 | _EXFUN(iconv_close, (iconv_t)); 48 | #endif 49 | 50 | iconv_t 51 | _EXFUN(_iconv_open_r, (struct _reent *, _CONST char *, _CONST char *)); 52 | 53 | size_t 54 | _EXFUN(_iconv_r, (struct _reent *, iconv_t, _CONST char **, 55 | size_t *, char **, size_t *)); 56 | 57 | int 58 | _EXFUN(_iconv_close_r, (struct _reent *, iconv_t)); 59 | 60 | _END_STD_C 61 | 62 | #endif /* #ifndef _ICONV_H_ */ 63 | -------------------------------------------------------------------------------- /extra_include/locale.h: -------------------------------------------------------------------------------- 1 | /* 2 | locale.h 3 | Values appropriate for the formatting of monetary and other 4 | numberic quantities. 5 | */ 6 | 7 | #ifndef _LOCALE_H_ 8 | #define _LOCALE_H_ 9 | 10 | #include "_ansi.h" 11 | 12 | #ifndef NULL 13 | #define NULL 0 14 | #endif 15 | 16 | #define LC_ALL 0 17 | #define LC_COLLATE 1 18 | #define LC_CTYPE 2 19 | #define LC_MONETARY 3 20 | #define LC_NUMERIC 4 21 | #define LC_TIME 5 22 | #define LC_MESSAGES 6 23 | 24 | _BEGIN_STD_C 25 | 26 | struct lconv 27 | { 28 | char *decimal_point; 29 | char *thousands_sep; 30 | char *grouping; 31 | char *int_curr_symbol; 32 | char *currency_symbol; 33 | char *mon_decimal_point; 34 | char *mon_thousands_sep; 35 | char *mon_grouping; 36 | char *positive_sign; 37 | char *negative_sign; 38 | char int_frac_digits; 39 | char frac_digits; 40 | char p_cs_precedes; 41 | char p_sep_by_space; 42 | char n_cs_precedes; 43 | char n_sep_by_space; 44 | char p_sign_posn; 45 | char n_sign_posn; 46 | }; 47 | 48 | #ifndef _REENT_ONLY 49 | char *_EXFUN(setlocale,(int category, const char *locale)); 50 | struct lconv *_EXFUN(localeconv,(void)); 51 | #endif 52 | 53 | struct _reent; 54 | char *_EXFUN(_setlocale_r,(struct _reent *, int category, const char *locale)); 55 | struct lconv *_EXFUN(_localeconv_r,(struct _reent *)); 56 | 57 | _END_STD_C 58 | 59 | #endif /* _LOCALE_H_ */ 60 | -------------------------------------------------------------------------------- /extra_include/machine/ansi.h: -------------------------------------------------------------------------------- 1 | /* dummy header file to support BSD compiler */ 2 | -------------------------------------------------------------------------------- /extra_include/machine/endian.h: -------------------------------------------------------------------------------- 1 | #ifndef __MACHINE_ENDIAN_H__ 2 | 3 | #include 4 | 5 | #ifndef BIG_ENDIAN 6 | #define BIG_ENDIAN 4321 7 | #endif 8 | #ifndef LITTLE_ENDIAN 9 | #define LITTLE_ENDIAN 1234 10 | #endif 11 | 12 | #ifndef BYTE_ORDER 13 | #ifdef __IEEE_LITTLE_ENDIAN 14 | #define BYTE_ORDER LITTLE_ENDIAN 15 | #else 16 | #define BYTE_ORDER BIG_ENDIAN 17 | #endif 18 | #endif 19 | 20 | #endif /* __MACHINE_ENDIAN_H__ */ 21 | -------------------------------------------------------------------------------- /extra_include/machine/malloc.h: -------------------------------------------------------------------------------- 1 | #ifndef _MACHMALLOC_H_ 2 | #define _MACHMALLOC_H_ 3 | 4 | /* place holder so platforms may add malloc.h extensions */ 5 | 6 | #endif /* _MACHMALLOC_H_ */ 7 | 8 | 9 | -------------------------------------------------------------------------------- /extra_include/machine/param.h: -------------------------------------------------------------------------------- 1 | /* Place holder for machine-specific param.h. */ 2 | -------------------------------------------------------------------------------- /extra_include/machine/setjmp-dj.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1991 DJ Delorie 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms is permitted 6 | * provided that the above copyright notice and following paragraph are 7 | * duplicated in all such forms. 8 | * 9 | * This file is distributed WITHOUT ANY WARRANTY; without even the implied 10 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | */ 12 | 13 | /* Modified to use SETJMP_DJ_H rather than SETJMP_H to avoid 14 | conflicting with setjmp.h. Ian Taylor, Cygnus support, April, 15 | 1993. */ 16 | 17 | #ifndef _SETJMP_DJ_H_ 18 | #define _SETJMP_DJ_H_ 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | typedef struct { 25 | unsigned long eax; 26 | unsigned long ebx; 27 | unsigned long ecx; 28 | unsigned long edx; 29 | unsigned long esi; 30 | unsigned long edi; 31 | unsigned long ebp; 32 | unsigned long esp; 33 | unsigned long eip; 34 | } jmp_buf[1]; 35 | 36 | extern int setjmp(jmp_buf); 37 | extern void longjmp(jmp_buf, int); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /extra_include/machine/stdlib.h: -------------------------------------------------------------------------------- 1 | #ifndef _MACHSTDLIB_H_ 2 | #define _MACHSTDLIB_H_ 3 | 4 | /* place holder so platforms may add stdlib.h extensions */ 5 | 6 | #endif /* _MACHSTDLIB_H_ */ 7 | 8 | 9 | -------------------------------------------------------------------------------- /extra_include/machine/termios.h: -------------------------------------------------------------------------------- 1 | #define __MAX_BAUD B4000000 2 | -------------------------------------------------------------------------------- /extra_include/machine/time.h: -------------------------------------------------------------------------------- 1 | #ifndef _MACHTIME_H_ 2 | #define _MACHTIME_H_ 3 | 4 | #if defined(__rtems__) 5 | #define _CLOCKS_PER_SEC_ sysconf(_SC_CLK_TCK) 6 | #else /* !__rtems__ */ 7 | #if defined(__arm__) || defined(__thumb__) 8 | #define _CLOCKS_PER_SEC_ 100 9 | #endif 10 | #if defined(__XTENSA__) 11 | /* Use the value mandated by POSIX:XSI. */ 12 | #define _CLOCKS_PER_SEC_ 1000000 13 | #endif 14 | #endif /* !__rtems__ */ 15 | 16 | #endif /* _MACHTIME_H_ */ 17 | 18 | 19 | -------------------------------------------------------------------------------- /extra_include/machine/types.h: -------------------------------------------------------------------------------- 1 | #ifndef _MACHTYPES_H_ 2 | #define _MACHTYPES_H_ 3 | 4 | /* 5 | * The following section is RTEMS specific and is needed to more 6 | * closely match the types defined in the BSD machine/types.h. 7 | * This is needed to let the RTEMS/BSD TCP/IP stack compile. 8 | */ 9 | 10 | #if defined(__rtems__) 11 | typedef signed long long int64_t; 12 | #if defined( __h8300__) 13 | typedef signed long int32_t; 14 | #else 15 | typedef signed int int32_t; 16 | #endif 17 | typedef signed short int16_t; 18 | typedef signed char int8_t; 19 | 20 | typedef unsigned long long u_int64_t; 21 | #if defined( __h8300__) 22 | typedef unsigned long u_int32_t; 23 | #else 24 | typedef unsigned int u_int32_t; 25 | #endif 26 | typedef unsigned short u_int16_t; 27 | typedef unsigned char u_int8_t; 28 | #endif 29 | 30 | #define _CLOCK_T_ unsigned long /* clock() */ 31 | #define _TIME_T_ long /* time() */ 32 | #define _CLOCKID_T_ unsigned long 33 | #define _TIMER_T_ unsigned long 34 | 35 | #ifndef _HAVE_SYSTYPES 36 | typedef long int __off_t; 37 | typedef int __pid_t; 38 | #ifdef __GNUC__ 39 | __extension__ typedef long long int __loff_t; 40 | #else 41 | typedef long int __loff_t; 42 | #endif 43 | #endif 44 | 45 | #endif /* _MACHTYPES_H_ */ 46 | 47 | 48 | -------------------------------------------------------------------------------- /extra_include/machine/xtensa-hal.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | -------------------------------------------------------------------------------- /extra_include/memory.h: -------------------------------------------------------------------------------- 1 | #ifndef _MEMORY_H_ 2 | #define _MEMORY_H_ 3 | 4 | #ifndef _STRING_H_ 5 | # include 6 | #endif /* _STRING_H_ */ 7 | 8 | #endif /* _MEMORY_H_ */ 9 | -------------------------------------------------------------------------------- /extra_include/paths.h: -------------------------------------------------------------------------------- 1 | #ifndef _PATHS_H_ 2 | #define _PATHS_H_ 3 | 4 | #define _PATH_DEV "/dev/" 5 | #define _PATH_BSHELL "/bin/sh" 6 | 7 | #endif /* _PATHS_H_ */ 8 | -------------------------------------------------------------------------------- /extra_include/process.h: -------------------------------------------------------------------------------- 1 | /* process.h. This file comes with MSDOS and WIN32 systems. */ 2 | 3 | #ifndef __PROCESS_H_ 4 | #define __PROCESS_H_ 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | int execl(const char *path, const char *argv0, ...); 11 | int execle(const char *path, const char *argv0, ... /*, char * const *envp */); 12 | int execlp(const char *path, const char *argv0, ...); 13 | int execlpe(const char *path, const char *argv0, ... /*, char * const *envp */); 14 | 15 | int execv(const char *path, char * const *argv); 16 | int execve(const char *path, char * const *argv, char * const *envp); 17 | int execvp(const char *path, char * const *argv); 18 | int execvpe(const char *path, char * const *argv, char * const *envp); 19 | 20 | int spawnl(int mode, const char *path, const char *argv0, ...); 21 | int spawnle(int mode, const char *path, const char *argv0, ... /*, char * const *envp */); 22 | int spawnlp(int mode, const char *path, const char *argv0, ...); 23 | int spawnlpe(int mode, const char *path, const char *argv0, ... /*, char * const *envp */); 24 | 25 | int spawnv(int mode, const char *path, const char * const *argv); 26 | int spawnve(int mode, const char *path, const char * const *argv, const char * const *envp); 27 | int spawnvp(int mode, const char *path, const char * const *argv); 28 | int spawnvpe(int mode, const char *path, const char * const *argv, const char * const *envp); 29 | 30 | int cwait(int *, int, int); 31 | 32 | #define _P_WAIT 1 33 | #define _P_NOWAIT 2 /* always generates error */ 34 | #define _P_OVERLAY 3 35 | #define _P_NOWAITO 4 36 | #define _P_DETACH 5 37 | 38 | #define WAIT_CHILD 1 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /extra_include/pwd.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 1989 The Regents of the University of California. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. All advertising materials mentioning features or use of this software 14 | * must display the following acknowledgement: 15 | * This product includes software developed by the University of 16 | * California, Berkeley and its contributors. 17 | * 4. Neither the name of the University nor the names of its contributors 18 | * may be used to endorse or promote products derived from this software 19 | * without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 | * SUCH DAMAGE. 32 | * 33 | * @(#)pwd.h 5.13 (Berkeley) 5/28/91 34 | */ 35 | 36 | #ifndef _PWD_H_ 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | #define _PWD_H_ 41 | 42 | #include 43 | 44 | #ifndef _POSIX_SOURCE 45 | #define _PATH_PASSWD "/etc/passwd" 46 | 47 | #define _PASSWORD_LEN 128 /* max length, not counting NULL */ 48 | #endif 49 | 50 | struct passwd { 51 | char *pw_name; /* user name */ 52 | char *pw_passwd; /* encrypted password */ 53 | int pw_uid; /* user uid */ 54 | int pw_gid; /* user gid */ 55 | char *pw_comment; /* comment */ 56 | char *pw_gecos; /* Honeywell login info */ 57 | char *pw_dir; /* home directory */ 58 | char *pw_shell; /* default shell */ 59 | }; 60 | 61 | #ifndef __INSIDE_CYGWIN__ 62 | struct passwd *getpwuid (uid_t); 63 | struct passwd *getpwnam (const char *); 64 | int getpwnam_r (const char *, struct passwd *, 65 | char *, size_t , struct passwd **); 66 | int getpwuid_r (uid_t, struct passwd *, char *, 67 | size_t, struct passwd **); 68 | #ifndef _POSIX_SOURCE 69 | struct passwd *getpwent (void); 70 | void setpwent (void); 71 | void endpwent (void); 72 | #endif 73 | #endif 74 | 75 | #ifdef __cplusplus 76 | } 77 | #endif 78 | #endif /* _PWD_H_ */ 79 | -------------------------------------------------------------------------------- /extra_include/regdef.h: -------------------------------------------------------------------------------- 1 | /* regdef.h -- define register names. */ 2 | 3 | /* This is a standard include file for MIPS targets. Other target 4 | probably don't define it, and attempts to include this file will 5 | fail. */ 6 | 7 | #include 8 | -------------------------------------------------------------------------------- /extra_include/search.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: search.h,v 1.12 1999/02/22 10:34:28 christos Exp $ */ 2 | /* $FreeBSD: src/include/search.h,v 1.4 2002/03/23 17:24:53 imp Exp $ */ 3 | 4 | /* 5 | * Written by J.T. Conklin 6 | * Public domain. 7 | */ 8 | 9 | #ifndef _SEARCH_H_ 10 | #define _SEARCH_H_ 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | typedef struct entry { 17 | char *key; 18 | void *data; 19 | } ENTRY; 20 | 21 | typedef enum { 22 | FIND, ENTER 23 | } ACTION; 24 | 25 | typedef enum { 26 | preorder, 27 | postorder, 28 | endorder, 29 | leaf 30 | } VISIT; 31 | 32 | #ifdef _SEARCH_PRIVATE 33 | typedef struct node { 34 | char *key; 35 | struct node *llink, *rlink; 36 | } node_t; 37 | #endif 38 | 39 | struct hsearch_data 40 | { 41 | struct internal_head *htable; 42 | size_t htablesize; 43 | }; 44 | 45 | __BEGIN_DECLS 46 | int hcreate(size_t); 47 | void hdestroy(void); 48 | ENTRY *hsearch(ENTRY, ACTION); 49 | int hcreate_r(size_t, struct hsearch_data *); 50 | void hdestroy_r(struct hsearch_data *); 51 | int hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *); 52 | void *tdelete(const void *, void **, int (*)(const void *, const void *)); 53 | void tdestroy (void *, void (*)(void *)); 54 | void *tfind(const void *, void **, int (*)(const void *, const void *)); 55 | void *tsearch(const void *, void **, int (*)(const void *, const void *)); 56 | void twalk(const void *, void (*)(const void *, VISIT, int)); 57 | __END_DECLS 58 | 59 | #endif /* !_SEARCH_H_ */ 60 | -------------------------------------------------------------------------------- /extra_include/setjmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | setjmp.h 3 | stubs for future use. 4 | */ 5 | 6 | #ifndef _SETJMP_H_ 7 | #define _SETJMP_H_ 8 | 9 | #include "_ansi.h" 10 | #include 11 | 12 | _BEGIN_STD_C 13 | 14 | void _EXFUN(longjmp,(jmp_buf __jmpb, int __retval)); 15 | int _EXFUN(setjmp,(jmp_buf __jmpb)); 16 | 17 | _END_STD_C 18 | 19 | #endif /* _SETJMP_H_ */ 20 | 21 | -------------------------------------------------------------------------------- /extra_include/signal.h: -------------------------------------------------------------------------------- 1 | #ifndef _SIGNAL_H_ 2 | #define _SIGNAL_H_ 3 | 4 | #include "_ansi.h" 5 | #include 6 | 7 | _BEGIN_STD_C 8 | 9 | typedef int sig_atomic_t; /* Atomic entity type (ANSI) */ 10 | 11 | #define SIG_DFL ((_sig_func_ptr)0) /* Default action */ 12 | #define SIG_IGN ((_sig_func_ptr)1) /* Ignore action */ 13 | #define SIG_ERR ((_sig_func_ptr)-1) /* Error return */ 14 | 15 | struct _reent; 16 | 17 | _sig_func_ptr _EXFUN(_signal_r, (struct _reent *, int, _sig_func_ptr)); 18 | int _EXFUN(_raise_r, (struct _reent *, int)); 19 | 20 | #ifndef _REENT_ONLY 21 | _sig_func_ptr _EXFUN(signal, (int, _sig_func_ptr)); 22 | int _EXFUN(raise, (int)); 23 | #endif 24 | 25 | _END_STD_C 26 | 27 | #endif /* _SIGNAL_H_ */ 28 | -------------------------------------------------------------------------------- /extra_include/sys/_types.h: -------------------------------------------------------------------------------- 1 | /* ANSI C namespace clean utility typedefs */ 2 | 3 | /* This file defines various typedefs needed by the system calls that support 4 | the C library. Basically, they're just the POSIX versions with an '_' 5 | prepended. This file lives in the `sys' directory so targets can provide 6 | their own if desired (or they can put target dependant conditionals here). 7 | */ 8 | 9 | #ifndef _SYS__TYPES_H 10 | #define _SYS__TYPES_H 11 | 12 | #include 13 | 14 | typedef long _off_t; 15 | __extension__ typedef long long _off64_t; 16 | 17 | #if defined(__INT_MAX__) && __INT_MAX__ == 2147483647 18 | typedef int _ssize_t; 19 | #else 20 | typedef long _ssize_t; 21 | #endif 22 | 23 | #define __need_wint_t 24 | #include 25 | 26 | /* Conversion state information. */ 27 | typedef struct 28 | { 29 | int __count; 30 | union 31 | { 32 | wint_t __wch; 33 | unsigned char __wchb[4]; 34 | } __value; /* Value so far. */ 35 | } _mbstate_t; 36 | 37 | typedef _LOCK_RECURSIVE_T _flock_t; 38 | 39 | /* Iconv descriptor type */ 40 | typedef void *_iconv_t; 41 | 42 | #endif /* _SYS__TYPES_H */ 43 | -------------------------------------------------------------------------------- /extra_include/sys/dirent.h: -------------------------------------------------------------------------------- 1 | /* includes , which is this file. On a 2 | system which supports , this file is overridden by 3 | dirent.h in the libc/sys/.../sys directory. On a system which does 4 | not support , we will get this file which tries to find 5 | any other which may be lurking around. If there isn't 6 | one, the user will get an error indicating that there is no 7 | . */ 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | #include_next 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | -------------------------------------------------------------------------------- /extra_include/sys/file.h: -------------------------------------------------------------------------------- 1 | /* Customer ID=7011; Build=0x2b6f6; Copyright (c) 2005-2006 Tensilica Inc. ALL RIGHTS RESERVED. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 14 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 15 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 16 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TENSILICA 17 | INCORPORATED BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 21 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 22 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 24 | 25 | #include 26 | 27 | /* Alternate names for values for the WHENCE argument to `lseek'. 28 | These are the same as SEEK_SET, SEEK_CUR, and SEEK_END, respectively. */ 29 | #ifndef L_SET 30 | #define L_SET 0 /* Seek from beginning of file. */ 31 | #define L_INCR 1 /* Seek from current position. */ 32 | #define L_XTND 2 /* Seek from end of file. */ 33 | #endif 34 | -------------------------------------------------------------------------------- /extra_include/sys/iconvnls.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003-2004, Artem B. Bityuckiy. 3 | * Rights transferred to Franklin Electronic Publishers. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 | * SUCH DAMAGE. 25 | */ 26 | 27 | /* 28 | * Funtions, macros, etc implimented in iconv library but used by other 29 | * NLS-related subsystems too. 30 | */ 31 | #ifndef __SYS_ICONVNLS_H__ 32 | #define __SYS_ICONVNLS_H__ 33 | 34 | #include <_ansi.h> 35 | #include 36 | #include 37 | #include 38 | 39 | /* Iconv data path environment variable name */ 40 | #define NLS_ENVVAR_NAME "NLSPATH" 41 | /* Default NLSPATH value */ 42 | #define ICONV_DEFAULT_NLSPATH "/usr/locale" 43 | /* Direction markers */ 44 | #define ICONV_NLS_FROM 0 45 | #define ICONV_NLS_TO 1 46 | 47 | _VOID 48 | _EXFUN(_iconv_nls_get_state, (iconv_t cd, mbstate_t *ps, int direction)); 49 | 50 | int 51 | _EXFUN(_iconv_nls_set_state, (iconv_t cd, mbstate_t *ps, int direction)); 52 | 53 | int 54 | _EXFUN(_iconv_nls_is_stateful, (iconv_t cd, int direction)); 55 | 56 | int 57 | _EXFUN(_iconv_nls_get_mb_cur_max, (iconv_t cd, int direction)); 58 | 59 | size_t 60 | _EXFUN(_iconv_nls_conv, (struct _reent *rptr, iconv_t cd, 61 | _CONST char **inbuf, size_t *inbytesleft, 62 | char **outbuf, size_t *outbytesleft)); 63 | 64 | _CONST char * 65 | _EXFUN(_iconv_nls_construct_filename, (struct _reent *rptr, _CONST char *file, 66 | _CONST char *dir, _CONST char *ext)); 67 | 68 | 69 | int 70 | _EXFUN(_iconv_nls_open, (struct _reent *rptr, _CONST char *encoding, 71 | iconv_t *towc, iconv_t *fromwc, int flag)); 72 | 73 | char * 74 | _EXFUN(_iconv_resolve_encoding_name, (struct _reent *rptr, _CONST char *ca)); 75 | 76 | #endif /* __SYS_ICONVNLS_H__ */ 77 | 78 | -------------------------------------------------------------------------------- /extra_include/sys/lock.h: -------------------------------------------------------------------------------- 1 | #ifndef __SYS_LOCK_H__ 2 | #define __SYS_LOCK_H__ 3 | 4 | /* dummy lock routines for single-threaded aps */ 5 | 6 | typedef int _LOCK_T; 7 | typedef int _LOCK_RECURSIVE_T; 8 | 9 | #define __LOCK_INIT(class,lock) static int lock = 0; 10 | #define __LOCK_INIT_RECURSIVE(class,lock) static int lock = 0; 11 | #define __lock_init(lock) (0) 12 | #define __lock_init_recursive(lock) (0) 13 | #define __lock_close(lock) (0) 14 | #define __lock_close_recursive(lock) (0) 15 | #define __lock_acquire(lock) (0) 16 | #define __lock_acquire_recursive(lock) (0) 17 | #define __lock_try_acquire(lock) (0) 18 | #define __lock_try_acquire_recursive(lock) (0) 19 | #define __lock_release(lock) (0) 20 | #define __lock_release_recursive(lock) (0) 21 | 22 | #endif /* __SYS_LOCK_H__ */ 23 | -------------------------------------------------------------------------------- /extra_include/sys/param.h: -------------------------------------------------------------------------------- 1 | /* This is a dummy file, not customized for any 2 | particular system. If there is a param.h in libc/sys/SYSDIR/sys, 3 | it will override this one. */ 4 | 5 | #ifndef _SYS_PARAM_H 6 | # define _SYS_PARAM_H 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #ifndef HZ 13 | # define HZ (60) 14 | #endif 15 | #ifndef NOFILE 16 | # define NOFILE (60) 17 | #endif 18 | #ifndef PATHSIZE 19 | # define PATHSIZE (1024) 20 | #endif 21 | 22 | #define MAX(a,b) ((a) > (b) ? (a) : (b)) 23 | #define MIN(a,b) ((a) < (b) ? (a) : (b)) 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /extra_include/sys/resource.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYS_RESOURCE_H_ 2 | #define _SYS_RESOURCE_H_ 3 | 4 | #include 5 | 6 | #define RUSAGE_SELF 0 /* calling process */ 7 | #define RUSAGE_CHILDREN -1 /* terminated child processes */ 8 | 9 | struct rusage { 10 | struct timeval ru_utime; /* user time used */ 11 | struct timeval ru_stime; /* system time used */ 12 | }; 13 | 14 | #endif 15 | 16 | -------------------------------------------------------------------------------- /extra_include/sys/sched.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Written by Joel Sherrill . 3 | * 4 | * COPYRIGHT (c) 1989-2000. 5 | * On-Line Applications Research Corporation (OAR). 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose without fee is hereby granted, provided that this entire notice 9 | * is included in all copies of any software which is or includes a copy 10 | * or modification of this software. 11 | * 12 | * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED 13 | * WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION 14 | * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS 15 | * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. 16 | * 17 | * $Id: sched.h,v 1.2 2002/06/20 19:51:24 fitzsim Exp $ 18 | */ 19 | 20 | 21 | #ifndef __POSIX_SYS_SCHEDULING_h 22 | #define __POSIX_SYS_SCHEDULING_h 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | #include 29 | 30 | #include 31 | #include 32 | 33 | /* Scheduling Policies, P1003.1b-1993, p. 250 34 | NOTE: SCHED_SPORADIC added by P1003.4b/D8, p. 34. */ 35 | 36 | #define SCHED_OTHER 0 37 | #define SCHED_FIFO 1 38 | #define SCHED_RR 2 39 | 40 | #if defined(_POSIX_SPORADIC_SERVER) 41 | #define SCHED_SPORADIC 3 42 | #endif 43 | 44 | /* Scheduling Parameters, P1003.1b-1993, p. 249 45 | NOTE: Fields whose name begins with "ss_" added by P1003.4b/D8, p. 33. */ 46 | 47 | struct sched_param { 48 | int sched_priority; /* Process execution scheduling priority */ 49 | 50 | #if defined(_POSIX_SPORADIC_SERVER) 51 | int ss_low_priority; /* Low scheduling priority for sporadic */ 52 | /* server */ 53 | struct timespec ss_replenish_period; 54 | /* Replenishment period for sporadic server */ 55 | struct timespec ss_initial_budget; /* Initial budget for sporadic server */ 56 | #endif 57 | }; 58 | 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | 63 | #endif 64 | /* end of include file */ 65 | 66 | -------------------------------------------------------------------------------- /extra_include/sys/stdio.h: -------------------------------------------------------------------------------- 1 | #ifndef _NEWLIB_STDIO_H 2 | #define _NEWLIB_STDIO_H 3 | 4 | #include 5 | #include 6 | 7 | /* Internal locking macros, used to protect stdio functions. In the 8 | general case, expand to nothing. Use __SSTR flag in FILE _flags to 9 | detect if FILE is private to sprintf/sscanf class of functions; if 10 | set then do nothing as lock is not initialised. */ 11 | #if !defined(_flockfile) 12 | #ifndef __SINGLE_THREAD__ 13 | # define _flockfile(fp) (((fp)->_flags & __SSTR) ? 0 : __lock_acquire_recursive((fp)->_lock)) 14 | #else 15 | # define _flockfile(fp) 16 | #endif 17 | #endif 18 | 19 | #if !defined(_funlockfile) 20 | #ifndef __SINGLE_THREAD__ 21 | # define _funlockfile(fp) (((fp)->_flags & __SSTR) ? 0 : __lock_release_recursive((fp)->_lock)) 22 | #else 23 | # define _funlockfile(fp) 24 | #endif 25 | #endif 26 | 27 | #define getline __getline 28 | #define getdelim __getdelim 29 | 30 | #endif /* _NEWLIB_STDIO_H */ 31 | -------------------------------------------------------------------------------- /extra_include/sys/time.h: -------------------------------------------------------------------------------- 1 | /* time.h -- An implementation of the standard Unix file. 2 | Written by Geoffrey Noer 3 | Public domain; no rights reserved. */ 4 | 5 | #ifndef _SYS_TIME_H_ 6 | #define _SYS_TIME_H_ 7 | 8 | #include <_ansi.h> 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | #ifndef _WINSOCK_H 16 | struct timeval { 17 | long tv_sec; 18 | long tv_usec; 19 | }; 20 | 21 | struct timezone { 22 | int tz_minuteswest; 23 | int tz_dsttime; 24 | }; 25 | 26 | #ifdef __CYGWIN__ 27 | #include 28 | #endif /* __CYGWIN__ */ 29 | 30 | #endif /* _WINSOCK_H */ 31 | 32 | #define ITIMER_REAL 0 33 | #define ITIMER_VIRTUAL 1 34 | #define ITIMER_PROF 2 35 | 36 | struct itimerval { 37 | struct timeval it_interval; 38 | struct timeval it_value; 39 | }; 40 | 41 | /* BSD time macros used by RTEMS code */ 42 | #if defined (__rtems__) || defined (__CYGWIN__) 43 | 44 | /* Convenience macros for operations on timevals. 45 | NOTE: `timercmp' does not work for >= or <=. */ 46 | #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) 47 | #define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) 48 | #define timercmp(a, b, CMP) \ 49 | (((a)->tv_sec == (b)->tv_sec) ? \ 50 | ((a)->tv_usec CMP (b)->tv_usec) : \ 51 | ((a)->tv_sec CMP (b)->tv_sec)) 52 | #define timeradd(a, b, result) \ 53 | do { \ 54 | (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ 55 | (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \ 56 | if ((result)->tv_usec >= 1000000) \ 57 | { \ 58 | ++(result)->tv_sec; \ 59 | (result)->tv_usec -= 1000000; \ 60 | } \ 61 | } while (0) 62 | #define timersub(a, b, result) \ 63 | do { \ 64 | (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ 65 | (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ 66 | if ((result)->tv_usec < 0) { \ 67 | --(result)->tv_sec; \ 68 | (result)->tv_usec += 1000000; \ 69 | } \ 70 | } while (0) 71 | #endif /* defined (__rtems__) || defined (__CYGWIN__) */ 72 | 73 | int _EXFUN(gettimeofday, (struct timeval *__p, struct timezone *__z)); 74 | int _EXFUN(settimeofday, (const struct timeval *, const struct timezone *)); 75 | int _EXFUN(utimes, (const char *__path, struct timeval *__tvp)); 76 | int _EXFUN(getitimer, (int __which, struct itimerval *__value)); 77 | int _EXFUN(setitimer, (int __which, const struct itimerval *__value, 78 | struct itimerval *__ovalue)); 79 | 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | #endif /* _SYS_TIME_H_ */ 84 | -------------------------------------------------------------------------------- /extra_include/sys/timeb.h: -------------------------------------------------------------------------------- 1 | /* timeb.h -- An implementation of the standard Unix file. 2 | Written by Ian Lance Taylor 3 | Public domain; no rights reserved. 4 | 5 | declares the structure used by the ftime function, as 6 | well as the ftime function itself. Newlib does not provide an 7 | implementation of ftime. */ 8 | 9 | #ifndef _SYS_TIMEB_H 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | #define _SYS_TIMEB_H 16 | 17 | #include <_ansi.h> 18 | #include 19 | 20 | #ifndef __time_t_defined 21 | typedef _TIME_T_ time_t; 22 | #define __time_t_defined 23 | #endif 24 | 25 | struct timeb 26 | { 27 | time_t time; 28 | unsigned short millitm; 29 | short timezone; 30 | short dstflag; 31 | }; 32 | 33 | extern int ftime _PARAMS ((struct timeb *)); 34 | 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | 39 | #endif /* ! defined (_SYS_TIMEB_H) */ 40 | -------------------------------------------------------------------------------- /extra_include/sys/times.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYS_TIMES_H 2 | #ifdef __cplusplus 3 | extern "C" { 4 | #endif 5 | #define _SYS_TIMES_H 6 | 7 | #include <_ansi.h> 8 | #include 9 | 10 | #ifndef __clock_t_defined 11 | typedef _CLOCK_T_ clock_t; 12 | #define __clock_t_defined 13 | #endif 14 | 15 | /* Get Process Times, P1003.1b-1993, p. 92 */ 16 | struct tms { 17 | clock_t tms_utime; /* user time */ 18 | clock_t tms_stime; /* system time */ 19 | clock_t tms_cutime; /* user time, children */ 20 | clock_t tms_cstime; /* system time, children */ 21 | }; 22 | 23 | clock_t _EXFUN(times,(struct tms *)); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | #endif /* !_SYS_TIMES_H */ 29 | -------------------------------------------------------------------------------- /extra_include/sys/utime.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYS_UTIME_H 2 | #define _SYS_UTIME_H 3 | 4 | /* This is a dummy file, not customized for any 5 | particular system. If there is a utime.h in libc/sys/SYSDIR/sys, 6 | it will override this one. */ 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | struct utimbuf 13 | { 14 | time_t actime; 15 | time_t modtime; 16 | }; 17 | 18 | #ifdef __cplusplus 19 | }; 20 | #endif 21 | 22 | #endif /* _SYS_UTIME_H */ 23 | -------------------------------------------------------------------------------- /extra_include/sys/wait.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYS_WAIT_H 2 | #define _SYS_WAIT_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | #define WNOHANG 1 11 | #define WUNTRACED 2 12 | 13 | /* A status looks like: 14 | <2 bytes info> <2 bytes code> 15 | 16 | == 0, child has exited, info is the exit value 17 | == 1..7e, child has exited, info is the signal number. 18 | == 7f, child has stopped, info was the signal number. 19 | == 80, there was a core dump. 20 | */ 21 | 22 | #define WIFEXITED(w) (((w) & 0xff) == 0) 23 | #define WIFSIGNALED(w) (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f)) 24 | #define WIFSTOPPED(w) (((w) & 0xff) == 0x7f) 25 | #define WEXITSTATUS(w) (((w) >> 8) & 0xff) 26 | #define WTERMSIG(w) ((w) & 0x7f) 27 | #define WSTOPSIG WEXITSTATUS 28 | 29 | pid_t wait (int *); 30 | pid_t waitpid (pid_t, int *, int); 31 | 32 | /* Provide prototypes for most of the _ names that are 33 | provided in newlib for some compilers. */ 34 | pid_t _wait (int *); 35 | 36 | #ifdef __cplusplus 37 | }; 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /extra_include/termios.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | #include 5 | #ifdef __cplusplus 6 | } 7 | #endif 8 | -------------------------------------------------------------------------------- /extra_include/unctrl.h: -------------------------------------------------------------------------------- 1 | /* From curses.h. */ 2 | /* 3 | * Copyright (c) 1981, 1993 4 | * The Regents of the University of California. All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 3. All advertising materials mentioning features or use of this software 15 | * must display the following acknowledgement: 16 | * This product includes software developed by the University of 17 | * California, Berkeley and its contributors. 18 | * 4. Neither the name of the University nor the names of its contributors 19 | * may be used to endorse or promote products derived from this software 20 | * without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 | * SUCH DAMAGE. 33 | */ 34 | 35 | #ifndef _UNCTRL_H_ 36 | #define _UNCTRL_H_ 37 | 38 | #include <_ansi.h> 39 | 40 | #define unctrl(c) __unctrl[(c) & 0xff] 41 | #define unctrllen(ch) __unctrllen[(ch) & 0xff] 42 | 43 | extern __IMPORT _CONST char * _CONST __unctrl[256]; /* Control strings. */ 44 | extern __IMPORT _CONST char __unctrllen[256]; /* Control strings length. */ 45 | 46 | #endif /* _UNCTRL_H_ */ 47 | -------------------------------------------------------------------------------- /extra_include/unistd.h: -------------------------------------------------------------------------------- 1 | #ifndef _UNISTD_H_ 2 | #define _UNISTD_H_ 3 | 4 | # include 5 | 6 | #ifndef L_SET 7 | /* Old BSD names for the same constants; just for compatibility. */ 8 | #define L_SET SEEK_SET 9 | #define L_INCR SEEK_CUR 10 | #define L_XTND SEEK_END 11 | #endif 12 | 13 | #endif /* _UNISTD_H_ */ 14 | -------------------------------------------------------------------------------- /extra_include/utime.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | 5 | #include <_ansi.h> 6 | 7 | /* The utime function is defined in libc/sys//sys if it exists. */ 8 | #include 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | -------------------------------------------------------------------------------- /extra_include/utmp.h: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | extern "C" { 3 | #endif 4 | #include 5 | #ifdef __cplusplus 6 | } 7 | #endif 8 | 9 | -------------------------------------------------------------------------------- /extra_include/wchar.h: -------------------------------------------------------------------------------- 1 | #ifndef _WCHAR_H_ 2 | #define _WCHAR_H_ 3 | 4 | #include <_ansi.h> 5 | 6 | #include 7 | 8 | #define __need_size_t 9 | #define __need_wchar_t 10 | #define __need_wint_t 11 | #include 12 | 13 | /* For _mbstate_t definition. */ 14 | #include 15 | 16 | #ifndef NULL 17 | #define NULL 0 18 | #endif 19 | 20 | #ifndef WEOF 21 | # define WEOF ((wint_t)-1) 22 | #endif 23 | 24 | #ifndef WCHAR_MIN 25 | #define WCHAR_MIN 0 26 | #endif 27 | 28 | #ifndef WCHAR_MAX 29 | #ifdef __WCHAR_MAX__ 30 | #define WCHAR_MAX __WCHAR_MAX__ 31 | #else 32 | #define WCHAR_MAX 0x7fffffffu 33 | #endif 34 | #endif 35 | 36 | _BEGIN_STD_C 37 | 38 | #ifndef _MBSTATE_T 39 | #define _MBSTATE_T 40 | typedef _mbstate_t mbstate_t; 41 | #endif /* _MBSTATE_T */ 42 | 43 | wint_t _EXFUN(btowc, (int)); 44 | int _EXFUN(wctob, (wint_t)); 45 | size_t _EXFUN(mbrlen, (const char * , size_t, mbstate_t *)); 46 | size_t _EXFUN(mbrtowc, (wchar_t * , const char * , size_t, mbstate_t *)); 47 | size_t _EXFUN(_mbrtowc_r, (struct _reent *, wchar_t * , const char * , 48 | size_t, mbstate_t *)); 49 | int _EXFUN(mbsinit, (const mbstate_t *)); 50 | size_t _EXFUN(mbsrtowcs, (wchar_t * , const char ** , size_t, mbstate_t *)); 51 | size_t _EXFUN(wcrtomb, (char * , wchar_t, mbstate_t *)); 52 | size_t _EXFUN(_wcrtomb_r, (struct _reent *, char * , wchar_t, mbstate_t *)); 53 | size_t _EXFUN(wcsrtombs, (char * , const wchar_t ** , size_t, mbstate_t *)); 54 | size_t _EXFUN(_wcsrtombs_r, (struct _reent *, char * , const wchar_t ** , 55 | size_t, mbstate_t *)); 56 | wchar_t *_EXFUN(wcscat, (wchar_t * , const wchar_t *)); 57 | wchar_t *_EXFUN(wcschr, (const wchar_t *, wchar_t)); 58 | int _EXFUN(wcscmp, (const wchar_t *, const wchar_t *)); 59 | int _EXFUN(wcscoll, (const wchar_t *, const wchar_t *)); 60 | wchar_t *_EXFUN(wcscpy, (wchar_t * , const wchar_t *)); 61 | size_t _EXFUN(wcscspn, (const wchar_t *, const wchar_t *)); 62 | size_t _EXFUN(wcslcat, (wchar_t *, const wchar_t *, size_t)); 63 | size_t _EXFUN(wcslcpy, (wchar_t *, const wchar_t *, size_t)); 64 | size_t _EXFUN(wcslen, (const wchar_t *)); 65 | wchar_t *_EXFUN(wcsncat, (wchar_t * , const wchar_t * , size_t)); 66 | int _EXFUN(wcsncmp, (const wchar_t *, const wchar_t *, size_t)); 67 | wchar_t *_EXFUN(wcsncpy, (wchar_t * , const wchar_t * , size_t)); 68 | size_t _EXFUN(wcsnlen, (const wchar_t *, size_t)); 69 | wchar_t *_EXFUN(wcspbrk, (const wchar_t *, const wchar_t *)); 70 | wchar_t *_EXFUN(wcsrchr, (const wchar_t *, wchar_t)); 71 | size_t _EXFUN(wcsspn, (const wchar_t *, const wchar_t *)); 72 | wchar_t *_EXFUN(wcsstr, (const wchar_t *, const wchar_t *)); 73 | int _EXFUN(wcswidth, (const wchar_t *, size_t)); 74 | int _EXFUN(wcwidth, (const wchar_t)); 75 | wchar_t *_EXFUN(wmemchr, (const wchar_t *, wchar_t, size_t)); 76 | int _EXFUN(wmemcmp, (const wchar_t *, const wchar_t *, size_t)); 77 | wchar_t *_EXFUN(wmemcpy, (wchar_t * , const wchar_t * , size_t)); 78 | wchar_t *_EXFUN(wmemmove, (wchar_t *, const wchar_t *, size_t)); 79 | wchar_t *_EXFUN(wmemset, (wchar_t *, wchar_t, size_t)); 80 | 81 | _END_STD_C 82 | 83 | #endif /* _WCHAR_H_ */ 84 | -------------------------------------------------------------------------------- /extra_include/wctype.h: -------------------------------------------------------------------------------- 1 | #ifndef _WCTYPE_H_ 2 | #define _WCTYPE_H_ 3 | 4 | #include <_ansi.h> 5 | #include 6 | 7 | #define __need_wint_t 8 | #include 9 | 10 | #ifndef WEOF 11 | # define WEOF ((wint_t)-1) 12 | #endif 13 | 14 | _BEGIN_STD_C 15 | 16 | #ifndef _WCTYPE_T 17 | #define _WCTYPE_T 18 | typedef int wctype_t; 19 | #endif 20 | 21 | #ifndef _WCTRANS_T 22 | #define _WCTRANS_T 23 | typedef int wctrans_t; 24 | #endif 25 | 26 | int _EXFUN(iswalpha, (wint_t)); 27 | int _EXFUN(iswalnum, (wint_t)); 28 | int _EXFUN(iswblank, (wint_t)); 29 | int _EXFUN(iswcntrl, (wint_t)); 30 | int _EXFUN(iswctype, (wint_t, wctype_t)); 31 | int _EXFUN(iswdigit, (wint_t)); 32 | int _EXFUN(iswgraph, (wint_t)); 33 | int _EXFUN(iswlower, (wint_t)); 34 | int _EXFUN(iswprint, (wint_t)); 35 | int _EXFUN(iswpunct, (wint_t)); 36 | int _EXFUN(iswspace, (wint_t)); 37 | int _EXFUN(iswupper, (wint_t)); 38 | int _EXFUN(iswxdigit, (wint_t)); 39 | wint_t _EXFUN(towctrans, (wint_t, wctrans_t)); 40 | wint_t _EXFUN(towupper, (wint_t)); 41 | wint_t _EXFUN(towlower, (wint_t)); 42 | wctrans_t _EXFUN(wctrans, (const char *)); 43 | wctype_t _EXFUN(wctype, (const char *)); 44 | 45 | _END_STD_C 46 | 47 | #endif /* _WCTYPE_H_ */ 48 | -------------------------------------------------------------------------------- /extra_include/xtensa/config/defs.h: -------------------------------------------------------------------------------- 1 | /* Definitions for Xtensa instructions, types, and protos. */ 2 | 3 | /* Customer ID=7011; Build=0x2b6f6; Copyright (c) 2003-2004 Tensilica Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included 14 | in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ 23 | 24 | /* NOTE: This file exists only for backward compatibility with T1050 25 | and earlier Xtensa releases. It includes only a subset of the 26 | available header files. */ 27 | 28 | #ifndef _XTENSA_BASE_HEADER 29 | #define _XTENSA_BASE_HEADER 30 | 31 | #ifdef __XTENSA__ 32 | 33 | #include 34 | #include 35 | 36 | #endif /* __XTENSA__ */ 37 | #endif /* !_XTENSA_BASE_HEADER */ 38 | -------------------------------------------------------------------------------- /extra_include/xtensa/config/specreg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Xtensa Special Register symbolic names 3 | */ 4 | 5 | /* $Id: //depot/rel/Boreal/Xtensa/SWConfig/hal/specreg.h.tpp#2 $ */ 6 | 7 | /* Customer ID=7011; Build=0x2b6f6; Copyright (c) 1998-2002 Tensilica Inc. 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining 10 | a copy of this software and associated documentation files (the 11 | "Software"), to deal in the Software without restriction, including 12 | without limitation the rights to use, copy, modify, merge, publish, 13 | distribute, sublicense, and/or sell copies of the Software, and to 14 | permit persons to whom the Software is furnished to do so, subject to 15 | the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included 18 | in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 23 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 24 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 25 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 26 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ 27 | 28 | #ifndef XTENSA_SPECREG_H 29 | #define XTENSA_SPECREG_H 30 | 31 | /* Include these special register bitfield definitions, for historical reasons: */ 32 | #include 33 | 34 | 35 | /* Special registers: */ 36 | #define SAR 3 37 | #define LITBASE 5 38 | #define IBREAKENABLE 96 39 | #define DDR 104 40 | #define IBREAKA_0 128 41 | #define DBREAKA_0 144 42 | #define DBREAKC_0 160 43 | #define EPC_1 177 44 | #define EPC_2 178 45 | #define EPC_3 179 46 | #define DEPC 192 47 | #define EPS_2 194 48 | #define EPS_3 195 49 | #define EXCSAVE_1 209 50 | #define EXCSAVE_2 210 51 | #define EXCSAVE_3 211 52 | #define INTERRUPT 226 53 | #define INTENABLE 228 54 | #define PS 230 55 | #define VECBASE 231 56 | #define EXCCAUSE 232 57 | #define DEBUGCAUSE 233 58 | #define CCOUNT 234 59 | #define PRID 235 60 | #define ICOUNT 236 61 | #define ICOUNTLEVEL 237 62 | #define EXCVADDR 238 63 | #define CCOMPARE_0 240 64 | 65 | /* Special cases (bases of special register series): */ 66 | #define IBREAKA 128 67 | #define DBREAKA 144 68 | #define DBREAKC 160 69 | #define EPC 176 70 | #define EPS 192 71 | #define EXCSAVE 208 72 | #define CCOMPARE 240 73 | 74 | /* Special names for read-only and write-only interrupt registers: */ 75 | #define INTREAD 226 76 | #define INTSET 226 77 | #define INTCLEAR 227 78 | 79 | #endif /* XTENSA_SPECREG_H */ 80 | 81 | -------------------------------------------------------------------------------- /extra_include/xtensa/sim.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2004-2006 by Tensilica Inc. ALL RIGHTS RESERVED. 2 | / These coded instructions, statements, and computer programs are the 3 | / copyrighted works and confidential proprietary information of Tensilica Inc. 4 | / They may not be modified, copied, reproduced, distributed, or disclosed to 5 | / third parties in any manner, medium, or form, in whole or in part, without 6 | / the prior written consent of Tensilica Inc. 7 | */ 8 | 9 | /* sim.h 10 | * 11 | * Definitions and prototypes for specific ISS SIMCALLs 12 | * (ie. outside the standard C library). 13 | */ 14 | 15 | #ifndef _INC_SIM_H_ 16 | #define _INC_SIM_H_ 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | /* Shortcuts for enabling/disabling profiling in the Xtensa ISS */ 23 | extern void xt_iss_profile_enable(void); 24 | extern void xt_iss_profile_disable(void); 25 | 26 | /* Shortcut for setting the trace level in the Xtensa ISS */ 27 | extern void xt_iss_trace_level(unsigned level); 28 | 29 | /* Generic interface for passing client commands in the Xtensa ISS: 30 | * returns 0 on success, -1 on failure. 31 | */ 32 | extern int xt_iss_client_command(const char *client, const char *command); 33 | 34 | /* Interface for switching simulation modes in the Xtensa ISS: 35 | * returns 0 on success, -1 on failure. 36 | */ 37 | #define XT_ISS_CYCLE_ACCURATE 0 38 | #define XT_ISS_FUNCTIONAL 1 39 | extern int xt_iss_switch_mode(int mode); 40 | 41 | 42 | /* Interface for waiting on a system synchronization event */ 43 | extern void xt_iss_event_wait(unsigned event_id); 44 | 45 | /* Interface for firing a system synchronization event */ 46 | extern void xt_iss_event_fire(unsigned event_id); 47 | 48 | /* Interface for invoking a user simcall action, 49 | * which can be registered in XTMP or XTSC. 50 | */ 51 | extern int xt_iss_simcall(int arg1, int arg2, int arg3, 52 | int arg4, int arg5, int arg6); 53 | 54 | 55 | #ifdef __cplusplus 56 | } 57 | #endif 58 | 59 | #endif /*_INC_SIM_H_*/ 60 | 61 | -------------------------------------------------------------------------------- /extra_include/xtensa/simcall-fcntl.h: -------------------------------------------------------------------------------- 1 | /* File control operations for Xtensa ISS semihosting. */ 2 | 3 | /* Copyright (c) 2003 by Tensilica Inc. ALL RIGHTS RESERVED. 4 | These coded instructions, statements, and computer programs are the 5 | copyrighted works and confidential proprietary information of Tensilica Inc. 6 | They may not be modified, copied, reproduced, distributed, or disclosed to 7 | third parties in any manner, medium, or form, in whole or in part, without 8 | the prior written consent of Tensilica Inc. */ 9 | 10 | #ifndef _SIMCALL_FCNTL_H 11 | #define _SIMCALL_FCNTL_H 12 | 13 | #define _SIMC_O_APPEND 0x0008 14 | #define _SIMC_O_NONBLOCK 0x0080 15 | #define _SIMC_O_CREAT 0x0100 16 | #define _SIMC_O_TRUNC 0x0200 17 | #define _SIMC_O_EXCL 0x0400 18 | #define _SIMC_O_TEXT 0x4000 19 | #define _SIMC_O_BINARY 0x8000 20 | 21 | #endif /* ! _SIMCALL_FCNTL_H */ 22 | -------------------------------------------------------------------------------- /extra_include/xtensa/tie/xt_MUL32.h: -------------------------------------------------------------------------------- 1 | /* Definitions for the 32-bit Integer Multiply Option. */ 2 | 3 | /* 4 | * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2009 by Tensilica Inc. ALL RIGHTS RESERVED. 5 | * These coded instructions, statements, and computer programs are the 6 | * copyrighted works and confidential proprietary information of Tensilica Inc. 7 | * They may not be modified, copied, reproduced, distributed, or disclosed to 8 | * third parties in any manner, medium, or form, in whole or in part, without 9 | * the prior written consent of Tensilica Inc. 10 | */ 11 | 12 | /* NOTE: This file exists only for backward compatibility with RB-200X.x 13 | and earlier Xtensa releases. Starting with RC-2009.0 you should use 14 | . */ 15 | 16 | #ifndef _XTENSA_xt_MUL32_HEADER 17 | #define _XTENSA_xt_MUL32_HEADER 18 | 19 | #ifdef __XTENSA__ 20 | 21 | #include 22 | 23 | #endif /* __XTENSA__ */ 24 | #endif /* !_XTENSA_xt_MUL32_HEADER */ 25 | -------------------------------------------------------------------------------- /extra_include/xtensa/tie/xt_density.h: -------------------------------------------------------------------------------- 1 | /* Definitions for the xt_density TIE package */ 2 | 3 | /* 4 | * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Tensilica Inc. ALL RIGHTS RESERVED. 5 | * These coded instructions, statements, and computer programs are the 6 | * copyrighted works and confidential proprietary information of Tensilica Inc. 7 | * They may not be modified, copied, reproduced, distributed, or disclosed to 8 | * third parties in any manner, medium, or form, in whole or in part, without 9 | * the prior written consent of Tensilica Inc. 10 | */ 11 | 12 | /* Do not modify. This is automatically generated.*/ 13 | 14 | #ifndef _XTENSA_xt_density_HEADER 15 | #define _XTENSA_xt_density_HEADER 16 | 17 | #ifdef __XTENSA__ 18 | #ifdef __XCC__ 19 | 20 | #include 21 | 22 | /* 23 | * The following prototypes describe intrinsic functions 24 | * corresponding to TIE instructions. Some TIE instructions 25 | * may produce multiple results (designated as "out" operands 26 | * in the iclass section) or may have operands used as both 27 | * inputs and outputs (designated as "inout"). However, the C 28 | * and C++ languages do not provide syntax that can express 29 | * the in/out/inout constraints of TIE intrinsics. 30 | * Nevertheless, the compiler understands these constraints 31 | * and will check that the intrinsic functions are used 32 | * correctly. To improve the readability of these prototypes, 33 | * the "out" and "inout" parameters are marked accordingly 34 | * with comments. 35 | */ 36 | 37 | extern void _TIE_xt_density_ILL_N(void); 38 | extern void _TIE_xt_density_NOP_N(void); 39 | extern int _TIE_xt_density_L32I_N(const int * p, immediate i); 40 | extern void _TIE_xt_density_S32I_N(int t, int * p, immediate i); 41 | extern int _TIE_xt_density_ADD_N(int s, int t); 42 | extern int _TIE_xt_density_ADDI_N(int s, immediate i); 43 | extern int _TIE_xt_density_MOV_N(int s); 44 | extern int _TIE_xt_density_MOVI_N(immediate i); 45 | #define XT_ILL_N _TIE_xt_density_ILL_N 46 | #define XT_NOP_N _TIE_xt_density_NOP_N 47 | #define XT_L32I_N _TIE_xt_density_L32I_N 48 | #define XT_S32I_N _TIE_xt_density_S32I_N 49 | #define XT_ADD_N _TIE_xt_density_ADD_N 50 | #define XT_ADDI_N _TIE_xt_density_ADDI_N 51 | #define XT_MOV_N _TIE_xt_density_MOV_N 52 | #define XT_MOVI_N _TIE_xt_density_MOVI_N 53 | 54 | #endif /* __XCC__ */ 55 | 56 | #endif /* __XTENSA__ */ 57 | #endif /* !_XTENSA_xt_density_HEADER */ 58 | -------------------------------------------------------------------------------- /extra_include/xtensa/tie/xt_exceptions.h: -------------------------------------------------------------------------------- 1 | /* Definitions for the xt_exceptions TIE package */ 2 | 3 | /* 4 | * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Tensilica Inc. ALL RIGHTS RESERVED. 5 | * These coded instructions, statements, and computer programs are the 6 | * copyrighted works and confidential proprietary information of Tensilica Inc. 7 | * They may not be modified, copied, reproduced, distributed, or disclosed to 8 | * third parties in any manner, medium, or form, in whole or in part, without 9 | * the prior written consent of Tensilica Inc. 10 | */ 11 | 12 | /* Do not modify. This is automatically generated.*/ 13 | 14 | #ifndef _XTENSA_xt_exceptions_HEADER 15 | #define _XTENSA_xt_exceptions_HEADER 16 | 17 | #ifdef __XTENSA__ 18 | #ifdef __XCC__ 19 | 20 | 21 | /* 22 | * The following prototypes describe intrinsic functions 23 | * corresponding to TIE instructions. Some TIE instructions 24 | * may produce multiple results (designated as "out" operands 25 | * in the iclass section) or may have operands used as both 26 | * inputs and outputs (designated as "inout"). However, the C 27 | * and C++ languages do not provide syntax that can express 28 | * the in/out/inout constraints of TIE intrinsics. 29 | * Nevertheless, the compiler understands these constraints 30 | * and will check that the intrinsic functions are used 31 | * correctly. To improve the readability of these prototypes, 32 | * the "out" and "inout" parameters are marked accordingly 33 | * with comments. 34 | */ 35 | 36 | extern void _TIE_xt_exceptions_EXCW(void); 37 | extern void _TIE_xt_exceptions_SYSCALL(void); 38 | extern void _TIE_xt_exceptions_SIMCALL(void); 39 | #define XT_EXCW _TIE_xt_exceptions_EXCW 40 | #define XT_SYSCALL _TIE_xt_exceptions_SYSCALL 41 | #define XT_SIMCALL _TIE_xt_exceptions_SIMCALL 42 | 43 | #endif /* __XCC__ */ 44 | 45 | #endif /* __XTENSA__ */ 46 | #endif /* !_XTENSA_xt_exceptions_HEADER */ 47 | -------------------------------------------------------------------------------- /extra_include/xtensa/tie/xt_externalregisters.h: -------------------------------------------------------------------------------- 1 | /* Definitions for the xt_externalregisters TIE package */ 2 | 3 | /* 4 | * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Tensilica Inc. ALL RIGHTS RESERVED. 5 | * These coded instructions, statements, and computer programs are the 6 | * copyrighted works and confidential proprietary information of Tensilica Inc. 7 | * They may not be modified, copied, reproduced, distributed, or disclosed to 8 | * third parties in any manner, medium, or form, in whole or in part, without 9 | * the prior written consent of Tensilica Inc. 10 | */ 11 | 12 | /* Do not modify. This is automatically generated.*/ 13 | 14 | #ifndef _XTENSA_xt_externalregisters_HEADER 15 | #define _XTENSA_xt_externalregisters_HEADER 16 | 17 | #ifdef __XTENSA__ 18 | #ifdef __XCC__ 19 | 20 | 21 | /* 22 | * The following prototypes describe intrinsic functions 23 | * corresponding to TIE instructions. Some TIE instructions 24 | * may produce multiple results (designated as "out" operands 25 | * in the iclass section) or may have operands used as both 26 | * inputs and outputs (designated as "inout"). However, the C 27 | * and C++ languages do not provide syntax that can express 28 | * the in/out/inout constraints of TIE intrinsics. 29 | * Nevertheless, the compiler understands these constraints 30 | * and will check that the intrinsic functions are used 31 | * correctly. To improve the readability of these prototypes, 32 | * the "out" and "inout" parameters are marked accordingly 33 | * with comments. 34 | */ 35 | 36 | extern void _TIE_xt_externalregisters_RER(void); 37 | extern void _TIE_xt_externalregisters_WER(void); 38 | #define XT_RER _TIE_xt_externalregisters_RER 39 | #define XT_WER _TIE_xt_externalregisters_WER 40 | 41 | #endif /* __XCC__ */ 42 | 43 | #endif /* __XTENSA__ */ 44 | #endif /* !_XTENSA_xt_externalregisters_HEADER */ 45 | -------------------------------------------------------------------------------- /extra_include/xtensa/tie/xt_interrupt.h: -------------------------------------------------------------------------------- 1 | /* Definitions for the xt_interrupt TIE package */ 2 | 3 | /* 4 | * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Tensilica Inc. ALL RIGHTS RESERVED. 5 | * These coded instructions, statements, and computer programs are the 6 | * copyrighted works and confidential proprietary information of Tensilica Inc. 7 | * They may not be modified, copied, reproduced, distributed, or disclosed to 8 | * third parties in any manner, medium, or form, in whole or in part, without 9 | * the prior written consent of Tensilica Inc. 10 | */ 11 | 12 | /* Do not modify. This is automatically generated.*/ 13 | 14 | #ifndef _XTENSA_xt_interrupt_HEADER 15 | #define _XTENSA_xt_interrupt_HEADER 16 | 17 | #ifdef __XTENSA__ 18 | #ifdef __XCC__ 19 | 20 | #include 21 | 22 | /* 23 | * The following prototypes describe intrinsic functions 24 | * corresponding to TIE instructions. Some TIE instructions 25 | * may produce multiple results (designated as "out" operands 26 | * in the iclass section) or may have operands used as both 27 | * inputs and outputs (designated as "inout"). However, the C 28 | * and C++ languages do not provide syntax that can express 29 | * the in/out/inout constraints of TIE intrinsics. 30 | * Nevertheless, the compiler understands these constraints 31 | * and will check that the intrinsic functions are used 32 | * correctly. To improve the readability of these prototypes, 33 | * the "out" and "inout" parameters are marked accordingly 34 | * with comments. 35 | */ 36 | 37 | extern void _TIE_xt_interrupt_WAITI(immediate s); 38 | extern unsigned _TIE_xt_interrupt_RSR_INTERRUPT(void); 39 | extern void _TIE_xt_interrupt_WSR_INTSET(unsigned art); 40 | extern void _TIE_xt_interrupt_WSR_INTCLEAR(unsigned art); 41 | extern unsigned _TIE_xt_interrupt_RSR_INTENABLE(void); 42 | extern void _TIE_xt_interrupt_WSR_INTENABLE(unsigned art); 43 | extern void _TIE_xt_interrupt_XSR_INTENABLE(unsigned art /*inout*/); 44 | #define XT_WAITI _TIE_xt_interrupt_WAITI 45 | #define XT_RSR_INTERRUPT _TIE_xt_interrupt_RSR_INTERRUPT 46 | #define XT_WSR_INTSET _TIE_xt_interrupt_WSR_INTSET 47 | #define XT_WSR_INTCLEAR _TIE_xt_interrupt_WSR_INTCLEAR 48 | #define XT_RSR_INTENABLE _TIE_xt_interrupt_RSR_INTENABLE 49 | #define XT_WSR_INTENABLE _TIE_xt_interrupt_WSR_INTENABLE 50 | #define XT_XSR_INTENABLE _TIE_xt_interrupt_XSR_INTENABLE 51 | 52 | #endif /* __XCC__ */ 53 | 54 | #endif /* __XTENSA__ */ 55 | #endif /* !_XTENSA_xt_interrupt_HEADER */ 56 | -------------------------------------------------------------------------------- /extra_include/xtensa/tie/xt_misc.h: -------------------------------------------------------------------------------- 1 | /* Definitions for the xt_misc TIE package */ 2 | 3 | /* 4 | * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Tensilica Inc. ALL RIGHTS RESERVED. 5 | * These coded instructions, statements, and computer programs are the 6 | * copyrighted works and confidential proprietary information of Tensilica Inc. 7 | * They may not be modified, copied, reproduced, distributed, or disclosed to 8 | * third parties in any manner, medium, or form, in whole or in part, without 9 | * the prior written consent of Tensilica Inc. 10 | */ 11 | 12 | /* Do not modify. This is automatically generated.*/ 13 | 14 | #ifndef _XTENSA_xt_misc_HEADER 15 | #define _XTENSA_xt_misc_HEADER 16 | 17 | #ifdef __XTENSA__ 18 | #ifdef __XCC__ 19 | 20 | #include 21 | 22 | /* 23 | * The following prototypes describe intrinsic functions 24 | * corresponding to TIE instructions. Some TIE instructions 25 | * may produce multiple results (designated as "out" operands 26 | * in the iclass section) or may have operands used as both 27 | * inputs and outputs (designated as "inout"). However, the C 28 | * and C++ languages do not provide syntax that can express 29 | * the in/out/inout constraints of TIE intrinsics. 30 | * Nevertheless, the compiler understands these constraints 31 | * and will check that the intrinsic functions are used 32 | * correctly. To improve the readability of these prototypes, 33 | * the "out" and "inout" parameters are marked accordingly 34 | * with comments. 35 | */ 36 | 37 | extern int _TIE_xt_misc_NSA(int s); 38 | extern unsigned _TIE_xt_misc_NSAU(unsigned s); 39 | #define XT_NSA _TIE_xt_misc_NSA 40 | #define XT_NSAU _TIE_xt_misc_NSAU 41 | 42 | #endif /* __XCC__ */ 43 | 44 | #endif /* __XTENSA__ */ 45 | #endif /* !_XTENSA_xt_misc_HEADER */ 46 | -------------------------------------------------------------------------------- /extra_include/xtensa/tie/xt_mmu.h: -------------------------------------------------------------------------------- 1 | /* Definitions for the xt_mmu TIE package */ 2 | 3 | /* 4 | * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Tensilica Inc. ALL RIGHTS RESERVED. 5 | * These coded instructions, statements, and computer programs are the 6 | * copyrighted works and confidential proprietary information of Tensilica Inc. 7 | * They may not be modified, copied, reproduced, distributed, or disclosed to 8 | * third parties in any manner, medium, or form, in whole or in part, without 9 | * the prior written consent of Tensilica Inc. 10 | */ 11 | 12 | /* Do not modify. This is automatically generated.*/ 13 | 14 | #ifndef _XTENSA_xt_mmu_HEADER 15 | #define _XTENSA_xt_mmu_HEADER 16 | 17 | #ifdef __XTENSA__ 18 | #ifdef __XCC__ 19 | 20 | #include 21 | 22 | /* 23 | * The following prototypes describe intrinsic functions 24 | * corresponding to TIE instructions. Some TIE instructions 25 | * may produce multiple results (designated as "out" operands 26 | * in the iclass section) or may have operands used as both 27 | * inputs and outputs (designated as "inout"). However, the C 28 | * and C++ languages do not provide syntax that can express 29 | * the in/out/inout constraints of TIE intrinsics. 30 | * Nevertheless, the compiler understands these constraints 31 | * and will check that the intrinsic functions are used 32 | * correctly. To improve the readability of these prototypes, 33 | * the "out" and "inout" parameters are marked accordingly 34 | * with comments. 35 | */ 36 | 37 | extern void _TIE_xt_mmu_IDTLB(unsigned ars); 38 | extern unsigned _TIE_xt_mmu_RDTLB1(unsigned ars); 39 | extern unsigned _TIE_xt_mmu_RDTLB0(unsigned ars); 40 | extern unsigned _TIE_xt_mmu_PDTLB(unsigned ars); 41 | extern void _TIE_xt_mmu_WDTLB(unsigned art, unsigned ars); 42 | extern void _TIE_xt_mmu_IITLB(unsigned ars); 43 | extern unsigned _TIE_xt_mmu_RITLB1(unsigned ars); 44 | extern unsigned _TIE_xt_mmu_RITLB0(unsigned ars); 45 | extern unsigned _TIE_xt_mmu_PITLB(unsigned ars); 46 | extern void _TIE_xt_mmu_WITLB(unsigned art, unsigned ars); 47 | #define XT_IDTLB _TIE_xt_mmu_IDTLB 48 | #define XT_RDTLB1 _TIE_xt_mmu_RDTLB1 49 | #define XT_RDTLB0 _TIE_xt_mmu_RDTLB0 50 | #define XT_PDTLB _TIE_xt_mmu_PDTLB 51 | #define XT_WDTLB _TIE_xt_mmu_WDTLB 52 | #define XT_IITLB _TIE_xt_mmu_IITLB 53 | #define XT_RITLB1 _TIE_xt_mmu_RITLB1 54 | #define XT_RITLB0 _TIE_xt_mmu_RITLB0 55 | #define XT_PITLB _TIE_xt_mmu_PITLB 56 | #define XT_WITLB _TIE_xt_mmu_WITLB 57 | 58 | #endif /* __XCC__ */ 59 | 60 | #endif /* __XTENSA__ */ 61 | #endif /* !_XTENSA_xt_mmu_HEADER */ 62 | -------------------------------------------------------------------------------- /extra_include/xtensa/tie/xt_mul.h: -------------------------------------------------------------------------------- 1 | /* Definitions for the xt_mul TIE package */ 2 | 3 | /* 4 | * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Tensilica Inc. ALL RIGHTS RESERVED. 5 | * These coded instructions, statements, and computer programs are the 6 | * copyrighted works and confidential proprietary information of Tensilica Inc. 7 | * They may not be modified, copied, reproduced, distributed, or disclosed to 8 | * third parties in any manner, medium, or form, in whole or in part, without 9 | * the prior written consent of Tensilica Inc. 10 | */ 11 | 12 | /* Do not modify. This is automatically generated.*/ 13 | 14 | #ifndef _XTENSA_xt_mul_HEADER 15 | #define _XTENSA_xt_mul_HEADER 16 | 17 | #ifdef __XTENSA__ 18 | #ifdef __XCC__ 19 | 20 | #include 21 | 22 | /* 23 | * The following prototypes describe intrinsic functions 24 | * corresponding to TIE instructions. Some TIE instructions 25 | * may produce multiple results (designated as "out" operands 26 | * in the iclass section) or may have operands used as both 27 | * inputs and outputs (designated as "inout"). However, the C 28 | * and C++ languages do not provide syntax that can express 29 | * the in/out/inout constraints of TIE intrinsics. 30 | * Nevertheless, the compiler understands these constraints 31 | * and will check that the intrinsic functions are used 32 | * correctly. To improve the readability of these prototypes, 33 | * the "out" and "inout" parameters are marked accordingly 34 | * with comments. 35 | */ 36 | 37 | extern int _TIE_xt_mul_MUL16S(short s, short t); 38 | extern unsigned _TIE_xt_mul_MUL16U(unsigned short s, unsigned short t); 39 | extern int _TIE_xt_mul_MULL(int s, int t); 40 | #define XT_MUL16S _TIE_xt_mul_MUL16S 41 | #define XT_MUL16U _TIE_xt_mul_MUL16U 42 | #define XT_MULL _TIE_xt_mul_MULL 43 | 44 | #endif /* __XCC__ */ 45 | 46 | #endif /* __XTENSA__ */ 47 | #endif /* !_XTENSA_xt_mul_HEADER */ 48 | -------------------------------------------------------------------------------- /extra_include/xtensa/tie/xt_timer.h: -------------------------------------------------------------------------------- 1 | /* Definitions for the xt_timer TIE package */ 2 | 3 | /* 4 | * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Tensilica Inc. ALL RIGHTS RESERVED. 5 | * These coded instructions, statements, and computer programs are the 6 | * copyrighted works and confidential proprietary information of Tensilica Inc. 7 | * They may not be modified, copied, reproduced, distributed, or disclosed to 8 | * third parties in any manner, medium, or form, in whole or in part, without 9 | * the prior written consent of Tensilica Inc. 10 | */ 11 | 12 | /* Do not modify. This is automatically generated.*/ 13 | 14 | #ifndef _XTENSA_xt_timer_HEADER 15 | #define _XTENSA_xt_timer_HEADER 16 | 17 | #ifdef __XTENSA__ 18 | #ifdef __XCC__ 19 | 20 | #include 21 | 22 | /* 23 | * The following prototypes describe intrinsic functions 24 | * corresponding to TIE instructions. Some TIE instructions 25 | * may produce multiple results (designated as "out" operands 26 | * in the iclass section) or may have operands used as both 27 | * inputs and outputs (designated as "inout"). However, the C 28 | * and C++ languages do not provide syntax that can express 29 | * the in/out/inout constraints of TIE intrinsics. 30 | * Nevertheless, the compiler understands these constraints 31 | * and will check that the intrinsic functions are used 32 | * correctly. To improve the readability of these prototypes, 33 | * the "out" and "inout" parameters are marked accordingly 34 | * with comments. 35 | */ 36 | 37 | extern unsigned _TIE_xt_timer_RSR_CCOUNT(void); 38 | extern void _TIE_xt_timer_WSR_CCOUNT(unsigned art); 39 | extern void _TIE_xt_timer_XSR_CCOUNT(unsigned art /*inout*/); 40 | extern unsigned _TIE_xt_timer_RSR_CCOMPARE0(void); 41 | extern void _TIE_xt_timer_WSR_CCOMPARE0(unsigned art); 42 | extern void _TIE_xt_timer_XSR_CCOMPARE0(unsigned art /*inout*/); 43 | #define XT_RSR_CCOUNT _TIE_xt_timer_RSR_CCOUNT 44 | #define XT_WSR_CCOUNT _TIE_xt_timer_WSR_CCOUNT 45 | #define XT_XSR_CCOUNT _TIE_xt_timer_XSR_CCOUNT 46 | #define XT_RSR_CCOMPARE0 _TIE_xt_timer_RSR_CCOMPARE0 47 | #define XT_WSR_CCOMPARE0 _TIE_xt_timer_WSR_CCOMPARE0 48 | #define XT_XSR_CCOMPARE0 _TIE_xt_timer_XSR_CCOMPARE0 49 | 50 | #endif /* __XCC__ */ 51 | 52 | #endif /* __XTENSA__ */ 53 | #endif /* !_XTENSA_xt_timer_HEADER */ 54 | -------------------------------------------------------------------------------- /extra_include/xtensa/tie/xt_trace.h: -------------------------------------------------------------------------------- 1 | /* Definitions for the xt_trace TIE package */ 2 | 3 | /* 4 | * Customer ID=7011; Build=0x2b6f6; Copyright (c) 2004 by Tensilica Inc. ALL RIGHTS RESERVED. 5 | * These coded instructions, statements, and computer programs are the 6 | * copyrighted works and confidential proprietary information of Tensilica Inc. 7 | * They may not be modified, copied, reproduced, distributed, or disclosed to 8 | * third parties in any manner, medium, or form, in whole or in part, without 9 | * the prior written consent of Tensilica Inc. 10 | */ 11 | 12 | /* Do not modify. This is automatically generated.*/ 13 | 14 | #ifndef _XTENSA_xt_trace_HEADER 15 | #define _XTENSA_xt_trace_HEADER 16 | 17 | #ifdef __XTENSA__ 18 | #ifdef __XCC__ 19 | 20 | #include 21 | 22 | /* 23 | * The following prototypes describe intrinsic functions 24 | * corresponding to TIE instructions. Some TIE instructions 25 | * may produce multiple results (designated as "out" operands 26 | * in the iclass section) or may have operands used as both 27 | * inputs and outputs (designated as "inout"). However, the C 28 | * and C++ languages do not provide syntax that can express 29 | * the in/out/inout constraints of TIE intrinsics. 30 | * Nevertheless, the compiler understands these constraints 31 | * and will check that the intrinsic functions are used 32 | * correctly. To improve the readability of these prototypes, 33 | * the "out" and "inout" parameters are marked accordingly 34 | * with comments. 35 | */ 36 | 37 | extern void _TIE_xt_trace_WSR_MMID(unsigned art); 38 | #define XT_WSR_MMID _TIE_xt_trace_WSR_MMID 39 | 40 | #endif /* __XCC__ */ 41 | 42 | #endif /* __XTENSA__ */ 43 | #endif /* !_XTENSA_xt_trace_HEADER */ 44 | -------------------------------------------------------------------------------- /include/espressif/c_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 - 2011 Espressif System 3 | * 4 | */ 5 | 6 | #ifndef _C_TYPES_H_ 7 | #define _C_TYPES_H_ 8 | 9 | typedef unsigned char uint8_t; 10 | typedef signed char sint8_t; 11 | typedef signed char int8_t; 12 | typedef unsigned short uint16_t; 13 | typedef signed short sint16_t; 14 | typedef signed short int16_t; 15 | typedef unsigned long uint32_t; 16 | typedef signed long sint32_t; 17 | typedef signed long int32_t; 18 | typedef signed long long sint64_t; 19 | typedef unsigned long long uint64_t; 20 | typedef unsigned long long u_int64_t; 21 | typedef float real32_t; 22 | typedef double real64_t; 23 | 24 | typedef unsigned char uint8; 25 | typedef unsigned char u8; 26 | typedef signed char sint8; 27 | typedef signed char int8; 28 | typedef signed char s8; 29 | typedef unsigned short uint16; 30 | typedef unsigned short u16; 31 | typedef signed short sint16; 32 | typedef signed short s16; 33 | typedef unsigned int uint32; 34 | typedef unsigned int u_int; 35 | typedef unsigned int u32; 36 | typedef signed int sint32; 37 | typedef signed int s32; 38 | typedef int int32; 39 | typedef signed long long sint64; 40 | typedef unsigned long long uint64; 41 | typedef unsigned long long u64; 42 | typedef float real32; 43 | typedef double real64; 44 | 45 | #define __le16 u16 46 | 47 | typedef unsigned int size_t; 48 | typedef int ssize_t; 49 | 50 | #define __packed __attribute__((packed)) 51 | 52 | #define LOCAL static 53 | 54 | #ifndef NULL 55 | #define NULL (void *)0 56 | #endif /* NULL */ 57 | 58 | /* probably should not put STATUS here */ 59 | typedef enum { 60 | OK = 0, 61 | FAIL, 62 | PENDING, 63 | BUSY, 64 | CANCEL, 65 | } STATUS; 66 | 67 | #define BIT(nr) (1UL << (nr)) 68 | 69 | #define REG_SET_BIT(_r, _b) (*(volatile uint32_t*)(_r) |= (_b)) 70 | #define REG_CLR_BIT(_r, _b) (*(volatile uint32_t*)(_r) &= ~(_b)) 71 | 72 | #define DMEM_ATTR __attribute__((section(".bss"))) 73 | #define SHMEM_ATTR 74 | 75 | #ifdef ICACHE_FLASH 76 | #define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text"))) 77 | #define ICACHE_RODATA_ATTR __attribute__((section(".irom.text"),aligned(4))) 78 | #else 79 | #define ICACHE_FLASH_ATTR 80 | #endif /* ICACHE_FLASH */ 81 | 82 | #ifndef __cplusplus 83 | typedef unsigned char bool; 84 | #define BOOL bool 85 | #define true (1) 86 | #define false (0) 87 | #define TRUE true 88 | #define FALSE false 89 | 90 | 91 | #endif /* !__cplusplus */ 92 | 93 | #endif /* _C_TYPES_H_ */ 94 | -------------------------------------------------------------------------------- /include/espressif/esp8266/esp8266.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 - 2016 Espressif System 3 | * 4 | */ 5 | 6 | #ifndef __ESP8266_H__ 7 | #define __ESP8266_H__ 8 | 9 | #include "ets_sys.h" 10 | #include "eagle_soc.h" 11 | #include "gpio_register.h" 12 | #include "pin_mux_register.h" 13 | #include "spi_register.h" 14 | #include "timer_register.h" 15 | #include "uart_register.h" 16 | 17 | #endif 18 | 19 | -------------------------------------------------------------------------------- /include/espressif/esp8266/ets_sys.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2008 - 2011 Espressif System 3 | * 4 | * Define user specified Event signals and Task priorities here 5 | * 6 | */ 7 | 8 | #ifndef __ETS_SYS_H__ 9 | #define __ETS_SYS_H__ 10 | 11 | /* interrupt related */ 12 | #define ETS_SPI_INUM 2 13 | #define ETS_GPIO_INUM 4 14 | #define ETS_UART_INUM 5 15 | #define ETS_MAX_INUM 6 16 | #define ETS_SOFT_INUM 7 17 | #define ETS_WDT_INUM 8 18 | #define ETS_FRC_TIMER1_INUM 9 19 | 20 | #endif /* _ETS_SYS_H */ 21 | -------------------------------------------------------------------------------- /include/espressif/esp_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 -2014 Espressif System 3 | * 4 | */ 5 | 6 | #ifndef __ESP_COMMON_H__ 7 | #define __ESP_COMMON_H__ 8 | 9 | #include "c_types.h" 10 | #include "esp_libc.h" 11 | #include "esp_misc.h" 12 | #include "esp_wifi.h" 13 | #include "esp_softap.h" 14 | #include "esp_sta.h" 15 | #include "esp_system.h" 16 | #include "esp_timer.h" 17 | 18 | #include "esp8266/esp8266.h" 19 | 20 | #include "smartconfig.h" 21 | #include "spi_flash.h" 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /include/espressif/esp_libc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 - 2011 Espressif System 3 | * 4 | */ 5 | 6 | #ifndef __ESP_LIBC_H__ 7 | #define __ESP_LIBC_H__ 8 | 9 | char *strcpy(char *dst, const char *src); 10 | char *strncpy(char *dst, const char *src, size_t n); 11 | int strcmp(const char *s1, const char *s2); 12 | int strncmp(const char *s1, const char *s2, size_t n); 13 | size_t strlen(const char *s); 14 | char *strstr(const char *s1, const char *s2); 15 | char *strcat(char *dst, const char *src); 16 | char *strncat(char *dst, const char *src, size_t count); 17 | size_t strspn(const char *s, const char *accept); 18 | size_t strcspn(const char *s, const char *reject); 19 | char *strtok_r(char *s, const char *delim, char **ptrptr); 20 | char *strtok(char *s, const char *delim); 21 | char *strrchr(const char *s, int c); 22 | char *strdup(const char *s); 23 | char *strchr(const char *s, int c); 24 | long strtol(const char *str, char **endptr, int base); 25 | 26 | void bzero(void *s, size_t n); 27 | 28 | void *memcpy(void *dst, const void *src, size_t n); 29 | void *memset(void *dst, int c, size_t n); 30 | int memcmp(const void *m1, const void *m2, size_t n); 31 | void *memmove(void *dst, const void *src, size_t n); 32 | 33 | int rand_r(unsigned int *seed); 34 | int rand(void); 35 | void srand(unsigned int i); 36 | 37 | int printf(const char *format, ...); 38 | int sprintf(char *out, const char *format, ...); 39 | int snprintf(char *buf, unsigned int count, const char *format, ...); 40 | int puts(const char *str); 41 | int putchar(int c); 42 | 43 | void *malloc(size_t n); 44 | void free(void *p); 45 | void *calloc(size_t c, size_t n); 46 | void *zalloc(size_t n); 47 | void *realloc(void *p, size_t n); 48 | 49 | int atoi(const char *s); 50 | long atol(const char *s); 51 | 52 | /* NOTE: don't use printf_opt in irq handler, for test */ 53 | #define printf_opt(fmt, ...) do { \ 54 | static const char flash_str[] ICACHE_RODATA_ATTR = fmt; \ 55 | printf(flash_str, ##__VA_ARGS__); \ 56 | } while(0) 57 | 58 | /* NOTE: don't use printf_opt in irq handler, for test */ 59 | #define sprintf_opt(out, fmt, ...) do { \ 60 | static const char flash_str[] ICACHE_RODATA_ATTR = fmt; \ 61 | sprintf(out, flash_str, ##__VA_ARGS__); \ 62 | } while(0) 63 | 64 | #endif /* __LIBC_H__ */ 65 | -------------------------------------------------------------------------------- /include/espressif/esp_misc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 -2014 Espressif System 3 | * 4 | */ 5 | 6 | #ifndef __ESP_MISC_H__ 7 | #define __ESP_MISC_H__ 8 | 9 | #include "lwip/ip_addr.h" 10 | 11 | #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5] 12 | #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x" 13 | 14 | #define IP2STR(ipaddr) ip4_addr1_16(ipaddr), \ 15 | ip4_addr2_16(ipaddr), \ 16 | ip4_addr3_16(ipaddr), \ 17 | ip4_addr4_16(ipaddr) 18 | 19 | #define IPSTR "%d.%d.%d.%d" 20 | 21 | void os_delay_us(uint16 us); 22 | 23 | void os_install_putc1(void (*p)(char c)); 24 | void os_putc(char c); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /include/espressif/esp_softap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 -2014 Espressif System 3 | * 4 | */ 5 | 6 | #ifndef __ESP_SOFTAP_H__ 7 | #define __ESP_SOFTAP_H__ 8 | 9 | struct softap_config { 10 | uint8 ssid[32]; 11 | uint8 password[64]; 12 | uint8 ssid_len; 13 | uint8 channel; 14 | AUTH_MODE authmode; 15 | uint8 ssid_hidden; 16 | uint8 max_connection; 17 | uint16 beacon_interval; 18 | }; 19 | 20 | bool wifi_softap_get_config(struct softap_config *config); 21 | bool wifi_softap_set_config(struct softap_config *config); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /include/espressif/esp_sta.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 -2014 Espressif System 3 | * 4 | */ 5 | 6 | #ifndef __ESP_STA_H__ 7 | #define __ESP_STA_H__ 8 | 9 | #include "queue.h" 10 | 11 | struct station_config { 12 | uint8 ssid[32]; 13 | uint8 password[64]; 14 | uint8 bssid_set; 15 | uint8 bssid[6]; 16 | }; 17 | 18 | bool wifi_station_get_config(struct station_config *config); 19 | bool wifi_station_set_config(struct station_config *config); 20 | 21 | bool wifi_station_connect(void); 22 | bool wifi_station_disconnect(void); 23 | 24 | struct scan_config { 25 | uint8 *ssid; 26 | uint8 *bssid; 27 | uint8 channel; 28 | uint8 show_hidden; 29 | }; 30 | 31 | struct bss_info { 32 | STAILQ_ENTRY(bss_info) next; 33 | 34 | uint8 bssid[6]; 35 | uint8 ssid[32]; 36 | uint8 channel; 37 | sint8 rssi; 38 | AUTH_MODE authmode; 39 | uint8 is_hidden; 40 | }; 41 | 42 | typedef void (* scan_done_cb_t)(void *arg, STATUS status); 43 | 44 | bool wifi_station_scan(struct scan_config *config, scan_done_cb_t cb); 45 | 46 | uint8 wifi_station_get_auto_connect(void); 47 | bool wifi_station_set_auto_connect(uint8 set); 48 | 49 | enum { 50 | STATION_IDLE = 0, 51 | STATION_CONNECTING, 52 | STATION_WRONG_PASSWORD, 53 | STATION_NO_AP_FOUND, 54 | STATION_CONNECT_FAIL, 55 | STATION_GOT_IP 56 | }; 57 | 58 | uint8 wifi_station_get_connect_status(void); 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /include/espressif/esp_system.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 -2014 Espressif System 3 | * 4 | */ 5 | 6 | #ifndef __ESP_SYSTEM_H__ 7 | #define __ESP_SYSTEM_H__ 8 | 9 | #include "c_types.h" 10 | 11 | enum rst_reason { 12 | DEFAULT_RST = 0, 13 | WDT_RST = 1, 14 | EXCEPTION_RST = 2, 15 | SOFT_RST = 3 16 | }; 17 | 18 | struct rst_info{ 19 | uint32 reason; 20 | uint32 exccause; 21 | uint32 epc1; 22 | uint32 epc2; 23 | uint32 epc3; 24 | uint32 excvaddr; 25 | uint32 depc; 26 | uint32 rtn_addr; 27 | }; 28 | 29 | struct rst_info* system_get_rst_info(void); 30 | 31 | const char* system_get_sdk_version(void); 32 | 33 | void system_restore(void); 34 | void system_restart(void); 35 | void system_deep_sleep(uint32 time_in_us); 36 | 37 | uint32 system_get_time(void); 38 | 39 | void system_print_meminfo(void); 40 | uint32 system_get_free_heap_size(void); 41 | uint32 system_get_chip_id(void); 42 | 43 | uint32 system_rtc_clock_cali_proc(void); 44 | uint32 system_get_rtc_time(void); 45 | 46 | bool system_rtc_mem_read(uint8 src, void *dst, uint16 n); 47 | bool system_rtc_mem_write(uint8 dst, const void *src, uint16 n); 48 | 49 | void system_uart_swap(void); 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /include/espressif/esp_timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 -2014 Espressif System 3 | * 4 | */ 5 | 6 | #ifndef __ESP_TIMER_H__ 7 | #define __ESP_TIMER_H__ 8 | 9 | /* timer related */ 10 | typedef void os_timer_func_t(void *timer_arg); 11 | 12 | typedef struct _os_timer_t { 13 | struct _os_timer_t *timer_next; 14 | void *freerots_handle; 15 | uint32 timer_expire; 16 | uint32 timer_period; 17 | os_timer_func_t *timer_func; 18 | bool timer_repeat_flag; 19 | void *timer_arg; 20 | } os_timer_t; 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /include/espressif/esp_wifi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 -2014 Espressif System 3 | * 4 | */ 5 | 6 | #ifndef __ESP_WIFI_H__ 7 | #define __ESP_WIFI_H__ 8 | 9 | enum { 10 | NULL_MODE = 0, 11 | STATION_MODE, 12 | SOFTAP_MODE, 13 | STATIONAP_MODE, 14 | MAX_MODE 15 | }; 16 | 17 | typedef enum _auth_mode { 18 | AUTH_OPEN = 0, 19 | AUTH_WEP, 20 | AUTH_WPA_PSK, 21 | AUTH_WPA2_PSK, 22 | AUTH_WPA_WPA2_PSK, 23 | AUTH_MAX 24 | } AUTH_MODE; 25 | 26 | uint8 wifi_get_opmode(void); 27 | bool wifi_set_opmode(uint8 opmode); 28 | 29 | enum { 30 | STATION_IF = 0, 31 | SOFTAP_IF, 32 | MAX_IF 33 | }; 34 | 35 | struct ip_info { 36 | struct ip_addr ip; 37 | struct ip_addr netmask; 38 | struct ip_addr gw; 39 | }; 40 | 41 | bool wifi_get_ip_info(uint8 if_index, struct ip_info *info); 42 | bool wifi_set_ip_info(uint8 if_index, struct ip_info *info); 43 | bool wifi_get_macaddr(uint8 if_index, uint8 *macaddr); 44 | bool wifi_set_macaddr(uint8 if_index, uint8 *macaddr); 45 | 46 | uint8 wifi_get_channel(void); 47 | bool wifi_set_channel(uint8 channel); 48 | 49 | void wifi_status_led_install(uint8 gpio_id, uint32 gpio_name, uint8 gpio_func); 50 | 51 | void wifi_promiscuous_enable(uint8 promiscuous); 52 | 53 | typedef void (* wifi_promiscuous_cb_t)(uint8 *buf, uint16 len); 54 | 55 | void wifi_set_promiscuous_rx_cb(wifi_promiscuous_cb_t cb); 56 | 57 | enum phy_mode { 58 | PHY_MODE_11B = 1, 59 | PHY_MODE_11G = 2, 60 | PHY_MODE_11N = 3 61 | }; 62 | 63 | enum phy_mode wifi_get_phy_mode(void); 64 | bool wifi_set_phy_mode(enum phy_mode mode); 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /include/espressif/smartconfig.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 -2018 Espressif System 3 | * 4 | */ 5 | 6 | #ifndef __SMARTCONFIG_H__ 7 | #define __SMARTCONFIG_H__ 8 | 9 | typedef void (*sc_callback_t)(void *data); 10 | 11 | typedef enum { 12 | SC_STATUS_WAIT = 0, 13 | SC_STATUS_FIND_CHANNEL, 14 | SC_STATUS_GETTING_SSID_PSWD, 15 | SC_STATUS_GOT_SSID_PSWD, 16 | SC_STATUS_LINK, 17 | SC_STATUS_LINK_OVER, 18 | } sc_status; 19 | 20 | typedef enum { 21 | SC_TYPE_ESPTOUCH = 0, 22 | SC_TYPE_AIRKISS, 23 | } sc_type; 24 | 25 | sc_status smartconfig_get_status(void); 26 | const char *smartconfig_get_version(void); 27 | bool smartconfig_start(sc_type type, sc_callback_t cb, ...); 28 | bool smartconfig_stop(void); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /include/espressif/spi_flash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) Espressif System 2010 3 | * 4 | */ 5 | 6 | #ifndef __SPI_FLASH_H__ 7 | #define __SPI_FLASH_H__ 8 | 9 | typedef enum { 10 | SPI_FLASH_RESULT_OK, 11 | SPI_FLASH_RESULT_ERR, 12 | SPI_FLASH_RESULT_TIMEOUT 13 | } SpiFlashOpResult; 14 | 15 | #define SPI_FLASH_SEC_SIZE 4096 16 | 17 | uint32 spi_flash_get_id(void); 18 | SpiFlashOpResult spi_flash_read_status(uint32 *status); 19 | SpiFlashOpResult spi_flash_write_status(uint32 status_value); 20 | SpiFlashOpResult spi_flash_erase_sector(uint16 sec); 21 | SpiFlashOpResult spi_flash_write(uint32 des_addr, uint32 *src_addr, uint32 size); 22 | SpiFlashOpResult spi_flash_read(uint32 src_addr, uint32 *des_addr, uint32 size); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /include/lwip/arch/perf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the lwIP TCP/IP stack. 30 | * 31 | * Author: Adam Dunkels 32 | * 33 | */ 34 | #ifndef __PERF_H__ 35 | #define __PERF_H__ 36 | 37 | #define PERF_START /* null definition */ 38 | #define PERF_STOP(x) /* null definition */ 39 | 40 | #endif /* __PERF_H__ */ 41 | -------------------------------------------------------------------------------- /include/lwip/arch/sys_arch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without modification, 6 | * are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 25 | * OF SUCH DAMAGE. 26 | * 27 | * This file is part of the lwIP TCP/IP stack. 28 | * 29 | * Author: Adam Dunkels 30 | * 31 | */ 32 | 33 | #ifndef __SYS_ARCH_H__ 34 | #define __SYS_ARCH_H__ 35 | 36 | #include "freertos/FreeRTOS.h" 37 | #include "freertos/task.h" 38 | #include "freertos/queue.h" 39 | #include "freertos/semphr.h" 40 | 41 | typedef xSemaphoreHandle sys_sem_t; 42 | typedef xSemaphoreHandle sys_mutex_t; 43 | typedef xQueueHandle sys_mbox_t; 44 | typedef xTaskHandle sys_thread_t; 45 | 46 | #define sys_mbox_valid( x ) ( ( ( *x ) == NULL) ? pdFALSE : pdTRUE ) 47 | #define sys_mbox_set_invalid( x ) ( ( *x ) = NULL ) 48 | #define sys_sem_valid( x ) ( ( ( *x ) == NULL) ? pdFALSE : pdTRUE ) 49 | #define sys_sem_set_invalid( x ) ( ( *x ) = NULL ) 50 | 51 | #define LWIP_COMPAT_MUTEX 0 52 | 53 | #endif /* __SYS_ARCH_H__ */ 54 | 55 | -------------------------------------------------------------------------------- /include/lwip/ipv6/lwip/dhcp6.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * 4 | * IPv6 address autoconfiguration as per RFC 4862. 5 | */ 6 | 7 | /* 8 | * Copyright (c) 2010 Inico Technologies Ltd. 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without modification, 12 | * are permitted provided that the following conditions are met: 13 | * 14 | * 1. Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 3. The name of the author may not be used to endorse or promote products 20 | * derived from this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 25 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 27 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 30 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 31 | * OF SUCH DAMAGE. 32 | * 33 | * This file is part of the lwIP TCP/IP stack. 34 | * 35 | * Author: Ivan Delamer 36 | * 37 | * IPv6 address autoconfiguration as per RFC 4862. 38 | * 39 | * Please coordinate changes and requests with Ivan Delamer 40 | * 41 | */ 42 | 43 | #ifndef __LWIP_IP6_DHCP6_H__ 44 | #define __LWIP_IP6_DHCP6_H__ 45 | 46 | #include "lwip/opt.h" 47 | 48 | #if LWIP_IPV6_DHCP6 /* don't build if not configured for use in lwipopts.h */ 49 | 50 | 51 | struct dhcp6 52 | { 53 | /*TODO: implement DHCP6*/ 54 | }; 55 | 56 | #endif /* LWIP_IPV6_DHCP6 */ 57 | 58 | #endif /* __LWIP_IP6_DHCP6_H__ */ 59 | -------------------------------------------------------------------------------- /include/lwip/ipv6/lwip/ethip6.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * 4 | * Ethernet output for IPv6. Uses ND tables for link-layer addressing. 5 | */ 6 | 7 | /* 8 | * Copyright (c) 2010 Inico Technologies Ltd. 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without modification, 12 | * are permitted provided that the following conditions are met: 13 | * 14 | * 1. Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 3. The name of the author may not be used to endorse or promote products 20 | * derived from this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 25 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 27 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 30 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 31 | * OF SUCH DAMAGE. 32 | * 33 | * This file is part of the lwIP TCP/IP stack. 34 | * 35 | * Author: Ivan Delamer 36 | * 37 | * 38 | * Please coordinate changes and requests with Ivan Delamer 39 | * 40 | */ 41 | 42 | #ifndef __LWIP_ETHIP6_H__ 43 | #define __LWIP_ETHIP6_H__ 44 | 45 | #include "lwip/opt.h" 46 | 47 | #if LWIP_IPV6 && LWIP_ETHERNET /* don't build if not configured for use in lwipopts.h */ 48 | 49 | #include "lwip/pbuf.h" 50 | #include "lwip/ip6.h" 51 | #include "lwip/ip6_addr.h" 52 | #include "lwip/netif.h" 53 | 54 | 55 | #ifdef __cplusplus 56 | extern "C" { 57 | #endif 58 | 59 | 60 | err_t ethip6_output(struct netif *netif, struct pbuf *q, ip6_addr_t *ip6addr); 61 | 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | 66 | #endif /* LWIP_IPV6 && LWIP_ETHERNET */ 67 | 68 | #endif /* __LWIP_ETHIP6_H__ */ 69 | -------------------------------------------------------------------------------- /include/lwip/netif/wlan_lwip_if.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2011 Espressif System 3 | * 4 | */ 5 | 6 | #ifndef _WLAN_LWIP_IF_H_ 7 | #define _WLAN_LWIP_IF_H_ 8 | 9 | #include "lwip/err.h" 10 | 11 | err_t ethernetif_init(struct netif *netif); 12 | void ethernetif_input(struct netif *netif, struct pbuf *p); 13 | 14 | #ifndef IOT_SIP_MODE 15 | sint8 ieee80211_output_pbuf(struct netif *ifp, struct pbuf* pb); 16 | #else 17 | sint8 ieee80211_output_pbuf(struct ieee80211_conn *conn, esf_buf *eb); 18 | #endif 19 | 20 | #endif /* _WLAN_LWIP_IF_H_ */ 21 | -------------------------------------------------------------------------------- /include/lwip/posix/netdb.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * This file is a posix wrapper for lwip/netdb.h. 4 | */ 5 | 6 | /* 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * 3. The name of the author may not be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 19 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 20 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 21 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 23 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 26 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 27 | * OF SUCH DAMAGE. 28 | * 29 | * This file is part of the lwIP TCP/IP stack. 30 | * 31 | */ 32 | 33 | #include "lwip/netdb.h" 34 | -------------------------------------------------------------------------------- /include/lwip/posix/sys/socket.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * This file is a posix wrapper for lwip/sockets.h. 4 | */ 5 | 6 | /* 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * 1. Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * 3. The name of the author may not be used to endorse or promote products 16 | * derived from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 19 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 20 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 21 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 23 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 26 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 27 | * OF SUCH DAMAGE. 28 | * 29 | * This file is part of the lwIP TCP/IP stack. 30 | * 31 | */ 32 | 33 | #include "lwip/sockets.h" 34 | -------------------------------------------------------------------------------- /include/ssl/ssl_os_port.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Cameron Rich 3 | * 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * * Neither the name of the axTLS project nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 22 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 23 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 25 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 26 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * @file os_port.h 33 | * 34 | * Some stuff to minimise the differences between windows and linux/unix 35 | */ 36 | 37 | #ifndef HEADER_OS_PORT_H 38 | #define HEADER_OS_PORT_H 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | #include "esp_common.h" 45 | 46 | #if 0 47 | #define ssl_printf(fmt, args...) os_printf(fmt,## args) 48 | #else 49 | #define ssl_printf(fmt, args...) 50 | #endif 51 | 52 | #define STDCALL 53 | #define EXP_FUNC 54 | 55 | #define SSL_CTX_MUTEX_INIT(A) 56 | #define SSL_CTX_MUTEX_DESTROY(A) 57 | #define SSL_CTX_LOCK(A) 58 | #define SSL_CTX_UNLOCK(A) 59 | 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /include/ssl/ssl_version.h: -------------------------------------------------------------------------------- 1 | #define AXTLS_VERSION "1.4.9" 2 | -------------------------------------------------------------------------------- /include/udhcp/dhcpc.h: -------------------------------------------------------------------------------- 1 | /* vi: set sw=4 ts=4: */ 2 | /* 3 | * Licensed under GPLv2, see file LICENSE in this source tree. 4 | */ 5 | #ifndef UDHCP_DHCPC_H 6 | #define UDHCP_DHCPC_H 1 7 | 8 | //PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN 9 | 10 | struct client_config_t { 11 | uint8_t client_mac[6]; /* Our mac address */ 12 | // IF_FEATURE_UDHCP_PORT(uint16_t port;) 13 | int ifindex; /* Index number of the interface to use */ 14 | uint8_t opt_mask[256 / 8]; /* Bitmask of options to send (-O option) */ 15 | const char *interface; /* The name of the interface to use */ 16 | char *pidfile; /* Optionally store the process ID */ 17 | const char *script; /* User script to run at dhcp events */ 18 | struct option_set *options; /* list of DHCP options to send to server */ 19 | uint8_t *clientid; /* Optional client id to use */ 20 | uint8_t *vendorclass; /* Optional vendor class-id to use */ 21 | uint8_t *hostname; /* Optional hostname to use */ 22 | uint8_t *fqdn; /* Optional fully qualified domain name to use */ 23 | 24 | uint16_t first_secs; 25 | uint16_t last_secs; 26 | }; 27 | 28 | /* server_config sits in 1st half of bb_common_bufsiz1 */ 29 | #define client_config (*(struct client_config_t*)(&bb_common_bufsiz1[COMMON_BUFSIZE / 2])) 30 | 31 | #if ENABLE_FEATURE_UDHCP_PORT 32 | #define CLIENT_PORT (client_config.port) 33 | #define CLIENT_PORT6 (client_config.port) 34 | #else 35 | #define CLIENT_PORT 68 36 | #define CLIENT_PORT6 546 37 | #endif 38 | 39 | //POP_SAVED_FUNCTION_VISIBILITY 40 | 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /ld/eagle.rom.addr.v6.ld: -------------------------------------------------------------------------------- 1 | PROVIDE ( SPI_sector_erase = 0x400040c0 ); 2 | PROVIDE ( SPI_page_program = 0x40004174 ); 3 | PROVIDE ( SPI_read_data = 0x400042ac ); 4 | PROVIDE ( SPI_read_status = 0x400043c8 ); 5 | PROVIDE ( SPI_write_status = 0x40004400 ); 6 | PROVIDE ( SPI_write_enable = 0x4000443c ); 7 | PROVIDE ( Wait_SPI_Idle = 0x4000448c ); 8 | PROVIDE ( Enable_QMode = 0x400044c0 ); 9 | PROVIDE ( Disable_QMode = 0x40004508 ); 10 | 11 | PROVIDE ( Cache_Read_Enable = 0x40004678 ); 12 | PROVIDE ( Cache_Read_Disable = 0x400047f0 ); 13 | 14 | PROVIDE ( lldesc_build_chain = 0x40004f40 ); 15 | PROVIDE ( lldesc_num2link = 0x40005050 ); 16 | PROVIDE ( lldesc_set_owner = 0x4000507c ); 17 | 18 | PROVIDE ( __adddf3 = 0x4000c538 ); 19 | PROVIDE ( __addsf3 = 0x4000c180 ); 20 | PROVIDE ( __divdf3 = 0x4000cb94 ); 21 | PROVIDE ( __divdi3 = 0x4000ce60 ); 22 | PROVIDE ( __divsi3 = 0x4000dc88 ); 23 | PROVIDE ( __extendsfdf2 = 0x4000cdfc ); 24 | PROVIDE ( __fixdfsi = 0x4000ccb8 ); 25 | PROVIDE ( __fixunsdfsi = 0x4000cd00 ); 26 | PROVIDE ( __fixunssfsi = 0x4000c4c4 ); 27 | PROVIDE ( __floatsidf = 0x4000e2f0 ); 28 | PROVIDE ( __floatsisf = 0x4000e2ac ); 29 | PROVIDE ( __floatunsidf = 0x4000e2e8 ); 30 | PROVIDE ( __floatunsisf = 0x4000e2a4 ); 31 | PROVIDE ( __muldf3 = 0x4000c8f0 ); 32 | PROVIDE ( __muldi3 = 0x40000650 ); 33 | PROVIDE ( __mulsf3 = 0x4000c3dc ); 34 | PROVIDE ( __subdf3 = 0x4000c688 ); 35 | PROVIDE ( __subsf3 = 0x4000c268 ); 36 | PROVIDE ( __truncdfsf2 = 0x4000cd5c ); 37 | PROVIDE ( __udivdi3 = 0x4000d310 ); 38 | PROVIDE ( __udivsi3 = 0x4000e21c ); 39 | PROVIDE ( __umoddi3 = 0x4000d770 ); 40 | PROVIDE ( __umodsi3 = 0x4000e268 ); 41 | PROVIDE ( __umulsidi3 = 0x4000dcf0 ); 42 | 43 | PROVIDE ( bzero = 0x40002ae8 ); 44 | PROVIDE ( memcmp = 0x400018d4 ); 45 | PROVIDE ( memcpy = 0x400018b4 ); 46 | PROVIDE ( memmove = 0x400018c4 ); 47 | PROVIDE ( memset = 0x400018a4 ); 48 | 49 | PROVIDE ( strcmp = 0x40002aa8 ); 50 | PROVIDE ( strcpy = 0x40002a88 ); 51 | PROVIDE ( strlen = 0x40002ac8 ); 52 | PROVIDE ( strncmp = 0x40002ab8 ); 53 | PROVIDE ( strncpy = 0x40002a98 ); 54 | PROVIDE ( strstr = 0x40002ad8 ); 55 | -------------------------------------------------------------------------------- /lib/libfreertos.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/lib/libfreertos.a -------------------------------------------------------------------------------- /lib/libjson.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/lib/libjson.a -------------------------------------------------------------------------------- /lib/liblwip.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/lib/liblwip.a -------------------------------------------------------------------------------- /lib/libmain.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/lib/libmain.a -------------------------------------------------------------------------------- /lib/libnet80211.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/lib/libnet80211.a -------------------------------------------------------------------------------- /lib/libphy.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/lib/libphy.a -------------------------------------------------------------------------------- /lib/libpp.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/lib/libpp.a -------------------------------------------------------------------------------- /lib/libsmartconfig.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/lib/libsmartconfig.a -------------------------------------------------------------------------------- /lib/libssl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/lib/libssl.a -------------------------------------------------------------------------------- /lib/libudhcp.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/lib/libudhcp.a -------------------------------------------------------------------------------- /lib/libwpa.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/lib/libwpa.a -------------------------------------------------------------------------------- /mp3/driver/.output/eagle/release/lib/libdriver.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/mp3/driver/.output/eagle/release/lib/libdriver.a -------------------------------------------------------------------------------- /mp3/driver/.output/eagle/release/obj/gpio.d: -------------------------------------------------------------------------------- 1 | .output/eagle/release/obj/gpio.o .output/eagle/release/obj/gpio.d : gpio.c ../../include/espressif/esp_common.h \ 2 | ../../include/espressif/c_types.h ../../include/espressif/esp_libc.h \ 3 | ../../include/espressif/esp_misc.h ../../include/lwip/lwip/ip_addr.h \ 4 | ../../include/lwip/lwip/opt.h ../../include/lwip/lwipopts.h \ 5 | ../../include/lwip/lwip/debug.h ../../include/lwip/lwip/arch.h \ 6 | ../../include/lwip/arch/cc.h ../../include/espressif/c_types.h \ 7 | ../../include/lwip/lwip/def.h ../../include/lwip/ipv4/lwip/ip4_addr.h \ 8 | ../../include/lwip/ipv6/lwip/ip6_addr.h \ 9 | ../../include/espressif/esp_wifi.h ../../include/espressif/esp_softap.h \ 10 | ../../include/espressif/esp_sta.h ../../include/espressif/queue.h \ 11 | ../../include/espressif/esp_system.h ../../include/espressif/esp_timer.h \ 12 | ../../include/espressif/esp8266/esp8266.h \ 13 | ../../include/espressif/esp8266/ets_sys.h \ 14 | ../../include/espressif/esp8266/eagle_soc.h \ 15 | ../../include/espressif/esp8266/gpio_register.h \ 16 | ../../include/espressif/esp8266/pin_mux_register.h \ 17 | ../../include/espressif/esp8266/spi_register.h \ 18 | ../../include/espressif/esp8266/timer_register.h \ 19 | ../../include/espressif/esp8266/uart_register.h \ 20 | ../../include/espressif/smartconfig.h \ 21 | ../../include/espressif/spi_flash.h ../../include/freertos/portmacro.h \ 22 | ../../include/espressif/esp_common.h \ 23 | ../../extra_include/xtensa/xtruntime.h \ 24 | ../../extra_include/xtensa/config/core.h \ 25 | ../../extra_include/xtensa/hal.h \ 26 | ../../extra_include/xtensa/config/core-isa.h \ 27 | ../../extra_include/xtensa/config/core-matmap.h \ 28 | ../../extra_include/xtensa/config/tie.h \ 29 | ../../extra_include/xtensa/config/specreg.h \ 30 | ../../extra_include/xtensa/corebits.h \ 31 | ../../include/freertos/xtensa_rtos.h \ 32 | ../../extra_include/xtensa/config/system.h \ 33 | ../../extra_include/xtensa/simcall.h \ 34 | ../../include/freertos/xtensa_context.h \ 35 | ../../include/freertos/xtensa_timer.h ../include/gpio.h 36 | -------------------------------------------------------------------------------- /mp3/driver/.output/eagle/release/obj/gpio.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/mp3/driver/.output/eagle/release/obj/gpio.o -------------------------------------------------------------------------------- /mp3/driver/.output/eagle/release/obj/uart.d: -------------------------------------------------------------------------------- 1 | .output/eagle/release/obj/uart.o .output/eagle/release/obj/uart.d : uart.c ../../include/espressif/esp_common.h \ 2 | ../../include/espressif/c_types.h ../../include/espressif/esp_libc.h \ 3 | ../../include/espressif/esp_misc.h ../../include/lwip/lwip/ip_addr.h \ 4 | ../../include/lwip/lwip/opt.h ../../include/lwip/lwipopts.h \ 5 | ../../include/lwip/lwip/debug.h ../../include/lwip/lwip/arch.h \ 6 | ../../include/lwip/arch/cc.h ../../include/espressif/c_types.h \ 7 | ../../include/lwip/lwip/def.h ../../include/lwip/ipv4/lwip/ip4_addr.h \ 8 | ../../include/lwip/ipv6/lwip/ip6_addr.h \ 9 | ../../include/espressif/esp_wifi.h ../../include/espressif/esp_softap.h \ 10 | ../../include/espressif/esp_sta.h ../../include/espressif/queue.h \ 11 | ../../include/espressif/esp_system.h ../../include/espressif/esp_timer.h \ 12 | ../../include/espressif/esp8266/esp8266.h \ 13 | ../../include/espressif/esp8266/ets_sys.h \ 14 | ../../include/espressif/esp8266/eagle_soc.h \ 15 | ../../include/espressif/esp8266/gpio_register.h \ 16 | ../../include/espressif/esp8266/pin_mux_register.h \ 17 | ../../include/espressif/esp8266/spi_register.h \ 18 | ../../include/espressif/esp8266/timer_register.h \ 19 | ../../include/espressif/esp8266/uart_register.h \ 20 | ../../include/espressif/smartconfig.h \ 21 | ../../include/espressif/spi_flash.h ../../include/freertos/FreeRTOS.h \ 22 | /home/jeroen/esp8266/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 23 | ../../include/freertos/projdefs.h \ 24 | ../../include/freertos/FreeRTOSConfig.h \ 25 | ../../include/freertos/portable.h ../../include/freertos/portmacro.h \ 26 | ../../extra_include/xtensa/xtruntime.h \ 27 | ../../extra_include/xtensa/config/core.h \ 28 | ../../extra_include/xtensa/hal.h \ 29 | ../../extra_include/xtensa/config/core-isa.h \ 30 | ../../extra_include/xtensa/config/core-matmap.h \ 31 | ../../extra_include/xtensa/config/tie.h \ 32 | ../../extra_include/xtensa/config/specreg.h \ 33 | ../../extra_include/xtensa/corebits.h \ 34 | ../../include/freertos/xtensa_rtos.h \ 35 | ../../extra_include/xtensa/config/system.h \ 36 | ../../extra_include/xtensa/simcall.h \ 37 | ../../include/freertos/xtensa_context.h \ 38 | ../../include/freertos/xtensa_timer.h \ 39 | ../../include/freertos/mpu_wrappers.h ../../include/freertos/task.h \ 40 | ../../include/freertos/list.h ../../include/freertos/queue.h \ 41 | ../include/uart.h 42 | -------------------------------------------------------------------------------- /mp3/driver/.output/eagle/release/obj/uart.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/mp3/driver/.output/eagle/release/obj/uart.o -------------------------------------------------------------------------------- /mp3/driver/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ############################################################# 3 | # Required variables for each makefile 4 | # Discard this section from all parent makefiles 5 | # Expected variables (with automatic defaults): 6 | # CSRCS (all "C" files in the dir) 7 | # SUBDIRS (all subdirs with a Makefile) 8 | # GEN_LIBS - list of libs to be generated () 9 | # GEN_IMAGES - list of images to be generated () 10 | # COMPONENTS_xxx - a list of libs/objs in the form 11 | # subdir/lib to be extracted and rolled up into 12 | # a generated lib/image xxx.a () 13 | # 14 | ifndef PDIR 15 | GEN_LIBS = libdriver.a 16 | endif 17 | 18 | 19 | ############################################################# 20 | # Configuration i.e. compile options etc. 21 | # Target specific stuff (defines etc.) goes in here! 22 | # Generally values applying to a tree are captured in the 23 | # makefile at its root level - these are then overridden 24 | # for a subtree within the makefile rooted therein 25 | # 26 | #DEFINES += 27 | 28 | ############################################################# 29 | # Recursion Magic - Don't touch this!! 30 | # 31 | # Each subtree potentially has an include directory 32 | # corresponding to the common APIs applicable to modules 33 | # rooted at that subtree. Accordingly, the INCLUDE PATH 34 | # of a module can only contain the include directories up 35 | # its parent path, and not its siblings 36 | # 37 | # Required for each makefile to inherit from the parent 38 | # 39 | 40 | INCLUDES := $(INCLUDES) -I $(PDIR)include 41 | PDIR := ../$(PDIR) 42 | sinclude $(PDIR)Makefile 43 | 44 | -------------------------------------------------------------------------------- /mp3/gen_misc.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | echo Please follow below steps(1-5) to generate specific bin(s): 4 | echo STEP 1: choose boot version(0=boot_v1.1, 1=boot_v1.2+, 2=none) 5 | set input=default 6 | set /p input=enter(0/1/2, default 2): 7 | 8 | if %input% equ 0 ( 9 | set boot=old 10 | ) else ( 11 | if %input% equ 1 ( 12 | set boot=new 13 | ) else ( 14 | set boot=none 15 | ) 16 | ) 17 | 18 | echo boot mode: %boot% 19 | echo. 20 | 21 | echo STEP 2: choose bin generate(0=eagle.flash.bin+eagle.irom0text.bin, 1=user1.bin, 2=user2.bin) 22 | set input=default 23 | set /p input=enter (0/1/2, default 0): 24 | 25 | if %input% equ 1 ( 26 | if %boot% equ none ( 27 | set app=0 28 | echo choose no boot before 29 | echo generate bin: eagle.flash.bin+eagle.irom0text.bin 30 | ) else ( 31 | set app=1 32 | echo generate bin: user1.bin 33 | ) 34 | ) else ( 35 | if %input% equ 2 ( 36 | if %boot% equ none ( 37 | set app=0 38 | echo choose no boot before 39 | echo generate bin: eagle.flash.bin+eagle.irom0text.bin 40 | ) else ( 41 | set app=2 42 | echo generate bin: user2.bin 43 | ) 44 | ) else ( 45 | if %boot% neq none ( 46 | set boot=none 47 | echo ignore boot 48 | ) 49 | set app=0 50 | echo generate bin: eagle.flash.bin+eagle.irom0text.bin 51 | )) 52 | 53 | echo. 54 | 55 | echo STEP 3: choose spi speed(0=20MHz, 1=26.7MHz, 2=40MHz, 3=80MHz) 56 | set input=default 57 | set /p input=enter (0/1/2/3, default 2): 58 | 59 | if %input% equ 0 ( 60 | set spi_speed=20 61 | ) else ( 62 | if %input% equ 1 ( 63 | set spi_speed=26.7 64 | ) else ( 65 | if %input% equ 3 ( 66 | set spi_speed=80 67 | ) else ( 68 | set spi_speed=40 69 | ))) 70 | 71 | echo spi speed: %spi_speed% MHz 72 | echo. 73 | 74 | echo STEP 4: choose spi mode(0=QIO, 1=QOUT, 2=DIO, 3=DOUT) 75 | set input=default 76 | set /p input=enter (0/1/2/3, default 0): 77 | 78 | if %input% equ 1 ( 79 | set spi_mode=QOUT 80 | ) else ( 81 | if %input% equ 2 ( 82 | set spi_mode=DIO 83 | ) else ( 84 | if %input% equ 3 ( 85 | set spi_mode=DOUT 86 | ) else ( 87 | set spi_mode=QIO 88 | ))) 89 | 90 | echo spi mode: %spi_mode% 91 | echo. 92 | 93 | echo STEP 5: choose spi size(0=256KB, 1=512KB, 2=1024KB, 3=2048KB, 4=4096KB) 94 | set input=default 95 | set /p input=enter (0/1/2/3/4, default 1): 96 | 97 | if %input% equ 0 ( 98 | set spi_size=256 99 | ) else ( 100 | if %input% equ 2 ( 101 | set spi_size=1024 102 | ) else ( 103 | if %input% equ 3 ( 104 | set spi_size=2048 105 | ) else ( 106 | if %input% equ 4 ( 107 | set spi_size=4096 108 | ) else ( 109 | set spi_size=512 110 | )))) 111 | 112 | echo spi size: %spi_size% KB 113 | 114 | touch user/user_main.c 115 | 116 | echo. 117 | echo start... 118 | echo. 119 | 120 | make BOOT=%boot% APP=%app% SPI_SPEED=%spi_speed% SPI_MODE=%spi_mode% SPI_SIZE=%spi_size% 121 | 122 | -------------------------------------------------------------------------------- /mp3/include/i2s_freertos.h: -------------------------------------------------------------------------------- 1 | #ifndef _I2S_FREERTOS_H_ 2 | #define _I2S_FREERTOS_H_ 3 | 4 | //Parameters for the I2S DMA behaviour 5 | #define I2SDMABUFCNT (14) //Number of buffers in the I2S circular buffer 6 | #define I2SDMABUFLEN (32*2) //Length of one buffer, in 32-bit words. 7 | 8 | 9 | void ICACHE_FLASH_ATTR i2sInit(); 10 | void i2sSetRate(int rate, int lockBitcount); 11 | void i2sPushSample(unsigned int sample); 12 | long ICACHE_FLASH_ATTR i2sGetUnderrunCnt(); 13 | 14 | 15 | #endif -------------------------------------------------------------------------------- /mp3/include/mad.h: -------------------------------------------------------------------------------- 1 | #include "../mad/mad.h" -------------------------------------------------------------------------------- /mp3/include/sdio_slv.h: -------------------------------------------------------------------------------- 1 | #ifndef SDIO_SLAVE_H 2 | #define SDIO_SLAVE_H 3 | #include "slc_register.h" 4 | #include "c_types.h" 5 | #include "user_interface.h" 6 | struct sdio_queue 7 | { 8 | uint32 blocksize:12; 9 | uint32 datalen:12; 10 | uint32 unused:5; 11 | uint32 sub_sof:1; 12 | uint32 eof:1; 13 | uint32 owner:1; 14 | 15 | uint32 buf_ptr; 16 | uint32 next_link_ptr; 17 | }; 18 | 19 | struct sdio_slave_status_element 20 | { 21 | uint32 wr_busy:1; 22 | uint32 rd_empty :1; 23 | uint32 comm_cnt :3; 24 | uint32 intr_no :3; 25 | uint32 rx_length:16; 26 | uint32 res:8; 27 | }; 28 | 29 | union sdio_slave_status 30 | { 31 | struct sdio_slave_status_element elm_value; 32 | uint32 word_value; 33 | }; 34 | 35 | #define RX_AVAILIBLE 2 36 | #define TX_AVAILIBLE 1 37 | #define INIT_STAGE 0 38 | 39 | #define SDIO_QUEUE_LEN 8 40 | #define MOSI 0 41 | #define MISO 1 42 | #define SDIO_DATA_ERROR 6 43 | 44 | #define SLC_INTEREST_EVENT (SLC_TX_EOF_INT_ENA | SLC_RX_EOF_INT_ENA | SLC_RX_UDF_INT_ENA | SLC_TX_DSCR_ERR_INT_ENA) 45 | #define TRIG_TOHOST_INT() SET_PERI_REG_MASK(SLC_INTVEC_TOHOST , BIT0);\ 46 | CLEAR_PERI_REG_MASK(SLC_INTVEC_TOHOST , BIT0) 47 | 48 | /* 49 | void sdio_slave_init(void); 50 | void sdio_slave_isr(void *para); 51 | void sdio_task_init(void); 52 | void sdio_err_task(os_event_t *e); 53 | void rx_buff_load_done(uint16 rx_len); 54 | void tx_buff_handle_done(void); 55 | void rx_buff_read_done(void); 56 | void tx_buff_write_done(void); 57 | */ 58 | #endif 59 | -------------------------------------------------------------------------------- /mp3/include/spiram.h: -------------------------------------------------------------------------------- 1 | #ifndef _SPIRAM_H_ 2 | #define _SPIRAM_H_ 3 | 4 | #define SPIRAMSIZE (128*1024) //for a 23LC1024 chip 5 | 6 | 7 | //Define this to use the SPI RAM in QSPI mode. This mode theoretically improves 8 | //the bandwith to the chip four-fold, but it needs all 4 SDIO pins connected. It's 9 | //disabled here because not everyone using the MP3 example will have those pins 10 | //connected and the overall speed increase on the MP3 example is negligable. 11 | //#define SPIRAM_QIO 12 | 13 | 14 | void spiRamInit(); 15 | void spiRamRead(int addr, char *buff, int len); 16 | void spiRamWrite(int addr, char *buff, int len); 17 | int spiRamTest(); 18 | 19 | #endif -------------------------------------------------------------------------------- /mp3/include/spiram_fifo.h: -------------------------------------------------------------------------------- 1 | #ifndef _SPIRAM_FIFO_H_ 2 | #define _SPIRAM_FIFO_H_ 3 | 4 | int ICACHE_FLASH_ATTR spiRamFifoInit(); 5 | void ICACHE_FLASH_ATTR spiRamFifoRead(char *buff, int len); 6 | void ICACHE_FLASH_ATTR spiRamFifoWrite(char *buff, int len); 7 | int ICACHE_FLASH_ATTR spiRamFifoFill(); 8 | int ICACHE_FLASH_ATTR spiRamFifoFree(); 9 | long ICACHE_FLASH_ATTR spiRamGetOverrunCt(); 10 | long ICACHE_FLASH_ATTR spiRamGetUnderrunCt(); 11 | 12 | #endif -------------------------------------------------------------------------------- /mp3/include/user_config.h: -------------------------------------------------------------------------------- 1 | #ifndef __USER_CONFIG_H__ 2 | #define __USER_CONFIG_H__ 3 | 4 | #endif 5 | 6 | -------------------------------------------------------------------------------- /mp3/include/user_interface.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/mp3/include/user_interface.h -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/lib/libmad.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/mp3/mad/.output/eagle/release/lib/libmad.a -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/bit.d: -------------------------------------------------------------------------------- 1 | .output/eagle/release/obj/bit.o .output/eagle/release/obj/bit.d : bit.c global.h ../../include/espressif/esp_common.h \ 2 | ../../include/espressif/c_types.h ../../include/espressif/esp_libc.h \ 3 | ../../include/espressif/esp_misc.h ../../include/lwip/lwip/ip_addr.h \ 4 | ../../include/lwip/lwip/opt.h ../../include/lwip/lwipopts.h \ 5 | ../../include/lwip/lwip/debug.h ../../include/lwip/lwip/arch.h \ 6 | ../../include/lwip/arch/cc.h ../../include/espressif/c_types.h \ 7 | ../../include/lwip/lwip/def.h ../../include/lwip/ipv4/lwip/ip4_addr.h \ 8 | ../../include/lwip/ipv6/lwip/ip6_addr.h \ 9 | ../../include/espressif/esp_wifi.h ../../include/espressif/esp_softap.h \ 10 | ../../include/espressif/esp_sta.h ../../include/espressif/queue.h \ 11 | ../../include/espressif/esp_system.h ../../include/espressif/esp_timer.h \ 12 | ../../include/espressif/esp8266/esp8266.h \ 13 | ../../include/espressif/esp8266/ets_sys.h \ 14 | ../../include/espressif/esp8266/eagle_soc.h \ 15 | ../../include/espressif/esp8266/gpio_register.h \ 16 | ../../include/espressif/esp8266/pin_mux_register.h \ 17 | ../../include/espressif/esp8266/spi_register.h \ 18 | ../../include/espressif/esp8266/timer_register.h \ 19 | ../../include/espressif/esp8266/uart_register.h \ 20 | ../../include/espressif/smartconfig.h \ 21 | ../../include/espressif/spi_flash.h bit.h 22 | -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/bit.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/mp3/mad/.output/eagle/release/obj/bit.o -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/decoder.d: -------------------------------------------------------------------------------- 1 | .output/eagle/release/obj/decoder.o .output/eagle/release/obj/decoder.d : decoder.c global.h ../../include/espressif/esp_common.h \ 2 | ../../include/espressif/c_types.h ../../include/espressif/esp_libc.h \ 3 | ../../include/espressif/esp_misc.h ../../include/lwip/lwip/ip_addr.h \ 4 | ../../include/lwip/lwip/opt.h ../../include/lwip/lwipopts.h \ 5 | ../../include/lwip/lwip/debug.h ../../include/lwip/lwip/arch.h \ 6 | ../../include/lwip/arch/cc.h ../../include/espressif/c_types.h \ 7 | ../../include/lwip/lwip/def.h ../../include/lwip/ipv4/lwip/ip4_addr.h \ 8 | ../../include/lwip/ipv6/lwip/ip6_addr.h \ 9 | ../../include/espressif/esp_wifi.h ../../include/espressif/esp_softap.h \ 10 | ../../include/espressif/esp_sta.h ../../include/espressif/queue.h \ 11 | ../../include/espressif/esp_system.h ../../include/espressif/esp_timer.h \ 12 | ../../include/espressif/esp8266/esp8266.h \ 13 | ../../include/espressif/esp8266/ets_sys.h \ 14 | ../../include/espressif/esp8266/eagle_soc.h \ 15 | ../../include/espressif/esp8266/gpio_register.h \ 16 | ../../include/espressif/esp8266/pin_mux_register.h \ 17 | ../../include/espressif/esp8266/spi_register.h \ 18 | ../../include/espressif/esp8266/timer_register.h \ 19 | ../../include/espressif/esp8266/uart_register.h \ 20 | ../../include/espressif/smartconfig.h \ 21 | ../../include/espressif/spi_flash.h ../../extra_include/stdlib.h \ 22 | ../../extra_include/_ansi.h ../../extra_include/newlib.h \ 23 | ../../extra_include/sys/config.h ../../extra_include/machine/ieeefp.h \ 24 | /home/jeroen/esp8266/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 25 | ../../extra_include/sys/reent.h ../../extra_include/_ansi.h \ 26 | ../../extra_include/sys/_types.h ../../extra_include/sys/lock.h \ 27 | ../../extra_include/machine/stdlib.h ../../extra_include/alloca.h \ 28 | stream.h bit.h frame.h fixed.h timer.h synth.h decoder.h 29 | -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/decoder.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/mp3/mad/.output/eagle/release/obj/decoder.o -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/fixed.d: -------------------------------------------------------------------------------- 1 | .output/eagle/release/obj/fixed.o .output/eagle/release/obj/fixed.d : fixed.c global.h ../../include/espressif/esp_common.h \ 2 | ../../include/espressif/c_types.h ../../include/espressif/esp_libc.h \ 3 | ../../include/espressif/esp_misc.h ../../include/lwip/lwip/ip_addr.h \ 4 | ../../include/lwip/lwip/opt.h ../../include/lwip/lwipopts.h \ 5 | ../../include/lwip/lwip/debug.h ../../include/lwip/lwip/arch.h \ 6 | ../../include/lwip/arch/cc.h ../../include/espressif/c_types.h \ 7 | ../../include/lwip/lwip/def.h ../../include/lwip/ipv4/lwip/ip4_addr.h \ 8 | ../../include/lwip/ipv6/lwip/ip6_addr.h \ 9 | ../../include/espressif/esp_wifi.h ../../include/espressif/esp_softap.h \ 10 | ../../include/espressif/esp_sta.h ../../include/espressif/queue.h \ 11 | ../../include/espressif/esp_system.h ../../include/espressif/esp_timer.h \ 12 | ../../include/espressif/esp8266/esp8266.h \ 13 | ../../include/espressif/esp8266/ets_sys.h \ 14 | ../../include/espressif/esp8266/eagle_soc.h \ 15 | ../../include/espressif/esp8266/gpio_register.h \ 16 | ../../include/espressif/esp8266/pin_mux_register.h \ 17 | ../../include/espressif/esp8266/spi_register.h \ 18 | ../../include/espressif/esp8266/timer_register.h \ 19 | ../../include/espressif/esp8266/uart_register.h \ 20 | ../../include/espressif/smartconfig.h \ 21 | ../../include/espressif/spi_flash.h fixed.h 22 | -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/fixed.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/mp3/mad/.output/eagle/release/obj/fixed.o -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/frame.d: -------------------------------------------------------------------------------- 1 | .output/eagle/release/obj/frame.o .output/eagle/release/obj/frame.d : frame.c global.h ../../include/espressif/esp_common.h \ 2 | ../../include/espressif/c_types.h ../../include/espressif/esp_libc.h \ 3 | ../../include/espressif/esp_misc.h ../../include/lwip/lwip/ip_addr.h \ 4 | ../../include/lwip/lwip/opt.h ../../include/lwip/lwipopts.h \ 5 | ../../include/lwip/lwip/debug.h ../../include/lwip/lwip/arch.h \ 6 | ../../include/lwip/arch/cc.h ../../include/espressif/c_types.h \ 7 | ../../include/lwip/lwip/def.h ../../include/lwip/ipv4/lwip/ip4_addr.h \ 8 | ../../include/lwip/ipv6/lwip/ip6_addr.h \ 9 | ../../include/espressif/esp_wifi.h ../../include/espressif/esp_softap.h \ 10 | ../../include/espressif/esp_sta.h ../../include/espressif/queue.h \ 11 | ../../include/espressif/esp_system.h ../../include/espressif/esp_timer.h \ 12 | ../../include/espressif/esp8266/esp8266.h \ 13 | ../../include/espressif/esp8266/ets_sys.h \ 14 | ../../include/espressif/esp8266/eagle_soc.h \ 15 | ../../include/espressif/esp8266/gpio_register.h \ 16 | ../../include/espressif/esp8266/pin_mux_register.h \ 17 | ../../include/espressif/esp8266/spi_register.h \ 18 | ../../include/espressif/esp8266/timer_register.h \ 19 | ../../include/espressif/esp8266/uart_register.h \ 20 | ../../include/espressif/smartconfig.h \ 21 | ../../include/espressif/spi_flash.h ../../extra_include/stdlib.h \ 22 | ../../extra_include/_ansi.h ../../extra_include/newlib.h \ 23 | ../../extra_include/sys/config.h ../../extra_include/machine/ieeefp.h \ 24 | /home/jeroen/esp8266/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 25 | ../../extra_include/sys/reent.h ../../extra_include/_ansi.h \ 26 | ../../extra_include/sys/_types.h ../../extra_include/sys/lock.h \ 27 | ../../extra_include/machine/stdlib.h ../../extra_include/alloca.h bit.h \ 28 | stream.h frame.h fixed.h timer.h layer12.h layer3.h 29 | -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/frame.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/mp3/mad/.output/eagle/release/obj/frame.o -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/huffman.d: -------------------------------------------------------------------------------- 1 | .output/eagle/release/obj/huffman.o .output/eagle/release/obj/huffman.d : huffman.c global.h ../../include/espressif/esp_common.h \ 2 | ../../include/espressif/c_types.h ../../include/espressif/esp_libc.h \ 3 | ../../include/espressif/esp_misc.h ../../include/lwip/lwip/ip_addr.h \ 4 | ../../include/lwip/lwip/opt.h ../../include/lwip/lwipopts.h \ 5 | ../../include/lwip/lwip/debug.h ../../include/lwip/lwip/arch.h \ 6 | ../../include/lwip/arch/cc.h ../../include/espressif/c_types.h \ 7 | ../../include/lwip/lwip/def.h ../../include/lwip/ipv4/lwip/ip4_addr.h \ 8 | ../../include/lwip/ipv6/lwip/ip6_addr.h \ 9 | ../../include/espressif/esp_wifi.h ../../include/espressif/esp_softap.h \ 10 | ../../include/espressif/esp_sta.h ../../include/espressif/queue.h \ 11 | ../../include/espressif/esp_system.h ../../include/espressif/esp_timer.h \ 12 | ../../include/espressif/esp8266/esp8266.h \ 13 | ../../include/espressif/esp8266/ets_sys.h \ 14 | ../../include/espressif/esp8266/eagle_soc.h \ 15 | ../../include/espressif/esp8266/gpio_register.h \ 16 | ../../include/espressif/esp8266/pin_mux_register.h \ 17 | ../../include/espressif/esp8266/spi_register.h \ 18 | ../../include/espressif/esp8266/timer_register.h \ 19 | ../../include/espressif/esp8266/uart_register.h \ 20 | ../../include/espressif/smartconfig.h \ 21 | ../../include/espressif/spi_flash.h huffman.h 22 | -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/huffman.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/mp3/mad/.output/eagle/release/obj/huffman.o -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/layer12.d: -------------------------------------------------------------------------------- 1 | .output/eagle/release/obj/layer12.o .output/eagle/release/obj/layer12.d : layer12.c global.h ../../include/espressif/esp_common.h \ 2 | ../../include/espressif/c_types.h ../../include/espressif/esp_libc.h \ 3 | ../../include/espressif/esp_misc.h ../../include/lwip/lwip/ip_addr.h \ 4 | ../../include/lwip/lwip/opt.h ../../include/lwip/lwipopts.h \ 5 | ../../include/lwip/lwip/debug.h ../../include/lwip/lwip/arch.h \ 6 | ../../include/lwip/arch/cc.h ../../include/espressif/c_types.h \ 7 | ../../include/lwip/lwip/def.h ../../include/lwip/ipv4/lwip/ip4_addr.h \ 8 | ../../include/lwip/ipv6/lwip/ip6_addr.h \ 9 | ../../include/espressif/esp_wifi.h ../../include/espressif/esp_softap.h \ 10 | ../../include/espressif/esp_sta.h ../../include/espressif/queue.h \ 11 | ../../include/espressif/esp_system.h ../../include/espressif/esp_timer.h \ 12 | ../../include/espressif/esp8266/esp8266.h \ 13 | ../../include/espressif/esp8266/ets_sys.h \ 14 | ../../include/espressif/esp8266/eagle_soc.h \ 15 | ../../include/espressif/esp8266/gpio_register.h \ 16 | ../../include/espressif/esp8266/pin_mux_register.h \ 17 | ../../include/espressif/esp8266/spi_register.h \ 18 | ../../include/espressif/esp8266/timer_register.h \ 19 | ../../include/espressif/esp8266/uart_register.h \ 20 | ../../include/espressif/smartconfig.h \ 21 | ../../include/espressif/spi_flash.h fixed.h bit.h stream.h frame.h \ 22 | timer.h layer12.h sf_table.dat qc_table.dat 23 | -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/layer12.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/mp3/mad/.output/eagle/release/obj/layer12.o -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/layer3.d: -------------------------------------------------------------------------------- 1 | .output/eagle/release/obj/layer3.o .output/eagle/release/obj/layer3.d : layer3.c global.h ../../include/espressif/esp_common.h \ 2 | ../../include/espressif/c_types.h ../../include/espressif/esp_libc.h \ 3 | ../../include/espressif/esp_misc.h ../../include/lwip/lwip/ip_addr.h \ 4 | ../../include/lwip/lwip/opt.h ../../include/lwip/lwipopts.h \ 5 | ../../include/lwip/lwip/debug.h ../../include/lwip/lwip/arch.h \ 6 | ../../include/lwip/arch/cc.h ../../include/espressif/c_types.h \ 7 | ../../include/lwip/lwip/def.h ../../include/lwip/ipv4/lwip/ip4_addr.h \ 8 | ../../include/lwip/ipv6/lwip/ip6_addr.h \ 9 | ../../include/espressif/esp_wifi.h ../../include/espressif/esp_softap.h \ 10 | ../../include/espressif/esp_sta.h ../../include/espressif/queue.h \ 11 | ../../include/espressif/esp_system.h ../../include/espressif/esp_timer.h \ 12 | ../../include/espressif/esp8266/esp8266.h \ 13 | ../../include/espressif/esp8266/ets_sys.h \ 14 | ../../include/espressif/esp8266/eagle_soc.h \ 15 | ../../include/espressif/esp8266/gpio_register.h \ 16 | ../../include/espressif/esp8266/pin_mux_register.h \ 17 | ../../include/espressif/esp8266/spi_register.h \ 18 | ../../include/espressif/esp8266/timer_register.h \ 19 | ../../include/espressif/esp8266/uart_register.h \ 20 | ../../include/espressif/smartconfig.h \ 21 | ../../include/espressif/spi_flash.h ../../extra_include/stdlib.h \ 22 | ../../extra_include/_ansi.h ../../extra_include/newlib.h \ 23 | ../../extra_include/sys/config.h ../../extra_include/machine/ieeefp.h \ 24 | /home/jeroen/esp8266/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 25 | ../../extra_include/sys/reent.h ../../extra_include/_ansi.h \ 26 | ../../extra_include/sys/_types.h ../../extra_include/sys/lock.h \ 27 | ../../extra_include/machine/stdlib.h ../../extra_include/alloca.h \ 28 | ../../extra_include/string.h fixed.h bit.h stream.h frame.h timer.h \ 29 | huffman.h layer3.h rq_table.dat imdct_s.dat 30 | -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/layer3.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/mp3/mad/.output/eagle/release/obj/layer3.o -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/stream.d: -------------------------------------------------------------------------------- 1 | .output/eagle/release/obj/stream.o .output/eagle/release/obj/stream.d : stream.c global.h ../../include/espressif/esp_common.h \ 2 | ../../include/espressif/c_types.h ../../include/espressif/esp_libc.h \ 3 | ../../include/espressif/esp_misc.h ../../include/lwip/lwip/ip_addr.h \ 4 | ../../include/lwip/lwip/opt.h ../../include/lwip/lwipopts.h \ 5 | ../../include/lwip/lwip/debug.h ../../include/lwip/lwip/arch.h \ 6 | ../../include/lwip/arch/cc.h ../../include/espressif/c_types.h \ 7 | ../../include/lwip/lwip/def.h ../../include/lwip/ipv4/lwip/ip4_addr.h \ 8 | ../../include/lwip/ipv6/lwip/ip6_addr.h \ 9 | ../../include/espressif/esp_wifi.h ../../include/espressif/esp_softap.h \ 10 | ../../include/espressif/esp_sta.h ../../include/espressif/queue.h \ 11 | ../../include/espressif/esp_system.h ../../include/espressif/esp_timer.h \ 12 | ../../include/espressif/esp8266/esp8266.h \ 13 | ../../include/espressif/esp8266/ets_sys.h \ 14 | ../../include/espressif/esp8266/eagle_soc.h \ 15 | ../../include/espressif/esp8266/gpio_register.h \ 16 | ../../include/espressif/esp8266/pin_mux_register.h \ 17 | ../../include/espressif/esp8266/spi_register.h \ 18 | ../../include/espressif/esp8266/timer_register.h \ 19 | ../../include/espressif/esp8266/uart_register.h \ 20 | ../../include/espressif/smartconfig.h \ 21 | ../../include/espressif/spi_flash.h ../../extra_include/stdlib.h \ 22 | ../../extra_include/_ansi.h ../../extra_include/newlib.h \ 23 | ../../extra_include/sys/config.h ../../extra_include/machine/ieeefp.h \ 24 | /home/jeroen/esp8266/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 25 | ../../extra_include/sys/reent.h ../../extra_include/_ansi.h \ 26 | ../../extra_include/sys/_types.h ../../extra_include/sys/lock.h \ 27 | ../../extra_include/machine/stdlib.h ../../extra_include/alloca.h bit.h \ 28 | stream.h 29 | -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/stream.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/mp3/mad/.output/eagle/release/obj/stream.o -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/synth.d: -------------------------------------------------------------------------------- 1 | .output/eagle/release/obj/synth.o .output/eagle/release/obj/synth.d : synth.c global.h ../../include/espressif/esp_common.h \ 2 | ../../include/espressif/c_types.h ../../include/espressif/esp_libc.h \ 3 | ../../include/espressif/esp_misc.h ../../include/lwip/lwip/ip_addr.h \ 4 | ../../include/lwip/lwip/opt.h ../../include/lwip/lwipopts.h \ 5 | ../../include/lwip/lwip/debug.h ../../include/lwip/lwip/arch.h \ 6 | ../../include/lwip/arch/cc.h ../../include/espressif/c_types.h \ 7 | ../../include/lwip/lwip/def.h ../../include/lwip/ipv4/lwip/ip4_addr.h \ 8 | ../../include/lwip/ipv6/lwip/ip6_addr.h \ 9 | ../../include/espressif/esp_wifi.h ../../include/espressif/esp_softap.h \ 10 | ../../include/espressif/esp_sta.h ../../include/espressif/queue.h \ 11 | ../../include/espressif/esp_system.h ../../include/espressif/esp_timer.h \ 12 | ../../include/espressif/esp8266/esp8266.h \ 13 | ../../include/espressif/esp8266/ets_sys.h \ 14 | ../../include/espressif/esp8266/eagle_soc.h \ 15 | ../../include/espressif/esp8266/gpio_register.h \ 16 | ../../include/espressif/esp8266/pin_mux_register.h \ 17 | ../../include/espressif/esp8266/spi_register.h \ 18 | ../../include/espressif/esp8266/timer_register.h \ 19 | ../../include/espressif/esp8266/uart_register.h \ 20 | ../../include/espressif/smartconfig.h \ 21 | ../../include/espressif/spi_flash.h fixed.h frame.h timer.h stream.h \ 22 | bit.h synth.h D.dat 23 | -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/synth.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/mp3/mad/.output/eagle/release/obj/synth.o -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/timer.d: -------------------------------------------------------------------------------- 1 | .output/eagle/release/obj/timer.o .output/eagle/release/obj/timer.d : timer.c global.h ../../include/espressif/esp_common.h \ 2 | ../../include/espressif/c_types.h ../../include/espressif/esp_libc.h \ 3 | ../../include/espressif/esp_misc.h ../../include/lwip/lwip/ip_addr.h \ 4 | ../../include/lwip/lwip/opt.h ../../include/lwip/lwipopts.h \ 5 | ../../include/lwip/lwip/debug.h ../../include/lwip/lwip/arch.h \ 6 | ../../include/lwip/arch/cc.h ../../include/espressif/c_types.h \ 7 | ../../include/lwip/lwip/def.h ../../include/lwip/ipv4/lwip/ip4_addr.h \ 8 | ../../include/lwip/ipv6/lwip/ip6_addr.h \ 9 | ../../include/espressif/esp_wifi.h ../../include/espressif/esp_softap.h \ 10 | ../../include/espressif/esp_sta.h ../../include/espressif/queue.h \ 11 | ../../include/espressif/esp_system.h ../../include/espressif/esp_timer.h \ 12 | ../../include/espressif/esp8266/esp8266.h \ 13 | ../../include/espressif/esp8266/ets_sys.h \ 14 | ../../include/espressif/esp8266/eagle_soc.h \ 15 | ../../include/espressif/esp8266/gpio_register.h \ 16 | ../../include/espressif/esp8266/pin_mux_register.h \ 17 | ../../include/espressif/esp8266/spi_register.h \ 18 | ../../include/espressif/esp8266/timer_register.h \ 19 | ../../include/espressif/esp8266/uart_register.h \ 20 | ../../include/espressif/smartconfig.h \ 21 | ../../include/espressif/spi_flash.h ../../extra_include/stdio.h \ 22 | ../../extra_include/_ansi.h ../../extra_include/newlib.h \ 23 | ../../extra_include/sys/config.h ../../extra_include/machine/ieeefp.h \ 24 | /home/jeroen/esp8266/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stddef.h \ 25 | /home/jeroen/esp8266/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.2/include/stdarg.h \ 26 | ../../extra_include/sys/reent.h ../../extra_include/_ansi.h \ 27 | ../../extra_include/sys/_types.h ../../extra_include/sys/lock.h \ 28 | ../../extra_include/sys/types.h ../../extra_include/machine/types.h \ 29 | ../../extra_include/sys/stdio.h timer.h 30 | -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/timer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/mp3/mad/.output/eagle/release/obj/timer.o -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/version.d: -------------------------------------------------------------------------------- 1 | .output/eagle/release/obj/version.o .output/eagle/release/obj/version.d : version.c global.h ../../include/espressif/esp_common.h \ 2 | ../../include/espressif/c_types.h ../../include/espressif/esp_libc.h \ 3 | ../../include/espressif/esp_misc.h ../../include/lwip/lwip/ip_addr.h \ 4 | ../../include/lwip/lwip/opt.h ../../include/lwip/lwipopts.h \ 5 | ../../include/lwip/lwip/debug.h ../../include/lwip/lwip/arch.h \ 6 | ../../include/lwip/arch/cc.h ../../include/espressif/c_types.h \ 7 | ../../include/lwip/lwip/def.h ../../include/lwip/ipv4/lwip/ip4_addr.h \ 8 | ../../include/lwip/ipv6/lwip/ip6_addr.h \ 9 | ../../include/espressif/esp_wifi.h ../../include/espressif/esp_softap.h \ 10 | ../../include/espressif/esp_sta.h ../../include/espressif/queue.h \ 11 | ../../include/espressif/esp_system.h ../../include/espressif/esp_timer.h \ 12 | ../../include/espressif/esp8266/esp8266.h \ 13 | ../../include/espressif/esp8266/ets_sys.h \ 14 | ../../include/espressif/esp8266/eagle_soc.h \ 15 | ../../include/espressif/esp8266/gpio_register.h \ 16 | ../../include/espressif/esp8266/pin_mux_register.h \ 17 | ../../include/espressif/esp8266/spi_register.h \ 18 | ../../include/espressif/esp8266/timer_register.h \ 19 | ../../include/espressif/esp8266/uart_register.h \ 20 | ../../include/espressif/smartconfig.h \ 21 | ../../include/espressif/spi_flash.h version.h 22 | -------------------------------------------------------------------------------- /mp3/mad/.output/eagle/release/obj/version.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/espressif/ESP8266_MP3_DECODER/7552a62d425598d64ebc255d32fa4f20220e92f6/mp3/mad/.output/eagle/release/obj/version.o -------------------------------------------------------------------------------- /mp3/mad/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ############################################################# 3 | # Required variables for each makefile 4 | # Discard this section from all parent makefiles 5 | # Expected variables (with automatic defaults): 6 | # CSRCS (all "C" files in the dir) 7 | # SUBDIRS (all subdirs with a Makefile) 8 | # GEN_LIBS - list of libs to be generated () 9 | # GEN_IMAGES - list of images to be generated () 10 | # COMPONENTS_xxx - a list of libs/objs in the form 11 | # subdir/lib to be extracted and rolled up into 12 | # a generated lib/image xxx.a () 13 | # 14 | ifndef PDIR 15 | GEN_LIBS = libmad.a 16 | endif 17 | 18 | 19 | ############################################################# 20 | # Configuration i.e. compile options etc. 21 | # Target specific stuff (defines etc.) goes in here! 22 | # Generally values applying to a tree are captured in the 23 | # makefile at its root level - these are then overridden 24 | # for a subtree within the makefile rooted therein 25 | # 26 | #DEFINES += 27 | 28 | ############################################################# 29 | # Recursion Magic - Don't touch this!! 30 | # 31 | # Each subtree potentially has an include directory 32 | # corresponding to the common APIs applicable to modules 33 | # rooted at that subtree. Accordingly, the INCLUDE PATH 34 | # of a module can only contain the include directories up 35 | # its parent path, and not its siblings 36 | # 37 | # Required for each makefile to inherit from the parent 38 | # 39 | 40 | INCLUDES := $(INCLUDES) -I $(PDIR)include 41 | PDIR := ../$(PDIR) 42 | 43 | sinclude $(PDIR)Makefile 44 | 45 | -------------------------------------------------------------------------------- /mp3/mad/align.c: -------------------------------------------------------------------------------- 1 | 2 | #include "esp_common.h" 3 | 4 | char unalChar(const char *adr) { 5 | int *p=(int *)((int)adr&0xfffffffc); 6 | int v=*p; 7 | int w=((int)adr&3); 8 | if (w==0) return ((v>>0)&0xff); 9 | if (w==1) return ((v>>8)&0xff); 10 | if (w==2) return ((v>>16)&0xff); 11 | if (w==3) return ((v>>24)&0xff); 12 | } 13 | 14 | 15 | short unalShort(const short *adr) { 16 | int *p=(int *)((int)adr&0xfffffffc); 17 | int v=*p; 18 | int w=((int)adr&3); 19 | if (w==0) return (v&0xffff); else return (v>>16); 20 | } 21 | -------------------------------------------------------------------------------- /mp3/mad/align.h: -------------------------------------------------------------------------------- 1 | char unalChar(char const *adr); 2 | short unalShort(short const *adr); 3 | -------------------------------------------------------------------------------- /mp3/mad/bit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: bit.h,v 1.12 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_BIT_H 23 | # define LIBMAD_BIT_H 24 | 25 | struct mad_bitptr { 26 | unsigned char const *byte; 27 | unsigned short cache; 28 | unsigned short left; 29 | }; 30 | 31 | void mad_bit_init(struct mad_bitptr *, unsigned char const *); 32 | 33 | # define mad_bit_finish(bitptr) /* nothing */ 34 | 35 | unsigned int mad_bit_length(struct mad_bitptr const *, 36 | struct mad_bitptr const *); 37 | 38 | # define mad_bit_bitsleft(bitptr) ((bitptr)->left) 39 | unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *); 40 | 41 | void mad_bit_skip(struct mad_bitptr *, unsigned int); 42 | unsigned long mad_bit_read(struct mad_bitptr *, unsigned int); 43 | void mad_bit_write(struct mad_bitptr *, unsigned int, unsigned long); 44 | 45 | unsigned short mad_bit_crc(struct mad_bitptr, unsigned int, unsigned short); 46 | 47 | # endif 48 | -------------------------------------------------------------------------------- /mp3/mad/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated by configure. */ 2 | /* config.h.in. Generated from configure.ac by autoheader. */ 3 | 4 | /* Define to enable diagnostic debugging support. */ 5 | /* #undef DEBUG */ 6 | 7 | /* Define to enable experimental code. */ 8 | /* #undef EXPERIMENTAL */ 9 | 10 | /* Define to disable debugging assertions. */ 11 | #define NDEBUG 12 | 13 | /* Define to optimize for accuracy over speed. */ 14 | /* #undef OPT_ACCURACY */ 15 | 16 | /* Define to optimize for speed over accuracy. */ 17 | #define OPT_SPEED 1 18 | 19 | /* Define to enable a fast subband synthesis approximation optimization. */ 20 | #define OPT_SSO 21 | 22 | /* Define to influence a strict interpretation of the ISO/IEC standards, even 23 | if this is in opposition with best accepted practices. */ 24 | /* #undef OPT_STRICT */ 25 | 26 | /* Name of package */ 27 | #define PACKAGE "libmad" 28 | 29 | /* Define to the address where bug reports for this package should be sent. */ 30 | #define PACKAGE_BUGREPORT "support@underbit.com" 31 | 32 | /* Define to the full name of this package. */ 33 | #define PACKAGE_NAME "MPEG Audio Decoder" 34 | 35 | /* Define to the full name and version of this package. */ 36 | #define PACKAGE_STRING "MPEG Audio Decoder 0.15.1b" 37 | 38 | /* Define to the one symbol short name of this package. */ 39 | #define PACKAGE_TARNAME "libmad" 40 | 41 | /* Define to the version of this package. */ 42 | #define PACKAGE_VERSION "0.15.1b" 43 | 44 | /* The size of a `int', as computed by sizeof. */ 45 | #define SIZEOF_INT 4 46 | 47 | /* The size of a `long', as computed by sizeof. */ 48 | #define SIZEOF_LONG 4 49 | 50 | /* The size of a `long long', as computed by sizeof. */ 51 | #define SIZEOF_LONG_LONG 8 52 | 53 | /* Define to 1 if you have the ANSI C header files. */ 54 | #undef STDC_HEADERS 55 | 56 | /* Version number of package */ 57 | #define VERSION "0.15.1b" 58 | 59 | /* Define to 1 if your processor stores words with the most significant byte 60 | first (like Motorola and SPARC, unlike Intel and VAX). */ 61 | /* #undef WORDS_BIGENDIAN */ 62 | 63 | /* Define to empty if `const' does not conform to ANSI C. */ 64 | /* #undef const */ 65 | 66 | /* Define to `__inline__' or `__inline' if that's what the C compiler 67 | calls it, or to nothing if 'inline' is not supported under any name. */ 68 | #ifndef __cplusplus 69 | /* #undef inline */ 70 | #endif 71 | 72 | #define FPM_DEFAULT 73 | 74 | /* Define to `int' if does not define. */ 75 | /* #undef pid_t */ 76 | -------------------------------------------------------------------------------- /mp3/mad/fixed.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: fixed.c,v 1.13 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifdef HAVE_CONFIG_H 23 | # include "config.h" 24 | # endif 25 | 26 | # include "global.h" 27 | 28 | # include "fixed.h" 29 | 30 | /* 31 | * NAME: fixed->abs() 32 | * DESCRIPTION: return absolute value of a fixed-point number 33 | */ 34 | mad_fixed_t ICACHE_FLASH_ATTR mad_f_abs(mad_fixed_t x) 35 | { 36 | return x < 0 ? -x : x; 37 | } 38 | 39 | /* 40 | * NAME: fixed->div() 41 | * DESCRIPTION: perform division using fixed-point math 42 | */ 43 | mad_fixed_t ICACHE_FLASH_ATTR mad_f_div(mad_fixed_t x, mad_fixed_t y) 44 | { 45 | mad_fixed_t q, r; 46 | unsigned int bits; 47 | 48 | q = mad_f_abs(x / y); 49 | 50 | if (x < 0) { 51 | x = -x; 52 | y = -y; 53 | } 54 | 55 | r = x % y; 56 | 57 | if (y < 0) { 58 | x = -x; 59 | y = -y; 60 | } 61 | 62 | if (q > mad_f_intpart(MAD_F_MAX) && 63 | !(q == -mad_f_intpart(MAD_F_MIN) && r == 0 && (x < 0) != (y < 0))) 64 | return 0; 65 | 66 | for (bits = MAD_F_FRACBITS; bits && r; --bits) { 67 | q <<= 1, r <<= 1; 68 | if (r >= y) 69 | r -= y, ++q; 70 | } 71 | 72 | /* round */ 73 | if (2 * r >= y) 74 | ++q; 75 | 76 | /* fix sign */ 77 | if ((x < 0) != (y < 0)) 78 | q = -q; 79 | 80 | return q << bits; 81 | } 82 | -------------------------------------------------------------------------------- /mp3/mad/global.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: global.h,v 1.11 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_GLOBAL_H 23 | # define LIBMAD_GLOBAL_H 24 | 25 | #include "esp_common.h" 26 | #include "config.h" 27 | /* conditional debugging */ 28 | 29 | # if defined(DEBUG) && defined(NDEBUG) 30 | # error "cannot define both DEBUG and NDEBUG" 31 | # endif 32 | 33 | # if defined(DEBUG) 34 | # include 35 | # endif 36 | 37 | /* conditional features */ 38 | 39 | # if defined(OPT_SPEED) && defined(OPT_ACCURACY) 40 | # error "cannot optimize for both speed and accuracy" 41 | # endif 42 | 43 | # if defined(OPT_SPEED) && !defined(OPT_SSO) 44 | # define OPT_SSO 45 | # endif 46 | 47 | # if defined(HAVE_UNISTD_H) && defined(HAVE_WAITPID) && \ 48 | defined(HAVE_FCNTL) && defined(HAVE_PIPE) && defined(HAVE_FORK) 49 | # define USE_ASYNC 50 | # endif 51 | 52 | # if !defined(HAVE_ASSERT_H) 53 | //# if defined(NDEBUG) 54 | # define assert(x) /* nothing */ 55 | //# else 56 | //# define assert(x) do { if (!(x)) abort(); } while (0) 57 | //# endif 58 | # endif 59 | 60 | # endif 61 | -------------------------------------------------------------------------------- /mp3/mad/huffman.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: huffman.h,v 1.11 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_HUFFMAN_H 23 | # define LIBMAD_HUFFMAN_H 24 | 25 | union huffquad { 26 | struct { 27 | unsigned int final : 1; 28 | unsigned int bits : 3; 29 | unsigned int offset : 12; 30 | } ptr; 31 | struct { 32 | unsigned int final : 1; 33 | unsigned int hlen : 3; 34 | unsigned int v : 1; 35 | unsigned int w : 1; 36 | unsigned int x : 1; 37 | unsigned int y : 1; 38 | } value; 39 | unsigned int final : 1; 40 | }; 41 | 42 | union huffpair { 43 | struct { 44 | unsigned int final : 1; 45 | unsigned int bits : 3; 46 | unsigned int offset : 12; 47 | } ptr; 48 | struct { 49 | unsigned int final : 1; 50 | unsigned int hlen : 3; 51 | unsigned int x : 4; 52 | unsigned int y : 4; 53 | } value; 54 | unsigned int final : 1; 55 | }; 56 | 57 | struct hufftable { 58 | union huffpair const *table; 59 | unsigned int linbits; 60 | unsigned int startbits; 61 | }; 62 | 63 | extern union huffquad const *const mad_huff_quad_table[2]; 64 | extern struct hufftable const mad_huff_pair_table[32]; 65 | 66 | # endif 67 | -------------------------------------------------------------------------------- /mp3/mad/imdct_s.dat: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: imdct_s.dat,v 1.8 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | /* 0 */ { MAD_F(0x09bd7ca0) /* 0.608761429 */, 23 | -MAD_F(0x0ec835e8) /* -0.923879533 */, 24 | -MAD_F(0x0216a2a2) /* -0.130526192 */, 25 | MAD_F(0x0fdcf549) /* 0.991444861 */, 26 | -MAD_F(0x061f78aa) /* -0.382683432 */, 27 | -MAD_F(0x0cb19346) /* -0.793353340 */ }, 28 | 29 | /* 6 */ { -MAD_F(0x0cb19346) /* -0.793353340 */, 30 | MAD_F(0x061f78aa) /* 0.382683432 */, 31 | MAD_F(0x0fdcf549) /* 0.991444861 */, 32 | MAD_F(0x0216a2a2) /* 0.130526192 */, 33 | -MAD_F(0x0ec835e8) /* -0.923879533 */, 34 | -MAD_F(0x09bd7ca0) /* -0.608761429 */ }, 35 | 36 | /* 1 */ { MAD_F(0x061f78aa) /* 0.382683432 */, 37 | -MAD_F(0x0ec835e8) /* -0.923879533 */, 38 | MAD_F(0x0ec835e8) /* 0.923879533 */, 39 | -MAD_F(0x061f78aa) /* -0.382683432 */, 40 | -MAD_F(0x061f78aa) /* -0.382683432 */, 41 | MAD_F(0x0ec835e8) /* 0.923879533 */ }, 42 | 43 | /* 7 */ { -MAD_F(0x0ec835e8) /* -0.923879533 */, 44 | -MAD_F(0x061f78aa) /* -0.382683432 */, 45 | MAD_F(0x061f78aa) /* 0.382683432 */, 46 | MAD_F(0x0ec835e8) /* 0.923879533 */, 47 | MAD_F(0x0ec835e8) /* 0.923879533 */, 48 | MAD_F(0x061f78aa) /* 0.382683432 */ }, 49 | 50 | /* 2 */ { MAD_F(0x0216a2a2) /* 0.130526192 */, 51 | -MAD_F(0x061f78aa) /* -0.382683432 */, 52 | MAD_F(0x09bd7ca0) /* 0.608761429 */, 53 | -MAD_F(0x0cb19346) /* -0.793353340 */, 54 | MAD_F(0x0ec835e8) /* 0.923879533 */, 55 | -MAD_F(0x0fdcf549) /* -0.991444861 */ }, 56 | 57 | /* 8 */ { -MAD_F(0x0fdcf549) /* -0.991444861 */, 58 | -MAD_F(0x0ec835e8) /* -0.923879533 */, 59 | -MAD_F(0x0cb19346) /* -0.793353340 */, 60 | -MAD_F(0x09bd7ca0) /* -0.608761429 */, 61 | -MAD_F(0x061f78aa) /* -0.382683432 */, 62 | -MAD_F(0x0216a2a2) /* -0.130526192 */ } 63 | -------------------------------------------------------------------------------- /mp3/mad/layer3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: layer3.h,v 1.10 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_LAYER3_H 23 | # define LIBMAD_LAYER3_H 24 | 25 | # include "stream.h" 26 | # include "frame.h" 27 | 28 | int mad_layer_III(struct mad_stream *, struct mad_frame *); 29 | 30 | extern main_data_t MainData; 31 | 32 | # endif 33 | -------------------------------------------------------------------------------- /mp3/mad/mpg12/layer12.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: layer12.h,v 1.10 2004/01/23 09:41:32 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_LAYER12_H 23 | # define LIBMAD_LAYER12_H 24 | 25 | # include "stream.h" 26 | # include "frame.h" 27 | 28 | int mad_layer_I(struct mad_stream *, struct mad_frame *); 29 | int mad_layer_II(struct mad_stream *, struct mad_frame *); 30 | 31 | # endif 32 | -------------------------------------------------------------------------------- /mp3/mad/mpg12/readme.txt: -------------------------------------------------------------------------------- 1 | Because of size constraints, the option to read mpg1/2 files has been 2 | disabled. -------------------------------------------------------------------------------- /mp3/mad/synth.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: synth.h,v 1.15 2004/01/23 09:41:33 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_SYNTH_H 23 | # define LIBMAD_SYNTH_H 24 | 25 | # include "fixed.h" 26 | # include "frame.h" 27 | 28 | struct mad_pcm { 29 | unsigned int samplerate; /* sampling frequency (Hz) */ 30 | unsigned short channels; /* number of channels */ 31 | unsigned short length; /* number of samples per channel */ 32 | }; 33 | 34 | struct mad_synth { 35 | mad_fixed_t filter[2][2][2][16][8]; /* polyphase filterbank outputs */ 36 | /* [ch][eo][peo][s][v] */ 37 | 38 | unsigned int phase; /* current processing phase */ 39 | 40 | struct mad_pcm pcm; /* PCM output */ 41 | }; 42 | 43 | /* single channel PCM selector */ 44 | enum { 45 | MAD_PCM_CHANNEL_SINGLE = 0 46 | }; 47 | 48 | /* dual channel PCM selector */ 49 | enum { 50 | MAD_PCM_CHANNEL_DUAL_1 = 0, 51 | MAD_PCM_CHANNEL_DUAL_2 = 1 52 | }; 53 | 54 | /* stereo PCM selector */ 55 | enum { 56 | MAD_PCM_CHANNEL_STEREO_LEFT = 0, 57 | MAD_PCM_CHANNEL_STEREO_RIGHT = 1 58 | }; 59 | 60 | void mad_synth_init(struct mad_synth *); 61 | 62 | # define mad_synth_finish(synth) /* nothing */ 63 | 64 | void mad_synth_mute(struct mad_synth *); 65 | 66 | void mad_synth_frame(struct mad_synth *, struct mad_frame const *); 67 | 68 | # endif 69 | -------------------------------------------------------------------------------- /mp3/mad/version.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: version.c,v 1.15 2004/01/23 09:41:33 rob Exp $ 20 | */ 21 | 22 | # ifdef HAVE_CONFIG_H 23 | # include "config.h" 24 | # endif 25 | 26 | # include "global.h" 27 | 28 | # include "version.h" 29 | 30 | char const mad_version[] = "MPEG Audio Decoder " MAD_VERSION; 31 | char const mad_copyright[] = "Copyright (C) " MAD_PUBLISHYEAR " " MAD_AUTHOR; 32 | char const mad_author[] = MAD_AUTHOR " <" MAD_EMAIL ">"; 33 | 34 | char const mad_build[] = "" 35 | # if defined(DEBUG) 36 | "DEBUG " 37 | # elif defined(NDEBUG) 38 | "NDEBUG " 39 | # endif 40 | 41 | # if defined(EXPERIMENTAL) 42 | "EXPERIMENTAL " 43 | # endif 44 | 45 | # if defined(FPM_64BIT) 46 | "FPM_64BIT " 47 | # elif defined(FPM_INTEL) 48 | "FPM_INTEL " 49 | # elif defined(FPM_ARM) 50 | "FPM_ARM " 51 | # elif defined(FPM_MIPS) 52 | "FPM_MIPS " 53 | # elif defined(FPM_SPARC) 54 | "FPM_SPARC " 55 | # elif defined(FPM_PPC) 56 | "FPM_PPC " 57 | # elif defined(FPM_DEFAULT) 58 | "FPM_DEFAULT " 59 | # endif 60 | 61 | # if defined(ASO_IMDCT) 62 | "ASO_IMDCT " 63 | # endif 64 | # if defined(ASO_INTERLEAVE1) 65 | "ASO_INTERLEAVE1 " 66 | # endif 67 | # if defined(ASO_INTERLEAVE2) 68 | "ASO_INTERLEAVE2 " 69 | # endif 70 | # if defined(ASO_ZEROCHECK) 71 | "ASO_ZEROCHECK " 72 | # endif 73 | 74 | # if defined(OPT_SPEED) 75 | "OPT_SPEED " 76 | # elif defined(OPT_ACCURACY) 77 | "OPT_ACCURACY " 78 | # endif 79 | 80 | # if defined(OPT_SSO) 81 | "OPT_SSO " 82 | # endif 83 | 84 | # if defined(OPT_DCTO) /* never defined here */ 85 | "OPT_DCTO " 86 | # endif 87 | 88 | # if defined(OPT_STRICT) 89 | "OPT_STRICT " 90 | # endif 91 | ; 92 | -------------------------------------------------------------------------------- /mp3/mad/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libmad - MPEG audio decoder library 3 | * Copyright (C) 2000-2004 Underbit Technologies, Inc. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: version.h,v 1.26 2004/01/23 09:41:33 rob Exp $ 20 | */ 21 | 22 | # ifndef LIBMAD_VERSION_H 23 | # define LIBMAD_VERSION_H 24 | 25 | # define MAD_VERSION_MAJOR 0 26 | # define MAD_VERSION_MINOR 15 27 | # define MAD_VERSION_PATCH 1 28 | # define MAD_VERSION_EXTRA " (beta)" 29 | 30 | # define MAD_VERSION_STRINGIZE(str) #str 31 | # define MAD_VERSION_STRING(num) MAD_VERSION_STRINGIZE(num) 32 | 33 | # define MAD_VERSION MAD_VERSION_STRING(MAD_VERSION_MAJOR) "." \ 34 | MAD_VERSION_STRING(MAD_VERSION_MINOR) "." \ 35 | MAD_VERSION_STRING(MAD_VERSION_PATCH) \ 36 | MAD_VERSION_EXTRA 37 | 38 | # define MAD_PUBLISHYEAR "2000-2004" 39 | # define MAD_AUTHOR "Underbit Technologies, Inc." 40 | # define MAD_EMAIL "info@underbit.com" 41 | 42 | extern char const mad_version[]; 43 | extern char const mad_copyright[]; 44 | extern char const mad_author[]; 45 | extern char const mad_build[]; 46 | 47 | # endif 48 | -------------------------------------------------------------------------------- /mp3/make.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | make COMPILE=gcc BOOT=none APP=0 SPI_SPEED=40 SPI_MODE=QIO SPI_SIZE=1024 3 | ${ESPTOOL} --port ${ESPPORT} --baud ${ESPBAUD} write_flash 0x00000 ../bin/eagle.flash.bin 0xA0000 ../bin/eagle.irom0text.bin 4 | 5 | -------------------------------------------------------------------------------- /mp3/user/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ############################################################# 3 | # Required variables for each makefile 4 | # Discard this section from all parent makefiles 5 | # Expected variables (with automatic defaults): 6 | # CSRCS (all "C" files in the dir) 7 | # SUBDIRS (all subdirs with a Makefile) 8 | # GEN_LIBS - list of libs to be generated () 9 | # GEN_IMAGES - list of images to be generated () 10 | # COMPONENTS_xxx - a list of libs/objs in the form 11 | # subdir/lib to be extracted and rolled up into 12 | # a generated lib/image xxx.a () 13 | # 14 | ifndef PDIR 15 | GEN_LIBS = libuser.a 16 | endif 17 | 18 | 19 | ############################################################# 20 | # Configuration i.e. compile options etc. 21 | # Target specific stuff (defines etc.) goes in here! 22 | # Generally values applying to a tree are captured in the 23 | # makefile at its root level - these are then overridden 24 | # for a subtree within the makefile rooted therein 25 | # 26 | #DEFINES += 27 | 28 | ############################################################# 29 | # Recursion Magic - Don't touch this!! 30 | # 31 | # Each subtree potentially has an include directory 32 | # corresponding to the common APIs applicable to modules 33 | # rooted at that subtree. Accordingly, the INCLUDE PATH 34 | # of a module can only contain the include directories up 35 | # its parent path, and not its siblings 36 | # 37 | # Required for each makefile to inherit from the parent 38 | # 39 | 40 | INCLUDES := $(INCLUDES) -I $(PDIR)include 41 | PDIR := ../$(PDIR) 42 | sinclude $(PDIR)Makefile 43 | 44 | -------------------------------------------------------------------------------- /third_party/freertos/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ############################################################# 3 | # Required variables for each makefile 4 | # Discard this section from all parent makefiles 5 | # Expected variables (with automatic defaults): 6 | # CSRCS (all "C" files in the dir) 7 | # SUBDIRS (all subdirs with a Makefile) 8 | # GEN_LIBS - list of libs to be generated () 9 | # GEN_IMAGES - list of images to be generated () 10 | # COMPONENTS_xxx - a list of libs/objs in the form 11 | # subdir/lib to be extracted and rolled up into 12 | # a generated lib/image xxx.a () 13 | # 14 | ifndef PDIR 15 | 16 | GEN_LIBS = libfreertos.a 17 | 18 | endif 19 | 20 | 21 | ############################################################# 22 | # Configuration i.e. compile options etc. 23 | # Target specific stuff (defines etc.) goes in here! 24 | # Generally values applying to a tree are captured in the 25 | # makefile at its root level - these are then overridden 26 | # for a subtree within the makefile rooted therein 27 | # 28 | #DEFINES += 29 | 30 | ############################################################# 31 | # Recursion Magic - Don't touch this!! 32 | # 33 | # Each subtree potentially has an include directory 34 | # corresponding to the common APIs applicable to modules 35 | # rooted at that subtree. Accordingly, the INCLUDE PATH 36 | # of a module can only contain the include directories up 37 | # its parent path, and not its siblings 38 | # 39 | # Required for each makefile to inherit from the parent 40 | # 41 | 42 | INCLUDES := $(INCLUDES) -I $(PDIR)include 43 | INCLUDES += -I ./ 44 | INCLUDES += -I ../../rom/include 45 | INCLUDES += -I ../../include/ets 46 | INCLUDES += -I ./include -I $(PDIR)include/freertos 47 | PDIR := ../$(PDIR) 48 | sinclude $(PDIR)Makefile 49 | 50 | -------------------------------------------------------------------------------- /third_party/freertos/readme.txt: -------------------------------------------------------------------------------- 1 | Each real time kernel port consists of three files that contain the core kernel 2 | components and are common to every port, and one or more files that are 3 | specific to a particular microcontroller and or compiler. 4 | 5 | + The FreeRTOS/Source directory contains the three files that are common to 6 | every port - list.c, queue.c and tasks.c. The kernel is contained within these 7 | three files. croutine.c implements the optional co-routine functionality - which 8 | is normally only used on very memory limited systems. 9 | 10 | + The FreeRTOS/Source/Portable directory contains the files that are specific to 11 | a particular microcontroller and or compiler. 12 | 13 | + The FreeRTOS/Source/include directory contains the real time kernel header 14 | files. 15 | 16 | See the readme file in the FreeRTOS/Source/Portable directory for more 17 | information. -------------------------------------------------------------------------------- /third_party/json/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ############################################################# 3 | # Required variables for each makefile 4 | # Discard this section from all parent makefiles 5 | # Expected variables (with automatic defaults): 6 | # CSRCS (all "C" files in the dir) 7 | # SUBDIRS (all subdirs with a Makefile) 8 | # GEN_LIBS - list of libs to be generated () 9 | # GEN_IMAGES - list of images to be generated () 10 | # COMPONENTS_xxx - a list of libs/objs in the form 11 | # subdir/lib to be extracted and rolled up into 12 | # a generated lib/image xxx.a () 13 | # 14 | ifndef PDIR 15 | 16 | GEN_LIBS = libjson.a 17 | 18 | endif 19 | 20 | 21 | ############################################################# 22 | # Configuration i.e. compile options etc. 23 | # Target specific stuff (defines etc.) goes in here! 24 | # Generally values applying to a tree are captured in the 25 | # makefile at its root level - these are then overridden 26 | # for a subtree within the makefile rooted therein 27 | # 28 | #DEFINES += 29 | 30 | ############################################################# 31 | # Recursion Magic - Don't touch this!! 32 | # 33 | # Each subtree potentially has an include directory 34 | # corresponding to the common APIs applicable to modules 35 | # rooted at that subtree. Accordingly, the INCLUDE PATH 36 | # of a module can only contain the include directories up 37 | # its parent path, and not its siblings 38 | # 39 | # Required for each makefile to inherit from the parent 40 | # 41 | 42 | INCLUDES := $(INCLUDES) -I $(PDIR)include 43 | INCLUDES += -I ./ 44 | PDIR := ../$(PDIR) 45 | sinclude $(PDIR)Makefile 46 | 47 | -------------------------------------------------------------------------------- /third_party/ssl/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ############################################################# 3 | # Required variables for each makefile 4 | # Discard this section from all parent makefiles 5 | # Expected variables (with automatic defaults): 6 | # CSRCS (all "C" files in the dir) 7 | # SUBDIRS (all subdirs with a Makefile) 8 | # GEN_LIBS - list of libs to be generated () 9 | # GEN_IMAGES - list of images to be generated () 10 | # COMPONENTS_xxx - a list of libs/objs in the form 11 | # subdir/lib to be extracted and rolled up into 12 | # a generated lib/image xxx.a () 13 | # 14 | ifndef PDIR 15 | UP_EXTRACT_DIR = .. 16 | GEN_LIBS = libssl.a 17 | COMPONENTS_libssl = crypto/libsslcrypto.a \ 18 | ssl/libsslssl.a 19 | endif 20 | 21 | 22 | ############################################################# 23 | # Configuration i.e. compile options etc. 24 | # Target specific stuff (defines etc.) goes in here! 25 | # Generally values applying to a tree are captured in the 26 | # makefile at its root level - these are then overridden 27 | # for a subtree within the makefile rooted therein 28 | # 29 | #DEFINES += 30 | 31 | ############################################################# 32 | # Recursion Magic - Don't touch this!! 33 | # 34 | # Each subtree potentially has an include directory 35 | # corresponding to the common APIs applicable to modules 36 | # rooted at that subtree. Accordingly, the INCLUDE PATH 37 | # of a module can only contain the include directories up 38 | # its parent path, and not its siblings 39 | # 40 | # Required for each makefile to inherit from the parent 41 | # 42 | 43 | INCLUDES := $(INCLUDES) -I $(PDIR)include 44 | INCLUDES += -I ./ 45 | PDIR := ../$(PDIR) 46 | sinclude $(PDIR)Makefile 47 | 48 | -------------------------------------------------------------------------------- /third_party/ssl/crypto/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ############################################################# 3 | # Required variables for each makefile 4 | # Discard this section from all parent makefiles 5 | # Expected variables (with automatic defaults): 6 | # CSRCS (all "C" files in the dir) 7 | # SUBDIRS (all subdirs with a Makefile) 8 | # GEN_LIBS - list of libs to be generated () 9 | # GEN_IMAGES - list of images to be generated () 10 | # COMPONENTS_xxx - a list of libs/objs in the form 11 | # subdir/lib to be extracted and rolled up into 12 | # a generated lib/image xxx.a () 13 | # 14 | ifndef PDIR 15 | 16 | GEN_LIBS = libsslcrypto.a 17 | 18 | endif 19 | 20 | 21 | ############################################################# 22 | # Configuration i.e. compile options etc. 23 | # Target specific stuff (defines etc.) goes in here! 24 | # Generally values applying to a tree are captured in the 25 | # makefile at its root level - these are then overridden 26 | # for a subtree within the makefile rooted therein 27 | # 28 | #DEFINES += 29 | 30 | ############################################################# 31 | # Recursion Magic - Don't touch this!! 32 | # 33 | # Each subtree potentially has an include directory 34 | # corresponding to the common APIs applicable to modules 35 | # rooted at that subtree. Accordingly, the INCLUDE PATH 36 | # of a module can only contain the include directories up 37 | # its parent path, and not its siblings 38 | # 39 | # Required for each makefile to inherit from the parent 40 | # 41 | 42 | INCLUDES := $(INCLUDES) -I $(PDIR)include 43 | INCLUDES += -I ./ 44 | PDIR := ../$(PDIR) 45 | sinclude $(PDIR)Makefile 46 | 47 | -------------------------------------------------------------------------------- /third_party/ssl/crypto/ssl_rc4.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, Cameron Rich 3 | * 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * * Neither the name of the axTLS project nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 22 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 23 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 25 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 26 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | /** 32 | * An implementation of the RC4/ARC4 algorithm. 33 | * Originally written by Christophe Devine. 34 | */ 35 | 36 | #include "ssl/ssl_os_port.h" 37 | #include "ssl/ssl_crypto.h" 38 | 39 | /** 40 | * Get ready for an encrypt/decrypt operation 41 | */ 42 | void ICACHE_FLASH_ATTR RC4_setup(RC4_CTX *ctx, const uint8_t *key, int length) 43 | { 44 | int i, j = 0, k = 0, a; 45 | uint8_t *m; 46 | 47 | ctx->x = 0; 48 | ctx->y = 0; 49 | m = ctx->m; 50 | 51 | for (i = 0; i < 256; i++) 52 | m[i] = i; 53 | 54 | for (i = 0; i < 256; i++) 55 | { 56 | a = m[i]; 57 | j = (uint8_t)(j + a + key[k]); 58 | m[i] = m[j]; 59 | m[j] = a; 60 | 61 | if (++k >= length) 62 | k = 0; 63 | } 64 | } 65 | 66 | /** 67 | * Perform the encrypt/decrypt operation (can use it for either since 68 | * this is a stream cipher). 69 | * NOTE: *msg and *out must be the same pointer (performance tweak) 70 | */ 71 | void ICACHE_FLASH_ATTR RC4_crypt(RC4_CTX *ctx, const uint8_t *msg, uint8_t *out, int length) 72 | { 73 | int i; 74 | uint8_t *m, x, y, a, b; 75 | 76 | x = ctx->x; 77 | y = ctx->y; 78 | m = ctx->m; 79 | 80 | for (i = 0; i < length; i++) 81 | { 82 | a = m[++x]; 83 | y += a; 84 | m[x] = b = m[y]; 85 | m[y] = a; 86 | out[i] ^= m[(uint8_t)(a + b)]; 87 | } 88 | 89 | ctx->x = x; 90 | ctx->y = y; 91 | } 92 | -------------------------------------------------------------------------------- /third_party/ssl/ssl/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ############################################################# 3 | # Required variables for each makefile 4 | # Discard this section from all parent makefiles 5 | # Expected variables (with automatic defaults): 6 | # CSRCS (all "C" files in the dir) 7 | # SUBDIRS (all subdirs with a Makefile) 8 | # GEN_LIBS - list of libs to be generated () 9 | # GEN_IMAGES - list of images to be generated () 10 | # COMPONENTS_xxx - a list of libs/objs in the form 11 | # subdir/lib to be extracted and rolled up into 12 | # a generated lib/image xxx.a () 13 | # 14 | ifndef PDIR 15 | 16 | GEN_LIBS = libsslssl.a 17 | 18 | endif 19 | 20 | 21 | ############################################################# 22 | # Configuration i.e. compile options etc. 23 | # Target specific stuff (defines etc.) goes in here! 24 | # Generally values applying to a tree are captured in the 25 | # makefile at its root level - these are then overridden 26 | # for a subtree within the makefile rooted therein 27 | # 28 | #DEFINES += 29 | 30 | ############################################################# 31 | # Recursion Magic - Don't touch this!! 32 | # 33 | # Each subtree potentially has an include directory 34 | # corresponding to the common APIs applicable to modules 35 | # rooted at that subtree. Accordingly, the INCLUDE PATH 36 | # of a module can only contain the include directories up 37 | # its parent path, and not its siblings 38 | # 39 | # Required for each makefile to inherit from the parent 40 | # 41 | 42 | INCLUDES := $(INCLUDES) -I $(PDIR)include 43 | INCLUDES += -I ./ 44 | PDIR := ../$(PDIR) 45 | sinclude $(PDIR)Makefile 46 | 47 | -------------------------------------------------------------------------------- /third_party/udhcp/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ############################################################# 3 | # Required variables for each makefile 4 | # Discard this section from all parent makefiles 5 | # Expected variables (with automatic defaults): 6 | # CSRCS (all "C" files in the dir) 7 | # SUBDIRS (all subdirs with a Makefile) 8 | # GEN_LIBS - list of libs to be generated () 9 | # GEN_IMAGES - list of images to be generated () 10 | # COMPONENTS_xxx - a list of libs/objs in the form 11 | # subdir/lib to be extracted and rolled up into 12 | # a generated lib/image xxx.a () 13 | # 14 | ifndef PDIR 15 | 16 | GEN_LIBS = libudhcp.a 17 | 18 | endif 19 | 20 | 21 | ############################################################# 22 | # Configuration i.e. compile options etc. 23 | # Target specific stuff (defines etc.) goes in here! 24 | # Generally values applying to a tree are captured in the 25 | # makefile at its root level - these are then overridden 26 | # for a subtree within the makefile rooted therein 27 | # 28 | #DEFINES += 29 | 30 | ############################################################# 31 | # Recursion Magic - Don't touch this!! 32 | # 33 | # Each subtree potentially has an include directory 34 | # corresponding to the common APIs applicable to modules 35 | # rooted at that subtree. Accordingly, the INCLUDE PATH 36 | # of a module can only contain the include directories up 37 | # its parent path, and not its siblings 38 | # 39 | # Required for each makefile to inherit from the parent 40 | # 41 | 42 | INCLUDES := $(INCLUDES) -I $(PDIR)include 43 | INCLUDES += -I ./ 44 | PDIR := ../$(PDIR) 45 | sinclude $(PDIR)Makefile 46 | 47 | -------------------------------------------------------------------------------- /third_party/udhcp/read.c: -------------------------------------------------------------------------------- 1 | /* vi: set sw=4 ts=4: */ 2 | /* 3 | * Utility routines. 4 | * 5 | * Copyright (C) 1999-2004 by Erik Andersen 6 | * 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 | */ 9 | 10 | #include "udhcp/common.h" 11 | 12 | struct sockaddr dest_sin; 13 | socklen_t dest_length = sizeof(struct sockaddr); 14 | 15 | ssize_t ICACHE_FLASH_ATTR safe_read(int fd, void *buf, size_t count) 16 | { 17 | ssize_t n; 18 | 19 | do { 20 | // n = read(fd, buf, count); 21 | n = recvfrom(fd, buf, count, 0, &dest_sin, &dest_length); 22 | } while (n < 0 && errno == EINTR); 23 | 24 | return n; 25 | } 26 | 27 | /* 28 | * Read all of the supplied buffer from a file. 29 | * This does multiple reads as necessary. 30 | * Returns the amount read, or -1 on an error. 31 | * A short read is returned on an end of file. 32 | */ 33 | ssize_t ICACHE_FLASH_ATTR full_read(int fd, void *buf, size_t len) 34 | { 35 | ssize_t cc; 36 | ssize_t total; 37 | 38 | total = 0; 39 | 40 | while (len) { 41 | cc = safe_read(fd, buf, len); 42 | 43 | if (cc < 0) { 44 | if (total) { 45 | /* we already have some! */ 46 | /* user can do another read to know the error code */ 47 | return total; 48 | } 49 | return cc; /* read() returns -1 on failure. */ 50 | } 51 | if (cc == 0) 52 | break; 53 | buf = ((char *)buf) + cc; 54 | total += cc; 55 | len -= cc; 56 | } 57 | 58 | return total; 59 | } 60 | 61 | ssize_t ICACHE_FLASH_ATTR read_close(int fd, void *buf, size_t size) 62 | { 63 | /*int e;*/ 64 | size = full_read(fd, buf, size); 65 | /*e = errno;*/ 66 | close(fd); 67 | /*errno = e;*/ 68 | return size; 69 | } 70 | 71 | /*ssize_t open_read_close(const char *filename, void *buf, size_t size) 72 | { 73 | int fd = open(filename, O_RDONLY); 74 | if (fd < 0) 75 | return fd; 76 | return read_close(fd, buf, size); 77 | }*/ 78 | 79 | ssize_t ICACHE_FLASH_ATTR safe_write(int fd, const void *buf, size_t count) 80 | { 81 | ssize_t n; 82 | 83 | do { 84 | // n = write(fd, buf, count); 85 | n = sendto(fd, buf, count, 0, &dest_sin, dest_length); 86 | } while (n < 0 && errno == EINTR); 87 | 88 | return n; 89 | } 90 | 91 | /* 92 | * Write all of the supplied buffer out to a file. 93 | * This does multiple writes as necessary. 94 | * Returns the amount written, or -1 on an error. 95 | */ 96 | ssize_t ICACHE_FLASH_ATTR full_write(int fd, const void *buf, size_t len) 97 | { 98 | ssize_t cc; 99 | ssize_t total; 100 | 101 | total = 0; 102 | 103 | while (len) { 104 | cc = safe_write(fd, buf, len); 105 | 106 | if (cc < 0) { 107 | if (total) { 108 | /* we already wrote some! */ 109 | /* user can do another write to know the error code */ 110 | return total; 111 | } 112 | return cc; /* write() returns -1 on failure. */ 113 | } 114 | 115 | total += cc; 116 | buf = ((const char *)buf) + cc; 117 | len -= cc; 118 | } 119 | 120 | return total; 121 | } 122 | 123 | -------------------------------------------------------------------------------- /third_party/udhcp/socket.c: -------------------------------------------------------------------------------- 1 | /* vi: set sw=4 ts=4: */ 2 | /* 3 | * DHCP server client/server socket creation 4 | * 5 | * udhcp client/server 6 | * Copyright (C) 1999 Matthew Ramsay 7 | * Chris Trew 8 | * 9 | * Rewrite by Russ Dill July 2001 10 | * 11 | * This program is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program; if not, write to the Free Software 23 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 24 | */ 25 | 26 | #include "udhcp/common.h" 27 | 28 | int ICACHE_FLASH_ATTR udhcp_read_interface(const char *interface, int *ifindex, uint32_t *nip, uint8_t *mac) 29 | { 30 | struct ip_info info; 31 | if (wifi_get_opmode() == NULL_MODE) { 32 | UDHCP_DEBUG("wifi's opmode is invalid\n"); 33 | return 1; 34 | } 35 | 36 | if (nip) { 37 | wifi_get_ip_info(SOFTAP_IF,&info); 38 | *nip = info.ip.addr; 39 | UDHCP_DEBUG("IP %s\n", inet_ntoa(info.ip)); 40 | } 41 | 42 | if (ifindex) { 43 | 44 | if (wifi_get_opmode() == SOFTAP_MODE || wifi_get_opmode() == STATIONAP_MODE) { 45 | *ifindex = SOFTAP_IF; 46 | } else { 47 | *ifindex = STATION_IF; 48 | } 49 | } 50 | 51 | if (mac) { 52 | 53 | if (wifi_get_opmode() == SOFTAP_MODE || wifi_get_opmode() == STATIONAP_MODE) { 54 | wifi_get_macaddr(SOFTAP_IF, mac); 55 | } 56 | UDHCP_DEBUG("MAC %02x:%02x:%02x:%02x:%02x:%02x\n", 57 | mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); 58 | } 59 | 60 | return 0; 61 | } 62 | 63 | /* 1. None of the callers expects it to ever fail */ 64 | /* 2. ip was always INADDR_ANY */ 65 | int ICACHE_FLASH_ATTR udhcp_listen_socket(/*uint32_t ip,*/ int port, const char *inf) 66 | { 67 | int fd; 68 | int recv_timeout = 10; 69 | struct sockaddr_in addr; 70 | 71 | UDHCP_DEBUG("Opening listen socket on *:%d %s\n", port, inf); 72 | 73 | fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); 74 | 75 | bzero(&addr, sizeof(addr)); 76 | addr.sin_family = AF_INET; 77 | addr.sin_addr.s_addr = htons(INADDR_ANY); 78 | addr.sin_port = htons(port); 79 | /* addr.sin_addr.s_addr = ip; - all-zeros is INADDR_ANY */ 80 | if (bind(fd, (struct sockaddr *)&addr, sizeof(addr)) == -1) 81 | UDHCP_DEBUG("bind port %d failed\n", port); 82 | 83 | setsockopt(fd,SOL_SOCKET,SO_RCVTIMEO,(void *)&recv_timeout,sizeof(recv_timeout)); 84 | 85 | return fd; 86 | } 87 | -------------------------------------------------------------------------------- /third_party/udhcp/static_leases.c: -------------------------------------------------------------------------------- 1 | /* vi: set sw=4 ts=4: */ 2 | /* 3 | * Storing and retrieving data for static leases 4 | * 5 | * Wade Berrier September 2004 6 | * 7 | * Licensed under GPLv2, see file LICENSE in this source tree. 8 | */ 9 | 10 | #include "udhcp/common.h" 11 | #include "udhcp/dhcpd.h" 12 | 13 | /* Takes the address of the pointer to the static_leases linked list, 14 | * address to a 6 byte mac address, 15 | * 4 byte IP address */ 16 | void ICACHE_FLASH_ATTR add_static_lease(struct static_lease **st_lease_pp, 17 | uint8_t *mac, 18 | uint32_t nip) 19 | { 20 | struct static_lease *st_lease; 21 | 22 | /* Find the tail of the list */ 23 | while ((st_lease = *st_lease_pp) != NULL) { 24 | st_lease_pp = &st_lease->next; 25 | } 26 | 27 | /* Add new node */ 28 | *st_lease_pp = st_lease = (struct static_lease *)zalloc(sizeof(*st_lease)); 29 | memcpy(st_lease->mac, mac, 6); 30 | st_lease->nip = nip; 31 | /*st_lease->next = NULL;*/ 32 | } 33 | 34 | /* Find static lease IP by mac */ 35 | uint32_t ICACHE_FLASH_ATTR get_static_nip_by_mac(struct static_lease *st_lease, void *mac) 36 | { 37 | while (st_lease) { 38 | if (memcmp(st_lease->mac, mac, 6) == 0) 39 | return st_lease->nip; 40 | st_lease = st_lease->next; 41 | } 42 | 43 | return 0; 44 | } 45 | 46 | /* Check to see if an IP is reserved as a static IP */ 47 | int ICACHE_FLASH_ATTR is_nip_reserved(struct static_lease *st_lease, uint32_t nip) 48 | { 49 | while (st_lease) { 50 | if (st_lease->nip == nip) 51 | return 1; 52 | st_lease = st_lease->next; 53 | } 54 | 55 | return 0; 56 | } 57 | 58 | #ifdef UDHCP_DBG 59 | /* Print out static leases just to check what's going on */ 60 | /* Takes the address of the pointer to the static_leases linked list */ 61 | void ICACHE_FLASH_ATTR log_static_leases(struct static_lease **st_lease_pp) 62 | { 63 | struct static_lease *cur; 64 | 65 | // if (dhcp_verbose < 2) 66 | // return; 67 | 68 | cur = *st_lease_pp; 69 | while (cur) { 70 | UDHCP_DEBUG("static lease: mac:%02x:%02x:%02x:%02x:%02x:%02x nip:%x", 71 | cur->mac[0], cur->mac[1], cur->mac[2], 72 | cur->mac[3], cur->mac[4], cur->mac[5], 73 | cur->nip); 74 | cur = cur->next; 75 | } 76 | } 77 | #endif 78 | -------------------------------------------------------------------------------- /third_party/udhcp/time.c: -------------------------------------------------------------------------------- 1 | /* vi: set sw=4 ts=4: */ 2 | /* 3 | * Utility routines. 4 | * 5 | * Copyright (C) 2007 Denys Vlasenko 6 | * 7 | * Licensed under GPLv2, see file LICENSE in this source tree. 8 | */ 9 | 10 | #include "udhcp/common.h" 11 | 12 | unsigned long long ICACHE_FLASH_ATTR monotonic_ns(void) 13 | { 14 | struct timeval tv; 15 | // gettimeofday(&tv, NULL); 16 | return tv.tv_sec * 1000000000ULL + tv.tv_usec * 1000; 17 | } 18 | unsigned long long ICACHE_FLASH_ATTR monotonic_us(void) 19 | { 20 | struct timeval tv; 21 | // gettimeofday(&tv, NULL); 22 | return tv.tv_sec * 1000000ULL + tv.tv_usec; 23 | } 24 | unsigned long long ICACHE_FLASH_ATTR monotonic_ms(void) 25 | { 26 | struct timeval tv; 27 | // gettimeofday(&tv, NULL); 28 | return tv.tv_sec * 1000ULL + tv.tv_usec / 1000; 29 | } 30 | 31 | unsigned ICACHE_FLASH_ATTR monotonic_sec(void) 32 | { 33 | unsigned monotonic_sec = 0; 34 | monotonic_sec = system_get_time(); 35 | if (monotonic_sec < 0) 36 | monotonic_sec = rand()-monotonic_sec; 37 | 38 | return monotonic_sec; 39 | } 40 | 41 | uint32_t ICACHE_FLASH_ATTR time(void *arg) 42 | { 43 | return system_get_time(); 44 | } 45 | -------------------------------------------------------------------------------- /tools/makefile.sh: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Generate the certificates and keys for encrypt. 4 | # 5 | 6 | # set default cert for use in the client 7 | xxd -i client.cer | sed -e \ 8 | "s/client_cer/default_certificate/" > cert.h 9 | # set default key for use in the server 10 | xxd -i server.key_1024 | sed -e \ 11 | "s/server_key_1024/default_private_key/" > private_key.h 12 | --------------------------------------------------------------------------------