├── README.md
├── code
├── MDK-ARM
│ ├── Discovery.uvproj
│ └── startup_stm32f4xx.s
├── inc
│ ├── FreeRTOSConfig.h
│ ├── lwipopts.h
│ ├── main.h
│ ├── netconf.h
│ ├── shell.h
│ ├── stm32f4x7_eth_bsp.h
│ ├── stm32f4x7_eth_conf.h
│ ├── stm32f4xx_conf.h
│ ├── stm32f4xx_it.h
│ └── telnet.h
├── readme.txt
└── src
│ ├── RTX_Conf_CM.c
│ ├── main.c
│ ├── netconf.c
│ ├── shell.c
│ ├── stm32f4x7_eth_bsp.c
│ ├── stm32f4xx_it.c
│ ├── system_stm32f4xx.c
│ └── telnet.c
└── libraries
├── 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
├── RTX-v4.73
├── Doc
│ ├── CMSIS_Logo_Final.png
│ ├── MailQueue.png
│ ├── MessageQueue.png
│ ├── Mutex.png
│ ├── RTX_Structure.png
│ ├── Semaphore.png
│ ├── ThreadStatus.png
│ ├── Timer.png
│ ├── UV4_Template.png
│ ├── _configure.html
│ ├── _configure.js
│ ├── _files.html
│ ├── _function_overview.html
│ ├── _overview.html
│ ├── _overview.js
│ ├── _r_t_x__conf__c_m.html
│ ├── _system_config.html
│ ├── _technical_data.html
│ ├── _theory.html
│ ├── _thread_config.html
│ ├── _timer_tick.html
│ ├── _using.html
│ ├── annotated.html
│ ├── annotated.js
│ ├── bc_s.png
│ ├── bdwn.png
│ ├── classes.html
│ ├── closed.png
│ ├── cmsis.css
│ ├── cmsis__os_8h.html
│ ├── cmsis__os__api_8txt.html
│ ├── cmsis_os_h.html
│ ├── dir_4c1954b16240b09fc149beff73880b13.html
│ ├── doxygen.png
│ ├── dynsections.js
│ ├── files.html
│ ├── ftv2blank.png
│ ├── ftv2cl.png
│ ├── ftv2doc.png
│ ├── ftv2folderclosed.png
│ ├── ftv2folderopen.png
│ ├── ftv2lastnode.png
│ ├── ftv2link.png
│ ├── ftv2mlastnode.png
│ ├── ftv2mnode.png
│ ├── ftv2mo.png
│ ├── ftv2node.png
│ ├── ftv2ns.png
│ ├── ftv2plastnode.png
│ ├── ftv2pnode.png
│ ├── ftv2splitbar.png
│ ├── ftv2vertline.png
│ ├── functions.html
│ ├── functions_vars.html
│ ├── globals.html
│ ├── globals_defs.html
│ ├── globals_enum.html
│ ├── globals_eval.html
│ ├── globals_func.html
│ ├── globals_type.html
│ ├── globals_vars.html
│ ├── group___c_m_s_i_s___r_t_o_s.html
│ ├── group___c_m_s_i_s___r_t_o_s.js
│ ├── group___c_m_s_i_s___r_t_o_s___definitions.html
│ ├── group___c_m_s_i_s___r_t_o_s___definitions.js
│ ├── group___c_m_s_i_s___r_t_o_s___kernel_ctrl.html
│ ├── group___c_m_s_i_s___r_t_o_s___kernel_ctrl.js
│ ├── group___c_m_s_i_s___r_t_o_s___mail.html
│ ├── group___c_m_s_i_s___r_t_o_s___mail.js
│ ├── group___c_m_s_i_s___r_t_o_s___message.html
│ ├── group___c_m_s_i_s___r_t_o_s___message.js
│ ├── group___c_m_s_i_s___r_t_o_s___mutex_mgmt.html
│ ├── group___c_m_s_i_s___r_t_o_s___mutex_mgmt.js
│ ├── group___c_m_s_i_s___r_t_o_s___pool_mgmt.html
│ ├── group___c_m_s_i_s___r_t_o_s___pool_mgmt.js
│ ├── group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.html
│ ├── group___c_m_s_i_s___r_t_o_s___semaphore_mgmt.js
│ ├── group___c_m_s_i_s___r_t_o_s___signal_mgmt.html
│ ├── group___c_m_s_i_s___r_t_o_s___signal_mgmt.js
│ ├── group___c_m_s_i_s___r_t_o_s___status.html
│ ├── group___c_m_s_i_s___r_t_o_s___status.js
│ ├── group___c_m_s_i_s___r_t_o_s___thread_mgmt.html
│ ├── group___c_m_s_i_s___r_t_o_s___thread_mgmt.js
│ ├── group___c_m_s_i_s___r_t_o_s___timer_mgmt.html
│ ├── group___c_m_s_i_s___r_t_o_s___timer_mgmt.js
│ ├── group___c_m_s_i_s___r_t_o_s___wait.html
│ ├── group___c_m_s_i_s___r_t_o_s___wait.js
│ ├── index.html
│ ├── jquery.js
│ ├── modules.html
│ ├── modules.js
│ ├── nav_f.png
│ ├── nav_g.png
│ ├── nav_h.png
│ ├── navtree.css
│ ├── navtree.js
│ ├── navtreeindex0.js
│ ├── open.png
│ ├── pages.html
│ ├── resize.js
│ ├── rtx_8txt.html
│ ├── structos_mail_q_def__t.html
│ ├── structos_mail_q_def__t.js
│ ├── structos_message_q_def__t.html
│ ├── structos_message_q_def__t.js
│ ├── structos_mutex_def__t.html
│ ├── structos_mutex_def__t.js
│ ├── structos_pool_def__t.html
│ ├── structos_pool_def__t.js
│ ├── structos_semaphore_def__t.html
│ ├── structos_semaphore_def__t.js
│ ├── structos_thread_def__t.html
│ ├── structos_thread_def__t.js
│ ├── structos_timer_def__t.html
│ ├── structos_timer_def__t.js
│ ├── sync_off.png
│ ├── sync_on.png
│ ├── tab_a.png
│ ├── tab_b.png
│ ├── tab_h.png
│ ├── tab_s.png
│ ├── tab_topnav.png
│ └── tabs.css
├── INC
│ ├── RTX_CM_lib.h
│ └── cmsis_os.h
├── LIB
│ ├── ARM
│ │ ├── RTX_CM0.lib
│ │ ├── RTX_CM0_B.lib
│ │ ├── RTX_CM3.lib
│ │ ├── RTX_CM3_B.lib
│ │ ├── RTX_CM3_IFX.lib
│ │ ├── RTX_CM4.lib
│ │ ├── RTX_CM4_B.lib
│ │ └── RTX_CM4_IFX.lib
│ ├── GCC
│ │ ├── libRTX_CM0.a
│ │ ├── libRTX_CM0_B.a
│ │ ├── libRTX_CM3.a
│ │ ├── libRTX_CM3_B.a
│ │ ├── libRTX_CM3_IFX.a
│ │ ├── libRTX_CM4.a
│ │ ├── libRTX_CM4_B.a
│ │ └── libRTX_CM4_IFX.a
│ └── IAR
│ │ ├── RTX_CM0.a
│ │ ├── RTX_CM0_B.a
│ │ ├── RTX_CM3.a
│ │ ├── RTX_CM3_B.a
│ │ ├── RTX_CM4.a
│ │ └── RTX_CM4_B.a
├── License.txt
├── SRC
│ ├── ARM
│ │ ├── HAL_CM0.c
│ │ ├── HAL_CM3.c
│ │ ├── HAL_CM4.c
│ │ ├── RTX_Lib_CM.uvopt
│ │ ├── RTX_Lib_CM.uvproj
│ │ └── SVC_Table.s
│ ├── GCC
│ │ ├── HAL_CM0.s
│ │ ├── HAL_CM3.s
│ │ ├── HAL_CM4.s
│ │ ├── RTX_Lib_CM.uvopt
│ │ ├── RTX_Lib_CM.uvproj
│ │ └── SVC_Table.s
│ ├── HAL_CM.c
│ ├── IAR
│ │ ├── HAL_CM0.s
│ │ ├── HAL_CM3.s
│ │ ├── HAL_CM4.s
│ │ ├── RTX_Lib_CM.ewp
│ │ ├── RTX_Lib_CM.eww
│ │ └── SVC_Table.s
│ ├── RTX_Config.h
│ ├── rt_CMSIS.c
│ ├── rt_Event.c
│ ├── rt_Event.h
│ ├── rt_HAL_CM.h
│ ├── rt_List.c
│ ├── rt_List.h
│ ├── rt_Mailbox.c
│ ├── rt_Mailbox.h
│ ├── rt_MemBox.c
│ ├── rt_MemBox.h
│ ├── rt_Memory.c
│ ├── rt_Memory.h
│ ├── rt_Mutex.c
│ ├── rt_Mutex.h
│ ├── rt_Robin.c
│ ├── rt_Robin.h
│ ├── rt_Semaphore.c
│ ├── rt_Semaphore.h
│ ├── rt_System.c
│ ├── rt_System.h
│ ├── rt_Task.c
│ ├── rt_Task.h
│ ├── rt_Time.c
│ ├── rt_Time.h
│ ├── rt_Timer.c
│ ├── rt_Timer.h
│ └── rt_TypeDef.h
├── Templates
│ └── RTX_Conf_CM.c
├── UserCodeTemplates
│ ├── MailQueue.c
│ ├── MemPool.c
│ ├── MsgQueue.c
│ ├── Mutex.c
│ ├── Semaphore.c
│ ├── Thread.c
│ ├── main.c
│ └── osObjects.h
└── index.html
├── STM32F4-Discovery
├── fonts.c
├── fonts.h
├── lcd_log.c
├── lcd_log.h
├── stm32f4_discovery.c
├── stm32f4_discovery.h
├── stm32f4_discovery_audio_codec.c
├── stm32f4_discovery_audio_codec.h
├── stm32f4_discovery_debug.c
├── stm32f4_discovery_debug.h
├── stm32f4_discovery_lcd.c
├── stm32f4_discovery_lcd.h
├── stm32f4_discovery_lis302dl.c
├── stm32f4_discovery_lis302dl.h
├── stm32f4_discovery_sdio_sd.c
└── stm32f4_discovery_sdio_sd.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
├── lwip-1.4.1
├── CHANGELOG
├── COPYING
├── FILES
├── README
├── UPGRADING
├── doc
│ ├── FILES
│ ├── contrib.txt
│ ├── rawapi.txt
│ ├── savannah.txt
│ ├── snmp_agent.txt
│ └── sys_arch.txt
├── port
│ └── STM32F4x7
│ │ └── arch
│ │ ├── bpstruct.h
│ │ ├── cc.h
│ │ ├── cpu.h
│ │ ├── epstruct.h
│ │ ├── ethernetif.c
│ │ ├── ethernetif.h
│ │ ├── init.h
│ │ ├── lib.h
│ │ ├── perf.h
│ │ ├── sys_arch.c
│ │ └── sys_arch.h
├── 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
└── test
│ └── unit
│ ├── core
│ ├── test_mem.c
│ └── test_mem.h
│ ├── etharp
│ ├── test_etharp.c
│ └── test_etharp.h
│ ├── lwip_check.h
│ ├── lwip_unittests.c
│ ├── lwipopts.h
│ ├── tcp
│ ├── tcp_helper.c
│ ├── tcp_helper.h
│ ├── test_tcp.c
│ ├── test_tcp.h
│ ├── test_tcp_oos.c
│ └── test_tcp_oos.h
│ └── udp
│ ├── test_udp.c
│ └── test_udp.h
└── ptpd-2.0.0
├── COPYRIGHT
├── README
├── RELEASE_NOTES
├── doc
└── IEEE1588v1_vs_IEEE1588v2.pdf
├── src
├── Doxyfile
├── Makefile
├── arith.c
├── bmc.c
├── constants.h
├── datatypes.h
├── dep
│ ├── constants_dep.h
│ ├── datatypes_dep.h
│ ├── msg.c
│ ├── net.c
│ ├── ptpd_dep.h
│ ├── servo.c
│ ├── startup.c
│ ├── sys_time.c
│ └── timer.c
├── protocol.c
├── ptpd.c
├── ptpd.h
└── ptpd2.8
└── tools
├── filter_response.m
└── offset_stats.m
/README.md:
--------------------------------------------------------------------------------
1 | # STM32 F4 PTPD
2 |
3 | IEEE 1588 PTP daemon for STM32 F4 Discovery board
4 |
5 | # Important Note
6 |
7 | While this code did work at one time, it is fairly old and runs on STM32 F4 development
8 | boards that are harder to come by.
9 |
10 | Please see the updated project [stm32_ptpd](https://github.com/mpthompson/stm32_ptpd "stm32_ptpd") which
11 | includes the following enhancements:
12 |
13 | - Provides an example of a PTPD master and slave
14 | - Projects for ST NUCLEO-F429ZI dev board which is more widely available
15 | - Ported PTPD v2 code has been improved and has better comments
16 | - Supports the STM32 F4 HAL library rather than the older standard library
17 | - Project files for Keil uVision and Linux friendly Makefile
18 | - Improved telnet and serial shell for testing
19 | - Easier network configuration in main.c
20 |
--------------------------------------------------------------------------------
/code/inc/netconf.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file netconf.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 netconf.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 netconf.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 netconf.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 __NETCONF_H
46 | #define __NETCONF_H
47 |
48 | #ifdef __cplusplus
49 | extern "C" {
50 | #endif
51 |
52 | /* Includes ------------------------------------------------------------------*/
53 | /* Exported types ------------------------------------------------------------*/
54 | /* Exported constants --------------------------------------------------------*/
55 | /* Exported macro ------------------------------------------------------------*/
56 | /* Exported functions ------------------------------------------------------- */
57 | void LwIP_Init(void);
58 | void LwIP_DHCP_task(void * pvParameters);
59 |
60 | #ifdef __cplusplus
61 | }
62 | #endif
63 |
64 | #endif /* __NETCONF_H */
65 |
66 |
67 | /*********** Portions COPYRIGHT 2012 Embest Tech. Co., Ltd.*****END OF FILE****/
68 |
--------------------------------------------------------------------------------
/code/inc/shell.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file shell.h
4 | * @author Mike Thompson
5 | * @version V1.0.0
6 | * @date 1-April-2014
7 | * @brief Commands for the telnet shell.
8 | ******************************************************************************
9 | */
10 |
11 | #ifndef __SHELL_H__
12 | #define __SHELL_H__
13 |
14 | #include
15 |
16 | void shell_process(void);
17 |
18 | #endif /* __SHELL_H__ */
19 |
--------------------------------------------------------------------------------
/code/inc/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 |
--------------------------------------------------------------------------------
/code/inc/telnet.h:
--------------------------------------------------------------------------------
1 | #ifndef __TELNET_SHELL_H__
2 | #define __TELNET_SHELL_H__
3 |
4 | #include
5 |
6 | void telnet_shell_init(void);
7 |
8 | void telnet_putc(char c);
9 | void telnet_puts(char *str);
10 | void telnet_printf(const char *fmt, ...);
11 | int telnet_flush(void);
12 | int telnet_getc(void);
13 | bool telnet_gets(char *buff, int len, int tocase, bool echo);
14 |
15 | #endif /* __TELNET_SHELL_H__ */
16 |
--------------------------------------------------------------------------------
/libraries/CMSIS/CMSIS END USER LICENCE AGREEMENT.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/CMSIS/CMSIS END USER LICENCE AGREEMENT.pdf
--------------------------------------------------------------------------------
/libraries/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h
--------------------------------------------------------------------------------
/libraries/CMSIS/Documentation/CMSIS_CM4_SIMD.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/CMSIS/Documentation/CMSIS_CM4_SIMD.htm
--------------------------------------------------------------------------------
/libraries/CMSIS/Documentation/CMSIS_Core.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/CMSIS/Documentation/CMSIS_Core.htm
--------------------------------------------------------------------------------
/libraries/CMSIS/Documentation/CMSIS_DebugSupport.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/CMSIS/Documentation/CMSIS_DebugSupport.htm
--------------------------------------------------------------------------------
/libraries/CMSIS/Documentation/CMSIS_History.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/CMSIS/Documentation/CMSIS_History.htm
--------------------------------------------------------------------------------
/libraries/CMSIS/Documentation/CMSIS_Logo_Final.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/CMSIS/Documentation/CMSIS_Logo_Final.jpg
--------------------------------------------------------------------------------
/libraries/CMSIS/Documentation/CMSIS_System_View_Description.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/CMSIS/Documentation/CMSIS_System_View_Description.htm
--------------------------------------------------------------------------------
/libraries/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 |
--------------------------------------------------------------------------------
/libraries/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 | ---
--------------------------------------------------------------------------------
/libraries/CMSIS/index.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/CMSIS/index.htm
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/CMSIS_Logo_Final.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/CMSIS_Logo_Final.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/MailQueue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/MailQueue.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/MessageQueue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/MessageQueue.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/Mutex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/Mutex.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/RTX_Structure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/RTX_Structure.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/Semaphore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/Semaphore.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/ThreadStatus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/ThreadStatus.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/Timer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/Timer.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/UV4_Template.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/UV4_Template.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/_configure.js:
--------------------------------------------------------------------------------
1 | var _configure =
2 | [
3 | [ "RTX_Conf_CM.c Configuration File", "_r_t_x__conf__c_m.html", null ],
4 | [ "Thread Stack and Processor Mode", "_thread_config.html", [
5 | [ "Configuration of Thread Stack Space", "_thread_config.html#StackConfig", null ],
6 | [ "Stack Overflow Checking", "_thread_config.html#StackCheck", null ],
7 | [ "Processor Mode for Thread Execution", "_thread_config.html#ProcessorMode", null ]
8 | ] ],
9 | [ "Tick Timer Configuration", "_timer_tick.html", [
10 | [ "Usage of the Cortex-M SysTick core timer as RTX kernel timer", "_timer_tick.html#SysTick", null ],
11 | [ "Usage of an alternative timer as RTX kernel timer.", "_timer_tick.html#AltTimer", null ],
12 | [ "Configuration for Low-Power modes", "_timer_tick.html#LowPower", null ],
13 | [ "Tick-less operation", "_timer_tick.html#TickLess", null ]
14 | ] ],
15 | [ "System Configuration", "_system_config.html", [
16 | [ "Settings for Round-Robin Thread Switching", "_system_config.html#RoundRobin", null ],
17 | [ "Settings for CMSIS-RTOS Timer Management", "_system_config.html#UserTimer", null ]
18 | ] ]
19 | ];
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/_overview.js:
--------------------------------------------------------------------------------
1 | var _overview =
2 | [
3 | [ "Theory of Operation", "_theory.html", [
4 | [ "RTX Kernel Timer Tick and Thread Management", "_theory.html#KernelTimer", null ],
5 | [ "CMSIS-RTOS RTX Threads", "_theory.html#RTX_Threads", null ],
6 | [ "Priority Inversion on Resource Sharing", "_theory.html#PriorityInversion", null ]
7 | ] ],
8 | [ "Directory Structure and File Overview", "_files.html", [
9 | [ "CMSIS-RTOS RTX Directory Structure", "_files.html#Folders", null ],
10 | [ "CMSIS-RTOS RTX Library Files", "_files.html#LibFiles", null ]
11 | ] ],
12 | [ "Technical Data", "_technical_data.html", [
13 | [ "osWait", "_technical_data.html#osWait", null ]
14 | ] ]
15 | ];
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/annotated.js:
--------------------------------------------------------------------------------
1 | var annotated =
2 | [
3 | [ "osMailQDef_t", "structos_mail_q_def__t.html", "structos_mail_q_def__t" ],
4 | [ "osMessageQDef_t", "structos_message_q_def__t.html", "structos_message_q_def__t" ],
5 | [ "osMutexDef_t", "structos_mutex_def__t.html", "structos_mutex_def__t" ],
6 | [ "osPoolDef_t", "structos_pool_def__t.html", "structos_pool_def__t" ],
7 | [ "osSemaphoreDef_t", "structos_semaphore_def__t.html", "structos_semaphore_def__t" ],
8 | [ "osThreadDef_t", "structos_thread_def__t.html", "structos_thread_def__t" ],
9 | [ "osTimerDef_t", "structos_timer_def__t.html", "structos_timer_def__t" ]
10 | ];
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/bc_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/bc_s.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/bdwn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/bdwn.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/closed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/closed.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/doxygen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/doxygen.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/dynsections.js:
--------------------------------------------------------------------------------
1 | function toggleVisibility(linkObj)
2 | {
3 | var base = $(linkObj).attr('id');
4 | var summary = $('#'+base+'-summary');
5 | var content = $('#'+base+'-content');
6 | var trigger = $('#'+base+'-trigger');
7 | var src=$(trigger).attr('src');
8 | if (content.is(':visible')===true) {
9 | content.hide();
10 | summary.show();
11 | $(linkObj).addClass('closed').removeClass('opened');
12 | $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
13 | } else {
14 | content.show();
15 | summary.hide();
16 | $(linkObj).removeClass('closed').addClass('opened');
17 | $(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
18 | }
19 | return false;
20 | }
21 |
22 | function updateStripes()
23 | {
24 | $('table.directory tr').
25 | removeClass('even').filter(':visible:even').addClass('even');
26 | }
27 | function toggleLevel(level)
28 | {
29 | $('table.directory tr').each(function(){
30 | var l = this.id.split('_').length-1;
31 | var i = $('#img'+this.id.substring(3));
32 | var a = $('#arr'+this.id.substring(3));
33 | if (l=0) window.location.hash=url.substr(i);
77 | var _preventDefault = function(evt) { evt.preventDefault(); };
78 | $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault);
79 | $(document).bind('touchmove',function(e){
80 | try {
81 | var target = e.target;
82 | while (target) {
83 | if ($(target).css('-webkit-overflow-scrolling')=='touch') return;
84 | target = target.parentNode;
85 | }
86 | e.preventDefault();
87 | } catch(err) {
88 | e.preventDefault();
89 | }
90 | });
91 | }
92 |
93 |
94 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/structos_mail_q_def__t.js:
--------------------------------------------------------------------------------
1 | var structos_mail_q_def__t =
2 | [
3 | [ "item_sz", "structos_mail_q_def__t.html#a4c2a0c691de3365c00ecd22d8102811f", null ],
4 | [ "pool", "structos_mail_q_def__t.html#a269c3935f8bc66db70bccdd02cb05e3c", null ],
5 | [ "queue_sz", "structos_mail_q_def__t.html#a8a83a3a8c0aa8057b13807d2a54077e0", null ]
6 | ];
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/structos_message_q_def__t.js:
--------------------------------------------------------------------------------
1 | var structos_message_q_def__t =
2 | [
3 | [ "pool", "structos_message_q_def__t.html#a269c3935f8bc66db70bccdd02cb05e3c", null ],
4 | [ "queue_sz", "structos_message_q_def__t.html#a8a83a3a8c0aa8057b13807d2a54077e0", null ]
5 | ];
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/structos_mutex_def__t.js:
--------------------------------------------------------------------------------
1 | var structos_mutex_def__t =
2 | [
3 | [ "mutex", "structos_mutex_def__t.html#aef475bb63aad7508c7dffe80ad332e4e", null ]
4 | ];
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/structos_pool_def__t.js:
--------------------------------------------------------------------------------
1 | var structos_pool_def__t =
2 | [
3 | [ "item_sz", "structos_pool_def__t.html#a4c2a0c691de3365c00ecd22d8102811f", null ],
4 | [ "pool", "structos_pool_def__t.html#a269c3935f8bc66db70bccdd02cb05e3c", null ],
5 | [ "pool_sz", "structos_pool_def__t.html#ac112e786b2a234e0e45cb5bdbee53763", null ]
6 | ];
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/structos_semaphore_def__t.js:
--------------------------------------------------------------------------------
1 | var structos_semaphore_def__t =
2 | [
3 | [ "semaphore", "structos_semaphore_def__t.html#a83324f0a93a76a6c99f5a21bbe9d9209", null ]
4 | ];
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/structos_thread_def__t.js:
--------------------------------------------------------------------------------
1 | var structos_thread_def__t =
2 | [
3 | [ "instances", "structos_thread_def__t.html#aa4c4115851a098c0b87358ab6c025603", null ],
4 | [ "pthread", "structos_thread_def__t.html#ad3c9624ee214329fb34e71f544a6933e", null ],
5 | [ "stacksize", "structos_thread_def__t.html#a950b7f81ad4711959517296e63bc79d1", null ],
6 | [ "tpriority", "structos_thread_def__t.html#a15da8f23c6fe684b70a73646ada685e7", null ]
7 | ];
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/structos_timer_def__t.js:
--------------------------------------------------------------------------------
1 | var structos_timer_def__t =
2 | [
3 | [ "ptimer", "structos_timer_def__t.html#a15773df83aba93f8e61f3737af5fae47", null ],
4 | [ "timer", "structos_timer_def__t.html#a7107c9a80d9b4991d437133827e35839", null ]
5 | ];
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/sync_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/sync_off.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/sync_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/sync_on.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/tab_a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/tab_a.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/tab_b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/tab_b.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/tab_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/tab_h.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/tab_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/tab_s.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/tab_topnav.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/Doc/tab_topnav.png
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/Doc/tabs.css:
--------------------------------------------------------------------------------
1 | .tabs, .tabs1, .tabs2, .tabs3 {
2 | background-image: url('tab_b.png');
3 | width: 100%;
4 | z-index: 101;
5 | font-size: 10px;
6 | }
7 |
8 | .tabs1 {
9 | background-image: url('tab_topnav.png');
10 | font-size: 12px;
11 | }
12 |
13 | .tabs2 {
14 | font-size: 10px;
15 | }
16 | .tabs3 {
17 | font-size: 9px;
18 | }
19 |
20 | .tablist {
21 | margin: 0;
22 | padding: 0;
23 | display: table;
24 | line-height: 24px;
25 | }
26 |
27 | .tablist li {
28 | float: left;
29 | display: table-cell;
30 | background-image: url('tab_b.png');
31 | list-style: none;
32 | }
33 |
34 | .tabs1 .tablist li {
35 | float: left;
36 | display: table-cell;
37 | background-image: url('tab_topnav.png');
38 | list-style: none;
39 | }
40 |
41 | .tablist a {
42 | display: block;
43 | padding: 0 20px;
44 | font-weight: bold;
45 | background-image:url('tab_s.png');
46 | background-repeat:no-repeat;
47 | background-position:right;
48 | color: #283A5D;
49 | text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
50 | text-decoration: none;
51 | outline: none;
52 | }
53 |
54 | .tabs3 .tablist a {
55 | padding: 0 10px;
56 | }
57 |
58 | .tablist a:hover {
59 | background-image: url('tab_h.png');
60 | background-repeat:repeat-x;
61 | color: #fff;
62 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
63 | text-decoration: none;
64 | }
65 |
66 | .tablist li.current a {
67 | background-image: url('tab_a.png');
68 | background-repeat:repeat-x;
69 | color: #fff;
70 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
71 | }
72 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/ARM/RTX_CM0.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/ARM/RTX_CM0.lib
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/ARM/RTX_CM0_B.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/ARM/RTX_CM0_B.lib
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/ARM/RTX_CM3.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/ARM/RTX_CM3.lib
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/ARM/RTX_CM3_B.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/ARM/RTX_CM3_B.lib
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/ARM/RTX_CM3_IFX.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/ARM/RTX_CM3_IFX.lib
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/ARM/RTX_CM4.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/ARM/RTX_CM4.lib
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/ARM/RTX_CM4_B.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/ARM/RTX_CM4_B.lib
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/ARM/RTX_CM4_IFX.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/ARM/RTX_CM4_IFX.lib
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/GCC/libRTX_CM0.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/GCC/libRTX_CM0.a
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/GCC/libRTX_CM0_B.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/GCC/libRTX_CM0_B.a
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/GCC/libRTX_CM3.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/GCC/libRTX_CM3.a
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/GCC/libRTX_CM3_B.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/GCC/libRTX_CM3_B.a
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/GCC/libRTX_CM3_IFX.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/GCC/libRTX_CM3_IFX.a
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/GCC/libRTX_CM4.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/GCC/libRTX_CM4.a
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/GCC/libRTX_CM4_B.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/GCC/libRTX_CM4_B.a
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/GCC/libRTX_CM4_IFX.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/GCC/libRTX_CM4_IFX.a
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/IAR/RTX_CM0.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/IAR/RTX_CM0.a
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/IAR/RTX_CM0_B.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/IAR/RTX_CM0_B.a
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/IAR/RTX_CM3.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/IAR/RTX_CM3.a
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/IAR/RTX_CM3_B.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/IAR/RTX_CM3_B.a
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/IAR/RTX_CM4.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/IAR/RTX_CM4.a
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/LIB/IAR/RTX_CM4_B.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/RTX-v4.73/LIB/IAR/RTX_CM4_B.a
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/License.txt:
--------------------------------------------------------------------------------
1 | License for CMSIS-RTOS RTX Implementation
2 |
3 | Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 | - Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 | - 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 | - Neither the name of ARM nor the names of its contributors may be used
14 | to endorse or promote products derived from this software without
15 | specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDERS AND CONTRIBUTORS BE
21 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 | 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)
26 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 | POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/SRC/ARM/SVC_Table.s:
--------------------------------------------------------------------------------
1 | ;/*----------------------------------------------------------------------------
2 | ; * RL-ARM - RTX
3 | ; *----------------------------------------------------------------------------
4 | ; * Name: SVC_TABLE.S
5 | ; * Purpose: Pre-defined SVC Table for Cortex-M
6 | ; * Rev.: V4.70
7 | ; *----------------------------------------------------------------------------
8 | ; *
9 | ; * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH
10 | ; * All rights reserved.
11 | ; * Redistribution and use in source and binary forms, with or without
12 | ; * modification, are permitted provided that the following conditions are met:
13 | ; * - Redistributions of source code must retain the above copyright
14 | ; * notice, this list of conditions and the following disclaimer.
15 | ; * - Redistributions in binary form must reproduce the above copyright
16 | ; * notice, this list of conditions and the following disclaimer in the
17 | ; * documentation and/or other materials provided with the distribution.
18 | ; * - Neither the name of ARM nor the names of its contributors may be used
19 | ; * to endorse or promote products derived from this software without
20 | ; * specific prior written permission.
21 | ; *
22 | ; * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | ; * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | ; * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 | ; * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
26 | ; * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 | ; * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 | ; * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 | ; * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 | ; * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | ; * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | ; * POSSIBILITY OF SUCH DAMAGE.
33 | ; *---------------------------------------------------------------------------*/
34 |
35 |
36 | AREA SVC_TABLE, CODE, READONLY
37 |
38 | EXPORT SVC_Count
39 |
40 | SVC_Cnt EQU (SVC_End-SVC_Table)/4
41 | SVC_Count DCD SVC_Cnt
42 |
43 | ; Import user SVC functions here.
44 | ; IMPORT __SVC_1
45 |
46 | EXPORT SVC_Table
47 | SVC_Table
48 | ; Insert user SVC functions here. SVC 0 used by RTL Kernel.
49 | ; DCD __SVC_1 ; user SVC function
50 |
51 | SVC_End
52 |
53 | END
54 |
55 | /*----------------------------------------------------------------------------
56 | * end of file
57 | *---------------------------------------------------------------------------*/
58 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/SRC/GCC/SVC_Table.s:
--------------------------------------------------------------------------------
1 | ;/*----------------------------------------------------------------------------
2 | ; * RL-ARM - RTX
3 | ; *----------------------------------------------------------------------------
4 | ; * Name: SVC_TABLE.S
5 | ; * Purpose: Pre-defined SVC Table for Cortex-M
6 | ; * Rev.: V4.70
7 | ; *----------------------------------------------------------------------------
8 | ; *
9 | ; * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH
10 | ; * All rights reserved.
11 | ; * Redistribution and use in source and binary forms, with or without
12 | ; * modification, are permitted provided that the following conditions are met:
13 | ; * - Redistributions of source code must retain the above copyright
14 | ; * notice, this list of conditions and the following disclaimer.
15 | ; * - Redistributions in binary form must reproduce the above copyright
16 | ; * notice, this list of conditions and the following disclaimer in the
17 | ; * documentation and/or other materials provided with the distribution.
18 | ; * - Neither the name of ARM nor the names of its contributors may be used
19 | ; * to endorse or promote products derived from this software without
20 | ; * specific prior written permission.
21 | ; *
22 | ; * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | ; * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | ; * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 | ; * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
26 | ; * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 | ; * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 | ; * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 | ; * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 | ; * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | ; * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | ; * POSSIBILITY OF SUCH DAMAGE.
33 | ; *---------------------------------------------------------------------------*/
34 |
35 |
36 | .file "SVC_Table.S"
37 |
38 |
39 | .section ".svc_table"
40 |
41 | .global SVC_Table
42 | SVC_Table:
43 | /* Insert user SVC functions here. SVC 0 used by RTL Kernel. */
44 | # .long __SVC_1 /* user SVC function */
45 | SVC_End:
46 |
47 | .global SVC_Count
48 | SVC_Count:
49 | .long (SVC_End-SVC_Table)/4
50 |
51 |
52 | .end
53 |
54 | /*----------------------------------------------------------------------------
55 | * end of file
56 | *---------------------------------------------------------------------------*/
57 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/SRC/IAR/RTX_Lib_CM.eww:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | $WS_DIR$\RTX_Lib_CM.ewp
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/SRC/IAR/SVC_Table.s:
--------------------------------------------------------------------------------
1 | ;/*----------------------------------------------------------------------------
2 | ; * RL-ARM - RTX
3 | ; *----------------------------------------------------------------------------
4 | ; * Name: SVC_TABLE.S
5 | ; * Purpose: Pre-defined SVC Table for Cortex-M
6 | ; * Rev.: V4.70
7 | ; *----------------------------------------------------------------------------
8 | ; *
9 | ; * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH
10 | ; * All rights reserved.
11 | ; * Redistribution and use in source and binary forms, with or without
12 | ; * modification, are permitted provided that the following conditions are met:
13 | ; * - Redistributions of source code must retain the above copyright
14 | ; * notice, this list of conditions and the following disclaimer.
15 | ; * - Redistributions in binary form must reproduce the above copyright
16 | ; * notice, this list of conditions and the following disclaimer in the
17 | ; * documentation and/or other materials provided with the distribution.
18 | ; * - Neither the name of ARM nor the names of its contributors may be used
19 | ; * to endorse or promote products derived from this software without
20 | ; * specific prior written permission.
21 | ; *
22 | ; * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | ; * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | ; * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 | ; * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
26 | ; * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 | ; * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 | ; * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 | ; * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 | ; * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | ; * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | ; * POSSIBILITY OF SUCH DAMAGE.
33 | ; *---------------------------------------------------------------------------*/
34 |
35 |
36 | NAME SVC_TABLE
37 | SECTION .text:CONST (2)
38 |
39 | PUBLIC SVC_Count
40 |
41 | SVC_Cnt EQU (SVC_End-SVC_Table)/4
42 | SVC_Count DCD SVC_Cnt
43 |
44 | ; Import user SVC functions here.
45 | ; IMPORT __SVC_1
46 |
47 | PUBLIC SVC_Table
48 | SVC_Table
49 | ; Insert user SVC functions here. SVC 0 used by RTL Kernel.
50 | ; DCD __SVC_1 ; user SVC function
51 |
52 | SVC_End
53 |
54 | END
55 |
56 | /*----------------------------------------------------------------------------
57 | * end of file
58 | *---------------------------------------------------------------------------*/
59 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/SRC/rt_Event.h:
--------------------------------------------------------------------------------
1 | /*----------------------------------------------------------------------------
2 | * RL-ARM - RTX
3 | *----------------------------------------------------------------------------
4 | * Name: RT_EVENT.H
5 | * Purpose: Implements waits and wake-ups for event flags
6 | * Rev.: V4.70
7 | *----------------------------------------------------------------------------
8 | *
9 | * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH
10 | * All rights reserved.
11 | * Redistribution and use in source and binary forms, with or without
12 | * modification, are permitted provided that the following conditions are met:
13 | * - Redistributions of source code must retain the above copyright
14 | * notice, this list of conditions and the following disclaimer.
15 | * - Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in the
17 | * documentation and/or other materials provided with the distribution.
18 | * - Neither the name of ARM nor the names of its contributors may be used
19 | * to endorse or promote products derived from this software without
20 | * specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 | * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | * POSSIBILITY OF SUCH DAMAGE.
33 | *---------------------------------------------------------------------------*/
34 |
35 | /* Functions */
36 | extern OS_RESULT rt_evt_wait (U16 wait_flags, U16 timeout, BOOL and_wait);
37 | extern void rt_evt_set (U16 event_flags, OS_TID task_id);
38 | extern void rt_evt_clr (U16 clear_flags, OS_TID task_id);
39 | extern void isr_evt_set (U16 event_flags, OS_TID task_id);
40 | extern U16 rt_evt_get (void);
41 | extern void rt_evt_psh (P_TCB p_CB, U16 set_flags);
42 |
43 | /*----------------------------------------------------------------------------
44 | * end of file
45 | *---------------------------------------------------------------------------*/
46 |
47 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/SRC/rt_Mailbox.h:
--------------------------------------------------------------------------------
1 | /*----------------------------------------------------------------------------
2 | * RL-ARM - RTX
3 | *----------------------------------------------------------------------------
4 | * Name: RT_MAILBOX.H
5 | * Purpose: Implements waits and wake-ups for mailbox messages
6 | * Rev.: V4.70
7 | *----------------------------------------------------------------------------
8 | *
9 | * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH
10 | * All rights reserved.
11 | * Redistribution and use in source and binary forms, with or without
12 | * modification, are permitted provided that the following conditions are met:
13 | * - Redistributions of source code must retain the above copyright
14 | * notice, this list of conditions and the following disclaimer.
15 | * - Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in the
17 | * documentation and/or other materials provided with the distribution.
18 | * - Neither the name of ARM nor the names of its contributors may be used
19 | * to endorse or promote products derived from this software without
20 | * specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 | * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | * POSSIBILITY OF SUCH DAMAGE.
33 | *---------------------------------------------------------------------------*/
34 |
35 | /* Functions */
36 | extern void rt_mbx_init (OS_ID mailbox, U16 mbx_size);
37 | extern OS_RESULT rt_mbx_send (OS_ID mailbox, void *p_msg, U16 timeout);
38 | extern OS_RESULT rt_mbx_wait (OS_ID mailbox, void **message, U16 timeout);
39 | extern OS_RESULT rt_mbx_check (OS_ID mailbox);
40 | extern void isr_mbx_send (OS_ID mailbox, void *p_msg);
41 | extern OS_RESULT isr_mbx_receive (OS_ID mailbox, void **message);
42 | extern void rt_mbx_psh (P_MCB p_CB, void *p_msg);
43 |
44 |
45 | /*----------------------------------------------------------------------------
46 | * end of file
47 | *---------------------------------------------------------------------------*/
48 |
49 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/SRC/rt_MemBox.h:
--------------------------------------------------------------------------------
1 | /*----------------------------------------------------------------------------
2 | * RL-ARM - RTX
3 | *----------------------------------------------------------------------------
4 | * Name: RT_MEMBOX.H
5 | * Purpose: Interface functions for fixed memory block management system
6 | * Rev.: V4.70
7 | *----------------------------------------------------------------------------
8 | *
9 | * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH
10 | * All rights reserved.
11 | * Redistribution and use in source and binary forms, with or without
12 | * modification, are permitted provided that the following conditions are met:
13 | * - Redistributions of source code must retain the above copyright
14 | * notice, this list of conditions and the following disclaimer.
15 | * - Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in the
17 | * documentation and/or other materials provided with the distribution.
18 | * - Neither the name of ARM nor the names of its contributors may be used
19 | * to endorse or promote products derived from this software without
20 | * specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 | * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | * POSSIBILITY OF SUCH DAMAGE.
33 | *---------------------------------------------------------------------------*/
34 |
35 | /* Functions */
36 | #define rt_init_box _init_box
37 | #define rt_calloc_box _calloc_box
38 | extern int _init_box (void *box_mem, U32 box_size, U32 blk_size);
39 | extern void *rt_alloc_box (void *box_mem);
40 | extern void * _calloc_box (void *box_mem);
41 | extern int rt_free_box (void *box_mem, void *box);
42 |
43 | /*----------------------------------------------------------------------------
44 | * end of file
45 | *---------------------------------------------------------------------------*/
46 |
47 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/SRC/rt_Memory.h:
--------------------------------------------------------------------------------
1 | /*----------------------------------------------------------------------------
2 | * RL-ARM - RTX
3 | *----------------------------------------------------------------------------
4 | * Name: RT_MEMORY.H
5 | * Purpose: Interface functions for Dynamic Memory Management System
6 | * Rev.: V4.70
7 | *----------------------------------------------------------------------------
8 | *
9 | * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH
10 | * All rights reserved.
11 | * Redistribution and use in source and binary forms, with or without
12 | * modification, are permitted provided that the following conditions are met:
13 | * - Redistributions of source code must retain the above copyright
14 | * notice, this list of conditions and the following disclaimer.
15 | * - Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in the
17 | * documentation and/or other materials provided with the distribution.
18 | * - Neither the name of ARM nor the names of its contributors may be used
19 | * to endorse or promote products derived from this software without
20 | * specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 | * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | * POSSIBILITY OF SUCH DAMAGE.
33 | *---------------------------------------------------------------------------*/
34 |
35 | /* Types */
36 | typedef struct mem { /* << Memory Pool management struct >> */
37 | struct mem *next; /* Next Memory Block in the list */
38 | U32 len; /* Length of data block */
39 | } MEMP;
40 |
41 | /* Functions */
42 | extern int rt_init_mem (void *pool, U32 size);
43 | extern void *rt_alloc_mem (void *pool, U32 size);
44 | extern int rt_free_mem (void *pool, void *mem);
45 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/SRC/rt_Mutex.h:
--------------------------------------------------------------------------------
1 | /*----------------------------------------------------------------------------
2 | * RL-ARM - RTX
3 | *----------------------------------------------------------------------------
4 | * Name: RT_MUTEX.H
5 | * Purpose: Implements mutex synchronization objects
6 | * Rev.: V4.70
7 | *----------------------------------------------------------------------------
8 | *
9 | * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH
10 | * All rights reserved.
11 | * Redistribution and use in source and binary forms, with or without
12 | * modification, are permitted provided that the following conditions are met:
13 | * - Redistributions of source code must retain the above copyright
14 | * notice, this list of conditions and the following disclaimer.
15 | * - Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in the
17 | * documentation and/or other materials provided with the distribution.
18 | * - Neither the name of ARM nor the names of its contributors may be used
19 | * to endorse or promote products derived from this software without
20 | * specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 | * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | * POSSIBILITY OF SUCH DAMAGE.
33 | *---------------------------------------------------------------------------*/
34 |
35 | /* Functions */
36 | extern void rt_mut_init (OS_ID mutex);
37 | extern OS_RESULT rt_mut_delete (OS_ID mutex);
38 | extern OS_RESULT rt_mut_release (OS_ID mutex);
39 | extern OS_RESULT rt_mut_wait (OS_ID mutex, U16 timeout);
40 |
41 | /*----------------------------------------------------------------------------
42 | * end of file
43 | *---------------------------------------------------------------------------*/
44 |
45 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/SRC/rt_Robin.h:
--------------------------------------------------------------------------------
1 | /*----------------------------------------------------------------------------
2 | * RL-ARM - RTX
3 | *----------------------------------------------------------------------------
4 | * Name: RT_ROBIN.H
5 | * Purpose: Round Robin Task switching definitions
6 | * Rev.: V4.70
7 | *----------------------------------------------------------------------------
8 | *
9 | * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH
10 | * All rights reserved.
11 | * Redistribution and use in source and binary forms, with or without
12 | * modification, are permitted provided that the following conditions are met:
13 | * - Redistributions of source code must retain the above copyright
14 | * notice, this list of conditions and the following disclaimer.
15 | * - Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in the
17 | * documentation and/or other materials provided with the distribution.
18 | * - Neither the name of ARM nor the names of its contributors may be used
19 | * to endorse or promote products derived from this software without
20 | * specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 | * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | * POSSIBILITY OF SUCH DAMAGE.
33 | *---------------------------------------------------------------------------*/
34 |
35 | /* Variables */
36 | extern struct OS_ROBIN os_robin;
37 |
38 | /* Functions */
39 | extern void rt_init_robin (void);
40 | extern void rt_chk_robin (void);
41 |
42 | /*----------------------------------------------------------------------------
43 | * end of file
44 | *---------------------------------------------------------------------------*/
45 |
46 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/SRC/rt_Semaphore.h:
--------------------------------------------------------------------------------
1 | /*----------------------------------------------------------------------------
2 | * RL-ARM - RTX
3 | *----------------------------------------------------------------------------
4 | * Name: RT_SEMAPHORE.H
5 | * Purpose: Implements binary and counting semaphores
6 | * Rev.: V4.70
7 | *----------------------------------------------------------------------------
8 | *
9 | * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH
10 | * All rights reserved.
11 | * Redistribution and use in source and binary forms, with or without
12 | * modification, are permitted provided that the following conditions are met:
13 | * - Redistributions of source code must retain the above copyright
14 | * notice, this list of conditions and the following disclaimer.
15 | * - Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in the
17 | * documentation and/or other materials provided with the distribution.
18 | * - Neither the name of ARM nor the names of its contributors may be used
19 | * to endorse or promote products derived from this software without
20 | * specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 | * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | * POSSIBILITY OF SUCH DAMAGE.
33 | *---------------------------------------------------------------------------*/
34 |
35 | /* Functions */
36 | extern void rt_sem_init (OS_ID semaphore, U16 token_count);
37 | extern OS_RESULT rt_sem_delete(OS_ID semaphore);
38 | extern OS_RESULT rt_sem_send (OS_ID semaphore);
39 | extern OS_RESULT rt_sem_wait (OS_ID semaphore, U16 timeout);
40 | extern void isr_sem_send (OS_ID semaphore);
41 | extern void rt_sem_psh (P_SCB p_CB);
42 |
43 | /*----------------------------------------------------------------------------
44 | * end of file
45 | *---------------------------------------------------------------------------*/
46 |
47 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/SRC/rt_System.h:
--------------------------------------------------------------------------------
1 | /*----------------------------------------------------------------------------
2 | * RL-ARM - RTX
3 | *----------------------------------------------------------------------------
4 | * Name: RT_SYSTEM.H
5 | * Purpose: System Task Manager definitions
6 | * Rev.: V4.70
7 | *----------------------------------------------------------------------------
8 | *
9 | * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH
10 | * All rights reserved.
11 | * Redistribution and use in source and binary forms, with or without
12 | * modification, are permitted provided that the following conditions are met:
13 | * - Redistributions of source code must retain the above copyright
14 | * notice, this list of conditions and the following disclaimer.
15 | * - Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in the
17 | * documentation and/or other materials provided with the distribution.
18 | * - Neither the name of ARM nor the names of its contributors may be used
19 | * to endorse or promote products derived from this software without
20 | * specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 | * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | * POSSIBILITY OF SUCH DAMAGE.
33 | *---------------------------------------------------------------------------*/
34 |
35 | /* Variables */
36 | #define os_psq ((P_PSQ)&os_fifo)
37 | extern int os_tick_irqn;
38 |
39 | /* Functions */
40 | extern U32 rt_suspend (void);
41 | extern void rt_resume (U32 sleep_time);
42 | extern void rt_tsk_lock (void);
43 | extern void rt_tsk_unlock (void);
44 | extern void rt_psh_req (void);
45 | extern void rt_pop_req (void);
46 | extern void rt_systick (void);
47 | extern void rt_stk_check (void);
48 |
49 | /*----------------------------------------------------------------------------
50 | * end of file
51 | *---------------------------------------------------------------------------*/
52 |
53 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/SRC/rt_Time.h:
--------------------------------------------------------------------------------
1 | /*----------------------------------------------------------------------------
2 | * RL-ARM - RTX
3 | *----------------------------------------------------------------------------
4 | * Name: RT_TIME.H
5 | * Purpose: Delay and interval wait functions definitions
6 | * Rev.: V4.70
7 | *----------------------------------------------------------------------------
8 | *
9 | * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH
10 | * All rights reserved.
11 | * Redistribution and use in source and binary forms, with or without
12 | * modification, are permitted provided that the following conditions are met:
13 | * - Redistributions of source code must retain the above copyright
14 | * notice, this list of conditions and the following disclaimer.
15 | * - Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in the
17 | * documentation and/or other materials provided with the distribution.
18 | * - Neither the name of ARM nor the names of its contributors may be used
19 | * to endorse or promote products derived from this software without
20 | * specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 | * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | * POSSIBILITY OF SUCH DAMAGE.
33 | *---------------------------------------------------------------------------*/
34 |
35 | /* Variables */
36 | extern U32 os_time;
37 |
38 | /* Functions */
39 | extern U32 rt_time_get (void);
40 | extern void rt_dly_wait (U16 delay_time);
41 | extern void rt_itv_set (U16 interval_time);
42 | extern void rt_itv_wait (void);
43 |
44 | /*----------------------------------------------------------------------------
45 | * end of file
46 | *---------------------------------------------------------------------------*/
47 |
48 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/SRC/rt_Timer.h:
--------------------------------------------------------------------------------
1 | /*----------------------------------------------------------------------------
2 | * RL-ARM - RTX
3 | *----------------------------------------------------------------------------
4 | * Name: RT_TIMER.H
5 | * Purpose: User timer functions
6 | * Rev.: V4.70
7 | *----------------------------------------------------------------------------
8 | *
9 | * Copyright (c) 1999-2009 KEIL, 2009-2013 ARM Germany GmbH
10 | * All rights reserved.
11 | * Redistribution and use in source and binary forms, with or without
12 | * modification, are permitted provided that the following conditions are met:
13 | * - Redistributions of source code must retain the above copyright
14 | * notice, this list of conditions and the following disclaimer.
15 | * - Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in the
17 | * documentation and/or other materials provided with the distribution.
18 | * - Neither the name of ARM nor the names of its contributors may be used
19 | * to endorse or promote products derived from this software without
20 | * specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 | * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | * POSSIBILITY OF SUCH DAMAGE.
33 | *---------------------------------------------------------------------------*/
34 |
35 | /* Variables */
36 | extern struct OS_XTMR os_tmr;
37 |
38 | /* Functions */
39 | extern void rt_tmr_tick (void);
40 | extern OS_ID rt_tmr_create (U16 tcnt, U16 info);
41 | extern OS_ID rt_tmr_kill (OS_ID timer);
42 |
43 | /*----------------------------------------------------------------------------
44 | * end of file
45 | *---------------------------------------------------------------------------*/
46 |
47 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/UserCodeTemplates/MailQueue.c:
--------------------------------------------------------------------------------
1 | #include // CMSIS RTOS header file
2 |
3 | /*----------------------------------------------------------------------------
4 | * Mail Queue creation & usage
5 | *---------------------------------------------------------------------------*/
6 |
7 | void Thread_MailQueue1 (void const *argument); // thread function 1
8 | void Thread_MailQueue2 (void const *argument); // thread function 2
9 | osThreadId tid_Thread_MailQueue1; // thread id 1
10 | osThreadId tid_Thread_MailQueue2; // thread id 2
11 | osThreadDef (Thread_MailQueue1, osPriorityNormal, 1, 0); // thread object 1
12 | osThreadDef (Thread_MailQueue2, osPriorityNormal, 1, 0); // thread object 2
13 |
14 | #define MAILQUEUE_OBJECTS 16 // number of Message Queue Objects
15 | typedef struct { // object data type
16 | uint8_t Buf[32];
17 | uint8_t Idx;
18 | } MAILQUEUE_OBJ_t;
19 |
20 | osMailQId qid_MailQueue; // mail queue id
21 | osMailQDef (MailQueue, MAILQUEUE_OBJECTS, MAILQUEUE_OBJ_t); // mail queue object
22 |
23 |
24 | int Init_MailQueue (void) {
25 |
26 | qid_MailQueue = osMailCreate(osMailQ(MailQueue), NULL); // create mail queue
27 | if(!qid_MailQueue) {
28 | ; // Mail Queue object not created, handle failure
29 | }
30 |
31 | tid_Thread_MailQueue1 = osThreadCreate (osThread(Thread_MailQueue1), NULL);
32 | if(!tid_Thread_MailQueue1) return(-1);
33 | tid_Thread_MailQueue2 = osThreadCreate (osThread(Thread_MailQueue2), NULL);
34 | if(!tid_Thread_MailQueue2) return(-1);
35 |
36 | return(0);
37 | }
38 |
39 | void Thread_MailQueue1(void const *argument) {
40 | MAILQUEUE_OBJ_t *pMail = 0;
41 |
42 | while(1) {
43 | ; // Insert thread code here...
44 | pMail = osMailAlloc(qid_MailQueue, osWaitForever); // Allocate memory
45 | if(pMail) {
46 | pMail->Buf[0] = 0xff; // Set the mail content
47 | pMail->Idx = 0;
48 | osMailPut(qid_MailQueue, pMail); // Send Mail
49 | }
50 |
51 | osThreadYield(); // suspend thread
52 | }
53 | }
54 |
55 | void Thread_MailQueue2(void const *argument) {
56 | MAILQUEUE_OBJ_t *pMail = 0;
57 | osEvent evt;
58 |
59 | while(1) {
60 | ; // Insert thread code here...
61 | evt = osMailGet(qid_MailQueue, osWaitForever); // wait for mail
62 | if (evt.status == osEventMail) {
63 | pMail = evt.value.p;
64 | if(pMail) {
65 | ; // process data
66 | osMailFree(qid_MailQueue, pMail); // free memory allocated for mail
67 | }
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/UserCodeTemplates/MemPool.c:
--------------------------------------------------------------------------------
1 |
2 | #include // CMSIS RTOS header file
3 |
4 | /*----------------------------------------------------------------------------
5 | * Memory Pool creation & usage
6 | *---------------------------------------------------------------------------*/
7 |
8 | #define MEMPOOL_OBJECTS 16 // number of Memory Pool Objects
9 |
10 | typedef struct { // object data type
11 | uint8_t Buf[32];
12 | uint8_t Idx;
13 | } MEM_BLOCK_t;
14 |
15 | void Thread_MemPool (void const *argument); // thread function
16 | osThreadId tid_Thread_MemPool; // thread id
17 | osThreadDef (Thread_MemPool, osPriorityNormal, 1, 0); // thread object
18 |
19 | osPoolId mpid_MemPool; // memory pool id
20 | osPoolDef (MemPool, MEMPOOL_OBJECTS, MEM_BLOCK_t); // memory pool object
21 |
22 |
23 | int Init_MemPool (void) {
24 |
25 | mpid_MemPool = osPoolCreate (osPool (MemPool)); // create Mem Pool
26 | if(!mpid_MemPool) {
27 | ; // MemPool object not created, handle failure
28 | }
29 |
30 | tid_Thread_MemPool = osThreadCreate (osThread(Thread_MemPool), NULL);
31 | if(!tid_Thread_MemPool) return(-1);
32 |
33 | return(0);
34 | }
35 |
36 | void Thread_MemPool(void const *argument) {
37 | osStatus status;
38 | MEM_BLOCK_t *pMem = 0;
39 |
40 | while(1) {
41 | ; // Insert thread code here...
42 |
43 | pMem = (MEM_BLOCK_t *)osPoolCAlloc (mpid_MemPool); // get Mem Block
44 | if(pMem) { // Mem Block was available
45 | pMem->Buf[0] = 0x55; // do some work...
46 | pMem->Idx = 0;
47 |
48 | status = osPoolFree (mpid_MemPool, pMem); // free mem block
49 | switch(status) {
50 | case osOK:
51 | break;
52 | case osErrorParameter:
53 | break;
54 | case osErrorValue:
55 | break;
56 | default:
57 | break;
58 | }
59 | }
60 |
61 | osThreadYield(); // suspend thread
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/UserCodeTemplates/Mutex.c:
--------------------------------------------------------------------------------
1 |
2 | #include // CMSIS RTOS header file
3 |
4 | /*----------------------------------------------------------------------------
5 | * Mutex creation & usage
6 | *---------------------------------------------------------------------------*/
7 |
8 | void Thread_Mutex (void const *argument); // thread function
9 | osThreadId tid_Thread_Mutex; // thread id
10 | osThreadDef (Thread_Mutex, osPriorityNormal, 1, 0); // thread object
11 |
12 | osMutexId mid_Thread_Mutex; // mutex id
13 | osMutexDef (SampleMutex); // mutex name definition
14 |
15 |
16 | int Init_Mutex (void) {
17 |
18 | mid_Thread_Mutex = osMutexCreate (osMutex (SampleMutex));
19 | if (!tid_Thread_Mutex) {
20 | ; // Mutex object not created, handle failure
21 | }
22 |
23 | tid_Thread_Mutex = osThreadCreate (osThread(Thread_Mutex), NULL);
24 | if(!tid_Thread_Mutex) return(-1);
25 |
26 | return(0);
27 | }
28 |
29 | void Thread_Mutex(void const *argument) {
30 | osStatus status;
31 |
32 | while(1) {
33 | ; // Insert thread code here...
34 |
35 | status = osMutexWait(mid_Thread_Mutex, NULL);
36 | switch(status) {
37 | case osOK:
38 | ; // Use protected code here...
39 | osMutexRelease(mid_Thread_Mutex);
40 | break;
41 | case osErrorTimeoutResource:
42 | break;
43 | case osErrorResource:
44 | break;
45 | case osErrorParameter:
46 | break;
47 | case osErrorISR:
48 | break;
49 | default:
50 | break;
51 | }
52 |
53 | osThreadYield(); // suspend thread
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/UserCodeTemplates/Semaphore.c:
--------------------------------------------------------------------------------
1 |
2 | #include // CMSIS RTOS header file
3 |
4 | /*----------------------------------------------------------------------------
5 | * Semaphore creation & usage
6 | *---------------------------------------------------------------------------*/
7 |
8 | void Thread_Semaphore (void const *argument); // thread function
9 | osThreadId tid_Thread_Semaphore; // thread id
10 | osThreadDef (Thread_Semaphore, osPriorityNormal, 1, 0); // thread object
11 |
12 | osSemaphoreId sid_Thread_Semaphore; // semaphore id
13 | osSemaphoreDef (SampleSemaphore); // semaphore object
14 |
15 |
16 | int Init_Semaphhore (void) {
17 |
18 | sid_Thread_Semaphore = osSemaphoreCreate(osSemaphore(SampleSemaphore), 1);
19 | if (!sid_Thread_Semaphore) {
20 | ; // Semaphore object not created, handle failure
21 | }
22 |
23 | tid_Thread_Semaphore = osThreadCreate (osThread(Thread_Semaphore), NULL);
24 | if(!tid_Thread_Semaphore) return(-1);
25 |
26 | return(0);
27 | }
28 |
29 | void Thread_Semaphore(void const *argument) {
30 | int32_t val;
31 |
32 | while(1) {
33 | ; // Insert thread code here...
34 |
35 | val = osSemaphoreWait (sid_Thread_Semaphore, 10); // wait 10 mSec
36 | switch (val) {
37 | case osOK:
38 | ; // Use protected code here...
39 | osSemaphoreRelease (sid_Thread_Semaphore); // Return a token back to a semaphore
40 | break;
41 | case osErrorResource:
42 | break;
43 | case osErrorParameter:
44 | break;
45 | default:
46 | break;
47 | }
48 |
49 | osThreadYield(); // suspend thread
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/UserCodeTemplates/Thread.c:
--------------------------------------------------------------------------------
1 |
2 | #include // CMSIS RTOS header file
3 |
4 | /*----------------------------------------------------------------------------
5 | * Thread 1 'Thread_Name': Sample thread
6 | *---------------------------------------------------------------------------*/
7 |
8 | void Thread (void const *argument); // thread function
9 | osThreadId tid_Thread; // thread id
10 | osThreadDef (Thread, osPriorityNormal, 1, 0); // thread object
11 |
12 | int Init_Thread (void) {
13 |
14 | tid_Thread = osThreadCreate (osThread(Thread), NULL);
15 | if(!tid_Thread) return(-1);
16 |
17 | return(0);
18 | }
19 |
20 | void Thread (void const *argument) {
21 |
22 | while (1) {
23 | ; // Insert thread code here...
24 | osThreadYield(); // suspend thread
25 | }
26 | }
27 |
28 |
29 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/UserCodeTemplates/main.c:
--------------------------------------------------------------------------------
1 | /*----------------------------------------------------------------------------
2 | * CMSIS-RTOS 'main' function template
3 | *---------------------------------------------------------------------------*/
4 |
5 | #define osObjectsPublic // define objects in main module
6 | #include "osObjects.h" // RTOS object definitions
7 |
8 |
9 | /*
10 | * main: initialize and start the system
11 | */
12 | int main (void) {
13 | osKernelInitialize (); // initialize CMSIS-RTOS
14 |
15 | // initialize peripherals here
16 |
17 | // create 'thread' functions that start executing,
18 | // example: tid_name = osThreadCreate (osThread(name), NULL);
19 |
20 | osKernelStart (); // start thread execution
21 | }
22 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/UserCodeTemplates/osObjects.h:
--------------------------------------------------------------------------------
1 | /*----------------------------------------------------------------------------
2 | * osObjects.h: CMSIS-RTOS global object definitions for an application
3 | *----------------------------------------------------------------------------
4 | *
5 | * This header file defines global RTOS objects used throughout a project
6 | *
7 | * #define osObjectsPublic indicates that objects are defined; without that
8 | * definition the objects are defined as external symbols.
9 | *
10 | *--------------------------------------------------------------------------*/
11 |
12 |
13 | #ifndef __osObjects
14 | #define __osObjects
15 |
16 | #if (!defined (osObjectsPublic))
17 | #define osObjectsExternal // define RTOS objects with extern attribute
18 | #endif
19 |
20 | #include // CMSIS RTOS header file
21 |
22 |
23 | // global 'thread' functions ---------------------------------------------------
24 | /*
25 | Example:
26 | extern void sample_name (void const *argument); // thread function
27 |
28 | osThreadId tid_sample_name; // thread id
29 | osThreadDef (sample_name, osPriorityNormal, 1, 0); // thread object
30 | */
31 |
32 |
33 | // global 'semaphores' ----------------------------------------------------------
34 | /*
35 | Example:
36 | osSemaphoreId sid_sample_name; // semaphore id
37 | osSemaphoreDef (sample_name); // semaphore object
38 | */
39 |
40 |
41 | // global 'memory pools' --------------------------------------------------------
42 | /*
43 | Example:
44 | typedef struct sample_name type_sample_name; // object data type
45 |
46 | osPoolId mpid_sample_name; // memory pool id
47 | osPoolDef (sample_name, 16, type_sample_name); // memory pool object
48 | */
49 |
50 |
51 | // global 'message queues' -------------------------------------------------------
52 | /*
53 | Example:
54 | typedef struct sample_name type_sample_name; // object data type
55 |
56 | osMessageQId mid_sample_name; // message queue id
57 | osMessageQDef (sample_name, 16, type_sample_name); // message queue object
58 | */
59 |
60 |
61 | // global 'mail queues' ----------------------------------------------------------
62 | /*
63 | Example:
64 | typedef struct sample_name type_sample_name; // object data type
65 |
66 | osMailQId qid_sample_name; // mail queue id
67 | osMailQDef (sample_name, 16, type_sample_name); // mail queue object
68 | */
69 |
70 | #endif // __osObjects
71 |
--------------------------------------------------------------------------------
/libraries/RTX-v4.73/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Redirect to the CMSIS-RTOS RTX main page after 0 seconds
5 |
6 |
7 |
8 |
9 |
10 |
11 | If the automatic redirection is failing, click open CMSIS Documentation.
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/libraries/STM32F4-Discovery/fonts.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file fonts.h
4 | * @author MCD Application Team
5 | * @version V4.6.1
6 | * @date 18-April-2011
7 | * @brief Header for fonts.c
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 | * © COPYRIGHT 2011 STMicroelectronics
19 | ******************************************************************************
20 | */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __FONTS_H
24 | #define __FONTS_H
25 |
26 | #ifdef __cplusplus
27 | extern "C" {
28 | #endif
29 |
30 | /* Includes ------------------------------------------------------------------*/
31 | #include
32 |
33 | /** @addtogroup Utilities
34 | * @{
35 | */
36 |
37 | /** @addtogroup STM32_EVAL
38 | * @{
39 | */
40 |
41 | /** @addtogroup Common
42 | * @{
43 | */
44 |
45 | /** @addtogroup FONTS
46 | * @{
47 | */
48 |
49 | /** @defgroup FONTS_Exported_Types
50 | * @{
51 | */
52 | typedef struct _tFont
53 | {
54 | const uint16_t *table;
55 | uint16_t Width;
56 | uint16_t Height;
57 |
58 | } sFONT;
59 |
60 | extern sFONT Font16x24;
61 | extern sFONT Font12x12;
62 | extern sFONT Font8x12;
63 | extern sFONT Font8x8;
64 |
65 | /**
66 | * @}
67 | */
68 |
69 | /** @defgroup FONTS_Exported_Constants
70 | * @{
71 | */
72 | #define LINE(x) ((x) * (((sFONT *)LCD_GetFont())->Height))
73 |
74 | /**
75 | * @}
76 | */
77 |
78 | /** @defgroup FONTS_Exported_Macros
79 | * @{
80 | */
81 | /**
82 | * @}
83 | */
84 |
85 | /** @defgroup FONTS_Exported_Functions
86 | * @{
87 | */
88 | /**
89 | * @}
90 | */
91 |
92 | #ifdef __cplusplus
93 | }
94 | #endif
95 |
96 | #endif /* __FONTS_H */
97 |
98 | /**
99 | * @}
100 | */
101 |
102 | /**
103 | * @}
104 | */
105 |
106 | /**
107 | * @}
108 | */
109 |
110 | /**
111 | * @}
112 | */
113 |
114 | /**
115 | * @}
116 | */
117 |
118 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
119 |
--------------------------------------------------------------------------------
/libraries/STM32F4-Discovery/stm32f4_discovery_debug.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * © COPYRIGHT 2012 Embest Tech. Co., Ltd.
4 | * @file stm32f4_discovery_debug.h
5 | * @author CMP Team
6 | * @version V1.0.0
7 | * @date 28-December-2012
8 | * @brief Header for stm32f4_discovery_debug.c module
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, Embest SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
15 | * OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
16 | * OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
17 | * CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18 | ******************************************************************************
19 | */
20 | /* Define to prevent recursive inclusion -------------------------------------*/
21 | #ifndef __STM32F4_DISCOVERY_DEBUG_H
22 | #define __STM32F4_DISCOVERY_DEBUG_H
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "stm32f4xx.h"
30 |
31 | /** @addtogroup Utilities
32 | * @{
33 | */
34 |
35 | /** @addtogroup STM32F4_DISCOVERY
36 | * @{
37 | */
38 | /** @defgroup STM32F4_DISCOVERY_LOW_LEVEL_Exported_Functions
39 | * @{
40 | */
41 | void STM32f4_Discovery_Debug_Init(void);
42 | int Get_Peek_Key(void);
43 | /**
44 | * @}
45 | */
46 | #ifdef __cplusplus
47 | }
48 | #endif
49 |
50 | #endif /* __STM32F4_DISCOVERY_DEBUG_H */
51 | /**
52 | * @}
53 | */
54 |
55 | /**
56 | * @}
57 | */
58 |
59 | /**
60 | * @}
61 | */
62 |
63 |
64 |
65 | /******************** COPYRIGHT 2012 Embest Tech. Co., Ltd.*****END OF FILE****/
66 |
--------------------------------------------------------------------------------
/libraries/STM32F4x7_ETH_Driver/inc/stm32f4x7_eth.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/STM32F4x7_ETH_Driver/inc/stm32f4x7_eth.h
--------------------------------------------------------------------------------
/libraries/STM32F4x7_ETH_Driver/src/stm32f4x7_eth.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/STM32F4x7_ETH_Driver/src/stm32f4x7_eth.c
--------------------------------------------------------------------------------
/libraries/STM32F4xx_StdPeriph_Driver/Release_Notes.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/STM32F4xx_StdPeriph_Driver/Release_Notes.html
--------------------------------------------------------------------------------
/libraries/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 |
--------------------------------------------------------------------------------
/libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c
--------------------------------------------------------------------------------
/libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/CHANGELOG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/lwip-1.4.1/CHANGELOG
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/port/STM32F4x7/arch/bpstruct.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science.
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without modification,
6 | * are permitted provided that the following conditions are met:
7 | *
8 | * 1. Redistributions of source code must retain the above copyright notice,
9 | * this list of conditions and the following disclaimer.
10 | * 2. Redistributions in binary form must reproduce the above copyright notice,
11 | * this list of conditions and the following disclaimer in the documentation
12 | * and/or other materials provided with the distribution.
13 | * 3. The name of the author may not be used to endorse or promote products
14 | * derived from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
25 | * OF SUCH DAMAGE.
26 | *
27 | * This file is part of the lwIP TCP/IP stack.
28 | *
29 | * Author: Adam Dunkels
30 | *
31 | */
32 |
33 | #if defined(__IAR_SYSTEMS_ICC__)
34 | #pragma pack(1)
35 | #endif
36 |
37 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/port/STM32F4x7/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/port/STM32F4x7/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/port/STM32F4x7/arch/epstruct.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2003 Swedish Institute of Computer Science.
3 | * All rights reserved.
4 | *
5 | * Redistribution and use in source and binary forms, with or without modification,
6 | * are permitted provided that the following conditions are met:
7 | *
8 | * 1. Redistributions of source code must retain the above copyright notice,
9 | * this list of conditions and the following disclaimer.
10 | * 2. Redistributions in binary form must reproduce the above copyright notice,
11 | * this list of conditions and the following disclaimer in the documentation
12 | * and/or other materials provided with the distribution.
13 | * 3. The name of the author may not be used to endorse or promote products
14 | * derived from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
19 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
21 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
25 | * OF SUCH DAMAGE.
26 | *
27 | * This file is part of the lwIP TCP/IP stack.
28 | *
29 | * Author: Adam Dunkels
30 | *
31 | */
32 |
33 | #if defined(__IAR_SYSTEMS_ICC__)
34 | #pragma pack()
35 | #endif
36 |
37 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/port/STM32F4x7/arch/ethernetif.h:
--------------------------------------------------------------------------------
1 | #ifndef __ETHERNETIF_H__
2 | #define __ETHERNETIF_H__
3 |
4 | #include
5 | #include "lwip/err.h"
6 | #include "lwip/netif.h"
7 |
8 | struct ptptime_t {
9 | s32_t tv_sec;
10 | s32_t tv_nsec;
11 | };
12 |
13 | err_t ethernetif_init(struct netif *netif);
14 |
15 | #if LWIP_PTP
16 | void ETH_PTPTime_SetTime(struct ptptime_t * timestamp);
17 | void ETH_PTPTime_GetTime(struct ptptime_t * timestamp);
18 | void ETH_PTPTime_UpdateOffset(struct ptptime_t * timeoffset);
19 | void ETH_PTPTime_AdjFreq(int32_t Adj);
20 |
21 | /* Examples of subsecond increment and addend values using SysClk = 144 MHz
22 |
23 | Addend * Increment = 2^63 / SysClk
24 |
25 | ptp_tick = Increment * 10^9 / 2^31
26 |
27 | +-----------+-----------+------------+
28 | | ptp tick | Increment | Addend |
29 | +-----------+-----------+------------+
30 | | 119 ns | 255 | 0x0EF8B863 |
31 | | 100 ns | 215 | 0x11C1C8D5 |
32 | | 50 ns | 107 | 0x23AE0D90 |
33 | | 20 ns | 43 | 0x58C8EC2B |
34 | | 14 ns | 30 | 0x7F421F4F |
35 | +-----------+-----------+------------+
36 | */
37 |
38 | /* Examples of subsecond increment and addend values using SysClk = 168 MHz
39 |
40 | Addend * Increment = 2^63 / SysClk
41 |
42 | ptp_tick = Increment * 10^9 / 2^31
43 |
44 | +-----------+-----------+------------+
45 | | ptp tick | Increment | Addend |
46 | +-----------+-----------+------------+
47 | | 119 ns | 255 | 0x0CD53055 |
48 | | 100 ns | 215 | 0x0F386300 |
49 | | 50 ns | 107 | 0x1E953032 |
50 | | 20 ns | 43 | 0x4C19EF00 |
51 | | 14 ns | 30 | 0x6D141AD6 |
52 | +-----------+-----------+------------+
53 | */
54 |
55 | #define ADJ_FREQ_BASE_ADDEND 0x58C8EC2B
56 | #define ADJ_FREQ_BASE_INCREMENT 43
57 |
58 | #endif
59 |
60 | #endif
61 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/port/STM32F4x7/arch/init.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_INIT_H__
33 | #define __ARCH_INIT_H__
34 |
35 | #define TCPIP_INIT_DONE(arg) tcpip_init_done(arg)
36 |
37 | void tcpip_init_done(void *);
38 | int wait_for_tcpip_init(void);
39 |
40 | #endif /* __ARCH_INIT_H__ */
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/port/STM32F4x7/arch/lib.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 __LIB_H__
33 | #define __LIB_H__
34 |
35 | #include
36 |
37 |
38 | #endif /* __LIB_H__ */
39 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/port/STM32F4x7/arch/perf.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 __PERF_H__
33 | #define __PERF_H__
34 |
35 | #define PERF_START /* null definition */
36 | #define PERF_STOP(x) /* null definition */
37 |
38 | #endif /* __PERF_H__ */
39 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/port/STM32F4x7/arch/sys_arch.h:
--------------------------------------------------------------------------------
1 | /* Copyright (C) 2012 mbed.org, MIT License
2 | *
3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | * and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | * including without limitation the rights to use, copy, modify, merge, publish, distribute,
6 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
7 | * furnished to do so, subject to the following conditions:
8 | *
9 | * The above copyright notice and this permission notice shall be included in all copies or
10 | * substantial portions of the Software.
11 | *
12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
13 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
14 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
15 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17 | */
18 | #ifndef __SYS_RTXC_H__
19 | #define __SYS_RTXC_H__
20 |
21 | #include "lwip/opt.h"
22 | #include "cmsis_os.h"
23 |
24 | // === SEMAPHORE ===
25 | typedef struct
26 | {
27 | osSemaphoreId id;
28 | osSemaphoreDef_t def;
29 | #ifdef __CMSIS_RTOS
30 | uint32_t data[2];
31 | #endif
32 | } sys_sem_t;
33 |
34 | #define sys_sem_valid(x) (((*x).id == NULL) ? 0 : 1)
35 | #define sys_sem_set_invalid(x) ( (*x).id = NULL)
36 |
37 | // === TIMER ===
38 | typedef struct
39 | {
40 | osTimerId id;
41 | osTimerDef_t def;
42 | #ifdef __CMSIS_RTOS
43 | int32_t data[5];
44 | #endif
45 | } sys_timer_t;
46 |
47 | // === MUTEX ===
48 | typedef struct
49 | {
50 | osMutexId id;
51 | osMutexDef_t def;
52 | #ifdef __CMSIS_RTOS
53 | int32_t data[4];
54 | #endif
55 | } sys_mutex_t;
56 |
57 | // === MAIL BOX ===
58 | #define MB_SIZE 16
59 |
60 | typedef struct
61 | {
62 | osMessageQId id;
63 | osMessageQDef_t def;
64 | #ifdef __CMSIS_RTOS
65 | uint32_t queue[4+MB_SIZE];
66 | #endif
67 | } sys_mbox_t;
68 |
69 | #define SYS_MBOX_NULL ((uint32_t) NULL)
70 | #define sys_mbox_valid(x) (((*x).id == NULL) ? 0 : 1 )
71 | #define sys_mbox_set_invalid(x) ( (*x).id = NULL )
72 |
73 | #if ((DEFAULT_RAW_RECVMBOX_SIZE) > (MB_SIZE)) || \
74 | ((DEFAULT_UDP_RECVMBOX_SIZE) > (MB_SIZE)) || \
75 | ((DEFAULT_TCP_RECVMBOX_SIZE) > (MB_SIZE)) || \
76 | ((DEFAULT_ACCEPTMBOX_SIZE) > (MB_SIZE)) || \
77 | ((TCPIP_MBOX_SIZE) > (MB_SIZE))
78 | # error Mailbox size not supported
79 | #endif
80 |
81 | // === THREAD ===
82 | typedef struct
83 | {
84 | osThreadId id;
85 | osThreadDef_t def;
86 | } sys_thread_data_t;
87 | typedef sys_thread_data_t* sys_thread_t;
88 |
89 | #define SYS_THREAD_POOL_N 6
90 | #define SYS_DEFAULT_THREAD_STACK_DEPTH DEFAULT_STACK_SIZE
91 |
92 | // === PROTECTION ===
93 | typedef int sys_prot_t;
94 |
95 | #endif /* __SYS_RTXC_H__ */
96 |
97 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/src/core/ipv6/README:
--------------------------------------------------------------------------------
1 | IPv6 support in lwIP is very experimental.
2 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/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.
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/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 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/test/unit/core/test_mem.c:
--------------------------------------------------------------------------------
1 | #include "test_mem.h"
2 |
3 | #include "lwip/mem.h"
4 | #include "lwip/stats.h"
5 |
6 | #if !LWIP_STATS || !MEM_STATS
7 | #error "This tests needs MEM-statistics enabled"
8 | #endif
9 | #if LWIP_DNS
10 | #error "This test needs DNS turned off (as it mallocs on init)"
11 | #endif
12 |
13 | /* Setups/teardown functions */
14 |
15 | static void
16 | mem_setup(void)
17 | {
18 | }
19 |
20 | static void
21 | mem_teardown(void)
22 | {
23 | }
24 |
25 |
26 | /* Test functions */
27 |
28 | /** Call mem_malloc, mem_free and mem_trim and check stats */
29 | START_TEST(test_mem_one)
30 | {
31 | #define SIZE1 16
32 | #define SIZE1_2 12
33 | #define SIZE2 16
34 | void *p1, *p2;
35 | mem_size_t s1, s2;
36 | LWIP_UNUSED_ARG(_i);
37 |
38 | #if LWIP_DNS
39 | fail("This test needs DNS turned off (as it mallocs on init)");
40 | #endif
41 |
42 | fail_unless(lwip_stats.mem.used == 0);
43 |
44 | p1 = mem_malloc(SIZE1);
45 | fail_unless(p1 != NULL);
46 | fail_unless(lwip_stats.mem.used >= SIZE1);
47 | s1 = lwip_stats.mem.used;
48 |
49 | p2 = mem_malloc(SIZE2);
50 | fail_unless(p2 != NULL);
51 | fail_unless(lwip_stats.mem.used >= SIZE2 + s1);
52 | s2 = lwip_stats.mem.used;
53 |
54 | mem_trim(p1, SIZE1_2);
55 |
56 | mem_free(p2);
57 | fail_unless(lwip_stats.mem.used <= s2 - SIZE2);
58 |
59 | mem_free(p1);
60 | fail_unless(lwip_stats.mem.used == 0);
61 | }
62 | END_TEST
63 |
64 |
65 | /** Create the suite including all tests for this module */
66 | Suite *
67 | mem_suite(void)
68 | {
69 | TFun tests[] = {
70 | test_mem_one
71 | };
72 | return create_suite("MEM", tests, sizeof(tests)/sizeof(TFun), mem_setup, mem_teardown);
73 | }
74 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/test/unit/core/test_mem.h:
--------------------------------------------------------------------------------
1 | #ifndef __TEST_MEM_H__
2 | #define __TEST_MEM_H__
3 |
4 | #include "../lwip_check.h"
5 |
6 | Suite *mem_suite(void);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/test/unit/etharp/test_etharp.h:
--------------------------------------------------------------------------------
1 | #ifndef __TEST_ETHARP_H__
2 | #define __TEST_ETHARP_H__
3 |
4 | #include "../lwip_check.h"
5 |
6 | Suite* etharp_suite(void);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/test/unit/lwip_check.h:
--------------------------------------------------------------------------------
1 | #ifndef __LWIP_CHECK_H__
2 | #define __LWIP_CHECK_H__
3 |
4 | /* Common header file for lwIP unit tests using the check framework */
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | #define FAIL_RET() do { fail(); return; } while(0)
11 | #define EXPECT(x) fail_unless(x)
12 | #define EXPECT_RET(x) do { fail_unless(x); if(!(x)) { return; }} while(0)
13 | #define EXPECT_RETX(x, y) do { fail_unless(x); if(!(x)) { return y; }} while(0)
14 | #define EXPECT_RETNULL(x) EXPECT_RETX(x, NULL)
15 |
16 | /** typedef for a function returning a test suite */
17 | typedef Suite* (suite_getter_fn)(void);
18 |
19 | /** Create a test suite */
20 | static Suite* create_suite(const char* name, TFun *tests, size_t num_tests, SFun setup, SFun teardown)
21 | {
22 | size_t i;
23 | Suite *s = suite_create(name);
24 |
25 | for(i = 0; i < num_tests; i++) {
26 | /* Core test case */
27 | TCase *tc_core = tcase_create("Core");
28 | if ((setup != NULL) || (teardown != NULL)) {
29 | tcase_add_checked_fixture(tc_core, setup, teardown);
30 | }
31 | tcase_add_test(tc_core, tests[i]);
32 | suite_add_tcase(s, tc_core);
33 | }
34 | return s;
35 | }
36 |
37 | #endif /* __LWIP_CHECK_H__ */
38 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/test/unit/lwip_unittests.c:
--------------------------------------------------------------------------------
1 | #include "lwip_check.h"
2 |
3 | #include "udp/test_udp.h"
4 | #include "tcp/test_tcp.h"
5 | #include "tcp/test_tcp_oos.h"
6 | #include "core/test_mem.h"
7 | #include "etharp/test_etharp.h"
8 |
9 | #include "lwip/init.h"
10 |
11 |
12 | int main()
13 | {
14 | int number_failed;
15 | SRunner *sr;
16 | size_t i;
17 | suite_getter_fn* suites[] = {
18 | udp_suite,
19 | tcp_suite,
20 | tcp_oos_suite,
21 | mem_suite,
22 | etharp_suite
23 | };
24 | size_t num = sizeof(suites)/sizeof(void*);
25 | LWIP_ASSERT("No suites defined", num > 0);
26 |
27 | lwip_init();
28 |
29 | sr = srunner_create((suites[0])());
30 | for(i = 1; i < num; i++) {
31 | srunner_add_suite(sr, ((suite_getter_fn*)suites[i])());
32 | }
33 |
34 | #ifdef LWIP_UNITTESTS_NOFORK
35 | srunner_set_fork_status(sr, CK_NOFORK);
36 | #endif
37 | #ifdef LWIP_UNITTESTS_FORK
38 | srunner_set_fork_status(sr, CK_FORK);
39 | #endif
40 |
41 | srunner_run_all(sr, CK_NORMAL);
42 | number_failed = srunner_ntests_failed(sr);
43 | srunner_free(sr);
44 | return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
45 | }
46 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/test/unit/lwipopts.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: Simon Goldschmidt
30 | *
31 | */
32 | #ifndef __LWIPOPTS_H__
33 | #define __LWIPOPTS_H__
34 |
35 | /* Prevent having to link sys_arch.c (we don't test the API layers in unit tests) */
36 | #define NO_SYS 1
37 | #define LWIP_NETCONN 0
38 | #define LWIP_SOCKET 0
39 |
40 | /* Minimal changes to opt.h required for tcp unit tests: */
41 | #define MEM_SIZE 16000
42 | #define TCP_SND_QUEUELEN 40
43 | #define MEMP_NUM_TCP_SEG TCP_SND_QUEUELEN
44 | #define TCP_SND_BUF (12 * TCP_MSS)
45 | #define TCP_WND (10 * TCP_MSS)
46 |
47 | /* Minimal changes to opt.h required for etharp unit tests: */
48 | #define ETHARP_SUPPORT_STATIC_ENTRIES 1
49 |
50 | #endif /* __LWIPOPTS_H__ */
51 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/test/unit/tcp/tcp_helper.h:
--------------------------------------------------------------------------------
1 | #ifndef __TCP_HELPER_H__
2 | #define __TCP_HELPER_H__
3 |
4 | #include "../lwip_check.h"
5 | #include "lwip/arch.h"
6 | #include "lwip/tcp.h"
7 | #include "lwip/netif.h"
8 |
9 | /* counters used for test_tcp_counters_* callback functions */
10 | struct test_tcp_counters {
11 | u32_t recv_calls;
12 | u32_t recved_bytes;
13 | u32_t recv_calls_after_close;
14 | u32_t recved_bytes_after_close;
15 | u32_t close_calls;
16 | u32_t err_calls;
17 | err_t last_err;
18 | char* expected_data;
19 | u32_t expected_data_len;
20 | };
21 |
22 | struct test_tcp_txcounters {
23 | u32_t num_tx_calls;
24 | u32_t num_tx_bytes;
25 | u8_t copy_tx_packets;
26 | struct pbuf *tx_packets;
27 | };
28 |
29 | /* Helper functions */
30 | void tcp_remove_all(void);
31 |
32 | struct pbuf* tcp_create_segment(ip_addr_t* src_ip, ip_addr_t* dst_ip,
33 | u16_t src_port, u16_t dst_port, void* data, size_t data_len,
34 | u32_t seqno, u32_t ackno, u8_t headerflags);
35 | struct pbuf* tcp_create_rx_segment(struct tcp_pcb* pcb, void* data, size_t data_len,
36 | u32_t seqno_offset, u32_t ackno_offset, u8_t headerflags);
37 | struct pbuf* tcp_create_rx_segment_wnd(struct tcp_pcb* pcb, void* data, size_t data_len,
38 | u32_t seqno_offset, u32_t ackno_offset, u8_t headerflags, u16_t wnd);
39 | void tcp_set_state(struct tcp_pcb* pcb, enum tcp_state state, ip_addr_t* local_ip,
40 | ip_addr_t* remote_ip, u16_t local_port, u16_t remote_port);
41 | void test_tcp_counters_err(void* arg, err_t err);
42 | err_t test_tcp_counters_recv(void* arg, struct tcp_pcb* pcb, struct pbuf* p, err_t err);
43 |
44 | struct tcp_pcb* test_tcp_new_counters_pcb(struct test_tcp_counters* counters);
45 |
46 | void test_tcp_input(struct pbuf *p, struct netif *inp);
47 |
48 | void test_tcp_init_netif(struct netif *netif, struct test_tcp_txcounters *txcounters,
49 | ip_addr_t *ip_addr, ip_addr_t *netmask);
50 |
51 |
52 | #endif
53 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/test/unit/tcp/test_tcp.h:
--------------------------------------------------------------------------------
1 | #ifndef __TEST_TCP_H__
2 | #define __TEST_TCP_H__
3 |
4 | #include "../lwip_check.h"
5 |
6 | Suite *tcp_suite(void);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/test/unit/tcp/test_tcp_oos.h:
--------------------------------------------------------------------------------
1 | #ifndef __TEST_TCP_OOS_H__
2 | #define __TEST_TCP_OOS_H__
3 |
4 | #include "../lwip_check.h"
5 |
6 | Suite *tcp_oos_suite(void);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/test/unit/udp/test_udp.c:
--------------------------------------------------------------------------------
1 | #include "test_udp.h"
2 |
3 | #include "lwip/udp.h"
4 | #include "lwip/stats.h"
5 |
6 | #if !LWIP_STATS || !UDP_STATS || !MEMP_STATS
7 | #error "This tests needs UDP- and MEMP-statistics enabled"
8 | #endif
9 |
10 | /* Helper functions */
11 | static void
12 | udp_remove_all(void)
13 | {
14 | struct udp_pcb *pcb = udp_pcbs;
15 | struct udp_pcb *pcb2;
16 |
17 | while(pcb != NULL) {
18 | pcb2 = pcb;
19 | pcb = pcb->next;
20 | udp_remove(pcb2);
21 | }
22 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 0);
23 | }
24 |
25 | /* Setups/teardown functions */
26 |
27 | static void
28 | udp_setup(void)
29 | {
30 | udp_remove_all();
31 | }
32 |
33 | static void
34 | udp_teardown(void)
35 | {
36 | udp_remove_all();
37 | }
38 |
39 |
40 | /* Test functions */
41 |
42 | START_TEST(test_udp_new_remove)
43 | {
44 | struct udp_pcb* pcb;
45 | LWIP_UNUSED_ARG(_i);
46 |
47 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 0);
48 |
49 | pcb = udp_new();
50 | fail_unless(pcb != NULL);
51 | if (pcb != NULL) {
52 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 1);
53 | udp_remove(pcb);
54 | fail_unless(lwip_stats.memp[MEMP_UDP_PCB].used == 0);
55 | }
56 | }
57 | END_TEST
58 |
59 |
60 | /** Create the suite including all tests for this module */
61 | Suite *
62 | udp_suite(void)
63 | {
64 | TFun tests[] = {
65 | test_udp_new_remove,
66 | };
67 | return create_suite("UDP", tests, sizeof(tests)/sizeof(TFun), udp_setup, udp_teardown);
68 | }
69 |
--------------------------------------------------------------------------------
/libraries/lwip-1.4.1/test/unit/udp/test_udp.h:
--------------------------------------------------------------------------------
1 | #ifndef __TEST_UDP_H__
2 | #define __TEST_UDP_H__
3 |
4 | #include "../lwip_check.h"
5 |
6 | Suite* udp_suite(void);
7 |
8 | #endif
9 |
--------------------------------------------------------------------------------
/libraries/ptpd-2.0.0/COPYRIGHT:
--------------------------------------------------------------------------------
1 | The following copyright notice applies to all files which compose the
2 | PTPd. This notice applies as if the text was explicitly included each
3 | file.
4 |
5 | Copyright (c) 2005-2008 Kendall Correll, Aidan Williams
6 | Copyright (c) 2009-2010 Gael Mace, Alexandre Van Kempen
7 | Copyright (c) 2010-2011 Jan Breuer
8 |
9 |
10 | Permission to use, copy, modify, and/or distribute this software for any
11 | purpose with or without fee is hereby granted, provided that the above
12 | copyright notice and this permission notice appear in all copies.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
15 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 |
--------------------------------------------------------------------------------
/libraries/ptpd-2.0.0/README:
--------------------------------------------------------------------------------
1 | README for PTPd
2 |
3 |
4 | - Introduction -
5 |
6 | This is the source code for the PTP daemon (PTPd) implementing the
7 | Precision Time Protocol (PTP) version 2 as defined by 'IEEE Std 1588-2008'. PTP
8 | provides precise time coordination of Ethernet LAN connected computers. It
9 | was designed primarily for instrumentation and control systems.
10 |
11 |
12 | - Use -
13 |
14 | PTPd can coordinate the clocks of a group of LAN connected computers with each
15 | other. It has been shown to achieve microsecond level coordination, even on
16 | limited platforms.
17 |
18 | The 'ptpd' program can be built from the included source code; see the release
19 | notes about platform compatibility. To use the program, run 'ptpd' on a group of
20 | LAN connected computers. Compile with 'PTPD_DBG' defined and run with the '-c'
21 | argument to watch what's going on.
22 |
23 | If you are just looking for software to update the time on your desktop, you
24 | probably want something that implements the Network Time Protocol. It can
25 | coordinate computer clocks with an absolute time reference such as UTC.
26 |
27 |
28 | - Legal notice -
29 |
30 | PTPd was written by using only information contained within 'IEEE Std
31 | 1588-2008'. IEEE 1588 may contain patented technology, the use of which is not
32 | under the control of the authors of PTPd. Users of IEEE 1588 may need to obtain
33 | a license for the patented technology in the protocol. Contact the IEEE for
34 | licensing information.
35 |
36 | PTPd comes with absolutely no warranty.
37 |
38 |
--------------------------------------------------------------------------------
/libraries/ptpd-2.0.0/RELEASE_NOTES:
--------------------------------------------------------------------------------
1 | RELEASE_NOTES for PTPd V2 ()
2 |
3 | v2rc1, January 2010:
4 |
5 | This is the first public source code release of PTPd implementing PTP v2 as
6 | defined by 'IEEE Std 1588-2008'.
7 | The source has been derivated from ptpd v1.0.0, compiled with gcc and tested
8 | on x86 platforms connected on an Ethernet infrastructure using a Hirschman 1588v2
9 | compliant Ethernet switch configured in Transparent Clock mode.
10 | (http://www.hirschmann.com/en/).
11 |
12 | This implementation supports both E2E and P2P mode with an ordinary clock on
13 | master/slave end-points.
14 | It support the 802.1 AS profile (http://www.ieee802.org/1/pages/802.1as.html)
15 |
16 | Please, have a look on the short comparison document 'IEEE1588v1_vs_IEEE1588v2.pdf'
17 | in the 'Doc' subdirectory, for a overview of the main differences between the two
18 | versions of the IEEE1588 standard and the impact on the implementation.
19 |
20 | - Alexandre & Gael
--------------------------------------------------------------------------------
/libraries/ptpd-2.0.0/doc/IEEE1588v1_vs_IEEE1588v2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mpthompson/stm32_f4_ptpd/1dacab14ffd712fe5a65a26d3f7946ea8d49c4a1/libraries/ptpd-2.0.0/doc/IEEE1588v1_vs_IEEE1588v2.pdf
--------------------------------------------------------------------------------
/libraries/ptpd-2.0.0/src/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile for ptpd
2 |
3 | RM = rm -f
4 | CFLAGS = -Wall
5 | #CPPFLAGS = -DPTPD_DBG -DPTPD_NO_DAEMON
6 | LDFLAGS = -lm
7 |
8 | PROG = ptpv2d
9 | #OBJ = ptpd.o arith.o bmc.o probe.o protocol.o \
10 | dep/msg.o dep/net.o dep/servo.o dep/startup.o dep/sys.o dep/timer.o
11 | OBJ = ptpd.o arith.o bmc.o protocol.o display.o\
12 | dep/msg.o dep/net.o dep/servo.o dep/startup.o dep/sys.o dep/timer.o
13 | HDR = ptpd.h constants.h datatypes.h \
14 | dep/ptpd_dep.h dep/constants_dep.h dep/datatypes_dep.h
15 |
16 |
17 | .c.o:
18 | $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
19 |
20 | all: $(PROG)
21 |
22 | $(PROG): $(OBJ)
23 | $(CC) $(LDFLAGS) -o $@ $(OBJ)
24 |
25 | $(OBJ): $(HDR)
26 |
27 | clean:
28 | $(RM) $(PROG) $(OBJ)
29 |
--------------------------------------------------------------------------------
/libraries/ptpd-2.0.0/src/dep/constants_dep.h:
--------------------------------------------------------------------------------
1 |
2 | /* constants_dep.h */
3 |
4 | #ifndef CONSTANTS_DEP_H
5 | #define CONSTANTS_DEP_H
6 |
7 | /**
8 | *\file
9 | * \brief Plateform-dependent constants definition
10 | *
11 | * This header defines all includes and constants which are plateform-dependent
12 | *
13 | */
14 |
15 | /* platform dependent */
16 |
17 | #define IF_NAMESIZE 2
18 | #define INET_ADDRSTRLEN 16
19 |
20 | #ifndef TRUE
21 | #define TRUE true
22 | #endif
23 |
24 | #ifndef FALSE
25 | #define FALSE false
26 | #endif
27 |
28 | #ifndef stdout
29 | #define stdout 1
30 | #endif
31 |
32 | #define IFACE_NAME_LENGTH IF_NAMESIZE
33 | #define NET_ADDRESS_LENGTH INET_ADDRSTRLEN
34 |
35 | #define IFCONF_LENGTH 10
36 |
37 | #if BYTE_ORDER == LITTLE_ENDIAN
38 | #define PTPD_LSBF
39 | #elif BYTE_ORDER == BIG_ENDIAN
40 | #define PTPD_MSBF
41 | #endif
42 |
43 | /* pow2ms(a) = round(pow(2,a)*1000) */
44 |
45 | #define pow2ms(a) (((a)>0) ? (1000 << (a)) : (1000 >>(-(a))))
46 |
47 | #define ADJ_FREQ_MAX 512000
48 |
49 | /* UDP/IPv4 dependent */
50 |
51 | #define SUBDOMAIN_ADDRESS_LENGTH 4
52 | #define PORT_ADDRESS_LENGTH 2
53 | #define PTP_UUID_LENGTH NETIF_MAX_HWADDR_LEN
54 | #define CLOCK_IDENTITY_LENGTH 8
55 | #define FLAG_FIELD_LENGTH 2
56 |
57 | #define PACKET_SIZE 300 /* ptpdv1 value kept because of use of TLV... */
58 |
59 | #define PTP_EVENT_PORT 319
60 | #define PTP_GENERAL_PORT 320
61 |
62 | #define DEFAULT_PTP_DOMAIN_ADDRESS "224.0.1.129"
63 | #define PEER_PTP_DOMAIN_ADDRESS "224.0.0.107"
64 |
65 | #define MM_STARTING_BOUNDARY_HOPS 0x7fff
66 |
67 | /* Must be a power of 2 */
68 | #define PBUF_QUEUE_SIZE 4
69 | #define PBUF_QUEUE_MASK (PBUF_QUEUE_SIZE - 1)
70 |
71 | /* others */
72 |
73 | #define SCREEN_BUFSZ 128
74 | #define SCREEN_MAXSZ 80
75 |
76 | #endif /* CONSTANTS_DEP_H_*/
77 |
78 |
--------------------------------------------------------------------------------
/libraries/ptpd-2.0.0/src/dep/datatypes_dep.h:
--------------------------------------------------------------------------------
1 | #ifndef DATATYPES_DEP_H_
2 | #define DATATYPES_DEP_H_
3 |
4 | // Implementation specific datatypes
5 |
6 | // 4-bit enumeration
7 | typedef unsigned char enum4bit_t;
8 |
9 | // 8-bit enumeration
10 | typedef unsigned char enum8bit_t;
11 |
12 | // 16-bit enumeration
13 | typedef unsigned short enum16bit_t;
14 |
15 | // 4-bit unsigned integer
16 | typedef unsigned char uint4bit_t;
17 |
18 | // 48-bit unsigned integer
19 | typedef struct
20 | {
21 | unsigned int lsb;
22 | unsigned short msb;
23 | } uint48bit_t;
24 |
25 | // 4-bit data without numerical representation
26 | typedef unsigned char nibble_t;
27 |
28 | // 8-bit data without numerical representation
29 | typedef char octet_t;
30 |
31 | // Struct used to average the offset from master and the one way delay
32 | //
33 | // Exponencial smoothing
34 | //
35 | // alpha = 1/2^s
36 | // y[1] = x[0]
37 | // y[n] = alpha * x[n-1] + (1-alpha) * y[n-1]
38 | //
39 | typedef struct
40 | {
41 | int32_t y_prev;
42 | int32_t y_sum;
43 | int16_t s;
44 | int16_t s_prev;
45 | int32_t n;
46 | } Filter;
47 |
48 | // Network buffer queue
49 | typedef struct
50 | {
51 | void *pbuf[PBUF_QUEUE_SIZE];
52 | int16_t head;
53 | int16_t tail;
54 | sys_mutex_t mutex;
55 | } BufQueue;
56 |
57 | // Struct used to store network datas
58 | typedef struct
59 | {
60 | int32_t multicastAddr;
61 | int32_t peerMulticastAddr;
62 | int32_t unicastAddr;
63 |
64 | struct udp_pcb *eventPcb;
65 | struct udp_pcb *generalPcb;
66 |
67 | BufQueue eventQ;
68 | BufQueue generalQ;
69 | } NetPath;
70 |
71 | // Define compiler specific symbols
72 | #if defined ( __CC_ARM )
73 | typedef long ssize_t;
74 | #elif defined ( __ICCARM__ )
75 | typedef long ssize_t;
76 | #elif defined ( __GNUC__ )
77 |
78 | #elif defined ( __TASKING__ )
79 | typedef long ssize_t;
80 | #endif
81 |
82 | #endif /* DATATYPES_DEP_H_*/
83 |
--------------------------------------------------------------------------------
/libraries/ptpd-2.0.0/src/dep/startup.c:
--------------------------------------------------------------------------------
1 | /* startup.c */
2 |
3 | #include "../ptpd.h"
4 |
5 | void ptpdShutdown(PtpClock *ptpClock)
6 | {
7 | netShutdown(&ptpClock->netPath);
8 | }
9 |
10 | int16_t ptpdStartup(PtpClock * ptpClock, RunTimeOpts *rtOpts, ForeignMasterRecord* foreign)
11 | {
12 | ptpClock->rtOpts = rtOpts;
13 | ptpClock->foreignMasterDS.records = foreign;
14 |
15 | /* 9.2.2 */
16 | if (rtOpts->slaveOnly) rtOpts->clockQuality.clockClass = DEFAULT_CLOCK_CLASS_SLAVE_ONLY;
17 |
18 | /* No negative or zero attenuation */
19 | if (rtOpts->servo.ap < 1) rtOpts->servo.ap = 1;
20 | if (rtOpts->servo.ai < 1) rtOpts->servo.ai = 1;
21 |
22 | DBG("event POWER UP\n");
23 |
24 | toState(ptpClock, PTP_INITIALIZING);
25 |
26 | return 0;
27 | }
28 |
--------------------------------------------------------------------------------
/libraries/ptpd-2.0.0/src/dep/timer.c:
--------------------------------------------------------------------------------
1 | /* timer.c */
2 |
3 | #include "../ptpd.h"
4 |
5 | /* An array to hold the various system timer handles. */
6 | static sys_timer_t ptpdTimers[TIMER_ARRAY_SIZE];
7 | static bool ptpdTimersExpired[TIMER_ARRAY_SIZE];
8 |
9 | static void timerCallback(void const *arg)
10 | {
11 | int index = (int) arg;
12 |
13 | // Sanity check the index.
14 | if (index < TIMER_ARRAY_SIZE)
15 | {
16 | /* Mark the indicated timer as expired. */
17 | ptpdTimersExpired[index] = TRUE;
18 |
19 | /* Notify the PTP thread of a pending operation. */
20 | ptpd_alert();
21 | }
22 | }
23 |
24 | void initTimer(void)
25 | {
26 | int32_t i;
27 |
28 | DBG("initTimer\n");
29 |
30 | /* Create the various timers used in the system. */
31 | for (i = 0; i < TIMER_ARRAY_SIZE; i++)
32 | {
33 | // Mark the timer as not expired.
34 | // Initialize the timer.
35 | sys_timer_new(&ptpdTimers[i], timerCallback, osTimerOnce, (void *) i);
36 | ptpdTimersExpired[i] = FALSE;
37 | }
38 | }
39 |
40 | void timerStop(int32_t index)
41 | {
42 | /* Sanity check the index. */
43 | if (index >= TIMER_ARRAY_SIZE) return;
44 |
45 | // Cancel the timer and reset the expired flag.
46 | DBGV("timerStop: stop timer %d\n", index);
47 | sys_timer_stop(&ptpdTimers[index]);
48 | ptpdTimersExpired[index] = FALSE;
49 | }
50 |
51 | void timerStart(int32_t index, uint32_t interval_ms)
52 | {
53 | /* Sanity check the index. */
54 | if (index >= TIMER_ARRAY_SIZE) return;
55 |
56 | // Set the timer duration and start the timer.
57 | DBGV("timerStart: set timer %d to %d\n", index, interval_ms);
58 | ptpdTimersExpired[index] = FALSE;
59 | sys_timer_start(&ptpdTimers[index], interval_ms);
60 | }
61 |
62 | bool timerExpired(int32_t index)
63 | {
64 | /* Sanity check the index. */
65 | if (index >= TIMER_ARRAY_SIZE) return FALSE;
66 |
67 | /* Determine if the timer expired. */
68 | if (!ptpdTimersExpired[index]) return FALSE;
69 | DBGV("timerExpired: timer %d expired\n", index);
70 | ptpdTimersExpired[index] = FALSE;
71 |
72 | return TRUE;
73 | }
74 |
--------------------------------------------------------------------------------
/libraries/ptpd-2.0.0/src/ptpd.c:
--------------------------------------------------------------------------------
1 | /* ptpd.c */
2 |
3 | #include "ptpd.h"
4 |
5 | #define PTPD_THREAD_PRIO (tskIDLE_PRIORITY + 2)
6 |
7 | static sys_mbox_t ptp_alert_queue;
8 |
9 | // Statically allocated run-time configuration data.
10 | RunTimeOpts rtOpts;
11 | PtpClock ptpClock;
12 | ForeignMasterRecord ptpForeignRecords[DEFAULT_MAX_FOREIGN_RECORDS];
13 |
14 | __IO uint32_t PTPTimer = 0;
15 |
16 | static void ptpd_thread(void *arg)
17 | {
18 | // Initialize run-time options to default values.
19 | rtOpts.announceInterval = DEFAULT_ANNOUNCE_INTERVAL;
20 | rtOpts.syncInterval = DEFAULT_SYNC_INTERVAL;
21 | rtOpts.clockQuality.clockAccuracy = DEFAULT_CLOCK_ACCURACY;
22 | rtOpts.clockQuality.clockClass = DEFAULT_CLOCK_CLASS;
23 | rtOpts.clockQuality.offsetScaledLogVariance = DEFAULT_CLOCK_VARIANCE; /* 7.6.3.3 */
24 | rtOpts.priority1 = DEFAULT_PRIORITY1;
25 | rtOpts.priority2 = DEFAULT_PRIORITY2;
26 | rtOpts.domainNumber = DEFAULT_DOMAIN_NUMBER;
27 | rtOpts.slaveOnly = SLAVE_ONLY;
28 | rtOpts.currentUtcOffset = DEFAULT_UTC_OFFSET;
29 | rtOpts.servo.noResetClock = DEFAULT_NO_RESET_CLOCK;
30 | rtOpts.servo.noAdjust = NO_ADJUST;
31 | rtOpts.inboundLatency.nanoseconds = DEFAULT_INBOUND_LATENCY;
32 | rtOpts.outboundLatency.nanoseconds = DEFAULT_OUTBOUND_LATENCY;
33 | rtOpts.servo.sDelay = DEFAULT_DELAY_S;
34 | rtOpts.servo.sOffset = DEFAULT_OFFSET_S;
35 | rtOpts.servo.ap = DEFAULT_AP;
36 | rtOpts.servo.ai = DEFAULT_AI;
37 | rtOpts.maxForeignRecords = sizeof(ptpForeignRecords) / sizeof(ptpForeignRecords[0]);
38 | rtOpts.stats = PTP_TEXT_STATS;
39 | rtOpts.delayMechanism = DEFAULT_DELAY_MECHANISM;
40 |
41 | // Initialize run time options.
42 | if (ptpdStartup(&ptpClock, &rtOpts, ptpForeignRecords) != 0)
43 | {
44 | printf("PTPD: startup failed");
45 | return;
46 | }
47 |
48 | #ifdef USE_DHCP
49 | // If DHCP, wait until the default interface has an IP address.
50 | while (!netif_default->ip_addr.addr)
51 | {
52 | // Sleep for 500 milliseconds.
53 | sys_msleep(500);
54 | }
55 | #endif
56 |
57 | // Loop forever.
58 | for (;;)
59 | {
60 | void *msg;
61 |
62 | // Process the current state.
63 | do
64 | {
65 | // doState() has a switch for the actions and events to be
66 | // checked for 'port_state'. The actions and events may or may not change
67 | // 'port_state' by calling toState(), but once they are done we loop around
68 | // again and perform the actions required for the new 'port_state'.
69 | doState(&ptpClock);
70 | }
71 | while (netSelect(&ptpClock.netPath, 0) > 0);
72 |
73 | // Wait up to 100ms for something to do, then do something anyway.
74 | sys_arch_mbox_fetch(&ptp_alert_queue, &msg, 100);
75 | }
76 | }
77 |
78 | // Notify the PTP thread of a pending operation.
79 | void ptpd_alert(void)
80 | {
81 | // Send a message to the alert queue to wake up the PTP thread.
82 | sys_mbox_trypost(&ptp_alert_queue, NULL);
83 | }
84 |
85 | void ptpd_init(void)
86 | {
87 | // Create the alert queue mailbox.
88 | if (sys_mbox_new(&ptp_alert_queue, 8) != ERR_OK)
89 | {
90 | printf("PTPD: failed to create ptp_alert_queue mbox");
91 | }
92 |
93 | // Create the PTP daemon thread.
94 | sys_thread_new("PTPD", ptpd_thread, NULL, DEFAULT_THREAD_STACKSIZE * 2, osPriorityAboveNormal);
95 | }
96 |
97 |
--------------------------------------------------------------------------------
/libraries/ptpd-2.0.0/src/ptpd2.8:
--------------------------------------------------------------------------------
1 | .\" -*- nroff -*"
2 | .TH ptpd 8 "January, 2010" "version 2" "Precision Time Protocol daemon"
3 | .SH NAME
4 | ptpv2d \- Precision Time Protocol daemon (1588-2008)
5 | .SH SYNOPSIS
6 | .B ptpd2
7 | [?]
8 | [-c]
9 | [-f FILE]
10 | [-d]
11 | [-D]
12 | [-x]
13 | [-t]
14 | [-a NUMBER,NUMBER]
15 | [-w NUMBER]
16 | [-b NAME]
17 | [-u ADDRESS]
18 | [-e]
19 | [-h]
20 | [-l NUMBER,NUMBER]
21 | [-o NUMBER]
22 | [-i NUMBER]
23 | [-n NUMBER]
24 | [-y NUMBER]
25 | [-m NUMBER]
26 | [-g]
27 | [-v NUMBER]
28 | [-r NUMBER]
29 | [-s NUMBER]
30 | [-p NUMBER]
31 | [-q NUMBER]
32 |
33 | .SH DESCRIPTION
34 | Implements the Precision Time Protocol (PTP) Version 2 as defined by the IEEE
35 | 1588-2008 standard. PTP was developed to provide very precise time
36 | coordination of LAN connected computers.
37 | .PP
38 | PTPd is a complete implementation of the IEEE 1588 v2 specification for a
39 | standard (ordinary) clock. PTPd has been tested with and is known
40 | to work properly with other IEEE 1588 implementations. The source code
41 | for PTPd is freely available under a BSD-style license. Thanks to
42 | contributions from users, PTPd is becoming an increasingly portable,
43 | interoperable, and stable IEEE 1588 implementation.
44 | .PP
45 | For more information, see http://ptpd.sourceforge.net/
46 | .SH OPTIONS
47 | .TP
48 | .B \-?
49 | display a short help text
50 | .TP
51 | .B \-c
52 | run in command line (non-daemon) mode
53 | .TP
54 | .B \-f FILE
55 | send output to FILE
56 | .TP
57 | .B \-d
58 | display stats
59 | .TP
60 | .B \-D
61 | display stats in .csv format
62 | .TP
63 | .B \-x
64 | do not reset the clock if off by more than one second
65 | .TP
66 | .B \-t
67 | do not adjust the system clock
68 | .TP
69 | .B \-a NUMBER,NUMBER
70 | specify clock servo P and I attenuations
71 | .TP
72 | .B \-w NUMBER
73 | specify one way delay filter stiffness
74 | .TP
75 | .B \-b NAME
76 | bind PTP to network interface NAME
77 | .TP
78 | .B \-u ADDRESS
79 | also send uni-cast to ADDRESS
80 | .TP
81 | .B \-e
82 | run in ethernet mode (level2)
83 | .TP
84 | .B \-h
85 | run in End to End mode
86 | .TP
87 | .B \-l NUMBER,NUMBER
88 | specify inbound, outbound latency in nsec
89 | .TP
90 | .B \-o NUMBER
91 | specify current UTC offset
92 | .TP
93 | .B \-i NUMBER
94 | specify PTP domain number
95 | .TP
96 | .B \-n NUMBER
97 | specify announce interval in 2^NUMBER sec
98 | .TP
99 | .B \-y NUMBER
100 | specify sync interval in 2^NUMBER sec
101 | .TP
102 | .B \-m NUMBER
103 | specify max number of foreign master records
104 | .TP
105 | .B \-g
106 | run as slave only
107 | .TP
108 | .B \-v NUMBER
109 | specify system clock allen variance
110 | .TP
111 | .B \-r NUMBER
112 | specify system clock accuracy
113 | .TP
114 | .B \-s NUMBER
115 | specify system clock class
116 | .TP
117 | .B \-p NUMBER
118 | specify priority1 attribute
119 | .TP
120 | .B \-q NUMBER
121 | specify priority2 attribute
122 |
123 | .SH AUTHOR
124 | Gael Mace & Alexandre Van Kempen. This manual page
125 | was written by Gael Mace for any Linux environment project.
126 |
--------------------------------------------------------------------------------
/libraries/ptpd-2.0.0/tools/filter_response.m:
--------------------------------------------------------------------------------
1 | #!/usr/bin/octave -qf
2 |
3 | # the IIR filter
4 | s = 2^4;
5 | a = [ s -(s-1) ];
6 | b = [ 1/2 1/2 ];
7 |
8 | [h w] = freqz(b, a, 100000);
9 |
10 | subplot(211);
11 | plot(w/pi,abs(h),";;");
12 | axis();
13 | #plot(w/pi,20*log(abs(h)));
14 | #axis([0 1 -120 0]);
15 | #semilogx(w/pi,20*log(abs(h)),";;");
16 | #axis([1e-3 1 -120 0]);
17 | ylabel("gain");
18 |
19 | subplot(212);
20 | plot(w/pi,unwrap(angle(h)),";;");
21 | axis([0 1 -pi 0]);
22 | #semilogx(w/pi,unwrap(angle(h)),";;");
23 | #axis([1e-3 1 -pi 0]);
24 | ylabel("phase (rad)");
25 | xlabel("frequency");
26 | replot;
27 |
28 | pause;
29 |
30 |
--------------------------------------------------------------------------------
/libraries/ptpd-2.0.0/tools/offset_stats.m:
--------------------------------------------------------------------------------
1 | #!/usr/bin/octave -qf
2 |
3 | printf("start\n");
4 |
5 | load t;
6 | load tr;
7 |
8 | # time window to analyze
9 | t_beg = 1;
10 | t_fin = length(t);
11 |
12 | # parameters for synthetic reference time
13 | #start_time = round(t(t_beg));
14 | #sample_interval = 1;
15 |
16 | # parameters for histogram
17 | h_beg = -15e-6;
18 | h_fin = 15e-6;
19 | h_sz = 1e-6;
20 |
21 | # parameters for allan variance
22 | # tune for your computational power
23 | tau_beg = 1;
24 | tau_fin = length(t)/10;
25 | tau_maxsamps = 100;
26 |
27 | # ----------
28 |
29 | printf("data loaded\n");
30 |
31 | # create synthetic reference time
32 | #tr = t;
33 | #tr(t_beg) = start_time;
34 | #for k = (t_beg+1):t_fin
35 | #
36 | # tr(k) = tr(k-1) + sample_interval;
37 | #
38 | #endfor
39 |
40 | # time offset computation
41 | o = t - tr;
42 |
43 | o_min = min(o(t_beg:t_fin));
44 | o_max = max(o(t_beg:t_fin));
45 | o_mean = mean(o(t_beg:t_fin));
46 |
47 | # relative tick rate computation
48 | r = t;
49 | for k = (t_beg+1):t_fin
50 |
51 | r(k) = o(k) - o(k-1);
52 |
53 | endfor
54 |
55 | r_min = min(r((t_beg+1):t_fin));
56 | r_max = max(r((t_beg+1):t_fin));
57 | r_mean = mean(r((t_beg+1):t_fin));
58 |
59 | figure;
60 | h_bins = h_beg:h_sz:h_fin;
61 | hist( o(t_beg:t_fin), h_bins, 1);
62 |
63 | printf("histogram plotted\n");
64 |
65 | figure;
66 | subplot(211);
67 | plot( t_beg:t_fin, o(t_beg:t_fin), "r;time offset;",
68 | [t_beg t_fin], [o_min o_min], "g;;",
69 | [t_beg t_fin], [o_max o_max], "g;;",
70 | [t_beg t_fin], [o_mean o_mean], "b;;");
71 | subplot(212);
72 | plot( (t_beg+1):t_fin, r((t_beg+1):t_fin), "r;relative tick rate;",
73 | [(t_beg+1) t_fin], [r_min r_min], "g;;",
74 | [(t_beg+1) t_fin], [r_max r_max], "g;;",
75 | [(t_beg+1) t_fin], [r_mean r_mean], "b;;")
76 | replot;
77 |
78 | printf("offset plotted\n");
79 |
80 | # the allan vaiance computation from the IEEE 1588 spec
81 | a = t;
82 | for tau = tau_beg:tau_fin
83 |
84 | beg = t_beg;
85 | if (t_fin-2*tau) > tau_maxsamps
86 | fin = tau_maxsamps;
87 | else
88 | fin = (t_fin-2*tau);
89 | end
90 |
91 | a(tau) = sum((t(beg:fin) - 2*t((beg+tau):(fin+tau)) + t((beg+2*tau):(fin+2*tau))).^2);
92 | a(tau) /= 2*(fin-beg)*(tau^2);
93 |
94 | endfor
95 |
96 | figure;
97 | loglog( tau_beg:tau_fin, a(tau_beg:tau_fin), ";allan variance;");
98 | replot;
99 |
100 | printf("variance plotted\n");
101 | input("done\n");
102 |
103 |
--------------------------------------------------------------------------------