├── .gitignore ├── CMSIS ├── CMSIS END USER LICENCE AGREEMENT.pdf ├── Device │ └── ST │ │ └── STM32F4xx │ │ ├── Include │ │ ├── stm32f4xx.h │ │ └── system_stm32f4xx.h │ │ ├── Release_Notes.html │ │ └── Source │ │ └── Templates │ │ ├── arm │ │ └── startup_stm32f4xx.s │ │ ├── iar │ │ └── startup_stm32f4xx.s │ │ └── system_stm32f4xx.c ├── Documentation │ ├── CMSIS-SVD_Schema_1_0.xsd │ ├── CMSIS_CM4_SIMD.htm │ ├── CMSIS_Core.htm │ ├── CMSIS_DebugSupport.htm │ ├── CMSIS_History.htm │ ├── CMSIS_Logo_Final.jpg │ └── CMSIS_System_View_Description.htm ├── Include │ ├── arm_common_tables.h │ ├── arm_math.h │ ├── core_cm0.h │ ├── core_cm3.h │ ├── core_cm4.h │ ├── core_cm4_simd.h │ ├── core_cmFunc.h │ └── core_cmInstr.h ├── README.txt └── index.htm ├── Debug ├── Exe │ ├── c.out │ └── c.sim └── Obj │ ├── api_lib.o │ ├── api_lib.pbi │ ├── api_lib.pbi.cout │ ├── api_msg.o │ ├── api_msg.pbi │ ├── api_msg.pbi.cout │ ├── autoip.o │ ├── autoip.pbi │ ├── autoip.pbi.cout │ ├── croutine.o │ ├── croutine.pbi │ ├── croutine.pbi.cout │ ├── def.o │ ├── def.pbi │ ├── def.pbi.cout │ ├── dhcp.o │ ├── dhcp.pbi │ ├── dhcp.pbi.cout │ ├── dns.o │ ├── dns.pbi │ ├── dns.pbi.cout │ ├── err.o │ ├── err.pbi │ ├── err.pbi.cout │ ├── etharp.o │ ├── etharp.pbi │ ├── etharp.pbi.cout │ ├── ethernet.pbd │ ├── ethernet.pbd.browse │ ├── ethernetif.o │ ├── ethernetif.pbi │ ├── ethernetif.pbi.cout │ ├── event_groups.o │ ├── event_groups.pbi │ ├── event_groups.pbi.cout │ ├── fs.o │ ├── fs.pbi.cout │ ├── fsdata.o │ ├── fsdata.pbi.cout │ ├── heap_4.o │ ├── heap_4.pbi │ ├── heap_4.pbi.cout │ ├── http_server.o │ ├── http_server.pbi │ ├── http_server.pbi.cout │ ├── httpserver-netconn.pbi.cout │ ├── icmp.o │ ├── icmp.pbi │ ├── icmp.pbi.cout │ ├── igmp.o │ ├── igmp.pbi │ ├── igmp.pbi.cout │ ├── inet.o │ ├── inet.pbi │ ├── inet.pbi.cout │ ├── inet_chksum.o │ ├── inet_chksum.pbi │ ├── inet_chksum.pbi.cout │ ├── init.o │ ├── init.pbi │ ├── init.pbi.cout │ ├── ip.o │ ├── ip.pbi │ ├── ip.pbi.cout │ ├── ip_addr.o │ ├── ip_addr.pbi │ ├── ip_addr.pbi.cout │ ├── ip_frag.o │ ├── ip_frag.pbi │ ├── ip_frag.pbi.cout │ ├── list.o │ ├── list.pbi │ ├── list.pbi.cout │ ├── main.o │ ├── main.pbi │ ├── main.pbi.cout │ ├── mem.o │ ├── mem.pbi │ ├── mem.pbi.cout │ ├── memp.o │ ├── memp.pbi │ ├── memp.pbi.cout │ ├── misc.o │ ├── misc.pbi │ ├── misc.pbi.cout │ ├── netbuf.o │ ├── netbuf.pbi │ ├── netbuf.pbi.cout │ ├── netconf.o │ ├── netconf.pbi.cout │ ├── netdb.o │ ├── netdb.pbi │ ├── netdb.pbi.cout │ ├── netif.o │ ├── netif.pbi │ ├── netif.pbi.cout │ ├── netifapi.o │ ├── netifapi.pbi │ ├── netifapi.pbi.cout │ ├── pbuf.o │ ├── pbuf.pbi │ ├── pbuf.pbi.cout │ ├── port.o │ ├── port.pbi │ ├── port.pbi.cout │ ├── portasm.o │ ├── queue.o │ ├── queue.pbi │ ├── queue.pbi.cout │ ├── raw.o │ ├── raw.pbi │ ├── raw.pbi.cout │ ├── slipif.o │ ├── slipif.pbi │ ├── slipif.pbi.cout │ ├── sockets.o │ ├── sockets.pbi │ ├── sockets.pbi.cout │ ├── startup_stm32f4xx.o │ ├── stats.o │ ├── stats.pbi │ ├── stats.pbi.cout │ ├── stm32f4_discovery.o │ ├── stm32f4_discovery.pbi │ ├── stm32f4_discovery.pbi.cout │ ├── stm32f4x7_eth.o │ ├── stm32f4x7_eth.pbi │ ├── stm32f4x7_eth.pbi.cout │ ├── stm32f4x7_eth_bsp.o │ ├── stm32f4x7_eth_bsp.pbi │ ├── stm32f4x7_eth_bsp.pbi.cout │ ├── stm32f4xx_adc.o │ ├── stm32f4xx_adc.pbi │ ├── stm32f4xx_adc.pbi.cout │ ├── stm32f4xx_can.o │ ├── stm32f4xx_can.pbi │ ├── stm32f4xx_can.pbi.cout │ ├── stm32f4xx_crc.o │ ├── stm32f4xx_crc.pbi │ ├── stm32f4xx_crc.pbi.cout │ ├── stm32f4xx_cryp.o │ ├── stm32f4xx_cryp.pbi │ ├── stm32f4xx_cryp.pbi.cout │ ├── stm32f4xx_cryp_aes.o │ ├── stm32f4xx_cryp_aes.pbi │ ├── stm32f4xx_cryp_aes.pbi.cout │ ├── stm32f4xx_cryp_des.o │ ├── stm32f4xx_cryp_des.pbi │ ├── stm32f4xx_cryp_des.pbi.cout │ ├── stm32f4xx_cryp_tdes.o │ ├── stm32f4xx_cryp_tdes.pbi │ ├── stm32f4xx_cryp_tdes.pbi.cout │ ├── stm32f4xx_dac.o │ ├── stm32f4xx_dac.pbi │ ├── stm32f4xx_dac.pbi.cout │ ├── stm32f4xx_dbgmcu.o │ ├── stm32f4xx_dbgmcu.pbi │ ├── stm32f4xx_dbgmcu.pbi.cout │ ├── stm32f4xx_dcmi.o │ ├── stm32f4xx_dcmi.pbi │ ├── stm32f4xx_dcmi.pbi.cout │ ├── stm32f4xx_dma.o │ ├── stm32f4xx_dma.pbi │ ├── stm32f4xx_dma.pbi.cout │ ├── stm32f4xx_exti.o │ ├── stm32f4xx_exti.pbi │ ├── stm32f4xx_exti.pbi.cout │ ├── stm32f4xx_flash.o │ ├── stm32f4xx_flash.pbi │ ├── stm32f4xx_flash.pbi.cout │ ├── stm32f4xx_fsmc.o │ ├── stm32f4xx_fsmc.pbi │ ├── stm32f4xx_fsmc.pbi.cout │ ├── stm32f4xx_gpio.o │ ├── stm32f4xx_gpio.pbi │ ├── stm32f4xx_gpio.pbi.cout │ ├── stm32f4xx_hash.o │ ├── stm32f4xx_hash.pbi │ ├── stm32f4xx_hash.pbi.cout │ ├── stm32f4xx_hash_md5.o │ ├── stm32f4xx_hash_md5.pbi │ ├── stm32f4xx_hash_md5.pbi.cout │ ├── stm32f4xx_hash_sha1.o │ ├── stm32f4xx_hash_sha1.pbi │ ├── stm32f4xx_hash_sha1.pbi.cout │ ├── stm32f4xx_i2c.o │ ├── stm32f4xx_i2c.pbi │ ├── stm32f4xx_i2c.pbi.cout │ ├── stm32f4xx_it.o │ ├── stm32f4xx_it.pbi │ ├── stm32f4xx_it.pbi.cout │ ├── stm32f4xx_iwdg.o │ ├── stm32f4xx_iwdg.pbi │ ├── stm32f4xx_iwdg.pbi.cout │ ├── stm32f4xx_pwr.o │ ├── stm32f4xx_pwr.pbi │ ├── stm32f4xx_pwr.pbi.cout │ ├── stm32f4xx_rcc.o │ ├── stm32f4xx_rcc.pbi │ ├── stm32f4xx_rcc.pbi.cout │ ├── stm32f4xx_rng.o │ ├── stm32f4xx_rng.pbi │ ├── stm32f4xx_rng.pbi.cout │ ├── stm32f4xx_rtc.o │ ├── stm32f4xx_rtc.pbi │ ├── stm32f4xx_rtc.pbi.cout │ ├── stm32f4xx_sdio.o │ ├── stm32f4xx_sdio.pbi │ ├── stm32f4xx_sdio.pbi.cout │ ├── stm32f4xx_spi.o │ ├── stm32f4xx_spi.pbi │ ├── stm32f4xx_spi.pbi.cout │ ├── stm32f4xx_syscfg.o │ ├── stm32f4xx_syscfg.pbi │ ├── stm32f4xx_syscfg.pbi.cout │ ├── stm32f4xx_tim.o │ ├── stm32f4xx_tim.pbi │ ├── stm32f4xx_tim.pbi.cout │ ├── stm32f4xx_usart.o │ ├── stm32f4xx_usart.pbi │ ├── stm32f4xx_usart.pbi.cout │ ├── stm32f4xx_wwdg.o │ ├── stm32f4xx_wwdg.pbi │ ├── stm32f4xx_wwdg.pbi.cout │ ├── sys.o │ ├── sys.pbi │ ├── sys.pbi.cout │ ├── sys_arch.o │ ├── sys_arch.pbi │ ├── sys_arch.pbi.cout │ ├── system_stm32f4xx.o │ ├── system_stm32f4xx.pbi │ ├── system_stm32f4xx.pbi.cout │ ├── tasks.o │ ├── tasks.pbi │ ├── tasks.pbi.cout │ ├── tcp.o │ ├── tcp.pbi │ ├── tcp.pbi.cout │ ├── tcp_in.o │ ├── tcp_in.pbi │ ├── tcp_in.pbi.cout │ ├── tcp_out.o │ ├── tcp_out.pbi │ ├── tcp_out.pbi.cout │ ├── tcpip.o │ ├── tcpip.pbi │ ├── tcpip.pbi.cout │ ├── timers.o │ ├── timers.pbi │ ├── timers.pbi.cout │ ├── udp.o │ ├── udp.pbi │ └── udp.pbi.cout ├── FreeRTOS ├── croutine.c ├── event_groups.c ├── include │ ├── FreeRTOS.h │ ├── FreeRTOSConfig.h │ ├── StackMacros.h │ ├── croutine.h │ ├── deprecated_definitions.h │ ├── event_groups.h │ ├── list.h │ ├── mpu_wrappers.h │ ├── portable.h │ ├── projdefs.h │ ├── queue.h │ ├── semphr.h │ ├── stdint.readme │ ├── task.h │ └── timers.h ├── list.c ├── portable │ ├── IAR │ │ └── ARM_CM4F │ │ │ ├── port.c │ │ │ ├── portasm.s │ │ │ └── portmacro.h │ └── MemMang │ │ ├── heap_1.c │ │ ├── heap_2.c │ │ ├── heap_3.c │ │ ├── heap_4.c │ │ └── heap_5.c ├── queue.c ├── readme.txt ├── tasks.c └── timers.c ├── README.md ├── STM32F4-Discovery ├── stm32f4_discovery.c └── stm32f4_discovery.h ├── STM32F4x7_ETH_Driver ├── Release_Notes.html ├── inc │ ├── stm32f4x7_eth.h │ └── stm32f4x7_eth_conf_template.h └── src │ └── stm32f4x7_eth.c ├── STM32F4xx_StdPeriph_Driver ├── Release_Notes.html ├── inc │ ├── misc.h │ ├── stm32f4xx_adc.h │ ├── stm32f4xx_can.h │ ├── stm32f4xx_crc.h │ ├── stm32f4xx_cryp.h │ ├── stm32f4xx_dac.h │ ├── stm32f4xx_dbgmcu.h │ ├── stm32f4xx_dcmi.h │ ├── stm32f4xx_dma.h │ ├── stm32f4xx_exti.h │ ├── stm32f4xx_flash.h │ ├── stm32f4xx_fsmc.h │ ├── stm32f4xx_gpio.h │ ├── stm32f4xx_hash.h │ ├── stm32f4xx_i2c.h │ ├── stm32f4xx_iwdg.h │ ├── stm32f4xx_pwr.h │ ├── stm32f4xx_rcc.h │ ├── stm32f4xx_rng.h │ ├── stm32f4xx_rtc.h │ ├── stm32f4xx_sdio.h │ ├── stm32f4xx_spi.h │ ├── stm32f4xx_syscfg.h │ ├── stm32f4xx_tim.h │ ├── stm32f4xx_usart.h │ └── stm32f4xx_wwdg.h └── src │ ├── misc.c │ ├── stm32f4xx_adc.c │ ├── stm32f4xx_can.c │ ├── stm32f4xx_crc.c │ ├── stm32f4xx_cryp.c │ ├── stm32f4xx_cryp_aes.c │ ├── stm32f4xx_cryp_des.c │ ├── stm32f4xx_cryp_tdes.c │ ├── stm32f4xx_dac.c │ ├── stm32f4xx_dbgmcu.c │ ├── stm32f4xx_dcmi.c │ ├── stm32f4xx_dma.c │ ├── stm32f4xx_exti.c │ ├── stm32f4xx_flash.c │ ├── stm32f4xx_fsmc.c │ ├── stm32f4xx_gpio.c │ ├── stm32f4xx_hash.c │ ├── stm32f4xx_hash_md5.c │ ├── stm32f4xx_hash_sha1.c │ ├── stm32f4xx_i2c.c │ ├── stm32f4xx_iwdg.c │ ├── stm32f4xx_pwr.c │ ├── stm32f4xx_rcc.c │ ├── stm32f4xx_rng.c │ ├── stm32f4xx_rtc.c │ ├── stm32f4xx_sdio.c │ ├── stm32f4xx_spi.c │ ├── stm32f4xx_syscfg.c │ ├── stm32f4xx_tim.c │ ├── stm32f4xx_usart.c │ └── stm32f4xx_wwdg.c ├── ethernet.dep ├── ethernet.ewd ├── ethernet.ewp ├── ethernet.ewt ├── ethernet.eww ├── http_server.c ├── http_server.h ├── lwip ├── CHANGELOG ├── COPYING ├── FILES ├── README ├── UPGRADING ├── doc │ ├── FILES │ ├── contrib.txt │ ├── rawapi.txt │ ├── savannah.txt │ ├── snmp_agent.txt │ └── sys_arch.txt ├── port │ ├── ethernetif.c │ ├── ethernetif.h │ ├── include │ │ └── arch │ │ │ ├── bpstruct.h │ │ │ ├── cc.h │ │ │ ├── cpu.h │ │ │ ├── epstruct.h │ │ │ ├── perf.h │ │ │ └── sys_arch.h │ └── sys_arch.c └── src │ ├── FILES │ ├── api │ ├── api_lib.c │ ├── api_msg.c │ ├── err.c │ ├── netbuf.c │ ├── netdb.c │ ├── netifapi.c │ ├── sockets.c │ └── tcpip.c │ ├── core │ ├── def.c │ ├── dhcp.c │ ├── dns.c │ ├── init.c │ ├── ipv4 │ │ ├── autoip.c │ │ ├── icmp.c │ │ ├── igmp.c │ │ ├── inet.c │ │ ├── inet_chksum.c │ │ ├── ip.c │ │ ├── ip_addr.c │ │ └── ip_frag.c │ ├── ipv6 │ │ ├── README │ │ ├── icmp6.c │ │ ├── inet6.c │ │ ├── ip6.c │ │ └── ip6_addr.c │ ├── mem.c │ ├── memp.c │ ├── netif.c │ ├── pbuf.c │ ├── raw.c │ ├── snmp │ │ ├── asn1_dec.c │ │ ├── asn1_enc.c │ │ ├── mib2.c │ │ ├── mib_structs.c │ │ ├── msg_in.c │ │ └── msg_out.c │ ├── stats.c │ ├── sys.c │ ├── tcp.c │ ├── tcp_in.c │ ├── tcp_out.c │ ├── timers.c │ └── udp.c │ ├── include │ ├── ipv4 │ │ └── lwip │ │ │ ├── autoip.h │ │ │ ├── icmp.h │ │ │ ├── igmp.h │ │ │ ├── inet.h │ │ │ ├── inet_chksum.h │ │ │ ├── ip.h │ │ │ ├── ip_addr.h │ │ │ └── ip_frag.h │ ├── ipv6 │ │ └── lwip │ │ │ ├── icmp.h │ │ │ ├── inet.h │ │ │ ├── ip.h │ │ │ └── ip_addr.h │ ├── lwip │ │ ├── api.h │ │ ├── api_msg.h │ │ ├── arch.h │ │ ├── debug.h │ │ ├── def.h │ │ ├── dhcp.h │ │ ├── dns.h │ │ ├── err.h │ │ ├── init.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 │ ├── netif │ │ ├── etharp.h │ │ ├── ppp_oe.h │ │ └── slipif.h │ └── posix │ │ ├── netdb.h │ │ └── sys │ │ └── socket.h │ └── netif │ ├── FILES │ ├── etharp.c │ ├── ethernetif.c │ ├── ppp │ ├── auth.c │ ├── auth.h │ ├── chap.c │ ├── chap.h │ ├── chpms.c │ ├── chpms.h │ ├── fsm.c │ ├── fsm.h │ ├── ipcp.c │ ├── ipcp.h │ ├── lcp.c │ ├── lcp.h │ ├── magic.c │ ├── magic.h │ ├── md5.c │ ├── md5.h │ ├── pap.c │ ├── pap.h │ ├── ppp.c │ ├── ppp.h │ ├── ppp_impl.h │ ├── ppp_oe.c │ ├── pppdebug.h │ ├── randm.c │ ├── randm.h │ ├── vj.c │ └── vj.h │ └── slipif.c ├── lwipopts.h ├── main.c ├── main.h ├── settings ├── ethernet.Debug.cspy.bat ├── ethernet.crun ├── ethernet.cspy.bat ├── ethernet.dbgdt ├── ethernet.dni ├── ethernet.wsdt └── ethernet.wspos ├── stm32f4x7_eth_bsp.c ├── stm32f4x7_eth_bsp.h ├── stm32f4x7_eth_conf.h ├── stm32f4xx_conf.h ├── stm32f4xx_it.c └── stm32f4xx_it.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Object files 2 | *.o 3 | *.ko 4 | *.obj 5 | *.elf 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Libraries 12 | *.lib 13 | *.a 14 | *.la 15 | *.lo 16 | 17 | # Shared objects (inc. Windows DLLs) 18 | *.dll 19 | *.so 20 | *.so.* 21 | *.dylib 22 | 23 | # Executables 24 | *.exe 25 | *.out 26 | *.app 27 | *.i*86 28 | *.x86_64 29 | *.hex 30 | -------------------------------------------------------------------------------- /CMSIS/CMSIS END USER LICENCE AGREEMENT.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/CMSIS/CMSIS END USER LICENCE AGREEMENT.pdf -------------------------------------------------------------------------------- /CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h -------------------------------------------------------------------------------- /CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file system_stm32f4xx.h 4 | * @author MCD Application Team 5 | * @version V1.0.0 6 | * @date 19-September-2011 7 | * @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 17 | * 18 | *

© Portions COPYRIGHT 2011 STMicroelectronics

19 | ****************************************************************************** 20 | */ 21 | /** 22 | ****************************************************************************** 23 | *

© Portions COPYRIGHT 2012 Embest Tech. Co., Ltd.

24 | * @file system_stm32f4xx.h 25 | * @author CMP Team 26 | * @version V1.0.0 27 | * @date 28-December-2012 28 | * @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices. 29 | * Modified to support the STM32F4DISCOVERY, STM32F4DIS-BB, STM32F4DIS-CAM 30 | * and STM32F4DIS-LCD modules. 31 | ****************************************************************************** 32 | * @attention 33 | * 34 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 35 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 36 | * TIME. AS A RESULT, Embest SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT 37 | * OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT 38 | * OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION 39 | * CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 40 | ****************************************************************************** 41 | */ 42 | /** @addtogroup CMSIS 43 | * @{ 44 | */ 45 | 46 | /** @addtogroup stm32f4xx_system 47 | * @{ 48 | */ 49 | 50 | /** 51 | * @brief Define to prevent recursive inclusion 52 | */ 53 | #ifndef __SYSTEM_STM32F4XX_H 54 | #define __SYSTEM_STM32F4XX_H 55 | 56 | #ifdef __cplusplus 57 | extern "C" { 58 | #endif 59 | 60 | /** @addtogroup STM32F4xx_System_Includes 61 | * @{ 62 | */ 63 | 64 | /** 65 | * @} 66 | */ 67 | 68 | 69 | /** @addtogroup STM32F4xx_System_Exported_types 70 | * @{ 71 | */ 72 | 73 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 74 | 75 | 76 | /** 77 | * @} 78 | */ 79 | 80 | /** @addtogroup STM32F4xx_System_Exported_Constants 81 | * @{ 82 | */ 83 | 84 | /** 85 | * @} 86 | */ 87 | 88 | /** @addtogroup STM32F4xx_System_Exported_Macros 89 | * @{ 90 | */ 91 | 92 | /** 93 | * @} 94 | */ 95 | 96 | /** @addtogroup STM32F4xx_System_Exported_Functions 97 | * @{ 98 | */ 99 | 100 | extern void SystemInit(void); 101 | extern void SystemCoreClockUpdate(void); 102 | /** 103 | * @} 104 | */ 105 | 106 | #ifdef __cplusplus 107 | } 108 | #endif 109 | 110 | #endif /*__SYSTEM_STM32F4XX_H */ 111 | 112 | /** 113 | * @} 114 | */ 115 | 116 | /** 117 | * @} 118 | */ 119 | /*********** Portions COPYRIGHT 2012 Embest Tech. Co., Ltd.*****END OF FILE****/ 120 | -------------------------------------------------------------------------------- /CMSIS/Documentation/CMSIS_CM4_SIMD.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/CMSIS/Documentation/CMSIS_CM4_SIMD.htm -------------------------------------------------------------------------------- /CMSIS/Documentation/CMSIS_Core.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/CMSIS/Documentation/CMSIS_Core.htm -------------------------------------------------------------------------------- /CMSIS/Documentation/CMSIS_DebugSupport.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/CMSIS/Documentation/CMSIS_DebugSupport.htm -------------------------------------------------------------------------------- /CMSIS/Documentation/CMSIS_History.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/CMSIS/Documentation/CMSIS_History.htm -------------------------------------------------------------------------------- /CMSIS/Documentation/CMSIS_Logo_Final.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/CMSIS/Documentation/CMSIS_Logo_Final.jpg -------------------------------------------------------------------------------- /CMSIS/Documentation/CMSIS_System_View_Description.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/CMSIS/Documentation/CMSIS_System_View_Description.htm -------------------------------------------------------------------------------- /CMSIS/Include/arm_common_tables.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------- 2 | * Copyright (C) 2010 ARM Limited. All rights reserved. 3 | * 4 | * $Date: 11. November 2010 5 | * $Revision: V1.0.2 6 | * 7 | * Project: CMSIS DSP Library 8 | * Title: arm_common_tables.h 9 | * 10 | * Description: This file has extern declaration for common tables like Bitreverse, reciprocal etc which are used across different functions 11 | * 12 | * Target Processor: Cortex-M4/Cortex-M3 13 | * 14 | * Version 1.0.2 2010/11/11 15 | * Documentation updated. 16 | * 17 | * Version 1.0.1 2010/10/05 18 | * Production release and review comments incorporated. 19 | * 20 | * Version 1.0.0 2010/09/20 21 | * Production release and review comments incorporated. 22 | * -------------------------------------------------------------------- */ 23 | 24 | #ifndef _ARM_COMMON_TABLES_H 25 | #define _ARM_COMMON_TABLES_H 26 | 27 | #include "arm_math.h" 28 | 29 | extern uint16_t armBitRevTable[256]; 30 | extern q15_t armRecipTableQ15[64]; 31 | extern q31_t armRecipTableQ31[64]; 32 | extern const q31_t realCoefAQ31[1024]; 33 | extern const q31_t realCoefBQ31[1024]; 34 | 35 | #endif /* ARM_COMMON_TABLES_H */ 36 | -------------------------------------------------------------------------------- /CMSIS/README.txt: -------------------------------------------------------------------------------- 1 | * ------------------------------------------------------------------- 2 | * Copyright (C) 2011 ARM Limited. All rights reserved. 3 | * 4 | * Date: 25 July 2011 5 | * Revision: V2.10 6 | * 7 | * Project: Cortex Microcontroller Software Interface Standard (CMSIS) 8 | * Title: Release Note for CMSIS 9 | * 10 | * ------------------------------------------------------------------- 11 | 12 | 13 | NOTE - Open the index.html file to access CMSIS documentation 14 | 15 | 16 | The Cortex Microcontroller Software Interface Standard (CMSIS) provides a single standard across all 17 | Cortex-Mx processor series vendors. It enables code re-use and code sharing across software projects 18 | and reduces time-to-market for new embedded applications. 19 | 20 | CMSIS is released under the terms of the end user license agreement ("CMSIS END USER LICENCE AGREEMENT.pdf"). 21 | Any user of the software package is bound to the terms and conditions of the end user license agreement. 22 | 23 | 24 | You will find the following sub-directories: 25 | 26 | Documentation - Contains CMSIS documentation. 27 | 28 | DSP_Lib - MDK project files, Examples and source files etc.. to build the 29 | CMSIS DSP Software Library for Cortex-M0, Cortex-M3, Cortex-M4 processors. 30 | 31 | Include - CMSIS Core Support and CMSIS DSP Include Files. 32 | 33 | Lib - CMSIS DSP Binaries 34 | --- -------------------------------------------------------------------------------- /CMSIS/index.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/CMSIS/index.htm -------------------------------------------------------------------------------- /Debug/Exe/c.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Exe/c.out -------------------------------------------------------------------------------- /Debug/Exe/c.sim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Exe/c.sim -------------------------------------------------------------------------------- /Debug/Obj/api_lib.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/api_lib.o -------------------------------------------------------------------------------- /Debug/Obj/api_lib.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/api_lib.pbi -------------------------------------------------------------------------------- /Debug/Obj/api_msg.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/api_msg.o -------------------------------------------------------------------------------- /Debug/Obj/api_msg.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/api_msg.pbi -------------------------------------------------------------------------------- /Debug/Obj/autoip.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/autoip.o -------------------------------------------------------------------------------- /Debug/Obj/autoip.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/autoip.pbi -------------------------------------------------------------------------------- /Debug/Obj/croutine.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/croutine.o -------------------------------------------------------------------------------- /Debug/Obj/croutine.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/croutine.pbi -------------------------------------------------------------------------------- /Debug/Obj/def.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/def.o -------------------------------------------------------------------------------- /Debug/Obj/def.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/def.pbi -------------------------------------------------------------------------------- /Debug/Obj/dhcp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/dhcp.o -------------------------------------------------------------------------------- /Debug/Obj/dhcp.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/dhcp.pbi -------------------------------------------------------------------------------- /Debug/Obj/dns.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/dns.o -------------------------------------------------------------------------------- /Debug/Obj/dns.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/dns.pbi -------------------------------------------------------------------------------- /Debug/Obj/err.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/err.o -------------------------------------------------------------------------------- /Debug/Obj/err.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/err.pbi -------------------------------------------------------------------------------- /Debug/Obj/etharp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/etharp.o -------------------------------------------------------------------------------- /Debug/Obj/etharp.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/etharp.pbi -------------------------------------------------------------------------------- /Debug/Obj/ethernet.pbd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/ethernet.pbd -------------------------------------------------------------------------------- /Debug/Obj/ethernet.pbd.browse: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/ethernet.pbd.browse -------------------------------------------------------------------------------- /Debug/Obj/ethernetif.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/ethernetif.o -------------------------------------------------------------------------------- /Debug/Obj/ethernetif.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/ethernetif.pbi -------------------------------------------------------------------------------- /Debug/Obj/event_groups.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/event_groups.o -------------------------------------------------------------------------------- /Debug/Obj/event_groups.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/event_groups.pbi -------------------------------------------------------------------------------- /Debug/Obj/fs.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/fs.o -------------------------------------------------------------------------------- /Debug/Obj/fsdata.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/fsdata.o -------------------------------------------------------------------------------- /Debug/Obj/heap_4.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/heap_4.o -------------------------------------------------------------------------------- /Debug/Obj/heap_4.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/heap_4.pbi -------------------------------------------------------------------------------- /Debug/Obj/http_server.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/http_server.o -------------------------------------------------------------------------------- /Debug/Obj/http_server.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/http_server.pbi -------------------------------------------------------------------------------- /Debug/Obj/icmp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/icmp.o -------------------------------------------------------------------------------- /Debug/Obj/icmp.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/icmp.pbi -------------------------------------------------------------------------------- /Debug/Obj/igmp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/igmp.o -------------------------------------------------------------------------------- /Debug/Obj/igmp.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/igmp.pbi -------------------------------------------------------------------------------- /Debug/Obj/inet.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/inet.o -------------------------------------------------------------------------------- /Debug/Obj/inet.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/inet.pbi -------------------------------------------------------------------------------- /Debug/Obj/inet_chksum.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/inet_chksum.o -------------------------------------------------------------------------------- /Debug/Obj/inet_chksum.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/inet_chksum.pbi -------------------------------------------------------------------------------- /Debug/Obj/init.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/init.o -------------------------------------------------------------------------------- /Debug/Obj/init.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/init.pbi -------------------------------------------------------------------------------- /Debug/Obj/ip.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/ip.o -------------------------------------------------------------------------------- /Debug/Obj/ip.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/ip.pbi -------------------------------------------------------------------------------- /Debug/Obj/ip_addr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/ip_addr.o -------------------------------------------------------------------------------- /Debug/Obj/ip_addr.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/ip_addr.pbi -------------------------------------------------------------------------------- /Debug/Obj/ip_frag.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/ip_frag.o -------------------------------------------------------------------------------- /Debug/Obj/ip_frag.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/ip_frag.pbi -------------------------------------------------------------------------------- /Debug/Obj/list.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/list.o -------------------------------------------------------------------------------- /Debug/Obj/list.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/list.pbi -------------------------------------------------------------------------------- /Debug/Obj/main.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/main.o -------------------------------------------------------------------------------- /Debug/Obj/main.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/main.pbi -------------------------------------------------------------------------------- /Debug/Obj/mem.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/mem.o -------------------------------------------------------------------------------- /Debug/Obj/mem.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/mem.pbi -------------------------------------------------------------------------------- /Debug/Obj/memp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/memp.o -------------------------------------------------------------------------------- /Debug/Obj/memp.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/memp.pbi -------------------------------------------------------------------------------- /Debug/Obj/misc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/misc.o -------------------------------------------------------------------------------- /Debug/Obj/misc.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/misc.pbi -------------------------------------------------------------------------------- /Debug/Obj/netbuf.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/netbuf.o -------------------------------------------------------------------------------- /Debug/Obj/netbuf.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/netbuf.pbi -------------------------------------------------------------------------------- /Debug/Obj/netconf.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/netconf.o -------------------------------------------------------------------------------- /Debug/Obj/netdb.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/netdb.o -------------------------------------------------------------------------------- /Debug/Obj/netdb.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/netdb.pbi -------------------------------------------------------------------------------- /Debug/Obj/netif.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/netif.o -------------------------------------------------------------------------------- /Debug/Obj/netif.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/netif.pbi -------------------------------------------------------------------------------- /Debug/Obj/netifapi.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/netifapi.o -------------------------------------------------------------------------------- /Debug/Obj/netifapi.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/netifapi.pbi -------------------------------------------------------------------------------- /Debug/Obj/pbuf.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/pbuf.o -------------------------------------------------------------------------------- /Debug/Obj/pbuf.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/pbuf.pbi -------------------------------------------------------------------------------- /Debug/Obj/port.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/port.o -------------------------------------------------------------------------------- /Debug/Obj/port.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/port.pbi -------------------------------------------------------------------------------- /Debug/Obj/portasm.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/portasm.o -------------------------------------------------------------------------------- /Debug/Obj/queue.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/queue.o -------------------------------------------------------------------------------- /Debug/Obj/queue.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/queue.pbi -------------------------------------------------------------------------------- /Debug/Obj/raw.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/raw.o -------------------------------------------------------------------------------- /Debug/Obj/raw.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/raw.pbi -------------------------------------------------------------------------------- /Debug/Obj/slipif.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/slipif.o -------------------------------------------------------------------------------- /Debug/Obj/slipif.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/slipif.pbi -------------------------------------------------------------------------------- /Debug/Obj/sockets.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/sockets.o -------------------------------------------------------------------------------- /Debug/Obj/sockets.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/sockets.pbi -------------------------------------------------------------------------------- /Debug/Obj/startup_stm32f4xx.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/startup_stm32f4xx.o -------------------------------------------------------------------------------- /Debug/Obj/stats.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stats.o -------------------------------------------------------------------------------- /Debug/Obj/stats.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stats.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4_discovery.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4_discovery.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4_discovery.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4_discovery.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4x7_eth.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4x7_eth.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4x7_eth.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4x7_eth.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4x7_eth_bsp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4x7_eth_bsp.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4x7_eth_bsp.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4x7_eth_bsp.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_adc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_adc.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_adc.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_adc.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_can.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_can.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_can.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_can.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_crc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_crc.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_crc.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_crc.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_cryp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_cryp.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_cryp.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_cryp.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_cryp_aes.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_cryp_aes.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_cryp_aes.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_cryp_aes.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_cryp_des.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_cryp_des.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_cryp_des.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_cryp_des.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_cryp_tdes.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_cryp_tdes.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_cryp_tdes.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_cryp_tdes.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_dac.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_dac.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_dac.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_dac.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_dbgmcu.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_dbgmcu.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_dbgmcu.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_dbgmcu.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_dcmi.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_dcmi.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_dcmi.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_dcmi.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_dma.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_dma.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_dma.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_dma.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_exti.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_exti.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_exti.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_exti.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_flash.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_flash.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_flash.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_flash.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_fsmc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_fsmc.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_fsmc.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_fsmc.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_gpio.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_gpio.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_gpio.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_gpio.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_hash.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_hash.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_hash.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_hash.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_hash_md5.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_hash_md5.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_hash_md5.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_hash_md5.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_hash_sha1.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_hash_sha1.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_hash_sha1.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_hash_sha1.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_i2c.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_i2c.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_i2c.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_i2c.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_it.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_it.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_it.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_it.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_iwdg.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_iwdg.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_iwdg.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_iwdg.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_pwr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_pwr.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_pwr.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_pwr.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_rcc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_rcc.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_rcc.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_rcc.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_rng.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_rng.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_rng.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_rng.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_rtc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_rtc.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_rtc.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_rtc.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_sdio.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_sdio.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_sdio.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_sdio.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_spi.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_spi.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_spi.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_spi.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_syscfg.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_syscfg.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_syscfg.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_syscfg.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_tim.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_tim.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_tim.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_tim.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_usart.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_usart.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_usart.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_usart.pbi -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_wwdg.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_wwdg.o -------------------------------------------------------------------------------- /Debug/Obj/stm32f4xx_wwdg.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/stm32f4xx_wwdg.pbi -------------------------------------------------------------------------------- /Debug/Obj/sys.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/sys.o -------------------------------------------------------------------------------- /Debug/Obj/sys.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/sys.pbi -------------------------------------------------------------------------------- /Debug/Obj/sys_arch.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/sys_arch.o -------------------------------------------------------------------------------- /Debug/Obj/sys_arch.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/sys_arch.pbi -------------------------------------------------------------------------------- /Debug/Obj/system_stm32f4xx.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/system_stm32f4xx.o -------------------------------------------------------------------------------- /Debug/Obj/system_stm32f4xx.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/system_stm32f4xx.pbi -------------------------------------------------------------------------------- /Debug/Obj/tasks.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/tasks.o -------------------------------------------------------------------------------- /Debug/Obj/tasks.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/tasks.pbi -------------------------------------------------------------------------------- /Debug/Obj/tcp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/tcp.o -------------------------------------------------------------------------------- /Debug/Obj/tcp.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/tcp.pbi -------------------------------------------------------------------------------- /Debug/Obj/tcp_in.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/tcp_in.o -------------------------------------------------------------------------------- /Debug/Obj/tcp_in.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/tcp_in.pbi -------------------------------------------------------------------------------- /Debug/Obj/tcp_out.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/tcp_out.o -------------------------------------------------------------------------------- /Debug/Obj/tcp_out.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/tcp_out.pbi -------------------------------------------------------------------------------- /Debug/Obj/tcpip.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/tcpip.o -------------------------------------------------------------------------------- /Debug/Obj/tcpip.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/tcpip.pbi -------------------------------------------------------------------------------- /Debug/Obj/timers.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/timers.o -------------------------------------------------------------------------------- /Debug/Obj/timers.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/timers.pbi -------------------------------------------------------------------------------- /Debug/Obj/udp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/udp.o -------------------------------------------------------------------------------- /Debug/Obj/udp.pbi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/Debug/Obj/udp.pbi -------------------------------------------------------------------------------- /FreeRTOS/include/stdint.readme: -------------------------------------------------------------------------------- 1 | 2 | #ifndef FREERTOS_STDINT 3 | #define FREERTOS_STDINT 4 | 5 | /******************************************************************************* 6 | * THIS IS NOT A FULL stdint.h IMPLEMENTATION - It only contains the definitions 7 | * necessary to build the FreeRTOS code. It is provided to allow FreeRTOS to be 8 | * built using compilers that do not provide their own stdint.h definition. 9 | * 10 | * To use this file: 11 | * 12 | * 1) Copy this file into the directory that contains your FreeRTOSConfig.h 13 | * header file, as that directory will already be in the compilers include 14 | * path. 15 | * 16 | * 2) Rename the copied file stdint.h. 17 | * 18 | */ 19 | 20 | typedef signed char int8_t; 21 | typedef unsigned char uint8_t; 22 | typedef short int16_t; 23 | typedef unsigned short uint16_t; 24 | typedef long int32_t; 25 | typedef unsigned long uint32_t; 26 | 27 | #endif /* FREERTOS_STDINT */ 28 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | FreeRTOS 8.2 + LwIP 1.4.1 + LAN8720 + stm32f4-discovery example. 2 | 3 | Board addr: 192.168.1.2 4 | Mask: 255.255.255.0 5 | Gw: 192.168.1.1 6 | -------------------------------------------------------------------------------- /STM32F4x7_ETH_Driver/inc/stm32f4x7_eth.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/STM32F4x7_ETH_Driver/inc/stm32f4x7_eth.h -------------------------------------------------------------------------------- /STM32F4x7_ETH_Driver/inc/stm32f4x7_eth_conf_template.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f4x7_eth_conf_template.h 4 | * @author MCD Application Team 5 | * @version V1.0.0 6 | * @date 14-October-2011 7 | * @brief Configuration file for the STM32F407xx/417xx Ethernet driver. 8 | * This file should be copied to the application folder and renamed to 9 | * stm32f4x7_eth_conf.h 10 | ****************************************************************************** 11 | * @attention 12 | * 13 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 14 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 15 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 16 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 17 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 18 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 19 | * 20 | *

© COPYRIGHT 2011 STMicroelectronics

21 | ****************************************************************************** 22 | */ 23 | 24 | /* Define to prevent recursive inclusion -------------------------------------*/ 25 | #ifndef __STM32F4x7_ETH_CONF_H 26 | #define __STM32F4x7_ETH_CONF_H 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | /* Includes ------------------------------------------------------------------*/ 33 | #include "stm32f4xx.h" 34 | 35 | /* Exported types ------------------------------------------------------------*/ 36 | /* Exported constants --------------------------------------------------------*/ 37 | 38 | /* Uncomment the line below when using time stamping and/or IPv4 checksum offload */ 39 | #define USE_ENHANCED_DMA_DESCRIPTORS 40 | 41 | /* Uncomment the line below if you want to use user defined Delay function 42 | (for precise timing), otherwise default _eth_delay_ function defined within 43 | the Ethernet driver is used (less precise timing) */ 44 | //#define USE_Delay 45 | 46 | #ifdef USE_Delay 47 | #include "main.h" /* Header file where the Delay function prototype is exported */ 48 | #define _eth_delay_ Delay /* User can provide more timing precise _eth_delay_ function */ 49 | #else 50 | #define _eth_delay_ ETH_Delay /* Default _eth_delay_ function with less precise timing */ 51 | #endif 52 | 53 | /* Uncomment the line below to allow custom configuration of the Ethernet driver buffers */ 54 | //#define CUSTOM_DRIVER_BUFFERS_CONFIG 55 | 56 | #ifdef CUSTOM_DRIVER_BUFFERS_CONFIG 57 | /* Redefinition of the Ethernet driver buffers size and count */ 58 | #define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ 59 | #define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ 60 | #define ETH_RXBUFNB 20 /* 20 Rx buffers of size ETH_RX_BUF_SIZE */ 61 | #define ETH_TXBUFNB 5 /* 5 Tx buffers of size ETH_TX_BUF_SIZE */ 62 | #endif 63 | 64 | 65 | /* PHY configuration section **************************************************/ 66 | /* PHY Reset delay */ 67 | #define PHY_RESET_DELAY ((uint32_t)0x000FFFFF) 68 | /* PHY Configuration delay */ 69 | #define PHY_CONFIG_DELAY ((uint32_t)0x00FFFFFF) 70 | 71 | /* The PHY status register value change from a PHY to another, so the user have 72 | to update this value depending on the used external PHY */ 73 | #define PHY_SR ((uint16_t)16) /* Value for DP83848 PHY */ 74 | 75 | /* The Speed and Duplex mask values change from a PHY to another, so the user 76 | have to update this value depending on the used external PHY */ 77 | #define PHY_SPEED_STATUS ((uint16_t)0x0002) /* Value for DP83848 PHY */ 78 | #define PHY_DUPLEX_STATUS ((uint16_t)0x0004) /* Value for DP83848 PHY */ 79 | 80 | 81 | /* Exported macro ------------------------------------------------------------*/ 82 | /* Exported functions ------------------------------------------------------- */ 83 | 84 | #ifdef __cplusplus 85 | } 86 | #endif 87 | 88 | #endif /* __STM32F4x7_ETH_CONF_H */ 89 | 90 | 91 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ 92 | 93 | -------------------------------------------------------------------------------- /STM32F4x7_ETH_Driver/src/stm32f4x7_eth.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/STM32F4x7_ETH_Driver/src/stm32f4x7_eth.c -------------------------------------------------------------------------------- /STM32F4xx_StdPeriph_Driver/Release_Notes.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/STM32F4xx_StdPeriph_Driver/Release_Notes.html -------------------------------------------------------------------------------- /STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_crc.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f4xx_crc.h 4 | * @author MCD Application Team 5 | * @version V1.0.2 6 | * @date 05-March-2012 7 | * @brief This file contains all the functions prototypes for the CRC firmware 8 | * library. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | *

© COPYRIGHT 2012 STMicroelectronics

13 | * 14 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 15 | * You may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at: 17 | * 18 | * http://www.st.com/software_license_agreement_liberty_v2 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * 26 | ****************************************************************************** 27 | */ 28 | 29 | /* Define to prevent recursive inclusion -------------------------------------*/ 30 | #ifndef __STM32F4xx_CRC_H 31 | #define __STM32F4xx_CRC_H 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | /* Includes ------------------------------------------------------------------*/ 38 | #include "stm32f4xx.h" 39 | 40 | /** @addtogroup STM32F4xx_StdPeriph_Driver 41 | * @{ 42 | */ 43 | 44 | /** @addtogroup CRC 45 | * @{ 46 | */ 47 | 48 | /* Exported types ------------------------------------------------------------*/ 49 | /* Exported constants --------------------------------------------------------*/ 50 | 51 | /** @defgroup CRC_Exported_Constants 52 | * @{ 53 | */ 54 | 55 | /** 56 | * @} 57 | */ 58 | 59 | /* Exported macro ------------------------------------------------------------*/ 60 | /* Exported functions --------------------------------------------------------*/ 61 | 62 | void CRC_ResetDR(void); 63 | uint32_t CRC_CalcCRC(uint32_t Data); 64 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength); 65 | uint32_t CRC_GetCRC(void); 66 | void CRC_SetIDRegister(uint8_t IDValue); 67 | uint8_t CRC_GetIDRegister(void); 68 | 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | 73 | #endif /* __STM32F4xx_CRC_H */ 74 | 75 | /** 76 | * @} 77 | */ 78 | 79 | /** 80 | * @} 81 | */ 82 | 83 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 84 | -------------------------------------------------------------------------------- /STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_rng.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f4xx_rng.h 4 | * @author MCD Application Team 5 | * @version V1.0.2 6 | * @date 05-March-2012 7 | * @brief This file contains all the functions prototypes for the Random 8 | * Number Generator(RNG) firmware library. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | *

© COPYRIGHT 2012 STMicroelectronics

13 | * 14 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 15 | * You may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at: 17 | * 18 | * http://www.st.com/software_license_agreement_liberty_v2 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * 26 | ****************************************************************************** 27 | */ 28 | 29 | /* Define to prevent recursive inclusion -------------------------------------*/ 30 | #ifndef __STM32F4xx_RNG_H 31 | #define __STM32F4xx_RNG_H 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | /* Includes ------------------------------------------------------------------*/ 38 | #include "stm32f4xx.h" 39 | 40 | /** @addtogroup STM32F4xx_StdPeriph_Driver 41 | * @{ 42 | */ 43 | 44 | /** @addtogroup RNG 45 | * @{ 46 | */ 47 | 48 | /* Exported types ------------------------------------------------------------*/ 49 | /* Exported constants --------------------------------------------------------*/ 50 | 51 | /** @defgroup RNG_Exported_Constants 52 | * @{ 53 | */ 54 | 55 | /** @defgroup RNG_flags_definition 56 | * @{ 57 | */ 58 | #define RNG_FLAG_DRDY ((uint8_t)0x0001) /*!< Data ready */ 59 | #define RNG_FLAG_CECS ((uint8_t)0x0002) /*!< Clock error current status */ 60 | #define RNG_FLAG_SECS ((uint8_t)0x0004) /*!< Seed error current status */ 61 | 62 | #define IS_RNG_GET_FLAG(RNG_FLAG) (((RNG_FLAG) == RNG_FLAG_DRDY) || \ 63 | ((RNG_FLAG) == RNG_FLAG_CECS) || \ 64 | ((RNG_FLAG) == RNG_FLAG_SECS)) 65 | #define IS_RNG_CLEAR_FLAG(RNG_FLAG) (((RNG_FLAG) == RNG_FLAG_CECS) || \ 66 | ((RNG_FLAG) == RNG_FLAG_SECS)) 67 | /** 68 | * @} 69 | */ 70 | 71 | /** @defgroup RNG_interrupts_definition 72 | * @{ 73 | */ 74 | #define RNG_IT_CEI ((uint8_t)0x20) /*!< Clock error interrupt */ 75 | #define RNG_IT_SEI ((uint8_t)0x40) /*!< Seed error interrupt */ 76 | 77 | #define IS_RNG_IT(IT) ((((IT) & (uint8_t)0x9F) == 0x00) && ((IT) != 0x00)) 78 | #define IS_RNG_GET_IT(RNG_IT) (((RNG_IT) == RNG_IT_CEI) || ((RNG_IT) == RNG_IT_SEI)) 79 | /** 80 | * @} 81 | */ 82 | 83 | /** 84 | * @} 85 | */ 86 | 87 | /* Exported macro ------------------------------------------------------------*/ 88 | /* Exported functions --------------------------------------------------------*/ 89 | 90 | /* Function used to set the RNG configuration to the default reset state *****/ 91 | void RNG_DeInit(void); 92 | 93 | /* Configuration function *****************************************************/ 94 | void RNG_Cmd(FunctionalState NewState); 95 | 96 | /* Get 32 bit Random number function ******************************************/ 97 | uint32_t RNG_GetRandomNumber(void); 98 | 99 | /* Interrupts and flags management functions **********************************/ 100 | void RNG_ITConfig(FunctionalState NewState); 101 | FlagStatus RNG_GetFlagStatus(uint8_t RNG_FLAG); 102 | void RNG_ClearFlag(uint8_t RNG_FLAG); 103 | ITStatus RNG_GetITStatus(uint8_t RNG_IT); 104 | void RNG_ClearITPendingBit(uint8_t RNG_IT); 105 | 106 | #ifdef __cplusplus 107 | } 108 | #endif 109 | 110 | #endif /*__STM32F4xx_RNG_H */ 111 | 112 | /** 113 | * @} 114 | */ 115 | 116 | /** 117 | * @} 118 | */ 119 | 120 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 121 | -------------------------------------------------------------------------------- /STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_wwdg.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f4xx_wwdg.h 4 | * @author MCD Application Team 5 | * @version V1.0.2 6 | * @date 05-March-2012 7 | * @brief This file contains all the functions prototypes for the WWDG firmware 8 | * library. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | *

© COPYRIGHT 2012 STMicroelectronics

13 | * 14 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 15 | * You may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at: 17 | * 18 | * http://www.st.com/software_license_agreement_liberty_v2 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * 26 | ****************************************************************************** 27 | */ 28 | 29 | /* Define to prevent recursive inclusion -------------------------------------*/ 30 | #ifndef __STM32F4xx_WWDG_H 31 | #define __STM32F4xx_WWDG_H 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | /* Includes ------------------------------------------------------------------*/ 38 | #include "stm32f4xx.h" 39 | 40 | /** @addtogroup STM32F4xx_StdPeriph_Driver 41 | * @{ 42 | */ 43 | 44 | /** @addtogroup WWDG 45 | * @{ 46 | */ 47 | 48 | /* Exported types ------------------------------------------------------------*/ 49 | /* Exported constants --------------------------------------------------------*/ 50 | 51 | /** @defgroup WWDG_Exported_Constants 52 | * @{ 53 | */ 54 | 55 | /** @defgroup WWDG_Prescaler 56 | * @{ 57 | */ 58 | 59 | #define WWDG_Prescaler_1 ((uint32_t)0x00000000) 60 | #define WWDG_Prescaler_2 ((uint32_t)0x00000080) 61 | #define WWDG_Prescaler_4 ((uint32_t)0x00000100) 62 | #define WWDG_Prescaler_8 ((uint32_t)0x00000180) 63 | #define IS_WWDG_PRESCALER(PRESCALER) (((PRESCALER) == WWDG_Prescaler_1) || \ 64 | ((PRESCALER) == WWDG_Prescaler_2) || \ 65 | ((PRESCALER) == WWDG_Prescaler_4) || \ 66 | ((PRESCALER) == WWDG_Prescaler_8)) 67 | #define IS_WWDG_WINDOW_VALUE(VALUE) ((VALUE) <= 0x7F) 68 | #define IS_WWDG_COUNTER(COUNTER) (((COUNTER) >= 0x40) && ((COUNTER) <= 0x7F)) 69 | 70 | /** 71 | * @} 72 | */ 73 | 74 | /** 75 | * @} 76 | */ 77 | 78 | /* Exported macro ------------------------------------------------------------*/ 79 | /* Exported functions --------------------------------------------------------*/ 80 | 81 | /* Function used to set the WWDG configuration to the default reset state ****/ 82 | void WWDG_DeInit(void); 83 | 84 | /* Prescaler, Refresh window and Counter configuration functions **************/ 85 | void WWDG_SetPrescaler(uint32_t WWDG_Prescaler); 86 | void WWDG_SetWindowValue(uint8_t WindowValue); 87 | void WWDG_EnableIT(void); 88 | void WWDG_SetCounter(uint8_t Counter); 89 | 90 | /* WWDG activation function ***************************************************/ 91 | void WWDG_Enable(uint8_t Counter); 92 | 93 | /* Interrupts and flags management functions **********************************/ 94 | FlagStatus WWDG_GetFlagStatus(void); 95 | void WWDG_ClearFlag(void); 96 | 97 | #ifdef __cplusplus 98 | } 99 | #endif 100 | 101 | #endif /* __STM32F4xx_WWDG_H */ 102 | 103 | /** 104 | * @} 105 | */ 106 | 107 | /** 108 | * @} 109 | */ 110 | 111 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 112 | -------------------------------------------------------------------------------- /STM32F4xx_StdPeriph_Driver/src/stm32f4xx_crc.c: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f4xx_crc.c 4 | * @author MCD Application Team 5 | * @version V1.0.2 6 | * @date 05-March-2012 7 | * @brief This file provides all the CRC firmware functions. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | *

© COPYRIGHT 2012 STMicroelectronics

12 | * 13 | * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 14 | * You may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at: 16 | * 17 | * http://www.st.com/software_license_agreement_liberty_v2 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | * 25 | ****************************************************************************** 26 | */ 27 | 28 | /* Includes ------------------------------------------------------------------*/ 29 | #include "stm32f4xx_crc.h" 30 | 31 | /** @addtogroup STM32F4xx_StdPeriph_Driver 32 | * @{ 33 | */ 34 | 35 | /** @defgroup CRC 36 | * @brief CRC driver modules 37 | * @{ 38 | */ 39 | 40 | /* Private typedef -----------------------------------------------------------*/ 41 | /* Private define ------------------------------------------------------------*/ 42 | /* Private macro -------------------------------------------------------------*/ 43 | /* Private variables ---------------------------------------------------------*/ 44 | /* Private function prototypes -----------------------------------------------*/ 45 | /* Private functions ---------------------------------------------------------*/ 46 | 47 | /** @defgroup CRC_Private_Functions 48 | * @{ 49 | */ 50 | 51 | /** 52 | * @brief Resets the CRC Data register (DR). 53 | * @param None 54 | * @retval None 55 | */ 56 | void CRC_ResetDR(void) 57 | { 58 | /* Reset CRC generator */ 59 | CRC->CR = CRC_CR_RESET; 60 | } 61 | 62 | /** 63 | * @brief Computes the 32-bit CRC of a given data word(32-bit). 64 | * @param Data: data word(32-bit) to compute its CRC 65 | * @retval 32-bit CRC 66 | */ 67 | uint32_t CRC_CalcCRC(uint32_t Data) 68 | { 69 | CRC->DR = Data; 70 | 71 | return (CRC->DR); 72 | } 73 | 74 | /** 75 | * @brief Computes the 32-bit CRC of a given buffer of data word(32-bit). 76 | * @param pBuffer: pointer to the buffer containing the data to be computed 77 | * @param BufferLength: length of the buffer to be computed 78 | * @retval 32-bit CRC 79 | */ 80 | uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength) 81 | { 82 | uint32_t index = 0; 83 | 84 | for(index = 0; index < BufferLength; index++) 85 | { 86 | CRC->DR = pBuffer[index]; 87 | } 88 | return (CRC->DR); 89 | } 90 | 91 | /** 92 | * @brief Returns the current CRC value. 93 | * @param None 94 | * @retval 32-bit CRC 95 | */ 96 | uint32_t CRC_GetCRC(void) 97 | { 98 | return (CRC->DR); 99 | } 100 | 101 | /** 102 | * @brief Stores a 8-bit data in the Independent Data(ID) register. 103 | * @param IDValue: 8-bit value to be stored in the ID register 104 | * @retval None 105 | */ 106 | void CRC_SetIDRegister(uint8_t IDValue) 107 | { 108 | CRC->IDR = IDValue; 109 | } 110 | 111 | /** 112 | * @brief Returns the 8-bit data stored in the Independent Data(ID) register 113 | * @param None 114 | * @retval 8-bit value of the ID register 115 | */ 116 | uint8_t CRC_GetIDRegister(void) 117 | { 118 | return (CRC->IDR); 119 | } 120 | 121 | /** 122 | * @} 123 | */ 124 | 125 | /** 126 | * @} 127 | */ 128 | 129 | /** 130 | * @} 131 | */ 132 | 133 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 134 | -------------------------------------------------------------------------------- /STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c -------------------------------------------------------------------------------- /STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c -------------------------------------------------------------------------------- /ethernet.eww: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | $WS_DIR$\ethernet.ewp 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /http_server.c: -------------------------------------------------------------------------------- 1 | #include "lwip/opt.h" 2 | #include "lwip/arch.h" 3 | #include "lwip/api.h" 4 | #include 5 | #include 6 | #include "http_server.h" 7 | 8 | #define LEN 1024 9 | char data[LEN]; 10 | 11 | void http_server_serve(struct netconn *conn) 12 | { 13 | struct netbuf *inbuf; 14 | err_t res; 15 | char* buf; 16 | u16_t buflen; 17 | size_t len; 18 | static u16_t call_times = 0; 19 | 20 | res = netconn_recv(conn, &inbuf); 21 | 22 | if (res == ERR_OK) 23 | { 24 | netbuf_data(inbuf, (void**)&buf, &buflen); 25 | if ((buflen >=5) && (strncmp(buf, "GET /", 5) == 0)) 26 | { 27 | sprintf(data, "Hello %d times!", call_times++); 28 | len = strlen(data); 29 | netconn_write(conn, (const unsigned char*)(data), (size_t)len, NETCONN_NOCOPY); 30 | } 31 | } 32 | 33 | /* Close the connection (server closes in HTTP) */ 34 | netconn_close(conn); 35 | 36 | /* Delete the buffer (netconn_recv gives us ownership, 37 | so we have to make sure to deallocate the buffer) */ 38 | netbuf_delete(inbuf); 39 | } 40 | 41 | void http_server_netconn_thread() 42 | { 43 | struct netconn *conn, *newconn; 44 | err_t err; 45 | 46 | /* Create a new TCP connection handle */ 47 | conn = netconn_new(NETCONN_TCP); 48 | 49 | if (conn!= NULL) 50 | { 51 | /* Bind to port 80 (HTTP) with default IP address */ 52 | err = netconn_bind(conn, NULL, 80); 53 | 54 | if (err == ERR_OK) 55 | { 56 | /* Put the connection into LISTEN state */ 57 | netconn_listen(conn); 58 | 59 | while(1) 60 | { 61 | /* accept any icoming connection */ 62 | err = netconn_accept(conn, &newconn); 63 | 64 | /* serve connection */ 65 | http_server_serve(newconn); 66 | 67 | /* delete connection */ 68 | netconn_delete(newconn); 69 | } 70 | } 71 | else 72 | { 73 | printf("can not bind netconn"); 74 | } 75 | } 76 | else 77 | { 78 | printf("can not create netconn"); 79 | } 80 | } -------------------------------------------------------------------------------- /http_server.h: -------------------------------------------------------------------------------- 1 | #include "lwip/opt.h" 2 | #include "lwip/arch.h" 3 | #include "lwip/api.h" 4 | 5 | void http_server_serve(struct netconn *conn); 6 | void http_server_netconn_thread(); -------------------------------------------------------------------------------- /lwip/CHANGELOG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsalnikov/stm32_lan8720_ethernet/de1cf826066d19e6da875ee1cdd72c5d65c409da/lwip/CHANGELOG -------------------------------------------------------------------------------- /lwip/COPYING: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001, 2002 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 | 34 | -------------------------------------------------------------------------------- /lwip/FILES: -------------------------------------------------------------------------------- 1 | src/ - The source code for the lwIP TCP/IP stack. 2 | doc/ - The documentation for lwIP. 3 | 4 | See also the FILES file in each subdirectory. 5 | -------------------------------------------------------------------------------- /lwip/README: -------------------------------------------------------------------------------- 1 | INTRODUCTION 2 | 3 | lwIP is a small independent implementation of the TCP/IP protocol 4 | suite that has been developed by Adam Dunkels at the Computer and 5 | Networks Architectures (CNA) lab at the Swedish Institute of Computer 6 | Science (SICS). 7 | 8 | The focus of the lwIP TCP/IP implementation is to reduce the RAM usage 9 | while still having a full scale TCP. This making lwIP suitable for use 10 | in embedded systems with tens of kilobytes of free RAM and room for 11 | around 40 kilobytes of code ROM. 12 | 13 | FEATURES 14 | 15 | * IP (Internet Protocol) including packet forwarding over multiple network 16 | interfaces 17 | * ICMP (Internet Control Message Protocol) for network maintenance and debugging 18 | * IGMP (Internet Group Management Protocol) for multicast traffic management 19 | * UDP (User Datagram Protocol) including experimental UDP-lite extensions 20 | * TCP (Transmission Control Protocol) with congestion control, RTT estimation 21 | and fast recovery/fast retransmit 22 | * Specialized raw/native API for enhanced performance 23 | * Optional Berkeley-like socket API 24 | * DNS (Domain names resolver) 25 | * SNMP (Simple Network Management Protocol) 26 | * DHCP (Dynamic Host Configuration Protocol) 27 | * AUTOIP (for IPv4, conform with RFC 3927) 28 | * PPP (Point-to-Point Protocol) 29 | * ARP (Address Resolution Protocol) for Ethernet 30 | 31 | LICENSE 32 | 33 | lwIP is freely available under a BSD license. 34 | 35 | DEVELOPMENT 36 | 37 | lwIP has grown into an excellent TCP/IP stack for embedded devices, 38 | and developers using the stack often submit bug fixes, improvements, 39 | and additions to the stack to further increase its usefulness. 40 | 41 | Development of lwIP is hosted on Savannah, a central point for 42 | software development, maintenance and distribution. Everyone can 43 | help improve lwIP by use of Savannah's interface, CVS and the 44 | mailing list. A core team of developers will commit changes to the 45 | CVS source tree. 46 | 47 | The lwIP TCP/IP stack is maintained in the 'lwip' CVS module and 48 | contributions (such as platform ports) are in the 'contrib' module. 49 | 50 | See doc/savannah.txt for details on CVS server access for users and 51 | developers. 52 | 53 | Last night's CVS tar ball can be downloaded from: 54 | http://savannah.gnu.org/cvs.backups/lwip.tar.gz [CHANGED - NEEDS FIXING] 55 | 56 | The current CVS trees are web-browsable: 57 | http://savannah.nongnu.org/cgi-bin/viewcvs/lwip/lwip/ 58 | http://savannah.nongnu.org/cgi-bin/viewcvs/lwip/contrib/ 59 | 60 | Submit patches and bugs via the lwIP project page: 61 | http://savannah.nongnu.org/projects/lwip/ 62 | 63 | 64 | DOCUMENTATION 65 | 66 | The original out-dated homepage of lwIP and Adam Dunkels' papers on 67 | lwIP are at the official lwIP home page: 68 | http://www.sics.se/~adam/lwip/ 69 | 70 | Self documentation of the source code is regularly extracted from the 71 | current CVS sources and is available from this web page: 72 | http://www.nongnu.org/lwip/ 73 | 74 | There is now a constantly growin wiki about lwIP at 75 | http://lwip.wikia.com/wiki/LwIP_Wiki 76 | 77 | Also, there are mailing lists you can subscribe at 78 | http://savannah.nongnu.org/mail/?group=lwip 79 | plus searchable archives: 80 | http://lists.nongnu.org/archive/html/lwip-users/ 81 | http://lists.nongnu.org/archive/html/lwip-devel/ 82 | 83 | Reading Adam's papers, the files in docs/, browsing the source code 84 | documentation and browsing the mailing list archives is a good way to 85 | become familiar with the design of lwIP. 86 | 87 | Adam Dunkels 88 | Leon Woestenberg 89 | 90 | -------------------------------------------------------------------------------- /lwip/doc/FILES: -------------------------------------------------------------------------------- 1 | savannah.txt - How to obtain the current development source code. 2 | contrib.txt - How to contribute to lwIP as a developer. 3 | rawapi.txt - The documentation for the core API of lwIP. 4 | Also provides an overview about the other APIs and multithreading. 5 | snmp_agent.txt - The documentation for the lwIP SNMP agent. 6 | sys_arch.txt - The documentation for a system abstraction layer of lwIP. 7 | -------------------------------------------------------------------------------- /lwip/doc/contrib.txt: -------------------------------------------------------------------------------- 1 | 1 Introduction 2 | 3 | This document describes some guidelines for people participating 4 | in lwIP development. 5 | 6 | 2 How to contribute to lwIP 7 | 8 | Here is a short list of suggestions to anybody working with lwIP and 9 | trying to contribute bug reports, fixes, enhancements, platform ports etc. 10 | First of all as you may already know lwIP is a volunteer project so feedback 11 | to fixes or questions might often come late. Hopefully the bug and patch tracking 12 | features of Savannah help us not lose users' input. 13 | 14 | 2.1 Source code style: 15 | 16 | 1. do not use tabs. 17 | 2. indentation is two spaces per level (i.e. per tab). 18 | 3. end debug messages with a trailing newline (\n). 19 | 4. one space between keyword and opening bracket. 20 | 5. no space between function and opening bracket. 21 | 6. one space and no newline before opening curly braces of a block. 22 | 7. closing curly brace on a single line. 23 | 8. spaces surrounding assignment and comparisons. 24 | 9. don't initialize static and/or global variables to zero, the compiler takes care of that. 25 | 10. use current source code style as further reference. 26 | 27 | 2.2 Source code documentation style: 28 | 29 | 1. JavaDoc compliant and Doxygen compatible. 30 | 2. Function documentation above functions in .c files, not .h files. 31 | (This forces you to synchronize documentation and implementation.) 32 | 3. Use current documentation style as further reference. 33 | 34 | 2.3 Bug reports and patches: 35 | 36 | 1. Make sure you are reporting bugs or send patches against the latest 37 | sources. (From the latest release and/or the current CVS sources.) 38 | 2. If you think you found a bug make sure it's not already filed in the 39 | bugtracker at Savannah. 40 | 3. If you have a fix put the patch on Savannah. If it is a patch that affects 41 | both core and arch specific stuff please separate them so that the core can 42 | be applied separately while leaving the other patch 'open'. The prefered way 43 | is to NOT touch archs you can't test and let maintainers take care of them. 44 | This is a good way to see if they are used at all - the same goes for unix 45 | netifs except tapif. 46 | 4. Do not file a bug and post a fix to it to the patch area. Either a bug report 47 | or a patch will be enough. 48 | If you correct an existing bug then attach the patch to the bug rather than creating a new entry in the patch area. 49 | 5. Trivial patches (compiler warning, indentation and spelling fixes or anything obvious which takes a line or two) 50 | can go to the lwip-users list. This is still the fastest way of interaction and the list is not so crowded 51 | as to allow for loss of fixes. Putting bugs on Savannah and subsequently closing them is too much an overhead 52 | for reporting a compiler warning fix. 53 | 6. Patches should be specific to a single change or to related changes.Do not mix bugfixes with spelling and other 54 | trivial fixes unless the bugfix is trivial too.Do not reorganize code and rename identifiers in the same patch you 55 | change behaviour if not necessary.A patch is easier to read and understand if it's to the point and short than 56 | if it's not to the point and long :) so the chances for it to be applied are greater. 57 | 58 | 2.4 Platform porters: 59 | 60 | 1. If you have ported lwIP to a platform (an OS, a uC/processor or a combination of these) and 61 | you think it could benefit others[1] you might want discuss this on the mailing list. You 62 | can also ask for CVS access to submit and maintain your port in the contrib CVS module. 63 | -------------------------------------------------------------------------------- /lwip/port/ethernetif.h: -------------------------------------------------------------------------------- 1 | #ifndef __ETHERNETIF_H__ 2 | #define __ETHERNETIF_H__ 3 | 4 | 5 | #include "lwip/err.h" 6 | #include "lwip/netif.h" 7 | 8 | err_t ethernetif_init(struct netif *netif); 9 | 10 | 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /lwip/port/include/arch/bpstruct.h: -------------------------------------------------------------------------------- 1 | #pragma pack(push,1) -------------------------------------------------------------------------------- /lwip/port/include/arch/cc.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 | #ifndef __CC_H__ 33 | #define __CC_H__ 34 | 35 | #include "cpu.h" 36 | 37 | typedef unsigned char u8_t; 38 | typedef signed char s8_t; 39 | typedef unsigned short u16_t; 40 | typedef signed short s16_t; 41 | typedef unsigned long u32_t; 42 | typedef signed long s32_t; 43 | typedef u32_t mem_ptr_t; 44 | typedef int sys_prot_t; 45 | 46 | 47 | #define U16_F "hu" 48 | #define S16_F "d" 49 | #define X16_F "hx" 50 | #define U32_F "u" 51 | #define S32_F "d" 52 | #define X32_F "x" 53 | #define SZT_F "uz" 54 | 55 | 56 | 57 | 58 | 59 | /* define compiler specific symbols */ 60 | #if defined (__ICCARM__) 61 | 62 | #define PACK_STRUCT_BEGIN 63 | #define PACK_STRUCT_STRUCT 64 | #define PACK_STRUCT_END 65 | #define PACK_STRUCT_FIELD(x) x 66 | #define PACK_STRUCT_USE_INCLUDES 67 | 68 | #elif defined (__CC_ARM) 69 | 70 | #define PACK_STRUCT_BEGIN __packed 71 | #define PACK_STRUCT_STRUCT 72 | #define PACK_STRUCT_END 73 | #define PACK_STRUCT_FIELD(x) x 74 | 75 | #elif defined (__GNUC__) 76 | 77 | #define PACK_STRUCT_BEGIN 78 | #define PACK_STRUCT_STRUCT __attribute__ ((__packed__)) 79 | #define PACK_STRUCT_END 80 | #define PACK_STRUCT_FIELD(x) x 81 | 82 | #elif defined (__TASKING__) 83 | 84 | #define PACK_STRUCT_BEGIN 85 | #define PACK_STRUCT_STRUCT 86 | #define PACK_STRUCT_END 87 | #define PACK_STRUCT_FIELD(x) x 88 | 89 | #endif 90 | 91 | #define LWIP_PLATFORM_ASSERT(x) //do { if(!(x)) while(1); } while(0) 92 | 93 | #endif /* __CC_H__ */ 94 | -------------------------------------------------------------------------------- /lwip/port/include/arch/cpu.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 | #ifndef __CPU_H__ 33 | #define __CPU_H__ 34 | 35 | #define BYTE_ORDER LITTLE_ENDIAN 36 | 37 | #endif /* __CPU_H__ */ 38 | -------------------------------------------------------------------------------- /lwip/port/include/arch/epstruct.h: -------------------------------------------------------------------------------- 1 | #pragma pack(pop) -------------------------------------------------------------------------------- /lwip/port/include/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 | -------------------------------------------------------------------------------- /lwip/port/include/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 | #ifndef __ARCH_SYS_ARCH_H__ 33 | #define __ARCH_SYS_ARCH_H__ 34 | 35 | #include "FreeRTOS.h" 36 | #include "task.h" 37 | #include "queue.h" 38 | #include "semphr.h" 39 | 40 | #define SYS_MBOX_NULL ( ( QueueHandle_t ) NULL ) 41 | #define SYS_SEM_NULL ( ( SemaphoreHandle_t ) NULL ) 42 | #define SYS_DEFAULT_THREAD_STACK_DEPTH configMINIMAL_STACK_SIZE 43 | 44 | typedef SemaphoreHandle_t sys_sem_t; 45 | typedef SemaphoreHandle_t sys_mutex_t; 46 | typedef QueueHandle_t sys_mbox_t; 47 | typedef TaskHandle_t sys_thread_t; 48 | 49 | #define sys_mbox_valid( x ) ( ( ( *x ) == NULL) ? pdFALSE : pdTRUE ) 50 | #define sys_mbox_set_invalid( x ) ( ( *x ) = NULL ) 51 | #define sys_sem_valid( x ) ( ( ( *x ) == NULL) ? pdFALSE : pdTRUE ) 52 | #define sys_sem_set_invalid( x ) ( ( *x ) = NULL ) 53 | 54 | 55 | #endif /* __ARCH_SYS_ARCH_H__ */ 56 | 57 | -------------------------------------------------------------------------------- /lwip/src/FILES: -------------------------------------------------------------------------------- 1 | api/ - The code for the high-level wrapper API. Not needed if 2 | you use the lowel-level call-back/raw API. 3 | 4 | core/ - The core of the TPC/IP stack; protocol implementations, 5 | memory and buffer management, and the low-level raw API. 6 | 7 | include/ - lwIP include files. 8 | 9 | netif/ - Generic network interface device drivers are kept here, 10 | as well as the ARP module. 11 | 12 | For more information on the various subdirectories, check the FILES 13 | file in each directory. 14 | -------------------------------------------------------------------------------- /lwip/src/api/err.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Error Management module 4 | * 5 | */ 6 | 7 | /* 8 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without modification, 12 | * are permitted provided that the following conditions are met: 13 | * 14 | * 1. Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 3. The name of the author may not be used to endorse or promote products 20 | * derived from this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 25 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 27 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 30 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 31 | * OF SUCH DAMAGE. 32 | * 33 | * This file is part of the lwIP TCP/IP stack. 34 | * 35 | * Author: Adam Dunkels 36 | * 37 | */ 38 | 39 | #include "lwip/err.h" 40 | 41 | #ifdef LWIP_DEBUG 42 | 43 | static const char *err_strerr[] = { 44 | "Ok.", /* ERR_OK 0 */ 45 | "Out of memory error.", /* ERR_MEM -1 */ 46 | "Buffer error.", /* ERR_BUF -2 */ 47 | "Timeout.", /* ERR_TIMEOUT -3 */ 48 | "Routing problem.", /* ERR_RTE -4 */ 49 | "Operation in progress.", /* ERR_INPROGRESS -5 */ 50 | "Illegal value.", /* ERR_VAL -6 */ 51 | "Operation would block.", /* ERR_WOULDBLOCK -7 */ 52 | "Address in use.", /* ERR_USE -8 */ 53 | "Already connected.", /* ERR_ISCONN -9 */ 54 | "Connection aborted.", /* ERR_ABRT -10 */ 55 | "Connection reset.", /* ERR_RST -11 */ 56 | "Connection closed.", /* ERR_CLSD -12 */ 57 | "Not connected.", /* ERR_CONN -13 */ 58 | "Illegal argument.", /* ERR_ARG -14 */ 59 | "Low-level netif error.", /* ERR_IF -15 */ 60 | }; 61 | 62 | /** 63 | * Convert an lwip internal error to a string representation. 64 | * 65 | * @param err an lwip internal err_t 66 | * @return a string representation for err 67 | */ 68 | const char * 69 | lwip_strerr(err_t err) 70 | { 71 | return err_strerr[-err]; 72 | 73 | } 74 | 75 | #endif /* LWIP_DEBUG */ 76 | -------------------------------------------------------------------------------- /lwip/src/core/def.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Common functions used throughout the stack. 4 | * 5 | */ 6 | 7 | /* 8 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without modification, 12 | * are permitted provided that the following conditions are met: 13 | * 14 | * 1. Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 3. The name of the author may not be used to endorse or promote products 20 | * derived from this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 25 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 27 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 30 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 31 | * OF SUCH DAMAGE. 32 | * 33 | * This file is part of the lwIP TCP/IP stack. 34 | * 35 | * Author: Simon Goldschmidt 36 | * 37 | */ 38 | 39 | #include "lwip/opt.h" 40 | #include "lwip/def.h" 41 | 42 | /** 43 | * These are reference implementations of the byte swapping functions. 44 | * Again with the aim of being simple, correct and fully portable. 45 | * Byte swapping is the second thing you would want to optimize. You will 46 | * need to port it to your architecture and in your cc.h: 47 | * 48 | * #define LWIP_PLATFORM_BYTESWAP 1 49 | * #define LWIP_PLATFORM_HTONS(x) 50 | * #define LWIP_PLATFORM_HTONL(x) 51 | * 52 | * Note ntohs() and ntohl() are merely references to the htonx counterparts. 53 | */ 54 | 55 | #if (LWIP_PLATFORM_BYTESWAP == 0) && (BYTE_ORDER == LITTLE_ENDIAN) 56 | 57 | /** 58 | * Convert an u16_t from host- to network byte order. 59 | * 60 | * @param n u16_t in host byte order 61 | * @return n in network byte order 62 | */ 63 | u16_t 64 | lwip_htons(u16_t n) 65 | { 66 | return ((n & 0xff) << 8) | ((n & 0xff00) >> 8); 67 | } 68 | 69 | /** 70 | * Convert an u16_t from network- to host byte order. 71 | * 72 | * @param n u16_t in network byte order 73 | * @return n in host byte order 74 | */ 75 | u16_t 76 | lwip_ntohs(u16_t n) 77 | { 78 | return lwip_htons(n); 79 | } 80 | 81 | /** 82 | * Convert an u32_t from host- to network byte order. 83 | * 84 | * @param n u32_t in host byte order 85 | * @return n in network byte order 86 | */ 87 | u32_t 88 | lwip_htonl(u32_t n) 89 | { 90 | return ((n & 0xff) << 24) | 91 | ((n & 0xff00) << 8) | 92 | ((n & 0xff0000UL) >> 8) | 93 | ((n & 0xff000000UL) >> 24); 94 | } 95 | 96 | /** 97 | * Convert an u32_t from network- to host byte order. 98 | * 99 | * @param n u32_t in network byte order 100 | * @return n in host byte order 101 | */ 102 | u32_t 103 | lwip_ntohl(u32_t n) 104 | { 105 | return lwip_htonl(n); 106 | } 107 | 108 | #endif /* (LWIP_PLATFORM_BYTESWAP == 0) && (BYTE_ORDER == LITTLE_ENDIAN) */ 109 | -------------------------------------------------------------------------------- /lwip/src/core/ipv4/inet.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Functions common to all TCP/IPv4 modules, such as the byte order functions. 4 | * 5 | */ 6 | 7 | /* 8 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without modification, 12 | * are permitted provided that the following conditions are met: 13 | * 14 | * 1. Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 3. The name of the author may not be used to endorse or promote products 20 | * derived from this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 25 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 27 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 30 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 31 | * OF SUCH DAMAGE. 32 | * 33 | * This file is part of the lwIP TCP/IP stack. 34 | * 35 | * Author: Adam Dunkels 36 | * 37 | */ 38 | 39 | #include "lwip/opt.h" 40 | 41 | #include "lwip/inet.h" 42 | 43 | -------------------------------------------------------------------------------- /lwip/src/core/ipv6/README: -------------------------------------------------------------------------------- 1 | IPv6 support in lwIP is very experimental. 2 | -------------------------------------------------------------------------------- /lwip/src/core/ipv6/ip6_addr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 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 | #include "lwip/opt.h" 34 | #include "lwip/ip_addr.h" 35 | #include "lwip/inet.h" 36 | 37 | u8_t 38 | ip_addr_netcmp(struct ip_addr *addr1, struct ip_addr *addr2, 39 | struct ip_addr *mask) 40 | { 41 | return((addr1->addr[0] & mask->addr[0]) == (addr2->addr[0] & mask->addr[0]) && 42 | (addr1->addr[1] & mask->addr[1]) == (addr2->addr[1] & mask->addr[1]) && 43 | (addr1->addr[2] & mask->addr[2]) == (addr2->addr[2] & mask->addr[2]) && 44 | (addr1->addr[3] & mask->addr[3]) == (addr2->addr[3] & mask->addr[3])); 45 | 46 | } 47 | 48 | u8_t 49 | ip_addr_cmp(struct ip_addr *addr1, struct ip_addr *addr2) 50 | { 51 | return(addr1->addr[0] == addr2->addr[0] && 52 | addr1->addr[1] == addr2->addr[1] && 53 | addr1->addr[2] == addr2->addr[2] && 54 | addr1->addr[3] == addr2->addr[3]); 55 | } 56 | 57 | void 58 | ip_addr_set(struct ip_addr *dest, struct ip_addr *src) 59 | { 60 | SMEMCPY(dest, src, sizeof(struct ip_addr)); 61 | /* dest->addr[0] = src->addr[0]; 62 | dest->addr[1] = src->addr[1]; 63 | dest->addr[2] = src->addr[2]; 64 | dest->addr[3] = src->addr[3];*/ 65 | } 66 | 67 | u8_t 68 | ip_addr_isany(struct ip_addr *addr) 69 | { 70 | if (addr == NULL) return 1; 71 | return((addr->addr[0] | addr->addr[1] | addr->addr[2] | addr->addr[3]) == 0); 72 | } 73 | -------------------------------------------------------------------------------- /lwip/src/core/sys.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * lwIP Operating System abstraction 4 | * 5 | */ 6 | 7 | /* 8 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without modification, 12 | * are permitted provided that the following conditions are met: 13 | * 14 | * 1. Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 2. Redistributions in binary form must reproduce the above copyright notice, 17 | * this list of conditions and the following disclaimer in the documentation 18 | * and/or other materials provided with the distribution. 19 | * 3. The name of the author may not be used to endorse or promote products 20 | * derived from this software without specific prior written permission. 21 | * 22 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 23 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 24 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 25 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 26 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 27 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 30 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 31 | * OF SUCH DAMAGE. 32 | * 33 | * This file is part of the lwIP TCP/IP stack. 34 | * 35 | * Author: Adam Dunkels 36 | * 37 | */ 38 | 39 | #include "lwip/opt.h" 40 | 41 | #include "lwip/sys.h" 42 | 43 | /* Most of the functions defined in sys.h must be implemented in the 44 | * architecture-dependent file sys_arch.c */ 45 | 46 | #if !NO_SYS 47 | 48 | #ifndef sys_msleep 49 | /** 50 | * Sleep for some ms. Timeouts are NOT processed while sleeping. 51 | * 52 | * @param ms number of milliseconds to sleep 53 | */ 54 | void 55 | sys_msleep(u32_t ms) 56 | { 57 | if (ms > 0) { 58 | sys_sem_t delaysem; 59 | err_t err = sys_sem_new(&delaysem, 0); 60 | if (err == ERR_OK) { 61 | sys_arch_sem_wait(&delaysem, ms); 62 | sys_sem_free(&delaysem); 63 | } 64 | } 65 | } 66 | #endif /* sys_msleep */ 67 | 68 | #endif /* !NO_SYS */ 69 | -------------------------------------------------------------------------------- /lwip/src/include/ipv4/lwip/icmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 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 | #ifndef __LWIP_ICMP_H__ 33 | #define __LWIP_ICMP_H__ 34 | 35 | #include "lwip/opt.h" 36 | #include "lwip/pbuf.h" 37 | #include "lwip/ip_addr.h" 38 | #include "lwip/netif.h" 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | #define ICMP_ER 0 /* echo reply */ 45 | #define ICMP_DUR 3 /* destination unreachable */ 46 | #define ICMP_SQ 4 /* source quench */ 47 | #define ICMP_RD 5 /* redirect */ 48 | #define ICMP_ECHO 8 /* echo */ 49 | #define ICMP_TE 11 /* time exceeded */ 50 | #define ICMP_PP 12 /* parameter problem */ 51 | #define ICMP_TS 13 /* timestamp */ 52 | #define ICMP_TSR 14 /* timestamp reply */ 53 | #define ICMP_IRQ 15 /* information request */ 54 | #define ICMP_IR 16 /* information reply */ 55 | 56 | enum icmp_dur_type { 57 | ICMP_DUR_NET = 0, /* net unreachable */ 58 | ICMP_DUR_HOST = 1, /* host unreachable */ 59 | ICMP_DUR_PROTO = 2, /* protocol unreachable */ 60 | ICMP_DUR_PORT = 3, /* port unreachable */ 61 | ICMP_DUR_FRAG = 4, /* fragmentation needed and DF set */ 62 | ICMP_DUR_SR = 5 /* source route failed */ 63 | }; 64 | 65 | enum icmp_te_type { 66 | ICMP_TE_TTL = 0, /* time to live exceeded in transit */ 67 | ICMP_TE_FRAG = 1 /* fragment reassembly time exceeded */ 68 | }; 69 | 70 | #ifdef PACK_STRUCT_USE_INCLUDES 71 | # include "arch/bpstruct.h" 72 | #endif 73 | /** This is the standard ICMP header only that the u32_t data 74 | * is splitted to two u16_t like ICMP echo needs it. 75 | * This header is also used for other ICMP types that do not 76 | * use the data part. 77 | */ 78 | PACK_STRUCT_BEGIN 79 | struct icmp_echo_hdr { 80 | PACK_STRUCT_FIELD(u8_t type); 81 | PACK_STRUCT_FIELD(u8_t code); 82 | PACK_STRUCT_FIELD(u16_t chksum); 83 | PACK_STRUCT_FIELD(u16_t id); 84 | PACK_STRUCT_FIELD(u16_t seqno); 85 | } PACK_STRUCT_STRUCT; 86 | PACK_STRUCT_END 87 | #ifdef PACK_STRUCT_USE_INCLUDES 88 | # include "arch/epstruct.h" 89 | #endif 90 | 91 | #define ICMPH_TYPE(hdr) ((hdr)->type) 92 | #define ICMPH_CODE(hdr) ((hdr)->code) 93 | 94 | /** Combines type and code to an u16_t */ 95 | #define ICMPH_TYPE_SET(hdr, t) ((hdr)->type = (t)) 96 | #define ICMPH_CODE_SET(hdr, c) ((hdr)->code = (c)) 97 | 98 | 99 | #if LWIP_ICMP /* don't build if not configured for use in lwipopts.h */ 100 | 101 | void icmp_input(struct pbuf *p, struct netif *inp); 102 | void icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t); 103 | void icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t); 104 | 105 | #endif /* LWIP_ICMP */ 106 | 107 | #ifdef __cplusplus 108 | } 109 | #endif 110 | 111 | #endif /* __LWIP_ICMP_H__ */ 112 | -------------------------------------------------------------------------------- /lwip/src/include/ipv4/lwip/igmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2002 CITEL Technologies Ltd. 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 CITEL Technologies Ltd 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 CITEL TECHNOLOGIES AND CONTRIBUTORS ``AS IS'' 18 | * AND 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 CITEL TECHNOLOGIES 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 a contribution to the lwIP TCP/IP stack. 30 | * The Swedish Institute of Computer Science and Adam Dunkels 31 | * are specifically granted permission to redistribute this 32 | * source code. 33 | */ 34 | 35 | #ifndef __LWIP_IGMP_H__ 36 | #define __LWIP_IGMP_H__ 37 | 38 | #include "lwip/opt.h" 39 | #include "lwip/ip_addr.h" 40 | #include "lwip/netif.h" 41 | #include "lwip/pbuf.h" 42 | 43 | #if LWIP_IGMP /* don't build if not configured for use in lwipopts.h */ 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | 50 | /* IGMP timer */ 51 | #define IGMP_TMR_INTERVAL 100 /* Milliseconds */ 52 | #define IGMP_V1_DELAYING_MEMBER_TMR (1000/IGMP_TMR_INTERVAL) 53 | #define IGMP_JOIN_DELAYING_MEMBER_TMR (500 /IGMP_TMR_INTERVAL) 54 | 55 | /* MAC Filter Actions, these are passed to a netif's 56 | * igmp_mac_filter callback function. */ 57 | #define IGMP_DEL_MAC_FILTER 0 58 | #define IGMP_ADD_MAC_FILTER 1 59 | 60 | 61 | /** 62 | * igmp group structure - there is 63 | * a list of groups for each interface 64 | * these should really be linked from the interface, but 65 | * if we keep them separate we will not affect the lwip original code 66 | * too much 67 | * 68 | * There will be a group for the all systems group address but this 69 | * will not run the state machine as it is used to kick off reports 70 | * from all the other groups 71 | */ 72 | struct igmp_group { 73 | /** next link */ 74 | struct igmp_group *next; 75 | /** interface on which the group is active */ 76 | struct netif *netif; 77 | /** multicast address */ 78 | ip_addr_t group_address; 79 | /** signifies we were the last person to report */ 80 | u8_t last_reporter_flag; 81 | /** current state of the group */ 82 | u8_t group_state; 83 | /** timer for reporting, negative is OFF */ 84 | u16_t timer; 85 | /** counter of simultaneous uses */ 86 | u8_t use; 87 | }; 88 | 89 | /* Prototypes */ 90 | void igmp_init(void); 91 | err_t igmp_start(struct netif *netif); 92 | err_t igmp_stop(struct netif *netif); 93 | void igmp_report_groups(struct netif *netif); 94 | struct igmp_group *igmp_lookfor_group(struct netif *ifp, ip_addr_t *addr); 95 | void igmp_input(struct pbuf *p, struct netif *inp, ip_addr_t *dest); 96 | err_t igmp_joingroup(ip_addr_t *ifaddr, ip_addr_t *groupaddr); 97 | err_t igmp_leavegroup(ip_addr_t *ifaddr, ip_addr_t *groupaddr); 98 | void igmp_tmr(void); 99 | 100 | #ifdef __cplusplus 101 | } 102 | #endif 103 | 104 | #endif /* LWIP_IGMP */ 105 | 106 | #endif /* __LWIP_IGMP_H__ */ 107 | -------------------------------------------------------------------------------- /lwip/src/include/ipv4/lwip/inet_chksum.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 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 | #ifndef __LWIP_INET_CHKSUM_H__ 33 | #define __LWIP_INET_CHKSUM_H__ 34 | 35 | #include "lwip/opt.h" 36 | 37 | #include "lwip/pbuf.h" 38 | #include "lwip/ip_addr.h" 39 | 40 | /** Swap the bytes in an u16_t: much like htons() for little-endian */ 41 | #ifndef SWAP_BYTES_IN_WORD 42 | #if LWIP_PLATFORM_BYTESWAP && (BYTE_ORDER == LITTLE_ENDIAN) 43 | /* little endian and PLATFORM_BYTESWAP defined */ 44 | #define SWAP_BYTES_IN_WORD(w) LWIP_PLATFORM_HTONS(w) 45 | #else /* LWIP_PLATFORM_BYTESWAP && (BYTE_ORDER == LITTLE_ENDIAN) */ 46 | /* can't use htons on big endian (or PLATFORM_BYTESWAP not defined)... */ 47 | #define SWAP_BYTES_IN_WORD(w) (((w) & 0xff) << 8) | (((w) & 0xff00) >> 8) 48 | #endif /* LWIP_PLATFORM_BYTESWAP && (BYTE_ORDER == LITTLE_ENDIAN)*/ 49 | #endif /* SWAP_BYTES_IN_WORD */ 50 | 51 | /** Split an u32_t in two u16_ts and add them up */ 52 | #ifndef FOLD_U32T 53 | #define FOLD_U32T(u) (((u) >> 16) + ((u) & 0x0000ffffUL)) 54 | #endif 55 | 56 | #if LWIP_CHECKSUM_ON_COPY 57 | /** Function-like macro: same as MEMCPY but returns the checksum of copied data 58 | as u16_t */ 59 | #ifndef LWIP_CHKSUM_COPY 60 | #define LWIP_CHKSUM_COPY(dst, src, len) lwip_chksum_copy(dst, src, len) 61 | #ifndef LWIP_CHKSUM_COPY_ALGORITHM 62 | #define LWIP_CHKSUM_COPY_ALGORITHM 1 63 | #endif /* LWIP_CHKSUM_COPY_ALGORITHM */ 64 | #endif /* LWIP_CHKSUM_COPY */ 65 | #else /* LWIP_CHECKSUM_ON_COPY */ 66 | #define LWIP_CHKSUM_COPY_ALGORITHM 0 67 | #endif /* LWIP_CHECKSUM_ON_COPY */ 68 | 69 | #ifdef __cplusplus 70 | extern "C" { 71 | #endif 72 | 73 | u16_t inet_chksum(void *dataptr, u16_t len); 74 | u16_t inet_chksum_pbuf(struct pbuf *p); 75 | u16_t inet_chksum_pseudo(struct pbuf *p, 76 | ip_addr_t *src, ip_addr_t *dest, 77 | u8_t proto, u16_t proto_len); 78 | u16_t inet_chksum_pseudo_partial(struct pbuf *p, 79 | ip_addr_t *src, ip_addr_t *dest, 80 | u8_t proto, u16_t proto_len, u16_t chksum_len); 81 | #if LWIP_CHKSUM_COPY_ALGORITHM 82 | u16_t lwip_chksum_copy(void *dst, const void *src, u16_t len); 83 | #endif /* LWIP_CHKSUM_COPY_ALGORITHM */ 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | 89 | #endif /* __LWIP_INET_H__ */ 90 | 91 | -------------------------------------------------------------------------------- /lwip/src/include/ipv4/lwip/ip_frag.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 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: Jani Monoses 30 | * 31 | */ 32 | 33 | #ifndef __LWIP_IP_FRAG_H__ 34 | #define __LWIP_IP_FRAG_H__ 35 | 36 | #include "lwip/opt.h" 37 | #include "lwip/err.h" 38 | #include "lwip/pbuf.h" 39 | #include "lwip/netif.h" 40 | #include "lwip/ip_addr.h" 41 | #include "lwip/ip.h" 42 | 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | #if IP_REASSEMBLY 48 | /* The IP reassembly timer interval in milliseconds. */ 49 | #define IP_TMR_INTERVAL 1000 50 | 51 | /* IP reassembly helper struct. 52 | * This is exported because memp needs to know the size. 53 | */ 54 | struct ip_reassdata { 55 | struct ip_reassdata *next; 56 | struct pbuf *p; 57 | struct ip_hdr iphdr; 58 | u16_t datagram_len; 59 | u8_t flags; 60 | u8_t timer; 61 | }; 62 | 63 | void ip_reass_init(void); 64 | void ip_reass_tmr(void); 65 | struct pbuf * ip_reass(struct pbuf *p); 66 | #endif /* IP_REASSEMBLY */ 67 | 68 | #if IP_FRAG 69 | #if !IP_FRAG_USES_STATIC_BUF && !LWIP_NETIF_TX_SINGLE_PBUF 70 | /** A custom pbuf that holds a reference to another pbuf, which is freed 71 | * when this custom pbuf is freed. This is used to create a custom PBUF_REF 72 | * that points into the original pbuf. */ 73 | struct pbuf_custom_ref { 74 | /** 'base class' */ 75 | struct pbuf_custom pc; 76 | /** pointer to the original pbuf that is referenced */ 77 | struct pbuf *original; 78 | }; 79 | #endif /* !IP_FRAG_USES_STATIC_BUF && !LWIP_NETIF_TX_SINGLE_PBUF */ 80 | 81 | err_t ip_frag(struct pbuf *p, struct netif *netif, ip_addr_t *dest); 82 | #endif /* IP_FRAG */ 83 | 84 | #ifdef __cplusplus 85 | } 86 | #endif 87 | 88 | #endif /* __LWIP_IP_FRAG_H__ */ 89 | -------------------------------------------------------------------------------- /lwip/src/include/ipv6/lwip/icmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 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 | #ifndef __LWIP_ICMP_H__ 33 | #define __LWIP_ICMP_H__ 34 | 35 | #include "lwip/opt.h" 36 | 37 | #if LWIP_ICMP /* don't build if not configured for use in lwipopts.h */ 38 | 39 | #include "lwip/pbuf.h" 40 | #include "lwip/netif.h" 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | #define ICMP6_DUR 1 47 | #define ICMP6_TE 3 48 | #define ICMP6_ECHO 128 /* echo */ 49 | #define ICMP6_ER 129 /* echo reply */ 50 | 51 | 52 | enum icmp_dur_type { 53 | ICMP_DUR_NET = 0, /* net unreachable */ 54 | ICMP_DUR_HOST = 1, /* host unreachable */ 55 | ICMP_DUR_PROTO = 2, /* protocol unreachable */ 56 | ICMP_DUR_PORT = 3, /* port unreachable */ 57 | ICMP_DUR_FRAG = 4, /* fragmentation needed and DF set */ 58 | ICMP_DUR_SR = 5 /* source route failed */ 59 | }; 60 | 61 | enum icmp_te_type { 62 | ICMP_TE_TTL = 0, /* time to live exceeded in transit */ 63 | ICMP_TE_FRAG = 1 /* fragment reassembly time exceeded */ 64 | }; 65 | 66 | void icmp_input(struct pbuf *p, struct netif *inp); 67 | 68 | void icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t); 69 | void icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t); 70 | 71 | struct icmp_echo_hdr { 72 | u8_t type; 73 | u8_t icode; 74 | u16_t chksum; 75 | u16_t id; 76 | u16_t seqno; 77 | }; 78 | 79 | struct icmp_dur_hdr { 80 | u8_t type; 81 | u8_t icode; 82 | u16_t chksum; 83 | u32_t unused; 84 | }; 85 | 86 | struct icmp_te_hdr { 87 | u8_t type; 88 | u8_t icode; 89 | u16_t chksum; 90 | u32_t unused; 91 | }; 92 | 93 | #ifdef __cplusplus 94 | } 95 | #endif 96 | 97 | #endif /* LWIP_ICMP */ 98 | 99 | #endif /* __LWIP_ICMP_H__ */ 100 | 101 | -------------------------------------------------------------------------------- /lwip/src/include/ipv6/lwip/inet.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 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 | #ifndef __LWIP_INET_H__ 33 | #define __LWIP_INET_H__ 34 | 35 | #include "lwip/opt.h" 36 | #include "lwip/pbuf.h" 37 | #include "lwip/ip_addr.h" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | u16_t inet_chksum(void *data, u16_t len); 44 | u16_t inet_chksum_pbuf(struct pbuf *p); 45 | u16_t inet_chksum_pseudo(struct pbuf *p, 46 | struct ip_addr *src, struct ip_addr *dest, 47 | u8_t proto, u32_t proto_len); 48 | 49 | u32_t inet_addr(const char *cp); 50 | s8_t inet_aton(const char *cp, struct in_addr *addr); 51 | 52 | #ifndef _MACHINE_ENDIAN_H_ 53 | #ifndef _NETINET_IN_H 54 | #ifndef _LINUX_BYTEORDER_GENERIC_H 55 | u16_t htons(u16_t n); 56 | u16_t ntohs(u16_t n); 57 | u32_t htonl(u32_t n); 58 | u32_t ntohl(u32_t n); 59 | #endif /* _LINUX_BYTEORDER_GENERIC_H */ 60 | #endif /* _NETINET_IN_H */ 61 | #endif /* _MACHINE_ENDIAN_H_ */ 62 | 63 | #ifdef __cplusplus 64 | } 65 | #endif 66 | 67 | #endif /* __LWIP_INET_H__ */ 68 | 69 | -------------------------------------------------------------------------------- /lwip/src/include/ipv6/lwip/ip_addr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 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 | #ifndef __LWIP_IP_ADDR_H__ 33 | #define __LWIP_IP_ADDR_H__ 34 | 35 | #include "lwip/opt.h" 36 | 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | #define IP_ADDR_ANY 0 42 | 43 | #ifdef PACK_STRUCT_USE_INCLUDES 44 | # include "arch/bpstruct.h" 45 | #endif 46 | PACK_STRUCT_BEGIN 47 | struct ip_addr { 48 | PACK_STRUCT_FIELD(u32_t addr[4]); 49 | } PACK_STRUCT_STRUCT; 50 | PACK_STRUCT_END 51 | #ifdef PACK_STRUCT_USE_INCLUDES 52 | # include "arch/epstruct.h" 53 | #endif 54 | 55 | /* 56 | * struct ipaddr2 is used in the definition of the ARP packet format in 57 | * order to support compilers that don't have structure packing. 58 | */ 59 | #ifdef PACK_STRUCT_USE_INCLUDES 60 | # include "arch/bpstruct.h" 61 | #endif 62 | PACK_STRUCT_BEGIN 63 | struct ip_addr2 { 64 | PACK_STRUCT_FIELD(u16_t addrw[2]); 65 | } PACK_STRUCT_STRUCT; 66 | PACK_STRUCT_END 67 | #ifdef PACK_STRUCT_USE_INCLUDES 68 | # include "arch/epstruct.h" 69 | #endif 70 | 71 | #define IP6_ADDR(ipaddr, a,b,c,d,e,f,g,h) do { (ipaddr)->addr[0] = htonl((u32_t)((a & 0xffff) << 16) | (b & 0xffff)); \ 72 | (ipaddr)->addr[1] = htonl(((c & 0xffff) << 16) | (d & 0xffff)); \ 73 | (ipaddr)->addr[2] = htonl(((e & 0xffff) << 16) | (f & 0xffff)); \ 74 | (ipaddr)->addr[3] = htonl(((g & 0xffff) << 16) | (h & 0xffff)); } while(0) 75 | 76 | u8_t ip_addr_netcmp(struct ip_addr *addr1, struct ip_addr *addr2, 77 | struct ip_addr *mask); 78 | u8_t ip_addr_cmp(struct ip_addr *addr1, struct ip_addr *addr2); 79 | void ip_addr_set(struct ip_addr *dest, struct ip_addr *src); 80 | u8_t ip_addr_isany(struct ip_addr *addr); 81 | 82 | #define ip_addr_debug_print(debug, ipaddr) \ 83 | LWIP_DEBUGF(debug, ("%"X32_F":%"X32_F":%"X32_F":%"X32_F":%"X32_F":%"X32_F":%"X32_F":%"X32_F"\n", \ 84 | (ntohl(ipaddr->addr[0]) >> 16) & 0xffff, \ 85 | ntohl(ipaddr->addr[0]) & 0xffff, \ 86 | (ntohl(ipaddr->addr[1]) >> 16) & 0xffff, \ 87 | ntohl(ipaddr->addr[1]) & 0xffff, \ 88 | (ntohl(ipaddr->addr[2]) >> 16) & 0xffff, \ 89 | ntohl(ipaddr->addr[2]) & 0xffff, \ 90 | (ntohl(ipaddr->addr[3]) >> 16) & 0xffff, \ 91 | ntohl(ipaddr->addr[3]) & 0xffff)); 92 | 93 | #ifdef __cplusplus 94 | } 95 | #endif 96 | 97 | #endif /* __LWIP_IP_ADDR_H__ */ 98 | -------------------------------------------------------------------------------- /lwip/src/include/lwip/def.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 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 | #ifndef __LWIP_DEF_H__ 33 | #define __LWIP_DEF_H__ 34 | 35 | /* arch.h might define NULL already */ 36 | #include "lwip/arch.h" 37 | #include "lwip/opt.h" 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | 43 | #define LWIP_MAX(x , y) (((x) > (y)) ? (x) : (y)) 44 | #define LWIP_MIN(x , y) (((x) < (y)) ? (x) : (y)) 45 | 46 | #ifndef NULL 47 | #define NULL ((void *)0) 48 | #endif 49 | 50 | /* Endianess-optimized shifting of two u8_t to create one u16_t */ 51 | #if BYTE_ORDER == LITTLE_ENDIAN 52 | #define LWIP_MAKE_U16(a, b) ((a << 8) | b) 53 | #else 54 | #define LWIP_MAKE_U16(a, b) ((b << 8) | a) 55 | #endif 56 | 57 | #ifndef LWIP_PLATFORM_BYTESWAP 58 | #define LWIP_PLATFORM_BYTESWAP 0 59 | #endif 60 | 61 | #ifndef LWIP_PREFIX_BYTEORDER_FUNCS 62 | /* workaround for naming collisions on some platforms */ 63 | 64 | #ifdef htons 65 | #undef htons 66 | #endif /* htons */ 67 | #ifdef htonl 68 | #undef htonl 69 | #endif /* htonl */ 70 | #ifdef ntohs 71 | #undef ntohs 72 | #endif /* ntohs */ 73 | #ifdef ntohl 74 | #undef ntohl 75 | #endif /* ntohl */ 76 | 77 | #define htons(x) lwip_htons(x) 78 | #define ntohs(x) lwip_ntohs(x) 79 | #define htonl(x) lwip_htonl(x) 80 | #define ntohl(x) lwip_ntohl(x) 81 | #endif /* LWIP_PREFIX_BYTEORDER_FUNCS */ 82 | 83 | #if BYTE_ORDER == BIG_ENDIAN 84 | #define lwip_htons(x) (x) 85 | #define lwip_ntohs(x) (x) 86 | #define lwip_htonl(x) (x) 87 | #define lwip_ntohl(x) (x) 88 | #define PP_HTONS(x) (x) 89 | #define PP_NTOHS(x) (x) 90 | #define PP_HTONL(x) (x) 91 | #define PP_NTOHL(x) (x) 92 | #else /* BYTE_ORDER != BIG_ENDIAN */ 93 | #if LWIP_PLATFORM_BYTESWAP 94 | #define lwip_htons(x) LWIP_PLATFORM_HTONS(x) 95 | #define lwip_ntohs(x) LWIP_PLATFORM_HTONS(x) 96 | #define lwip_htonl(x) LWIP_PLATFORM_HTONL(x) 97 | #define lwip_ntohl(x) LWIP_PLATFORM_HTONL(x) 98 | #else /* LWIP_PLATFORM_BYTESWAP */ 99 | u16_t lwip_htons(u16_t x); 100 | u16_t lwip_ntohs(u16_t x); 101 | u32_t lwip_htonl(u32_t x); 102 | u32_t lwip_ntohl(u32_t x); 103 | #endif /* LWIP_PLATFORM_BYTESWAP */ 104 | 105 | /* These macros should be calculated by the preprocessor and are used 106 | with compile-time constants only (so that there is no little-endian 107 | overhead at runtime). */ 108 | #define PP_HTONS(x) ((((x) & 0xff) << 8) | (((x) & 0xff00) >> 8)) 109 | #define PP_NTOHS(x) PP_HTONS(x) 110 | #define PP_HTONL(x) ((((x) & 0xff) << 24) | \ 111 | (((x) & 0xff00) << 8) | \ 112 | (((x) & 0xff0000UL) >> 8) | \ 113 | (((x) & 0xff000000UL) >> 24)) 114 | #define PP_NTOHL(x) PP_HTONL(x) 115 | 116 | #endif /* BYTE_ORDER == BIG_ENDIAN */ 117 | 118 | #ifdef __cplusplus 119 | } 120 | #endif 121 | 122 | #endif /* __LWIP_DEF_H__ */ 123 | 124 | -------------------------------------------------------------------------------- /lwip/src/include/lwip/err.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 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 | #ifndef __LWIP_ERR_H__ 33 | #define __LWIP_ERR_H__ 34 | 35 | #include "lwip/opt.h" 36 | #include "lwip/arch.h" 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | /** Define LWIP_ERR_T in cc.h if you want to use 43 | * a different type for your platform (must be signed). */ 44 | #ifdef LWIP_ERR_T 45 | typedef LWIP_ERR_T err_t; 46 | #else /* LWIP_ERR_T */ 47 | typedef s8_t err_t; 48 | #endif /* LWIP_ERR_T*/ 49 | 50 | /* Definitions for error constants. */ 51 | 52 | #define ERR_OK 0 /* No error, everything OK. */ 53 | #define ERR_MEM -1 /* Out of memory error. */ 54 | #define ERR_BUF -2 /* Buffer error. */ 55 | #define ERR_TIMEOUT -3 /* Timeout. */ 56 | #define ERR_RTE -4 /* Routing problem. */ 57 | #define ERR_INPROGRESS -5 /* Operation in progress */ 58 | #define ERR_VAL -6 /* Illegal value. */ 59 | #define ERR_WOULDBLOCK -7 /* Operation would block. */ 60 | #define ERR_USE -8 /* Address in use. */ 61 | #define ERR_ISCONN -9 /* Already connected. */ 62 | 63 | #define ERR_IS_FATAL(e) ((e) < ERR_ISCONN) 64 | 65 | #define ERR_ABRT -10 /* Connection aborted. */ 66 | #define ERR_RST -11 /* Connection reset. */ 67 | #define ERR_CLSD -12 /* Connection closed. */ 68 | #define ERR_CONN -13 /* Not connected. */ 69 | 70 | #define ERR_ARG -14 /* Illegal argument. */ 71 | 72 | #define ERR_IF -15 /* Low-level netif error */ 73 | 74 | 75 | #ifdef LWIP_DEBUG 76 | extern const char *lwip_strerr(err_t err); 77 | #else 78 | #define lwip_strerr(x) "" 79 | #endif /* LWIP_DEBUG */ 80 | 81 | #ifdef __cplusplus 82 | } 83 | #endif 84 | 85 | #endif /* __LWIP_ERR_H__ */ 86 | -------------------------------------------------------------------------------- /lwip/src/include/lwip/init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 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 | #ifndef __LWIP_INIT_H__ 33 | #define __LWIP_INIT_H__ 34 | 35 | #include "lwip/opt.h" 36 | 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | /** X.x.x: Major version of the stack */ 42 | #define LWIP_VERSION_MAJOR 1U 43 | /** x.X.x: Minor version of the stack */ 44 | #define LWIP_VERSION_MINOR 4U 45 | /** x.x.X: Revision of the stack */ 46 | #define LWIP_VERSION_REVISION 1U 47 | /** For release candidates, this is set to 1..254 48 | * For official releases, this is set to 255 (LWIP_RC_RELEASE) 49 | * For development versions (CVS), this is set to 0 (LWIP_RC_DEVELOPMENT) */ 50 | #define LWIP_VERSION_RC 255U 51 | 52 | /** LWIP_VERSION_RC is set to LWIP_RC_RELEASE for official releases */ 53 | #define LWIP_RC_RELEASE 255U 54 | /** LWIP_VERSION_RC is set to LWIP_RC_DEVELOPMENT for CVS versions */ 55 | #define LWIP_RC_DEVELOPMENT 0U 56 | 57 | #define LWIP_VERSION_IS_RELEASE (LWIP_VERSION_RC == LWIP_RC_RELEASE) 58 | #define LWIP_VERSION_IS_DEVELOPMENT (LWIP_VERSION_RC == LWIP_RC_DEVELOPMENT) 59 | #define LWIP_VERSION_IS_RC ((LWIP_VERSION_RC != LWIP_RC_RELEASE) && (LWIP_VERSION_RC != LWIP_RC_DEVELOPMENT)) 60 | 61 | /** Provides the version of the stack */ 62 | #define LWIP_VERSION (LWIP_VERSION_MAJOR << 24 | LWIP_VERSION_MINOR << 16 | \ 63 | LWIP_VERSION_REVISION << 8 | LWIP_VERSION_RC) 64 | 65 | /* Modules initialization */ 66 | void lwip_init(void); 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | 72 | #endif /* __LWIP_INIT_H__ */ 73 | -------------------------------------------------------------------------------- /lwip/src/include/lwip/memp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 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 __LWIP_MEMP_H__ 34 | #define __LWIP_MEMP_H__ 35 | 36 | #include "lwip/opt.h" 37 | 38 | #ifdef __cplusplus 39 | extern "C" { 40 | #endif 41 | 42 | /* Create the list of all memory pools managed by memp. MEMP_MAX represents a NULL pool at the end */ 43 | typedef enum { 44 | #define LWIP_MEMPOOL(name,num,size,desc) MEMP_##name, 45 | #include "lwip/memp_std.h" 46 | MEMP_MAX 47 | } memp_t; 48 | 49 | #if MEM_USE_POOLS 50 | /* Use a helper type to get the start and end of the user "memory pools" for mem_malloc */ 51 | typedef enum { 52 | /* Get the first (via: 53 | MEMP_POOL_HELPER_START = ((u8_t) 1*MEMP_POOL_A + 0*MEMP_POOL_B + 0*MEMP_POOL_C + 0)*/ 54 | MEMP_POOL_HELPER_FIRST = ((u8_t) 55 | #define LWIP_MEMPOOL(name,num,size,desc) 56 | #define LWIP_MALLOC_MEMPOOL_START 1 57 | #define LWIP_MALLOC_MEMPOOL(num, size) * MEMP_POOL_##size + 0 58 | #define LWIP_MALLOC_MEMPOOL_END 59 | #include "lwip/memp_std.h" 60 | ) , 61 | /* Get the last (via: 62 | MEMP_POOL_HELPER_END = ((u8_t) 0 + MEMP_POOL_A*0 + MEMP_POOL_B*0 + MEMP_POOL_C*1) */ 63 | MEMP_POOL_HELPER_LAST = ((u8_t) 64 | #define LWIP_MEMPOOL(name,num,size,desc) 65 | #define LWIP_MALLOC_MEMPOOL_START 66 | #define LWIP_MALLOC_MEMPOOL(num, size) 0 + MEMP_POOL_##size * 67 | #define LWIP_MALLOC_MEMPOOL_END 1 68 | #include "lwip/memp_std.h" 69 | ) 70 | } memp_pool_helper_t; 71 | 72 | /* The actual start and stop values are here (cast them over) 73 | We use this helper type and these defines so we can avoid using const memp_t values */ 74 | #define MEMP_POOL_FIRST ((memp_t) MEMP_POOL_HELPER_FIRST) 75 | #define MEMP_POOL_LAST ((memp_t) MEMP_POOL_HELPER_LAST) 76 | #endif /* MEM_USE_POOLS */ 77 | 78 | #if MEMP_MEM_MALLOC || MEM_USE_POOLS 79 | extern const u16_t memp_sizes[MEMP_MAX]; 80 | #endif /* MEMP_MEM_MALLOC || MEM_USE_POOLS */ 81 | 82 | #if MEMP_MEM_MALLOC 83 | 84 | #include "mem.h" 85 | 86 | #define memp_init() 87 | #define memp_malloc(type) mem_malloc(memp_sizes[type]) 88 | #define memp_free(type, mem) mem_free(mem) 89 | 90 | #else /* MEMP_MEM_MALLOC */ 91 | 92 | #if MEM_USE_POOLS 93 | /** This structure is used to save the pool one element came from. */ 94 | struct memp_malloc_helper 95 | { 96 | memp_t poolnr; 97 | }; 98 | #endif /* MEM_USE_POOLS */ 99 | 100 | void memp_init(void); 101 | 102 | #if MEMP_OVERFLOW_CHECK 103 | void *memp_malloc_fn(memp_t type, const char* file, const int line); 104 | #define memp_malloc(t) memp_malloc_fn((t), __FILE__, __LINE__) 105 | #else 106 | void *memp_malloc(memp_t type); 107 | #endif 108 | void memp_free(memp_t type, void *mem); 109 | 110 | #endif /* MEMP_MEM_MALLOC */ 111 | 112 | #ifdef __cplusplus 113 | } 114 | #endif 115 | 116 | #endif /* __LWIP_MEMP_H__ */ 117 | -------------------------------------------------------------------------------- /lwip/src/include/lwip/netifapi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Redistribution and use in source and binary forms, with or without modification, 3 | * are permitted provided that the following conditions are met: 4 | * 5 | * 1. Redistributions of source code must retain the above copyright notice, 6 | * this list of conditions and the following disclaimer. 7 | * 2. Redistributions in binary form must reproduce the above copyright notice, 8 | * this list of conditions and the following disclaimer in the documentation 9 | * and/or other materials provided with the distribution. 10 | * 3. The name of the author may not be used to endorse or promote products 11 | * derived from this software without specific prior written permission. 12 | * 13 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 14 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 15 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 16 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 17 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 18 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 19 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 20 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 21 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 22 | * OF SUCH DAMAGE. 23 | * 24 | * This file is part of the lwIP TCP/IP stack. 25 | * 26 | */ 27 | 28 | #ifndef __LWIP_NETIFAPI_H__ 29 | #define __LWIP_NETIFAPI_H__ 30 | 31 | #include "lwip/opt.h" 32 | 33 | #if LWIP_NETIF_API /* don't build if not configured for use in lwipopts.h */ 34 | 35 | #include "lwip/sys.h" 36 | #include "lwip/netif.h" 37 | #include "lwip/dhcp.h" 38 | #include "lwip/autoip.h" 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | typedef void (*netifapi_void_fn)(struct netif *netif); 45 | typedef err_t (*netifapi_errt_fn)(struct netif *netif); 46 | 47 | struct netifapi_msg_msg { 48 | #if !LWIP_TCPIP_CORE_LOCKING 49 | sys_sem_t sem; 50 | #endif /* !LWIP_TCPIP_CORE_LOCKING */ 51 | err_t err; 52 | struct netif *netif; 53 | union { 54 | struct { 55 | ip_addr_t *ipaddr; 56 | ip_addr_t *netmask; 57 | ip_addr_t *gw; 58 | void *state; 59 | netif_init_fn init; 60 | netif_input_fn input; 61 | } add; 62 | struct { 63 | netifapi_void_fn voidfunc; 64 | netifapi_errt_fn errtfunc; 65 | } common; 66 | } msg; 67 | }; 68 | 69 | struct netifapi_msg { 70 | void (* function)(struct netifapi_msg_msg *msg); 71 | struct netifapi_msg_msg msg; 72 | }; 73 | 74 | 75 | /* API for application */ 76 | err_t netifapi_netif_add ( struct netif *netif, 77 | ip_addr_t *ipaddr, 78 | ip_addr_t *netmask, 79 | ip_addr_t *gw, 80 | void *state, 81 | netif_init_fn init, 82 | netif_input_fn input); 83 | 84 | err_t netifapi_netif_set_addr ( struct netif *netif, 85 | ip_addr_t *ipaddr, 86 | ip_addr_t *netmask, 87 | ip_addr_t *gw ); 88 | 89 | err_t netifapi_netif_common ( struct netif *netif, 90 | netifapi_void_fn voidfunc, 91 | netifapi_errt_fn errtfunc); 92 | 93 | #define netifapi_netif_remove(n) netifapi_netif_common(n, netif_remove, NULL) 94 | #define netifapi_netif_set_up(n) netifapi_netif_common(n, netif_set_up, NULL) 95 | #define netifapi_netif_set_down(n) netifapi_netif_common(n, netif_set_down, NULL) 96 | #define netifapi_netif_set_default(n) netifapi_netif_common(n, netif_set_default, NULL) 97 | #define netifapi_dhcp_start(n) netifapi_netif_common(n, NULL, dhcp_start) 98 | #define netifapi_dhcp_stop(n) netifapi_netif_common(n, dhcp_stop, NULL) 99 | #define netifapi_autoip_start(n) netifapi_netif_common(n, NULL, autoip_start) 100 | #define netifapi_autoip_stop(n) netifapi_netif_common(n, NULL, autoip_stop) 101 | 102 | #ifdef __cplusplus 103 | } 104 | #endif 105 | 106 | #endif /* LWIP_NETIF_API */ 107 | 108 | #endif /* __LWIP_NETIFAPI_H__ */ 109 | -------------------------------------------------------------------------------- /lwip/src/include/lwip/raw.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2001-2004 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 | #ifndef __LWIP_RAW_H__ 33 | #define __LWIP_RAW_H__ 34 | 35 | #include "lwip/opt.h" 36 | 37 | #if LWIP_RAW /* don't build if not configured for use in lwipopts.h */ 38 | 39 | #include "lwip/pbuf.h" 40 | #include "lwip/def.h" 41 | #include "lwip/ip.h" 42 | #include "lwip/ip_addr.h" 43 | 44 | #ifdef __cplusplus 45 | extern "C" { 46 | #endif 47 | 48 | struct raw_pcb; 49 | 50 | /** Function prototype for raw pcb receive callback functions. 51 | * @param arg user supplied argument (raw_pcb.recv_arg) 52 | * @param pcb the raw_pcb which received data 53 | * @param p the packet buffer that was received 54 | * @param addr the remote IP address from which the packet was received 55 | * @return 1 if the packet was 'eaten' (aka. deleted), 56 | * 0 if the packet lives on 57 | * If returning 1, the callback is responsible for freeing the pbuf 58 | * if it's not used any more. 59 | */ 60 | typedef u8_t (*raw_recv_fn)(void *arg, struct raw_pcb *pcb, struct pbuf *p, 61 | ip_addr_t *addr); 62 | 63 | struct raw_pcb { 64 | /* Common members of all PCB types */ 65 | IP_PCB; 66 | 67 | struct raw_pcb *next; 68 | 69 | u8_t protocol; 70 | 71 | /** receive callback function */ 72 | raw_recv_fn recv; 73 | /* user-supplied argument for the recv callback */ 74 | void *recv_arg; 75 | }; 76 | 77 | /* The following functions is the application layer interface to the 78 | RAW code. */ 79 | struct raw_pcb * raw_new (u8_t proto); 80 | void raw_remove (struct raw_pcb *pcb); 81 | err_t raw_bind (struct raw_pcb *pcb, ip_addr_t *ipaddr); 82 | err_t raw_connect (struct raw_pcb *pcb, ip_addr_t *ipaddr); 83 | 84 | void raw_recv (struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg); 85 | err_t raw_sendto (struct raw_pcb *pcb, struct pbuf *p, ip_addr_t *ipaddr); 86 | err_t raw_send (struct raw_pcb *pcb, struct pbuf *p); 87 | 88 | /* The following functions are the lower layer interface to RAW. */ 89 | u8_t raw_input (struct pbuf *p, struct netif *inp); 90 | #define raw_init() /* Compatibility define, not init needed. */ 91 | 92 | #ifdef __cplusplus 93 | } 94 | #endif 95 | 96 | #endif /* LWIP_RAW */ 97 | 98 | #endif /* __LWIP_RAW_H__ */ 99 | -------------------------------------------------------------------------------- /lwip/src/include/lwip/timers.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001-2004 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 | * Simon Goldschmidt 31 | * 32 | */ 33 | #ifndef __LWIP_TIMERS_H__ 34 | #define __LWIP_TIMERS_H__ 35 | 36 | #include "lwip/opt.h" 37 | 38 | /* Timers are not supported when NO_SYS==1 and NO_SYS_NO_TIMERS==1 */ 39 | #define LWIP_TIMERS (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS)) 40 | 41 | #if LWIP_TIMERS 42 | 43 | #include "lwip/err.h" 44 | #if !NO_SYS 45 | #include "lwip/sys.h" 46 | #endif 47 | 48 | #ifdef __cplusplus 49 | extern "C" { 50 | #endif 51 | 52 | #ifndef LWIP_DEBUG_TIMERNAMES 53 | #ifdef LWIP_DEBUG 54 | #define LWIP_DEBUG_TIMERNAMES SYS_DEBUG 55 | #else /* LWIP_DEBUG */ 56 | #define LWIP_DEBUG_TIMERNAMES 0 57 | #endif /* LWIP_DEBUG*/ 58 | #endif 59 | 60 | /** Function prototype for a timeout callback function. Register such a function 61 | * using sys_timeout(). 62 | * 63 | * @param arg Additional argument to pass to the function - set up by sys_timeout() 64 | */ 65 | typedef void (* sys_timeout_handler)(void *arg); 66 | 67 | struct sys_timeo { 68 | struct sys_timeo *next; 69 | u32_t time; 70 | sys_timeout_handler h; 71 | void *arg; 72 | #if LWIP_DEBUG_TIMERNAMES 73 | const char* handler_name; 74 | #endif /* LWIP_DEBUG_TIMERNAMES */ 75 | }; 76 | 77 | void sys_timeouts_init(void); 78 | 79 | #if LWIP_DEBUG_TIMERNAMES 80 | void sys_timeout_debug(u32_t msecs, sys_timeout_handler handler, void *arg, const char* handler_name); 81 | #define sys_timeout(msecs, handler, arg) sys_timeout_debug(msecs, handler, arg, #handler) 82 | #else /* LWIP_DEBUG_TIMERNAMES */ 83 | void sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg); 84 | #endif /* LWIP_DEBUG_TIMERNAMES */ 85 | 86 | void sys_untimeout(sys_timeout_handler handler, void *arg); 87 | #if NO_SYS 88 | void sys_check_timeouts(void); 89 | void sys_restart_timeouts(void); 90 | #else /* NO_SYS */ 91 | void sys_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg); 92 | #endif /* NO_SYS */ 93 | 94 | 95 | #ifdef __cplusplus 96 | } 97 | #endif 98 | 99 | #endif /* LWIP_TIMERS */ 100 | #endif /* __LWIP_TIMERS_H__ */ 101 | -------------------------------------------------------------------------------- /lwip/src/include/netif/slipif.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 __NETIF_SLIPIF_H__ 35 | #define __NETIF_SLIPIF_H__ 36 | 37 | #include "lwip/opt.h" 38 | #include "lwip/netif.h" 39 | 40 | /** Set this to 1 to start a thread that blocks reading on the serial line 41 | * (using sio_read()). 42 | */ 43 | #ifndef SLIP_USE_RX_THREAD 44 | #define SLIP_USE_RX_THREAD !NO_SYS 45 | #endif 46 | 47 | /** Set this to 1 to enable functions to pass in RX bytes from ISR context. 48 | * If enabled, slipif_received_byte[s]() process incoming bytes and put assembled 49 | * packets on a queue, which is fed into lwIP from slipif_poll(). 50 | * If disabled, slipif_poll() polls the serila line (using sio_tryread()). 51 | */ 52 | #ifndef SLIP_RX_FROM_ISR 53 | #define SLIP_RX_FROM_ISR 0 54 | #endif 55 | 56 | /** Set this to 1 (default for SLIP_RX_FROM_ISR) to queue incoming packets 57 | * received by slipif_received_byte[s]() as long as PBUF_POOL pbufs are available. 58 | * If disabled, packets will be dropped if more than one packet is received. 59 | */ 60 | #ifndef SLIP_RX_QUEUE 61 | #define SLIP_RX_QUEUE SLIP_RX_FROM_ISR 62 | #endif 63 | 64 | #ifdef __cplusplus 65 | extern "C" { 66 | #endif 67 | 68 | err_t slipif_init(struct netif * netif); 69 | void slipif_poll(struct netif *netif); 70 | #if SLIP_RX_FROM_ISR 71 | void slipif_process_rxqueue(struct netif *netif); 72 | void slipif_received_byte(struct netif *netif, u8_t data); 73 | void slipif_received_bytes(struct netif *netif, u8_t *data, u8_t len); 74 | #endif /* SLIP_RX_FROM_ISR */ 75 | 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | 80 | #endif 81 | 82 | -------------------------------------------------------------------------------- /lwip/src/include/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 | -------------------------------------------------------------------------------- /lwip/src/include/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 | -------------------------------------------------------------------------------- /lwip/src/netif/FILES: -------------------------------------------------------------------------------- 1 | This directory contains generic network interface device drivers that 2 | do not contain any hardware or architecture specific code. The files 3 | are: 4 | 5 | etharp.c 6 | Implements the ARP (Address Resolution Protocol) over 7 | Ethernet. The code in this file should be used together with 8 | Ethernet device drivers. Note that this module has been 9 | largely made Ethernet independent so you should be able to 10 | adapt this for other link layers (such as Firewire). 11 | 12 | ethernetif.c 13 | An example of how an Ethernet device driver could look. This 14 | file can be used as a "skeleton" for developing new Ethernet 15 | network device drivers. It uses the etharp.c ARP code. 16 | 17 | loopif.c 18 | A "loopback" network interface driver. It requires configuration 19 | through the define LWIP_LOOPIF_MULTITHREADING (see opt.h). 20 | 21 | slipif.c 22 | A generic implementation of the SLIP (Serial Line IP) 23 | protocol. It requires a sio (serial I/O) module to work. 24 | 25 | ppp/ Point-to-Point Protocol stack 26 | The PPP stack has been ported from ucip (http://ucip.sourceforge.net). 27 | It matches quite well to pppd 2.3.1 (http://ppp.samba.org), although 28 | compared to that, it has some modifications for embedded systems and 29 | the source code has been reordered a bit. -------------------------------------------------------------------------------- /lwip/src/netif/ppp/chpms.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * chpms.h - Network Microsoft Challenge Handshake Protocol header file. 3 | * 4 | * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. 5 | * portions Copyright (c) 1998 Global Election Systems Inc. 6 | * 7 | * The authors hereby grant permission to use, copy, modify, distribute, 8 | * and license this software and its documentation for any purpose, provided 9 | * that existing copyright notices are retained in all copies and that this 10 | * notice and the following disclaimer are included verbatim in any 11 | * distributions. No written agreement, license, or royalty fee is required 12 | * for any of the authorized uses. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | * 25 | ****************************************************************************** 26 | * REVISION HISTORY 27 | * 28 | * 03-01-01 Marc Boucher 29 | * Ported to lwIP. 30 | * 98-01-30 Guy Lancaster , Global Election Systems Inc. 31 | * Original built from BSD network code. 32 | ******************************************************************************/ 33 | /* 34 | * chap.h - Challenge Handshake Authentication Protocol definitions. 35 | * 36 | * Copyright (c) 1995 Eric Rosenquist, Strata Software Limited. 37 | * http://www.strataware.com/ 38 | * 39 | * All rights reserved. 40 | * 41 | * Redistribution and use in source and binary forms are permitted 42 | * provided that the above copyright notice and this paragraph are 43 | * duplicated in all such forms and that any documentation, 44 | * advertising materials, and other materials related to such 45 | * distribution and use acknowledge that the software was developed 46 | * by Eric Rosenquist. The name of the author may not be used to 47 | * endorse or promote products derived from this software without 48 | * specific prior written permission. 49 | * 50 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 51 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 52 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 53 | * 54 | * $Id: chpms.h,v 1.5 2007/12/19 20:47:23 fbernon Exp $ 55 | */ 56 | 57 | #ifndef CHPMS_H 58 | #define CHPMS_H 59 | 60 | #define MAX_NT_PASSWORD 256 /* Maximum number of (Unicode) chars in an NT password */ 61 | 62 | void ChapMS (chap_state *, char *, int, char *, int); 63 | 64 | #endif /* CHPMS_H */ 65 | -------------------------------------------------------------------------------- /lwip/src/netif/ppp/magic.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * magic.c - Network Random Number Generator program file. 3 | * 4 | * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. 5 | * portions Copyright (c) 1997 by Global Election Systems Inc. 6 | * 7 | * The authors hereby grant permission to use, copy, modify, distribute, 8 | * and license this software and its documentation for any purpose, provided 9 | * that existing copyright notices are retained in all copies and that this 10 | * notice and the following disclaimer are included verbatim in any 11 | * distributions. No written agreement, license, or royalty fee is required 12 | * for any of the authorized uses. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | * 25 | ****************************************************************************** 26 | * REVISION HISTORY 27 | * 28 | * 03-01-01 Marc Boucher 29 | * Ported to lwIP. 30 | * 97-12-04 Guy Lancaster , Global Election Systems Inc. 31 | * Original based on BSD magic.c. 32 | *****************************************************************************/ 33 | /* 34 | * magic.c - PPP Magic Number routines. 35 | * 36 | * Copyright (c) 1989 Carnegie Mellon University. 37 | * All rights reserved. 38 | * 39 | * Redistribution and use in source and binary forms are permitted 40 | * provided that the above copyright notice and this paragraph are 41 | * duplicated in all such forms and that any documentation, 42 | * advertising materials, and other materials related to such 43 | * distribution and use acknowledge that the software was developed 44 | * by Carnegie Mellon University. The name of the 45 | * University may not be used to endorse or promote products derived 46 | * from this software without specific prior written permission. 47 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 48 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 49 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 50 | */ 51 | 52 | #include "lwip/opt.h" 53 | 54 | #if PPP_SUPPORT 55 | 56 | #include "ppp_impl.h" 57 | #include "randm.h" 58 | #include "magic.h" 59 | 60 | 61 | /* 62 | * magicInit - Initialize the magic number generator. 63 | * 64 | * Since we use another random number generator that has its own 65 | * initialization, we do nothing here. 66 | */ 67 | void magicInit() 68 | { 69 | return; 70 | } 71 | 72 | /* 73 | * magic - Returns the next magic number. 74 | */ 75 | u32_t magic() 76 | { 77 | return avRandom(); 78 | } 79 | 80 | #endif /* PPP_SUPPORT */ 81 | -------------------------------------------------------------------------------- /lwip/src/netif/ppp/magic.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * magic.h - Network Random Number Generator header file. 3 | * 4 | * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. 5 | * portions Copyright (c) 1997 Global Election Systems Inc. 6 | * 7 | * The authors hereby grant permission to use, copy, modify, distribute, 8 | * and license this software and its documentation for any purpose, provided 9 | * that existing copyright notices are retained in all copies and that this 10 | * notice and the following disclaimer are included verbatim in any 11 | * distributions. No written agreement, license, or royalty fee is required 12 | * for any of the authorized uses. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | * 25 | ****************************************************************************** 26 | * REVISION HISTORY 27 | * 28 | * 03-01-01 Marc Boucher 29 | * Ported to lwIP. 30 | * 97-12-04 Guy Lancaster , Global Election Systems Inc. 31 | * Original derived from BSD codes. 32 | *****************************************************************************/ 33 | /* 34 | * magic.h - PPP Magic Number definitions. 35 | * 36 | * Copyright (c) 1989 Carnegie Mellon University. 37 | * All rights reserved. 38 | * 39 | * Redistribution and use in source and binary forms are permitted 40 | * provided that the above copyright notice and this paragraph are 41 | * duplicated in all such forms and that any documentation, 42 | * advertising materials, and other materials related to such 43 | * distribution and use acknowledge that the software was developed 44 | * by Carnegie Mellon University. The name of the 45 | * University may not be used to endorse or promote products derived 46 | * from this software without specific prior written permission. 47 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 48 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 49 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 50 | * 51 | * $Id: magic.h,v 1.3 2010/01/18 20:49:43 goldsimon Exp $ 52 | */ 53 | 54 | #ifndef MAGIC_H 55 | #define MAGIC_H 56 | 57 | /* Initialize the magic number generator */ 58 | void magicInit(void); 59 | 60 | /* Returns the next magic number */ 61 | u32_t magic(void); 62 | 63 | #endif /* MAGIC_H */ 64 | -------------------------------------------------------------------------------- /lwip/src/netif/ppp/md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | *********************************************************************** 3 | ** md5.h -- header file for implementation of MD5 ** 4 | ** RSA Data Security, Inc. MD5 Message-Digest Algorithm ** 5 | ** Created: 2/17/90 RLR ** 6 | ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version ** 7 | ** Revised (for MD5): RLR 4/27/91 ** 8 | ** -- G modified to have y&~z instead of y&z ** 9 | ** -- FF, GG, HH modified to add in last register done ** 10 | ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 ** 11 | ** -- distinct additive constant for each step ** 12 | ** -- round 4 added, working mod 7 ** 13 | *********************************************************************** 14 | */ 15 | 16 | /* 17 | *********************************************************************** 18 | ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. ** 19 | ** ** 20 | ** License to copy and use this software is granted provided that ** 21 | ** it is identified as the "RSA Data Security, Inc. MD5 Message- ** 22 | ** Digest Algorithm" in all material mentioning or referencing this ** 23 | ** software or this function. ** 24 | ** ** 25 | ** License is also granted to make and use derivative works ** 26 | ** provided that such works are identified as "derived from the RSA ** 27 | ** Data Security, Inc. MD5 Message-Digest Algorithm" in all ** 28 | ** material mentioning or referencing the derived work. ** 29 | ** ** 30 | ** RSA Data Security, Inc. makes no representations concerning ** 31 | ** either the merchantability of this software or the suitability ** 32 | ** of this software for any particular purpose. It is provided "as ** 33 | ** is" without express or implied warranty of any kind. ** 34 | ** ** 35 | ** These notices must be retained in any copies of any part of this ** 36 | ** documentation and/or software. ** 37 | *********************************************************************** 38 | */ 39 | 40 | #ifndef MD5_H 41 | #define MD5_H 42 | 43 | /* Data structure for MD5 (Message-Digest) computation */ 44 | typedef struct { 45 | u32_t i[2]; /* number of _bits_ handled mod 2^64 */ 46 | u32_t buf[4]; /* scratch buffer */ 47 | unsigned char in[64]; /* input buffer */ 48 | unsigned char digest[16]; /* actual digest after MD5Final call */ 49 | } MD5_CTX; 50 | 51 | void MD5Init ( MD5_CTX *mdContext); 52 | void MD5Update( MD5_CTX *mdContext, unsigned char *inBuf, unsigned int inLen); 53 | void MD5Final ( unsigned char hash[], MD5_CTX *mdContext); 54 | 55 | #endif /* MD5_H */ 56 | -------------------------------------------------------------------------------- /lwip/src/netif/ppp/pppdebug.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * pppdebug.h - System debugging utilities. 3 | * 4 | * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. 5 | * portions Copyright (c) 1998 Global Election Systems Inc. 6 | * portions Copyright (c) 2001 by Cognizant Pty Ltd. 7 | * 8 | * The authors hereby grant permission to use, copy, modify, distribute, 9 | * and license this software and its documentation for any purpose, provided 10 | * that existing copyright notices are retained in all copies and that this 11 | * notice and the following disclaimer are included verbatim in any 12 | * distributions. No written agreement, license, or royalty fee is required 13 | * for any of the authorized uses. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR 16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 | * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | ****************************************************************************** 27 | * REVISION HISTORY (please don't use tabs!) 28 | * 29 | * 03-01-01 Marc Boucher 30 | * Ported to lwIP. 31 | * 98-07-29 Guy Lancaster , Global Election Systems Inc. 32 | * Original. 33 | * 34 | ***************************************************************************** 35 | */ 36 | #ifndef PPPDEBUG_H 37 | #define PPPDEBUG_H 38 | 39 | /* Trace levels. */ 40 | #define LOG_CRITICAL (PPP_DEBUG | LWIP_DBG_LEVEL_SEVERE) 41 | #define LOG_ERR (PPP_DEBUG | LWIP_DBG_LEVEL_SEVERE) 42 | #define LOG_NOTICE (PPP_DEBUG | LWIP_DBG_LEVEL_WARNING) 43 | #define LOG_WARNING (PPP_DEBUG | LWIP_DBG_LEVEL_WARNING) 44 | #define LOG_INFO (PPP_DEBUG) 45 | #define LOG_DETAIL (PPP_DEBUG) 46 | #define LOG_DEBUG (PPP_DEBUG) 47 | 48 | 49 | #define TRACELCP PPP_DEBUG 50 | 51 | #if PPP_DEBUG 52 | 53 | #define AUTHDEBUG(a, b) LWIP_DEBUGF(a, b) 54 | #define IPCPDEBUG(a, b) LWIP_DEBUGF(a, b) 55 | #define UPAPDEBUG(a, b) LWIP_DEBUGF(a, b) 56 | #define LCPDEBUG(a, b) LWIP_DEBUGF(a, b) 57 | #define FSMDEBUG(a, b) LWIP_DEBUGF(a, b) 58 | #define CHAPDEBUG(a, b) LWIP_DEBUGF(a, b) 59 | #define PPPDEBUG(a, b) LWIP_DEBUGF(a, b) 60 | 61 | #else /* PPP_DEBUG */ 62 | 63 | #define AUTHDEBUG(a, b) 64 | #define IPCPDEBUG(a, b) 65 | #define UPAPDEBUG(a, b) 66 | #define LCPDEBUG(a, b) 67 | #define FSMDEBUG(a, b) 68 | #define CHAPDEBUG(a, b) 69 | #define PPPDEBUG(a, b) 70 | 71 | #endif /* PPP_DEBUG */ 72 | 73 | #endif /* PPPDEBUG_H */ 74 | -------------------------------------------------------------------------------- /lwip/src/netif/ppp/randm.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * randm.h - Random number generator header file. 3 | * 4 | * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc. 5 | * Copyright (c) 1998 Global Election Systems Inc. 6 | * 7 | * The authors hereby grant permission to use, copy, modify, distribute, 8 | * and license this software and its documentation for any purpose, provided 9 | * that existing copyright notices are retained in all copies and that this 10 | * notice and the following disclaimer are included verbatim in any 11 | * distributions. No written agreement, license, or royalty fee is required 12 | * for any of the authorized uses. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | * 25 | ****************************************************************************** 26 | * REVISION HISTORY 27 | * 28 | * 03-01-01 Marc Boucher 29 | * Ported to lwIP. 30 | * 98-05-29 Guy Lancaster , Global Election Systems Inc. 31 | * Extracted from avos. 32 | *****************************************************************************/ 33 | 34 | #ifndef RANDM_H 35 | #define RANDM_H 36 | 37 | /*********************** 38 | *** PUBLIC FUNCTIONS *** 39 | ***********************/ 40 | /* 41 | * Initialize the random number generator. 42 | */ 43 | void avRandomInit(void); 44 | 45 | /* 46 | * Churn the randomness pool on a random event. Call this early and often 47 | * on random and semi-random system events to build randomness in time for 48 | * usage. For randomly timed events, pass a null pointer and a zero length 49 | * and this will use the system timer and other sources to add randomness. 50 | * If new random data is available, pass a pointer to that and it will be 51 | * included. 52 | */ 53 | void avChurnRand(char *randData, u32_t randLen); 54 | 55 | /* 56 | * Randomize our random seed value. To be called for truely random events 57 | * such as user operations and network traffic. 58 | */ 59 | #if MD5_SUPPORT 60 | #define avRandomize() avChurnRand(NULL, 0) 61 | #else /* MD5_SUPPORT */ 62 | void avRandomize(void); 63 | #endif /* MD5_SUPPORT */ 64 | 65 | /* 66 | * Use the random pool to generate random data. This degrades to pseudo 67 | * random when used faster than randomness is supplied using churnRand(). 68 | * Thus it's important to make sure that the results of this are not 69 | * published directly because one could predict the next result to at 70 | * least some degree. Also, it's important to get a good seed before 71 | * the first use. 72 | */ 73 | void avGenRand(char *buf, u32_t bufLen); 74 | 75 | /* 76 | * Return a new random number. 77 | */ 78 | u32_t avRandom(void); 79 | 80 | 81 | #endif /* RANDM_H */ 82 | -------------------------------------------------------------------------------- /main.c: -------------------------------------------------------------------------------- 1 | #include "stm32f4xx.h" 2 | #include "stm32f4_discovery.h" 3 | 4 | #include "FreeRTOS.h" 5 | #include "task.h" 6 | 7 | #include "stm32f4x7_eth_bsp.h" 8 | 9 | #include "http_server.h" 10 | 11 | void vTaskLED1(void *pvParameters) { 12 | for (;;) { 13 | STM_EVAL_LEDToggle(LED3); 14 | vTaskDelay(500); 15 | } 16 | } 17 | 18 | void vTaskLED2(void *pvParameters) { 19 | for (;;) { 20 | STM_EVAL_LEDToggle(LED4); 21 | vTaskDelay(321); 22 | } 23 | } 24 | 25 | #include "lwip/mem.h" 26 | #include "lwip/memp.h" 27 | #include "lwip/dhcp.h" 28 | #include "ethernetif.h" 29 | #include "main.h" 30 | #include "tcpip.h" 31 | #include "netif.h" 32 | #include 33 | 34 | struct netif xnetif; /* network interface structure */ 35 | 36 | void LwIP_Init(void) 37 | { 38 | ip_addr_t ipaddr; 39 | ip_addr_t netmask; 40 | ip_addr_t gw; 41 | 42 | /* Create tcp_ip stack thread */ 43 | tcpip_init( NULL, NULL ); 44 | 45 | /* IP address setting & display on STM32_evalboard LCD*/ 46 | #ifdef USE_DHCP 47 | ipaddr.addr = 0; 48 | netmask.addr = 0; 49 | gw.addr = 0; 50 | #else 51 | IP4_ADDR(&ipaddr, IP_ADDR0, IP_ADDR1, IP_ADDR2, IP_ADDR3); 52 | IP4_ADDR(&netmask, NETMASK_ADDR0, NETMASK_ADDR1 , NETMASK_ADDR2, NETMASK_ADDR3); 53 | IP4_ADDR(&gw, GW_ADDR0, GW_ADDR1, GW_ADDR2, GW_ADDR3); 54 | #endif 55 | 56 | /* - netif_add(struct netif *netif, struct ip_addr *ipaddr, 57 | struct ip_addr *netmask, struct ip_addr *gw, 58 | void *state, err_t (* init)(struct netif *netif), 59 | err_t (* input)(struct pbuf *p, struct netif *netif)) 60 | 61 | Adds your network interface to the netif_list. Allocate a struct 62 | netif and pass a pointer to this structure as the first argument. 63 | Give pointers to cleared ip_addr structures when using DHCP, 64 | or fill them with sane numbers otherwise. The state pointer may be NULL. 65 | 66 | The init function pointer must point to a initialization function for 67 | your ethernet netif interface. The following code illustrates it's use.*/ 68 | 69 | netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 70 | 71 | /* Registers the default network interface. */ 72 | netif_set_default(&xnetif); 73 | 74 | /* When the netif is fully configured this function must be called.*/ 75 | netif_set_up(&xnetif); 76 | } 77 | 78 | 79 | int main() 80 | { 81 | STM_EVAL_LEDInit(LED3); 82 | STM_EVAL_LEDInit(LED4); 83 | STM_EVAL_LEDInit(LED5); 84 | 85 | /* configure Ethernet (GPIOs, clocks, MAC, DMA) */ 86 | ETH_BSP_Config(); 87 | 88 | /* Initilaize the LwIP stack */ 89 | LwIP_Init(); 90 | 91 | /* Initialize webserver demo */ 92 | //http_server_netconn_init(); 93 | 94 | 95 | xTaskCreate(vTaskLED1, "LED1", configMINIMAL_STACK_SIZE, NULL, 2, ( TaskHandle_t * ) NULL); 96 | xTaskCreate(vTaskLED2, "LED2", configMINIMAL_STACK_SIZE, NULL, 2, ( TaskHandle_t * ) NULL); 97 | 98 | xTaskCreate(http_server_netconn_thread, "HTTP", configMINIMAL_STACK_SIZE, NULL, 2, ( TaskHandle_t * ) NULL); 99 | 100 | vTaskStartScheduler(); 101 | return 0; 102 | } 103 | -------------------------------------------------------------------------------- /main.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file main.h 4 | * @author MCD Application Team 5 | * @version V1.0.0 6 | * @date 31-October-2011 7 | * @brief This file contains all the functions prototypes for the main.c 8 | * file. 9 | ****************************************************************************** 10 | * @attention 11 | * 12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 18 | * 19 | *

© Portions COPYRIGHT 2011 STMicroelectronics

20 | ****************************************************************************** 21 | */ 22 | /** 23 | ****************************************************************************** 24 | *

© Portions COPYRIGHT 2012 Embest Tech. Co., Ltd.

25 | * @file main.h 26 | * @author CMP Team 27 | * @version V1.0.0 28 | * @date 28-December-2012 29 | * @brief This file contains all the functions prototypes for the main.c 30 | * file. 31 | * Modified to support the STM32F4DISCOVERY, STM32F4DIS-BB and 32 | * STM32F4DIS-LCD modules. 33 | ****************************************************************************** 34 | * @attention 35 | * 36 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 37 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 38 | * TIME. AS A RESULT, Embest SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT 39 | * OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT 40 | * OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION 41 | * CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 42 | ****************************************************************************** 43 | */ 44 | /* Define to prevent recursive inclusion -------------------------------------*/ 45 | #ifndef __MAIN_H 46 | #define __MAIN_H 47 | 48 | #ifdef __cplusplus 49 | extern "C" { 50 | #endif 51 | 52 | /* Includes ------------------------------------------------------------------*/ 53 | #include "stm32f4xx.h" 54 | #include "stm32f4x7_eth_bsp.h" 55 | 56 | /* Exported types ------------------------------------------------------------*/ 57 | /* Exported constants --------------------------------------------------------*/ 58 | #define USE_LCD /* enable LCD */ 59 | //#define USE_DHCP 60 | 61 | /* MAC ADDRESS*/ 62 | #define MAC_ADDR0 02 63 | #define MAC_ADDR1 00 64 | #define MAC_ADDR2 00 65 | #define MAC_ADDR3 00 66 | #define MAC_ADDR4 00 67 | #define MAC_ADDR5 00 68 | 69 | /*Static IP ADDRESS*/ 70 | #define IP_ADDR0 192 71 | #define IP_ADDR1 168 72 | #define IP_ADDR2 1 73 | #define IP_ADDR3 2 74 | 75 | /*NETMASK*/ 76 | #define NETMASK_ADDR0 255 77 | #define NETMASK_ADDR1 255 78 | #define NETMASK_ADDR2 255 79 | #define NETMASK_ADDR3 0 80 | 81 | /*Gateway Address*/ 82 | #define GW_ADDR0 192 83 | #define GW_ADDR1 168 84 | #define GW_ADDR2 0 85 | #define GW_ADDR3 1 86 | 87 | /* MII and RMII mode selection, for STM324xG-EVAL Board(MB786) RevB ***********/ 88 | #define RMII_MODE 89 | 90 | 91 | /* Exported macro ------------------------------------------------------------*/ 92 | /* Exported functions ------------------------------------------------------- */ 93 | void Time_Update(void); 94 | void Delay(uint32_t nCount); 95 | 96 | 97 | #ifdef __cplusplus 98 | } 99 | #endif 100 | 101 | #endif /* __MAIN_H */ 102 | 103 | 104 | /*********** Portions COPYRIGHT 2012 Embest Tech. Co., Ltd.*****END OF FILE****/ 105 | 106 | 107 | -------------------------------------------------------------------------------- /settings/ethernet.Debug.cspy.bat: -------------------------------------------------------------------------------- 1 | @REM This batch file has been generated by the IAR Embedded Workbench 2 | @REM C-SPY Debugger, as an aid to preparing a command line for running 3 | @REM the cspybat command line utility using the appropriate settings. 4 | @REM 5 | @REM Note that this file is generated every time a new debug session 6 | @REM is initialized, so you may want to move or rename the file before 7 | @REM making changes. 8 | @REM 9 | @REM You can launch cspybat by typing the name of this batch file followed 10 | @REM by the name of the debug file (usually an ELF/DWARF or UBROF file). 11 | @REM 12 | @REM Read about available command line parameters in the C-SPY Debugging 13 | @REM Guide. Hints about additional command line parameters that may be 14 | @REM useful in specific cases: 15 | @REM --download_only Downloads a code image without starting a debug 16 | @REM session afterwards. 17 | @REM --silent Omits the sign-on message. 18 | @REM --timeout Limits the maximum allowed execution time. 19 | @REM 20 | 21 | 22 | "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\common\bin\cspybat" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\bin\armproc.dll" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\bin\armstlink.dll" %1 --plugin "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\bin\armbat.dll" --device_macro "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\config\debugger\ST\STM32F4xx.dmac" --flash_loader "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\config\flashloader\ST\FlashSTM32F4xxx.board" --backend -B "--endian=little" "--cpu=Cortex-M4F" "--fpu=VFPv4" "-p" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\CONFIG\debugger\ST\STM32F407VG.ddf" "--semihosting" "--device=STM32F407VG" "--stlink_interface=SWD" "--stlink_reset_strategy=0,0" "--drv_swo_clock_setup=72000000,0,2000000" 23 | 24 | 25 | -------------------------------------------------------------------------------- /settings/ethernet.crun: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1 5 | 6 | 7 | * 8 | * 9 | * 10 | 0 11 | 1 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /settings/ethernet.cspy.bat: -------------------------------------------------------------------------------- 1 | @REM This batch file has been generated by the IAR Embedded Workbench 2 | @REM C-SPY Debugger, as an aid to preparing a command line for running 3 | @REM the cspybat command line utility using the appropriate settings. 4 | @REM 5 | @REM Note that this file is generated every time a new debug session 6 | @REM is initialized, so you may want to move or rename the file before 7 | @REM making changes. 8 | @REM 9 | @REM You can launch cspybat by typing the name of this batch file followed 10 | @REM by the name of the debug file (usually an ELF/DWARF or UBROF file). 11 | @REM 12 | @REM Read about available command line parameters in the C-SPY Debugging 13 | @REM Guide. Hints about additional command line parameters that may be 14 | @REM useful in specific cases: 15 | @REM --download_only Downloads a code image without starting a debug 16 | @REM session afterwards. 17 | @REM --silent Omits the sign-on message. 18 | @REM --timeout Limits the maximum allowed execution time. 19 | @REM 20 | 21 | 22 | "C:\Program Files\IAR Systems\Embedded Workbench 6.5\common\bin\cspybat" "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\bin\armproc.dll" "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\bin\armstlink.dll" %1 --plugin "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\bin\armbat.dll" --macro "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\config\debugger\ST\Trace_STM32F4xx.dmac" --flash_loader "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\config\flashloader\ST\FlashSTM32F4xxx.board" --backend -B "--endian=little" "--cpu=Cortex-M4" "--fpu=VFPv4" "-p" "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\CONFIG\debugger\ST\STM32F407VG.ddf" "--semihosting" "--device=STM32F407VG" "--stlink_interface=SWD" "--stlink_reset_strategy=0,0" "--drv_swo_clock_setup=72000000,0,2000000" 23 | 24 | 25 | -------------------------------------------------------------------------------- /settings/ethernet.dni: -------------------------------------------------------------------------------- 1 | [Stack] 2 | FillEnabled=0 3 | OverflowWarningsEnabled=1 4 | WarningThreshold=90 5 | SpWarningsEnabled=1 6 | WarnLogOnly=1 7 | UseTrigger=1 8 | TriggerName=main 9 | LimitSize=0 10 | ByteLimit=50 11 | [Interrupts] 12 | Enabled=1 13 | [MemoryMap] 14 | Enabled=0 15 | Base=0 16 | UseAuto=0 17 | TypeViolation=1 18 | UnspecRange=1 19 | ActionState=1 20 | [DebugChecksum] 21 | Checksum=787865438 22 | [Exceptions] 23 | StopOnUncaught=_ 0 24 | StopOnThrow=_ 0 25 | [CallStack] 26 | ShowArgs=0 27 | [Disassembly] 28 | MixedMode=1 29 | [SWOTraceHWSettings] 30 | OverrideDefaultClocks=0 31 | CpuClock=72000000 32 | ClockAutoDetect=0 33 | ClockWanted=2000000 34 | JtagSpeed=2000000 35 | Prescaler=36 36 | TimeStampPrescIndex=0 37 | TimeStampPrescData=0 38 | PcSampCYCTAP=1 39 | PcSampPOSTCNT=15 40 | PcSampIndex=0 41 | DataLogMode=0 42 | ITMportsEnable=0 43 | ITMportsTermIO=0 44 | ITMportsLogFile=0 45 | ITMlogFile=$PROJ_DIR$\ITM.log 46 | [CodeCoverage] 47 | Enabled=_ 0 48 | [SWOTraceWindow] 49 | PcSampling=0 50 | InterruptLogs=0 51 | ForcedTimeStamps=0 52 | EventCPI=0 53 | EventEXC=0 54 | EventFOLD=0 55 | EventLSU=0 56 | EventSLEEP=0 57 | [DataLog] 58 | LogEnabled=0 59 | SumEnabled=0 60 | GraphEnabled=0 61 | ShowTimeLog=1 62 | ShowTimeSum=1 63 | [InterruptLog] 64 | LogEnabled=0 65 | SumEnabled=0 66 | GraphEnabled=0 67 | ShowTimeLog=1 68 | ShowTimeSum=1 69 | SumSortOrder=0 70 | [Log file] 71 | LoggingEnabled=_ 0 72 | LogFile=_ "" 73 | Category=_ 0 74 | [TermIOLog] 75 | LoggingEnabled=_ 0 76 | LogFile=_ "" 77 | [CallStackLog] 78 | Enabled=0 79 | [DriverProfiling] 80 | Enabled=0 81 | Mode=3 82 | Graph=0 83 | Symbiont=0 84 | Exclusions= 85 | [Disassemble mode] 86 | mode=0 87 | [Breakpoints2] 88 | Count=0 89 | [Aliases] 90 | Count=0 91 | SuppressDialog=0 92 | -------------------------------------------------------------------------------- /settings/ethernet.wsdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ethernet/Debug 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 2208270 16 | 17 | 20103527669201381496708502304967085049670850 18 | 19 | 20 | 21 | 22 | 23 | TabID-16389-21742 24 | Workspace 25 | Workspace 26 | 27 | 28 | ethernet 29 | 30 | 31 | 32 | 0TabID-11309-29616BuildBuildTabID-4433-20311Debug LogDebug-LogTabID-11440-28367Find in FilesFind-in-FilesTabID-29391-23287Ambiguous DefinitionsSelect-Ambiguous-DefinitionsTabID-108-10814Find All DeclarationsFind-All-Declarations0 33 | 34 | 35 | 36 | 37 | 38 | 0100000010000001 39 | 40 | 41 | 42 | 43 | 44 | 45 | iaridepm.enu1-2-2466275-2-2166175127301241047212423644628-2-22151306-2-213082171003067298898127301241047 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /settings/ethernet.wspos: -------------------------------------------------------------------------------- 1 | [MainWindow] 2 | WindowPlacement=_ 42 13 1234 730 3 3 | -------------------------------------------------------------------------------- /stm32f4x7_eth_bsp.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f4x7_eth_bsp.h 4 | * @author MCD Application Team 5 | * @version V1.0.0 6 | * @date 31-October-2011 7 | * @brief Header for stm32f4x7_eth_bsp.c file. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 17 | * 18 | *

© Portions COPYRIGHT 2011 STMicroelectronics

19 | ****************************************************************************** 20 | */ 21 | /** 22 | ****************************************************************************** 23 | *

© Portions COPYRIGHT 2012 Embest Tech. Co., Ltd.

24 | * @file stm32f4x7_eth_bsp.h 25 | * @author CMP Team 26 | * @version V1.0.0 27 | * @date 28-December-2012 28 | * @brief Header for stm32f4x7_eth_bsp.c file. 29 | * Modified to support the STM32F4DISCOVERY, STM32F4DIS-BB and 30 | * STM32F4DIS-LCD modules. 31 | ****************************************************************************** 32 | * @attention 33 | * 34 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 35 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 36 | * TIME. AS A RESULT, Embest SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT 37 | * OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT 38 | * OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION 39 | * CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 40 | ****************************************************************************** 41 | */ 42 | /* Define to prevent recursive inclusion -------------------------------------*/ 43 | #ifndef __STM32F4x7_ETH_BSP_H 44 | #define __STM32F4x7_ETH_BSP_H 45 | 46 | #ifdef __cplusplus 47 | extern "C" { 48 | #endif 49 | 50 | /* Includes ------------------------------------------------------------------*/ 51 | #include "stm32f4xx.h" 52 | #include "stm32f4_discovery.h" 53 | //#include "stm32f4_discovery_lcd.h" 54 | 55 | /* Exported types ------------------------------------------------------------*/ 56 | /* Exported constants --------------------------------------------------------*/ 57 | #define LAN8720_PHY_ADDRESS 0x01 /* Relative to STM324xG-EVAL Board */ 58 | 59 | /* Exported macro ------------------------------------------------------------*/ 60 | /* Exported functions ------------------------------------------------------- */ 61 | void ETH_BSP_Config(void); 62 | 63 | #ifdef __cplusplus 64 | } 65 | #endif 66 | 67 | #endif /* __STM32F4x7_ETH_BSP_H */ 68 | 69 | 70 | /*********** Portions COPYRIGHT 2012 Embest Tech. Co., Ltd.*****END OF FILE****/ 71 | -------------------------------------------------------------------------------- /stm32f4xx_it.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * @file stm32f4xx_it.h 4 | * @author MCD Application Team 5 | * @version V1.0.0 6 | * @date 31-October-2011 7 | * @brief This file contains the headers of the interrupt handlers. 8 | ****************************************************************************** 9 | * @attention 10 | * 11 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 12 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 13 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY 14 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING 15 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE 16 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 17 | * 18 | *

© Portions COPYRIGHT 2011 STMicroelectronics

19 | ****************************************************************************** 20 | */ 21 | /** 22 | ****************************************************************************** 23 | *

© Portions COPYRIGHT 2012 Embest Tech. Co., Ltd.

24 | * @file stm32f4xx_it.h 25 | * @author CMP Team 26 | * @version V1.0.0 27 | * @date 28-December-2012 28 | * @brief This file contains the headers of the interrupt handlers. 29 | * Modified to support the STM32F4DISCOVERY, STM32F4DIS-BB and 30 | * STM32F4DIS-LCD modules. 31 | ****************************************************************************** 32 | * @attention 33 | * 34 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS 35 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE 36 | * TIME. AS A RESULT, Embest SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT 37 | * OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT 38 | * OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION 39 | * CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. 40 | ****************************************************************************** 41 | */ 42 | /* Define to prevent recursive inclusion -------------------------------------*/ 43 | #ifndef __STM32F4xx_IT_H 44 | #define __STM32F4xx_IT_H 45 | 46 | #ifdef __cplusplus 47 | extern "C" { 48 | #endif 49 | 50 | /* Includes ------------------------------------------------------------------*/ 51 | #include "stm32f4xx.h" 52 | 53 | /* Exported types ------------------------------------------------------------*/ 54 | /* Exported constants --------------------------------------------------------*/ 55 | /* Exported macro ------------------------------------------------------------*/ 56 | /* Exported functions ------------------------------------------------------- */ 57 | 58 | void NMI_Handler(void); 59 | void HardFault_Handler(void); 60 | void MemManage_Handler(void); 61 | void BusFault_Handler(void); 62 | void UsageFault_Handler(void); 63 | void SVC_Handler(void); 64 | void DebugMon_Handler(void); 65 | void PendSV_Handler(void); 66 | void SysTick_Handler(void); 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | 72 | #endif /* __STM32F4xx_IT_H */ 73 | 74 | /*********** Portions COPYRIGHT 2012 Embest Tech. Co., Ltd.*****END OF FILE****/ 75 | --------------------------------------------------------------------------------